{{- if .Values.kubecostProductConfigs }} {{- if .Values.kubecostProductConfigs.createServiceKeySecret }} {{- if .Values.kubecostProductConfigs.alibabaServiceKeyName }} apiVersion: v1 kind: Secret metadata: name: cloud-service-key namespace: {{ .Release.Namespace }} labels: {{ include "cost-analyzer.commonLabels" . | nindent 4 }} type: Opaque stringData: service-key.json: |- { "alibaba_access_key_id": "{{ .Values.kubecostProductConfigs.alibabaServiceKeyName }}", "alibaba_secret_access_key": "{{ .Values.kubecostProductConfigs.alibabaServiceKeyPassword }}" } {{- end -}} {{- end -}} {{- end -}}