Skip to content

Commit

Permalink
feat: add ability to use an existing secret
Browse files Browse the repository at this point in the history
  • Loading branch information
redhatrises committed Jun 17, 2024
1 parent 98ee8ea commit 534a9a7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ data:
# Uncomment to provide Secrets Manager secret name. Alternatively, use SECRETS_MANAGER_SECRET_NAME env variable.
#secrets_manager_secret_name = falcon/fig/credentials
{{- if .Values.credentials_store.secrets_manager.secret_name }}
secrets_manager_secret_name = {{ .Values.credentials_store.secrets_manager.secret_name }}
{{- end }}
# Uncomment to provide Secrets Manager client id key. Alternatively, use SECRETS_MANAGER_CLIENT_ID_KEY env variable.
#secrets_manager_client_id_key = client_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ spec:
subPath: config.ini
envFrom:
- secretRef:
{{- if .Values.falcon.existingSecret }}
name: {{ .Values.falcon.existingSecret }}
{{- else }}
name: {{ include "falcon-integration-gateway.fullname" . }}-creds
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
command:
Expand Down
5 changes: 2 additions & 3 deletions helm-charts/falcon-integration-gateway/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.falcon.existingSecret -}}
apiVersion: v1
kind: Secret
type: Opaque
Expand All @@ -10,9 +11,6 @@ data:
FALCON_CLIENT_ID: {{ .Values.falcon.client_id | b64enc }}
FALCON_CLIENT_SECRET: {{ .Values.falcon.client_secret | b64enc }}
FALCON_CLOUD_REGION: {{ .Values.falcon.cloud_region | b64enc }}
{{- if .Values.credentials_store.secrets_manager.secret_name }}
SECRETS_MANAGER_SECRET_NAME: {{ .Values.credentials_store.secrets_manager.secret_name | b64enc }}
{{- end }}
{{- if .Values.push.azure_log_analytics.enabled }}
WORKSPACE_ID: {{ .Values.push.azure_log_analytics.workspace_id | b64enc }}
PRIMARY_KEY: {{ .Values.push.azure_log_analytics.primary_key | b64enc }}
Expand All @@ -26,3 +24,4 @@ data:
{{- if .Values.push.vmware_workspace_one.enabled }}
WORKSPACEONE_TOKEN: {{ .Values.push.vmware_workspace_one.token | b64enc }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions helm-charts/falcon-integration-gateway/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
"us-gov-1"
]
},
"existingSecret": {
"type": "string"
},
"integration_gateway": {
"type": "object",
"properties": {
Expand Down
5 changes: 5 additions & 0 deletions helm-charts/falcon-integration-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ falcon:
client_secret:
cloud_region:

# Use this value if you have an existing secret
# defined in your k8s that may contain secrets
# for falcon api client id and pw
existingSecret: ""

integration_gateway:
# Configure number of threads that process Falcon Events
worker_threads: 4
Expand Down

0 comments on commit 534a9a7

Please sign in to comment.