Skip to content

Commit d34187e

Browse files
committed
mock profile CRD for linting purpouse only
1 parent 89be8c2 commit d34187e

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

charts/vsphere-csi/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ vSphere Container Storage Interface (CSI) for Kamaji Tenant Clusters
6666
| driver.registrar.resources | object | `{}` | CSI driver registrar resources |
6767
| driver.registrar.tag | string | `"v2.13.0"` | CSI driver registrar image tag |
6868
| driver.resources | object | `{}` | CSI driver resources |
69+
| enableMockCRD | bool | `false` | Mock Profile CRD (only for linting purposes) |
6970
| secret | string | `"csi-config-secret"` | The name of an existing Secret for vSphere. |
7071
| storageClass.allowVolumeExpansion | bool | `true` | Allow volume expansion |
7172
| storageClass.default | bool | `true` | Configure as the default storage class |

charts/vsphere-csi/templates/csi-node-driver.manifests.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if (lookup "apiextensions.k8s.io/v1" "CustomResourceDefinition" "profiles.config.projectsveltos.io" "") }}
21
apiVersion: config.projectsveltos.io/v1beta1
32
kind: Profile
43
metadata:
@@ -32,9 +31,6 @@ spec:
3231
name: {{ include "cluster-name" . }}-csi-daemonset-node
3332
- kind: ConfigMap
3433
name: {{ include "cluster-name" . }}-csi-storageclass
35-
{{- else }}
36-
{{- fail "The required CRD 'profiles.config.projectsveltos.io' is not installed in the cluster. Aborting installation." }}
37-
{{- end }}
3834
---
3935
apiVersion: v1
4036
data:
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# templates/mock-crd.yaml
2+
{{- if .Values.enableMockCRD }}
3+
apiVersion: apiextensions.k8s.io/v1
4+
kind: CustomResourceDefinition
5+
metadata:
6+
name: profiles.config.projectsveltos.io
7+
spec:
8+
group: config.projectsveltos.io
9+
names:
10+
kind: Profile
11+
listKind: ProfileList
12+
plural: profiles
13+
singular: profile
14+
scope: Namespaced
15+
versions:
16+
- name: v1beta1
17+
served: true
18+
storage: true
19+
{{- end }}

charts/vsphere-csi/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,5 @@ storageClass:
127127
parameters: {}
128128
# storagepolicyname: DATASTORE_POLICY_NAME
129129

130+
# -- Mock Profile CRD (only for linting purposes)
131+
enableMockCRD: false

0 commit comments

Comments
 (0)