Skip to content

Commit 534a9a7

Browse files
committed
feat: add ability to use an existing secret
1 parent 98ee8ea commit 534a9a7

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

helm-charts/falcon-integration-gateway/templates/configmap.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ data:
110110
111111
# Uncomment to provide Secrets Manager secret name. Alternatively, use SECRETS_MANAGER_SECRET_NAME env variable.
112112
#secrets_manager_secret_name = falcon/fig/credentials
113+
{{- if .Values.credentials_store.secrets_manager.secret_name }}
114+
secrets_manager_secret_name = {{ .Values.credentials_store.secrets_manager.secret_name }}
115+
{{- end }}
113116
114117
# Uncomment to provide Secrets Manager client id key. Alternatively, use SECRETS_MANAGER_CLIENT_ID_KEY env variable.
115118
#secrets_manager_client_id_key = client_id

helm-charts/falcon-integration-gateway/templates/deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ spec:
4242
subPath: config.ini
4343
envFrom:
4444
- secretRef:
45+
{{- if .Values.falcon.existingSecret }}
46+
name: {{ .Values.falcon.existingSecret }}
47+
{{- else }}
4548
name: {{ include "falcon-integration-gateway.fullname" . }}-creds
49+
{{- end }}
4650
resources:
4751
{{- toYaml .Values.resources | nindent 12 }}
4852
command:

helm-charts/falcon-integration-gateway/templates/secret.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.falcon.existingSecret -}}
12
apiVersion: v1
23
kind: Secret
34
type: Opaque
@@ -10,9 +11,6 @@ data:
1011
FALCON_CLIENT_ID: {{ .Values.falcon.client_id | b64enc }}
1112
FALCON_CLIENT_SECRET: {{ .Values.falcon.client_secret | b64enc }}
1213
FALCON_CLOUD_REGION: {{ .Values.falcon.cloud_region | b64enc }}
13-
{{- if .Values.credentials_store.secrets_manager.secret_name }}
14-
SECRETS_MANAGER_SECRET_NAME: {{ .Values.credentials_store.secrets_manager.secret_name | b64enc }}
15-
{{- end }}
1614
{{- if .Values.push.azure_log_analytics.enabled }}
1715
WORKSPACE_ID: {{ .Values.push.azure_log_analytics.workspace_id | b64enc }}
1816
PRIMARY_KEY: {{ .Values.push.azure_log_analytics.primary_key | b64enc }}
@@ -26,3 +24,4 @@ data:
2624
{{- if .Values.push.vmware_workspace_one.enabled }}
2725
WORKSPACEONE_TOKEN: {{ .Values.push.vmware_workspace_one.token | b64enc }}
2826
{{- end }}
27+
{{- end }}

helm-charts/falcon-integration-gateway/values.schema.json

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
"us-gov-1"
4343
]
4444
},
45+
"existingSecret": {
46+
"type": "string"
47+
},
4548
"integration_gateway": {
4649
"type": "object",
4750
"properties": {

helm-charts/falcon-integration-gateway/values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ falcon:
6767
client_secret:
6868
cloud_region:
6969

70+
# Use this value if you have an existing secret
71+
# defined in your k8s that may contain secrets
72+
# for falcon api client id and pw
73+
existingSecret: ""
74+
7075
integration_gateway:
7176
# Configure number of threads that process Falcon Events
7277
worker_threads: 4

0 commit comments

Comments
 (0)