S
S
Sergey2020-03-03 20:56:37
linux
Sergey, 2020-03-03 20:56:37

How to specify p12 license file in Helm chart?

Can't figure out how to properly specify the license file from the .p12 file.
Made a secret with this content. It is created, but the system cannot read it and pass authorization

apiVersion: v1
kind: Secret
metadata:
  name: "my-license"
type: Opaque
data:
  file: "MIIXvwIBAzCCF4kGCSqGSIb3DQEHAaCCF3oEghd2MIIXcj...o/nmsrQHETEFUdOUfc/4zQQI8mST/thjsjs="
password: "MQo="

I got the value itself from file with the help of: You
base64 /path/to/licence.p12
can't just specify the path to the license file.
In the docks of Helm, I could not find exactly the right solution.
Perhaps someone has already experienced this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2020-03-12
@svakhovksyy

I'll answer myself)
Maybe someone will come in handy.
For values.yaml
base64 /path/to/licence.p12

license:
    secretName: "my-license"
    createSecret:
      enabled: true
      fileBase64: "сюда полученное значение из команды выше"
      password: "сюда значение из команды ниже"

echo <пароль> | base64
For secret.yaml
{{- if .Values.global.license.createSecret.enabled -}}
apiVersion: v1
kind: Secret
metadata:
  name: "{{ .Values.global.license.secretName }}"
  labels:
    app.kubernetes.io/name: {{ include "my.name" . }}
    helm.sh/chart: {{ include "my.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
type: Opaque
data:
  file: "{{ .Values.global.license.createSecret.fileBase64  }}"
  password: "{{ .Values.global.license.createSecret.password }}"
{{- end -}}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question