Skip to content

Commit

Permalink
improve: cleanup and fixes to OSS helm chart (#12141)
Browse files Browse the repository at this point in the history
  • Loading branch information
perangel committed Apr 18, 2024
1 parent a4767ec commit ed61baf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
17 changes: 9 additions & 8 deletions charts/airbyte-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -440,17 +440,17 @@ spec:
securityContext: {{- toYaml .Values.containerSecurityContext | nindent 10 }}
{{- end }}
volumeMounts:
{{- if eq .Values.global.deploymentMode "oss" }}
{{- if eq (lower (default "" .Values.global.storage.type)) "gcs" }}
{{- if eq .Values.global.deploymentMode "oss" }}
{{- if eq (lower (default "" .Values.global.storage.type)) "gcs" }}
- name: gcs-log-creds-volume
mountPath: /secrets/gcs-log-creds
readOnly: true
{{- end }}
{{- end }}
- name: airbyte-yml-volume
mountPath: /app/configs/airbyte.yml
subPath: fileContents
readOnly: true
{{- end }}
{{- end }}

{{- if .Values.extraVolumeMounts }}
{{ toYaml .Values.extraVolumeMounts | nindent 8 }}
Expand All @@ -466,16 +466,17 @@ spec:
{{- end }}
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}
volumes:
{{- if eq .Values.global.deploymentMode "oss" }}
{{- if eq (lower (default "" .Values.global.storage.type)) "gcs" }}
{{- if eq .Values.global.deploymentMode "oss" }}
{{- if eq (lower (default "" .Values.global.storage.type)) "gcs" }}
- name: gcs-log-creds-volume
secret:
secretName: {{ ternary (printf "%s-gcs-log-creds" ( .Release.Name )) .Values.global.storage.storageSecretName (not ((.Values.global.storage).storageSecretName)) }}
{{- end }}
{{- end }}

- name: airbyte-yml-volume
secret:
secretName: {{ .Release.Name }}-airbyte-yml
{{- end }}
{{- end }}
{{- if .Values.extraVolumes }}
{{ toYaml .Values.extraVolumes | nindent 6 }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/airbyte-workload-launcher/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ spec:
{{- if and (eq .Values.global.deploymentMode "oss") (eq (lower (default "" .Values.global.storage.type)) "gcs") }}
- name: gcs-log-creds-volume
secret:
secretName: {{ ternary (printf "%s-gcs-log-creds" ( .Release.Name )) (.Values.global.credVolumeOverride) (eq .Values.global.deploymentMode "oss") }}
secretName: {{ ternary (printf "%s-gcs-log-creds" ( .Release.Name )) .Values.global.storage.storageSecretName (not ((.Values.global.storage).storageSecretName)) }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 6 }}
Expand Down
1 change: 0 additions & 1 deletion charts/airbyte/templates/airbyte-yml-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ metadata:
type: Opaque
data:
fileContents: "{{ .Values.airbyteYml | default "" | nindent 4 | b64enc }}"

4 changes: 3 additions & 1 deletion charts/airbyte/templates/env-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ data:
STORAGE_BUCKET_LOG: {{ ((((.Values.global).storage).bucket).log) | default "airbyte-storage" | quote }}
STORAGE_BUCKET_STATE: {{ ((((.Values.global).storage).bucket).state) | default "airbyte-storage" | quote }}
STORAGE_BUCKET_WORKLOAD_OUTPUT: {{ ((((.Values.global).storage).bucket).workloadOutput) | default "airbyte-storage" | quote }}
AWS_DEFAULT_REGION: {{ ((((.Values.global).storage).s3).region) | default "" | quote }}
{{- with .Values.global.storage.s3 }}
AWS_DEFAULT_REGION: {{ .region | default "" | quote }}
{{- end}}
MINIO_ENDPOINT: {{ include "airbyte.storage.minio.endpoint" . | quote }}
S3_PATH_STYLE_ACCESS: {{ include "airbyte.s3PathStyleAccess" . | quote }}
# Storage end
Expand Down
4 changes: 3 additions & 1 deletion charts/airbyte/templates/gcs-log-creds-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{- if and (eq .Values.global.deploymentMode "oss") (eq (lower (default "" .Values.global.storage.type)) "gcs") }}
{{ $gcsConfig := required "You must set 'global.storage.gcs' when setting 'global.storage.type' to 'gcs'" .Values.global.storage.gcs }}
{{ $credentialsJson := required "You must set 'global.storage.gcs.credentialsJson' when setting 'global.storage.type' to 'gcs'" .Values.global.storage.gcs.credentialsJson }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -7,5 +9,5 @@ metadata:
{{- include "airbyte.labels" . | nindent 4 }}
type: Opaque
data:
gcp.json: "{{ .Values.global.storage.gcs.credentialsJson }}"
gcp.json: {{ $credentialsJson | default "" | quote }}
{{- end }}

0 comments on commit ed61baf

Please sign in to comment.