Skip to content

Commit

Permalink
style: DRY template
Browse files Browse the repository at this point in the history
  • Loading branch information
arturshadnik committed Aug 22, 2024
1 parent cf7903b commit 65f6544
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pkg/utils/embed/resources/validator/validator-base-values.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -194,20 +194,14 @@ pluginSecrets:
{{- end }}

{{- if .VspherePlugin.Enabled }}
{{- if .VspherePlugin.Validator.Auth.SecretName }}
vSphere:
{{- if .VspherePlugin.Validator.Auth.SecretName }}
secretName: {{ .VspherePlugin.Validator.Auth.SecretName }}
username: {{ .VspherePlugin.Validator.Auth.CloudAccount.Username | quote }}
password: {{ .VspherePlugin.Validator.Auth.CloudAccount.Password | quote }}
vcenterServer: {{ .VspherePlugin.Validator.Auth.CloudAccount.VcenterServer | quote }}
insecureSkipVerify: {{ .VspherePlugin.Validator.Auth.CloudAccount.Insecure | quote }}
{{- else }}
vSphere:
{{- end }}
username: {{ .VspherePlugin.Validator.Auth.CloudAccount.Username | quote }}
password: {{ .VspherePlugin.Validator.Auth.CloudAccount.Password | quote }}
vcenterServer: {{ .VspherePlugin.Validator.Auth.CloudAccount.VcenterServer | quote }}
insecureSkipVerify: {{ .VspherePlugin.Validator.Auth.CloudAccount.Insecure | quote }}
{{- end }}
{{- else }}
vSphere: {}
{{- end }}
Expand Down

0 comments on commit 65f6544

Please sign in to comment.