Commit a7f85c69 authored by Waqar Ahmed's avatar Waqar Ahmed

Consider cert key as a string in library chart

parent e19d7d63
...@@ -4,7 +4,7 @@ Retrieve true/false if certificate is available in ixCertificates ...@@ -4,7 +4,7 @@ Retrieve true/false if certificate is available in ixCertificates
{{- define "common.resources.cert_present" -}} {{- define "common.resources.cert_present" -}}
{{- $values := . -}} {{- $values := . -}}
{{- include "common.schema.validateKeys" (dict "values" . "checkKeys" (list "commonCertOptions")) -}} {{- include "common.schema.validateKeys" (dict "values" . "checkKeys" (list "commonCertOptions")) -}}
{{- hasKey $values.ixCertificates $values.commonCertOptions.certKeyName -}} {{- hasKey $values.Values.ixCertificates ($values.commonCertOptions.certKeyName | toString) -}}
{{- end -}} {{- end -}}
...@@ -14,8 +14,9 @@ Retrieve certificate from variable name ...@@ -14,8 +14,9 @@ Retrieve certificate from variable name
{{- define "common.resources.cert" -}} {{- define "common.resources.cert" -}}
{{- $values := . -}} {{- $values := . -}}
{{- include "common.schema.validateKeys" (dict "values" . "checkKeys" (list "commonCertOptions")) -}} {{- include "common.schema.validateKeys" (dict "values" . "checkKeys" (list "commonCertOptions")) -}}
{{- if hasKey $values.ixCertificates $values.commonCertOptions.certKeyName -}} {{- $certKey := ($values.commonCertOptions.certKeyName | toString) -}}
{{- $cert := get $values.ixCertificates $values.commonCertOptions.certKeyName -}} {{- if hasKey $values.Values.ixCertificates $certKey -}}
{{- $cert := get $values.Values.ixCertificates $certKey -}}
{{- if $values.commonCertOptions.publicKey -}} {{- if $values.commonCertOptions.publicKey -}}
{{ $cert.certificate }} {{ $cert.certificate }}
{{- else -}} {{- else -}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment