Skip to content

Commit

Permalink
Aws fsxn auto backend config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Utkarshjh committed Nov 27, 2024
1 parent c7eb0d0 commit c9aa7fa
Show file tree
Hide file tree
Showing 14 changed files with 847 additions and 90 deletions.
76 changes: 76 additions & 0 deletions helm/trident-operator/templates/tridentconfigurator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,79 @@ spec:
{{- end }}
{{- end }}

---

{{- if .Values.ontapConfigurator.enabled }}
{{- $includeCR := false }}
{{- range .Values.ontapConfigurator.svms }}
{{- if or (has "nfs" .protocols) (has "smb" .protocols) }}
{{- $includeCR = true }}
{{- end }}
{{- end }}

{{- if $includeCR }}
apiVersion: trident.netapp.io/v1
kind: TridentConfigurator
metadata:
name: netapp-nas-backend-configurator
spec:
storageDriverName: ontap-nas
svms:
{{- range .Values.ontapConfigurator.svms }}
{{- if or (has "nfs" .protocols) (has "smb" .protocols) }}
- fsxnID: {{ .fsxnID | quote }}
protocols:
{{- $filteredProtocols := list }}
{{- range .protocols }}
{{- if or (eq . "nfs") (eq . "smb") }}
{{- $filteredProtocols = append $filteredProtocols . }}
{{- end }}
{{- end }}
{{- range $filteredProtocols }}
- {{ . | quote }}
{{- end }}
svmName: {{ .svmName | quote }}
authType: {{ .authType | default "awsarn" | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}


---

{{- if .Values.ontapConfigurator.enabled }}
{{- $includeCR := false }}
{{- range .Values.ontapConfigurator.svms }}
{{- if or (has "iscsi" .protocols) (has "nvme" .protocols) }}
{{- $includeCR = true }}
{{- end }}
{{- end }}

{{- if $includeCR }}
apiVersion: trident.netapp.io/v1
kind: TridentConfigurator
metadata:
name: netapp-san-backend-configurator
spec:
storageDriverName: ontap-san
svms:
{{- range .Values.ontapConfigurator.svms }}
{{- if or (has "iscsi" .protocols) (has "nvme" .protocols) }}
- fsxnID: {{ .fsxnID | quote }}
protocols:
{{- $filteredProtocols := list }}
{{- range .protocols }}
{{- if or (eq . "iscsi") (eq . "nvme") }}
{{- $filteredProtocols = append $filteredProtocols . }}
{{- end }}
{{- end }}
{{- range $filteredProtocols }}
- {{ . | quote }}
{{- end }}
svmName: {{ .svmName | quote }}
authType: {{ .authType | default "awsarn" | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
9 changes: 9 additions & 0 deletions helm/trident-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,12 @@ anfConfigurator:
netappAccounts: []
resourceGroups: []
customerEncryptionKeys: {}

# Auto generated ONTAP backend related fields consumed by the configurator controller.
ontapConfigurator:
enabled: false
svms:
- fsxnID: ''
svmName: ''
protocols: []
authType: ''
Loading

0 comments on commit c9aa7fa

Please sign in to comment.