Skip to content

Commit

Permalink
Change var name
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleytate614 committed Dec 6, 2024
1 parent 430a884 commit 3be85c5
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{ $aws_secret := "aws"}}
{{ $sa_name := "postsync-custom-sa-update-sm-sa" }}
{{ $secret.metadata.name := "test-secret" }}
{{ $secret_name := "test-secret" }}
{{- range $custom_sa_name, $custom_sa_role := $.Values.custom_sa_details }}
# List secrets from the custom sa namespace
# {{- range $index, $secret := (lookup "v1" "Secret" $.Values.custom_sa_namespace "").items }}
# The secret name has a prefix of the service account name - use this to get the secret name
# {{ $prefix := printf "%s-token" $custom_sa_name }}
# {{- if (hasPrefix $secret.metadata.name $prefix) }}
# {{- if (hasPrefix $secret_name $prefix) }}
---
apiVersion: batch/v1
kind: Job
Expand Down Expand Up @@ -54,15 +54,15 @@ spec:
- name: CUSTOM_SA_NAME
value: {{ $custom_sa_name }}
- name: CUSTOM_SA_SECRET_NAME
value: {{ $secret.metadata.name }}
value: {{ $secret_name }}
# Hard-coded for now:
- name: AVP_TYPE
value: "aws"
volumeMounts:
- name: aws
mountPath: /etc/mas/creds/aws
- name: {{ $secret.metadata.name }}
mountPath: "/etc/mas/creds/{{ $secret.metadata.name }}"
- name: {{ $secret_name }}
mountPath: "/etc/mas/creds/{{ $secret_name }}"
command:
- /bin/sh
- -c
Expand Down Expand Up @@ -114,9 +114,9 @@ spec:
secretName: {{ $aws_secret }}
defaultMode: 420
optional: false
- name: {{ $secret.metadata.name }}
- name: {{ $secret_name }}
secret:
secretName: {{ $secret.metadata.name }}
secretName: {{ $secret_name }}
defaultMode: 420
optional: false
backoffLimit: 4
Expand Down

0 comments on commit 3be85c5

Please sign in to comment.