Skip to content

Commit

Permalink
fix: values for aws secrets (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: tomer.fisher <tomer.fisher@zesty.co>
  • Loading branch information
Tomerfi1210 and tomer.fisher committed Aug 19, 2024
1 parent 0a04d9f commit 04d8f37
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/zesty/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.35
version: 0.1.36

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
7 changes: 7 additions & 0 deletions charts/zesty/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ Create a name for the PVC
{{ printf "%s-pvc" (include "zesty-k8s.fullname" .) }}
{{- end -}}

{{/*
Create a name for the external-secret
*/}}
{{- define "zesty-k8s.externalSecret.awsCred" -}}
{{ printf "%s-aws-cluster-secret" (include "zesty-k8s.fullname" .) }}
{{- end -}}


{{/*
Create a name for the ConfigMap
Expand Down
6 changes: 3 additions & 3 deletions charts/zesty/templates/cost-externalSecret.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{{- if .Values.awsCluster }}
{{- if .Values.awsCluster.enabled }}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "aws-cluster-secret"
name: "{{ include "zesty-k8s.externalSecret.awsCred" . }}"
spec:
secretStoreRef:
name: aws-secret-manager-secretstore
kind: ClusterSecretStore
target:
name: "aws-cluster-secret"
name: {{ .Values.awsCluster.secretName }}
dataFrom:
- extract:
key: zesty/access-credentials
Expand Down
4 changes: 2 additions & 2 deletions charts/zesty/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ spec:
envFrom:
- configMapRef:
name: "{{ include "zesty-k8s.configmap" . }}"
{{- if .Values.awsCluster }}
{{- if .Values.awsCluster.enabled }}
- secretRef:
name: "aws-cluster-secret"
name: {{ .Values.awsCluster.secretName }}
{{- end }}
{{- if eq .Values.encryptedCredentials "" }}
- secretRef:
Expand Down
4 changes: 3 additions & 1 deletion charts/zesty/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ prometheus:
password: ~
bearerToken: ~

awsCluster: true
awsCluster:
enabled: true
secretName: aws-cluster-secret

awsAthena:
enabled: false
Expand Down

0 comments on commit 04d8f37

Please sign in to comment.