Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve store secrets enabling #1029

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions helm/templates/standalone-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ spec:
- name: {{ $key }}
value: {{ tpl $value $ | quote }}
{{- end }}
{{- if .Values.parseable.localModeSecret }}
{{- range $secret := .Values.parseable.localModeSecret }}
{{- if and .Values.parseable.localModeSecret .Values.parseable.localModeSecret.enabled }}
{{- range $secret := .Values.parseable.localModeSecret.secrets }}
{{- range $key := $secret.keys }}
{{- $envPrefix := $secret.prefix | default "" | upper }}
{{- $envKey := $key | upper | replace "." "_" | replace "-" "_" }}
Expand All @@ -59,8 +59,10 @@ spec:
key: {{ $key }}
{{- end }}
{{- end }}
{{- else }}
{{- range $secret := .Values.parseable.s3ModeSecret }}
{{- end }}

{{- if and .Values.parseable.s3ModeSecret .Values.parseable.s3ModeSecret.enabled }}
{{- range $secret := .Values.parseable.s3ModeSecret.secrets }}
{{- range $key := $secret.keys }}
{{- $envPrefix := $secret.prefix | default "" | upper }}
{{- $envKey := $key | upper | replace "." "_" | replace "-" "_" }}
Expand All @@ -72,7 +74,9 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- range $secret := .Values.parseable.blobModeSecret }}

{{- if and .Values.parseable.blobModeSecret .Values.parseable.blobModeSecret.enabled }}
{{- range $secret := .Values.parseable.blobModeSecret.secrets }}
{{- range $key := $secret.keys }}
{{- $envPrefix := $secret.prefix | default "" | upper }}
{{- $envKey := $key | upper | replace "." "_" | replace "-" "_" }}
Expand All @@ -83,6 +87,7 @@ spec:
key: {{ $key }}
{{- end }}
{{- end }}
{{- end }}
ports:
- containerPort: 8000
{{- with .Values.readinessProbe }}
Expand Down
79 changes: 39 additions & 40 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,46 +77,45 @@ parseable:
## blobModeSecret if store is set to blob-store
## s3ModeSecret if store is set to s3-store
localModeSecret:
- type: env
name: parseable-env-secret
prefix: P_
keys:
- addr
- username
- password
- staging.dir
- fs.dir
# blobModeSecret:
# - type: env
# name: parseable-env-secret
# prefix: p_
# keys:
# - addr
# - username
# - password
# - azr.access_key
# - azr.account
# - azr.container
# - azr.url
# s3ModeSecret:
# - type: env
# name: parseable-env-secret
# prefix: P_
# keys:
# ## Comment / uncomment the following lines as required
# # - tls.cert.path
# # - tls.key.path
# # - storage.upload.interval
# - addr
# - username
# - password
# - staging.dir
# - fs.dir
# - s3.url
# - s3.access.key
# - s3.secret.key
# - s3.bucket
# - s3.region
enabled: false
secrets:
- name: parseable-env-secret
prefix: P_
keys:
- addr
- username
- password
- staging.dir
- fs.dir
blobModeSecret:
enabled: false
secrets:
- name: parseable-env-secret
prefix: P_
keys:
- addr
- username
- password
- azr.access_key
- azr.account
- azr.container
- azr.url
s3ModeSecret:
enabled: false
secrets:
- name: parseable-env-secret
prefix: P_
keys:
- addr
- username
- password
- staging.dir
- fs.dir
- s3.url
- s3.access.key
- s3.secret.key
- s3.bucket
- s3.region
serviceAccount:
create: true
name: "parseable"
Expand Down
Loading