Skip to content

Commit

Permalink
fix!(deps): Update cloud dependency to v0.23.0
Browse files Browse the repository at this point in the history
This update no longer needs the init container, so removing this and setting the correct environment variables.
  • Loading branch information
mnorbury committed Dec 17, 2024
1 parent 0e1c9f3 commit 54e2db2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 38 deletions.
2 changes: 1 addition & 1 deletion charts/platform/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ maintainers:
- name: yevgenypats
email: [email protected]
version: 0.2.3
appVersion: 0.22.0
appVersion: 0.23.0
annotations:
artifacthub.io/license: MPL-2.0
artifacthub.io/links: |
Expand Down
41 changes: 5 additions & 36 deletions charts/platform/templates/deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,13 @@ spec:
serviceAccountName: {{ include "platform.serviceAccount" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: {{ .Chart.Name }}-init
image: "{{ include "platform.image" . }}"
command: [ "/backend/localadmin", "init" ]
env:
- name: CQAPI_DB_DSN
valueFrom:
secretKeyRef:
name: {{ include "platform.fullName" . }}-secrets
key: postgresqlDSN
- name: CQAPI_LOCAL_AES_KEY_FILE
value: /shared/encrypted_aes_key.bin
- name: CQAPI_LOCAL_JWT_PRIVATE_KEY_FILE
value: /etc/jwt/jwt-private-key.pem
volumeMounts:
- name: jwt-private-key
mountPath: /etc/jwt/jwt-private-key.pem
subPath: jwtPrivateKey
readOnly: true
- name: shared-data
mountPath: /shared
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
image: "{{ include "platform.image" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: CQAPI_LOCAL_AES_KEY_FILE
value: /shared/encrypted_aes_key.bin
{{- if .Values.activationKey }}
- name: CQAPI_LOCAL_ACTIVATION_KEY
valueFrom:
Expand All @@ -75,8 +52,11 @@ spec:
secretKeyRef:
name: {{ include "platform.fullName" . }}-secrets
key: clickhouseDSN
- name: CQAPI_LOCAL_JWT_PRIVATE_KEY_FILE
value: /etc/jwt/jwt-private-key.pem
- name: CQAPI_LOCAL_JWT_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: {{ include "platform.fullName" . }}-secrets
key: jwtPrivateKey
- name: CQAPI_REDIS_ADDR
value: redis://{{ .Release.Name }}-redis-master.{{ .Release.Namespace }}.svc.cluster.local:6379
ports:
Expand All @@ -102,21 +82,10 @@ spec:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
- name: jwt-private-key
mountPath: /etc/jwt/jwt-private-key.pem
subPath: jwtPrivateKey
readOnly: true
- name: shared-data
mountPath: /shared
volumes:
{{- with .Values.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
- name: jwt-private-key
secret:
secretName: {{ include "platform.fullName" . }}-secrets
- name: shared-data
emptyDir: {}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/platform/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ data:
{{- end }}
postgresqlDSN: {{ required "A valid postgres DSN is required" .Values.externalDependencies.postgresql_dsn | b64enc }}
clickhouseDSN: {{ required "A valid clickhouse DSN is required" .Values.externalDependencies.clickhouse_dsn | b64enc }}
jwtPrivateKey: {{ genPrivateKey "rsa" | b64enc }}
jwtPrivateKey: {{ .Values.jwtPrivateKey | default (genPrivateKey "rsa") | b64enc }}
3 changes: 3 additions & 0 deletions charts/platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ volumeMounts: []
# -- Activation key for the self-hosted platform
activationKey: ""

# -- JWT private key for the self-hosted platform - if not provided, a new key will be generated
jwtPrivateKey: ""

externalDependencies:
# -- Required: The DSN for the Postgres database
postgresql_dsn: ""
Expand Down

0 comments on commit 54e2db2

Please sign in to comment.