Skip to content

Commit

Permalink
Fixing ENTERPRISE_LICENSE setting enterprise-license-job for Enterpri…
Browse files Browse the repository at this point in the history
…se License on vault
  • Loading branch information
jmurret committed Feb 17, 2022
1 parent d7b0461 commit a48d018
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions charts/consul/templates/enterprise-license-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ spec:
- name: apply-enterprise-license
image: "{{ default .Values.global.image .Values.server.image }}"
env:
{{- if not .Values.global.secretsBackend.vault.enabled }}
- name: ENTERPRISE_LICENSE
{{- if .Values.global.secretsBackend.vault.enabled }}
value: /vault/secrets/enterpriselicense.txt
{{- else }}
valueFrom:
secretKeyRef:
name: {{ .Values.global.enterpriseLicense.secretName }}
key: {{ .Values.global.enterpriseLicense.secretKey }}
{{- end}}
{{- end }}
- name: CONSUL_HTTP_ADDR
{{- if .Values.global.tls.enabled }}
value: https://{{ template "consul.fullname" . }}-server:8501
Expand Down Expand Up @@ -87,9 +89,6 @@ spec:
#!/bin/sh
while true; do
echo "Applying license..."
{{- if .Values.global.secretsBackend.vault.enabled }}
ENTERPRISE_LICENSE=`cat /vault/secrets/enterpriselicense.txt`
{{- end }}
if consul license put "${ENTERPRISE_LICENSE}" 2>&1; then
echo "License applied successfully"
break
Expand Down

0 comments on commit a48d018

Please sign in to comment.