{{- if .Values.artifactory.unifiedSecretInstallation }} apiVersion: v1 kind: Secret metadata: name: {{ template "artifactory-ha.name" . }}-unified-secret labels: app: "{{ template "artifactory-ha.name" $ }}" chart: "{{ template "artifactory-ha.chart" $ }}" component: "{{ $.Values.artifactory.name }}" heritage: {{ $.Release.Service | quote }} release: {{ $.Release.Name | quote }} type: Opaque stringData: {{- if .Values.access.accessConfig }} access.config.patch.yml: | {{ tpl (toYaml .Values.access.accessConfig) . | indent 4 }} {{- end }} {{- if and (not .Values.artifactory.persistence.customBinarystoreXmlSecret) }} binarystore.xml: |- {{- if .Values.artifactory.persistence.binarystoreXml }} {{ tpl .Values.artifactory.persistence.binarystoreXml . | indent 4 }} {{- else }} {{ tpl ( .Files.Get "files/binarystore.xml" ) . | indent 4 }} {{- end }} {{- end }} {{- if not .Values.systemYamlOverride.existingSecret }} system.yaml: | {{ tpl .Values.artifactory.systemYaml . | indent 4 }} {{- end }} {{- if .Values.artifactory.customSecrets }} {{- range .Values.artifactory.customSecrets }} {{ .key }}: | {{ .data | indent 4 -}} {{- end }} {{- end }} {{- if not .Values.artifactory.persistence.googleStorage.gcpServiceAccount.customSecretName }} {{- if .Values.artifactory.persistence.googleStorage.gcpServiceAccount.enabled }} gcp.credentials.json: |- {{ tpl .Values.artifactory.persistence.googleStorage.gcpServiceAccount.config . | indent 4 }} {{- end }} {{- end }} data: {{- if and (not .Values.database.secrets) (not .Values.postgresql.enabled) }} {{- if or .Values.database.url .Values.database.user .Values.database.password }} {{- with .Values.database.url }} db-url: {{ tpl . $ | b64enc | quote }} {{- end }} {{- with .Values.database.user }} db-user: {{ tpl . $ | b64enc | quote }} {{- end }} {{- with .Values.database.password }} db-password: {{ tpl . $ | b64enc | quote }} {{- end }} {{- end }} {{- end }} {{- if not (and .Values.artifactory.admin.secret .Values.artifactory.admin.dataKey) }} {{- if .Values.artifactory.admin.password }} bootstrap.creds: {{ (printf "%s@%s=%s" .Values.artifactory.admin.username .Values.artifactory.admin.ip .Values.artifactory.admin.password) | b64enc }} {{- end }} {{- end }} {{- with .Values.artifactory.license.licenseKey }} artifactory.lic: {{ . | b64enc | quote }} {{- end }} {{- if or .Values.artifactory.masterKey .Values.global.masterKey }} {{- if not (or .Values.artifactory.masterKeySecretName .Values.global.masterKeySecretName) }} master-key: {{ include "artifactory-ha.masterKey" . | b64enc | quote }} {{- end }} {{- end }} {{- if or .Values.artifactory.joinKey .Values.global.joinKey }} {{- if not (or .Values.artifactory.joinKeySecretName .Values.global.joinKeySecretName) }} join-key: {{ include "artifactory-ha.joinKey" . | b64enc | quote }} {{- end }} {{- end }} {{- if .Values.artifactory.jfConnectToken }} {{- if not (.Values.artifactory.jfConnectTokenSecretName) }} jfconnect-token: {{ include "artifactory-ha.jfConnectToken" . | b64enc | quote }} {{- end }} {{- end }} {{- end }}