apiVersion: v1 kind: Secret metadata: name: {{ include "sigi.fullname" . }}-saberes-tkn labels: {{- include "sigi.labels" . | nindent 4 }} type: Opaque data: {{- if .Release.IsUpgrade }} MOODLE_API_TOKEN: {{ index (lookup "v1" "Secret" .Release.Namespace (printf "%s-saberes-tkn" (include "sigi.fullname" .))).data "MOODLE_API_TOKEN" }} {{ else }} # install operation MOODLE_API_TOKEN: {{ .Values.sigi.saberes.moodleToken | b64enc }} {{ end }}