Skip to content

Commit

Permalink
Merge pull request #41 from streamnative/john/strip-as-secret
Browse files Browse the repository at this point in the history
Stripe key as secret
  • Loading branch information
jrsdav authored Apr 28, 2022
2 parents 4075033 + f5795c5 commit dc75d78
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
12 changes: 9 additions & 3 deletions modules/cloud-manager-agent/chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ spec:
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
containers:
- name: agent
{{ $stripeKeySecretName := .Values.appConfig.applicationAgentProperties.stripeKeySecretName }}
{{- if $stripeKeySecretName }}
env:
- name: STRIPE_DEFAULT_SECRET_API_KEY
valueFrom:
secretKeyRef:
name: {{ $stripeKeySecretName | quote }}
key: {{ .Values.appConfig.applicationAgentProperties.stripeKeySecretKey | quote }}
{{- end }}
image: {{ include "cloud-manager-agent.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
readinessProbe:
Expand Down Expand Up @@ -89,9 +98,6 @@ spec:
items:
- key: application-default.properties
path: application-agent.properties
# - name: cloud-manager-agent-tls
# secret:
# secretName: ctl-tls
- name: data
emptyDir: {}
{{- with .Values.nodeSelector }}
Expand Down
2 changes: 2 additions & 0 deletions modules/cloud-manager-agent/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ rbac:

appConfig:
applicationAgentProperties:
stripeKeySecretName: ""
stripeKeySecretKey: key
raw: ""
applicationProperties: |
logging.level.org.apache=INFO
Expand Down
22 changes: 19 additions & 3 deletions modules/cloud-manager-agent/values.yaml.tftpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
appConfig:
applicationAgentProperties:
kubernetesExternalSecret:
enabled: true
secretName: cloud-manager-agent-extra-${environment}
stripeKeySecretName: stripe
%{ if environment == "test" }
raw: |
spring.security.oauth2.resourceserver.jwt.issuer-uri=https://auth.test.cloud.gcp.streamnative.dev/
cloud.api.audience=https://api.test.cloud.gcp.streamnative.dev
spring.security.oauth2.resourceserver.jwt.audience=https://api.test.cloud.gcp.streamnative.dev
%{ else }
%{ if environment == "staging" }
raw: |
spring.security.oauth2.resourceserver.jwt.issuer-uri=https://auth.sncloud-stg.dev/
cloud.api.audience=https://api.sncloud-stg.dev
spring.security.oauth2.resourceserver.jwt.audience=https://api.sncloud-stg.dev
%{ else }
raw: |
spring.security.oauth2.resourceserver.jwt.issuer-uri=https://auth.streamnative.cloud/
cloud.api.audience=https://api.streamnative.cloud
spring.security.oauth2.resourceserver.jwt.audience=https://api.streamnative.cloud
%{ endif }
%{ endif }

0 comments on commit dc75d78

Please sign in to comment.