Skip to content

Commit dcdfe98

Browse files
authored
Aws fsxn auto backend config changes (#1718)
1 parent c7eb0d0 commit dcdfe98

File tree

14 files changed

+847
-90
lines changed

14 files changed

+847
-90
lines changed

helm/trident-operator/templates/tridentconfigurator.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,79 @@ spec:
3333
{{- end }}
3434
{{- end }}
3535

36+
---
37+
38+
{{- if .Values.ontapConfigurator.enabled }}
39+
{{- $includeCR := false }}
40+
{{- range .Values.ontapConfigurator.svms }}
41+
{{- if or (has "nfs" .protocols) (has "smb" .protocols) }}
42+
{{- $includeCR = true }}
43+
{{- end }}
44+
{{- end }}
45+
46+
{{- if $includeCR }}
47+
apiVersion: trident.netapp.io/v1
48+
kind: TridentConfigurator
49+
metadata:
50+
name: netapp-nas-backend-configurator
51+
spec:
52+
storageDriverName: ontap-nas
53+
svms:
54+
{{- range .Values.ontapConfigurator.svms }}
55+
{{- if or (has "nfs" .protocols) (has "smb" .protocols) }}
56+
- fsxnID: {{ .fsxnID | quote }}
57+
protocols:
58+
{{- $filteredProtocols := list }}
59+
{{- range .protocols }}
60+
{{- if or (eq . "nfs") (eq . "smb") }}
61+
{{- $filteredProtocols = append $filteredProtocols . }}
62+
{{- end }}
63+
{{- end }}
64+
{{- range $filteredProtocols }}
65+
- {{ . | quote }}
66+
{{- end }}
67+
svmName: {{ .svmName | quote }}
68+
authType: {{ .authType | default "awsarn" | quote }}
69+
{{- end }}
70+
{{- end }}
71+
{{- end }}
72+
{{- end }}
73+
74+
75+
---
76+
77+
{{- if .Values.ontapConfigurator.enabled }}
78+
{{- $includeCR := false }}
79+
{{- range .Values.ontapConfigurator.svms }}
80+
{{- if or (has "iscsi" .protocols) (has "nvme" .protocols) }}
81+
{{- $includeCR = true }}
82+
{{- end }}
83+
{{- end }}
84+
85+
{{- if $includeCR }}
86+
apiVersion: trident.netapp.io/v1
87+
kind: TridentConfigurator
88+
metadata:
89+
name: netapp-san-backend-configurator
90+
spec:
91+
storageDriverName: ontap-san
92+
svms:
93+
{{- range .Values.ontapConfigurator.svms }}
94+
{{- if or (has "iscsi" .protocols) (has "nvme" .protocols) }}
95+
- fsxnID: {{ .fsxnID | quote }}
96+
protocols:
97+
{{- $filteredProtocols := list }}
98+
{{- range .protocols }}
99+
{{- if or (eq . "iscsi") (eq . "nvme") }}
100+
{{- $filteredProtocols = append $filteredProtocols . }}
101+
{{- end }}
102+
{{- end }}
103+
{{- range $filteredProtocols }}
104+
- {{ . | quote }}
105+
{{- end }}
106+
svmName: {{ .svmName | quote }}
107+
authType: {{ .authType | default "awsarn" | quote }}
108+
{{- end }}
109+
{{- end }}
110+
{{- end }}
111+
{{- end }}

helm/trident-operator/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,12 @@ anfConfigurator:
177177
netappAccounts: []
178178
resourceGroups: []
179179
customerEncryptionKeys: {}
180+
181+
# Auto generated ONTAP backend related fields consumed by the configurator controller.
182+
ontapConfigurator:
183+
enabled: false
184+
svms:
185+
- fsxnID: ''
186+
svmName: ''
187+
protocols: []
188+
authType: ''

0 commit comments

Comments
 (0)