Skip to content

Commit

Permalink
Move to iam-runtime-infratographer.manifests (#83)
Browse files Browse the repository at this point in the history
This makes it easier for applications depending on this chart to
include the required configuration. Now an application can just add a
```
{{ include "iam-runtime-infratographer.manifests" $ }}
```

And we'll be able to plug in any supporting manifests we need to
support the runtime.

Signed-off-by: Adam Mohammed <admohammed@equinix.com>
  • Loading branch information
adammohammed authored Sep 3, 2024
1 parent bc97b30 commit 11319f1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
19 changes: 4 additions & 15 deletions chart/iam-runtime-infratographer/templates/_container.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,11 @@ securityContext: {{- toYaml . | nindent 2 }}
{{- with $values.resources }}
resources: {{- toYaml . | nindent 2 }}
{{- end }}
env:
{{- with $values.secrets.nats.token }}
- name: IAMRUNTIME_EVENTS_NATS_TOKEN
valueFrom:
secretKeyRef:
key: natsToken
name: {{ include "iam-runtime-infratographer.resource.fullname" (dict "suffix" "secrets" "context" $) | quote }}
{{- end }}
{{- with $values.secrets.accessToken.source.clientSecret }}
- name: IAMRUNTIME_ACCESSTOKENPROVIDER_SOURCE_CLIENTCREDENTIALS_CLIENTSECRET
valueFrom:
secretKeyRef:
key: clientSecret
name: {{ include "iam-runtime-infratographer.resource.fullname" (dict "suffix" "secrets" "context" $) | quote }}
{{- end }}
envFrom:
- secretRef:
name: {{ include "iam-runtime-infratographer.resource.fullname" (dict "suffix" "secrets" "context" $) | quote }}
{{- with $values.extraEnv }}
env:
{{- toYaml . | nindent 2 }}
{{- end }}
volumeMounts:
Expand Down
4 changes: 4 additions & 0 deletions chart/iam-runtime-infratographer/templates/_manifests.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- define "iam-runtime-infratographer.manifests" }}
{{ include "iam-runtime-infratographer.configmap" $ }}
{{ include "iam-runtime-infratographer.secrets" $ }}
{{- end }}
4 changes: 2 additions & 2 deletions chart/iam-runtime-infratographer/templates/_secrets.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ metadata:
name: {{ include "iam-runtime-infratographer.resource.fullname" (dict "suffix" "secrets" "context" $) | quote }}
labels: {{- include "common.labels.standard" $ | nindent 4 }}
data:
natsToken: {{ $values.secrets.nats.token | quote }}
clientSecret: {{ $values.secrets.accessToken.source.clientSecret | quote }}
IAMRUNTIME_EVENTS_NATS_TOKEN: {{ $values.secrets.nats.token | quote }}
IAMRUNTIME_ACCESSTOKENPROVIDER_SOURCE_CLIENTCREDENTIALS_CLIENTSECRET: {{ $values.secrets.accessToken.source.clientSecret | quote }}
{{- end }}

0 comments on commit 11319f1

Please sign in to comment.