datastax/pulsar-helm-chart

Decouple burnell "provision container" provision-tls-jwt from autorecovery component

Opened this issue · 2 comments

Currently JWT tokens are provisioned by an init container that is part of the autorecovery component.

{{- if .Values.autoRecovery.enableProvisionContainer }}
- name: provision-tls-jwt
image: "{{ .Values.image.burnell.repository }}:{{ .Values.image.burnell.tag }}"
imagePullPolicy: {{ .Values.image.burnell.pullPolicy }}
{{- if .Values.proxy.burnellResources }}
resources:
{{ toYaml .Values.proxy.burnellResources | indent 10 }}
{{- end }}
env:
- name: ClusterName
value: "{{ template "pulsar.fullname" . }}"
- name: SuperRoles
value: {{ .Values.superUserRoles }}
- name: ProcessMode
value: "init"
- name: PulsarNamespace
value: {{ .Release.Namespace }}
- name: PrivateKeySecretName
value: {{ .Values.tokenPrivateKeyFile }}
- name: PublicKeySecretName
value: {{ .Values.tokenPublicKeyFile }}
{{- end }}

This should be decoupled since provision-tls-jwt has nothing to do with Bookkeeper autorecovery.

The reason we added here is because AR is the first pod coming up in the cluster. Private/public key pair need to be created ahead of bastion and other pods initialized. We have have a dedicated pod to initialize keys and JWTs.

+1. We should create a separate initialization job that runs when needed.