@@ -34,7 +34,7 @@ stringData:
3434{{- end }}
3535---
3636{{- $jobName := print "user-add-" .name "-" $.Release.Name -}}
37- {{- if empty (lookup "batch/v1" "Job" $.Release.Namespace $jobName) - }}
37+ {{- if empty (lookup "batch/v1" "Job" $.Release.Namespace $jobName) }}
3838apiVersion : batch/v1
3939kind : Job
4040metadata :
7171 - configMapRef :
7272 name : {{ $.Chart.Name }}-configmap-{{ $.Release.Name }}
7373 env :
74+ - name : CONFIG
75+ value : /oada.config.mjs
7476 - name : ARANGODB_USERNAME
7577 valueFrom :
7678 secretKeyRef :
9092 {{- end }}
9193 image : oada/users:{{ $tag }}
9294 # imagePullPolicy: {{ $.Values.global.development | ternary "Always" "IfNotPresent" }}
93- command : ["/usr/bin/dumb-init", "--rewrite", "15:2", "--", "/bin/sh"]
94- args : ["-c", "yarn workspace @oada/users run add -u {{ .name }} -a {{ .admin | default false }} "]
95+ command :
96+ - /usr/bin/dumb-init
97+ - --rewrite
98+ - 15:2
99+ - --
100+ - /bin/sh
101+ args :
102+ - -c
103+ - >-
104+ yarn workspace @oada/users run add
105+ -u={{ .name }}
106+ -a={{ .admin | default false }}
107+ {{- range (.roles | default list) }}
108+ -r={{ . }}
109+ {{- end }}
95110 resources :
96111 limits : {{- toYaml $.Values.oada.resources.limits | nindent 14 }}
97112 requests : {{- toYaml $.Values.oada.resources.limits | nindent 14 }}
@@ -101,6 +116,8 @@ spec:
101116 - configMapRef :
102117 name : {{ $.Chart.Name }}-configmap-{{ $.Release.Name }}
103118 env :
119+ - name : CONFIG
120+ value : /oada.config.mjs
104121 - name : TOKEN
105122 valueFrom :
106123 secretKeyRef :
@@ -126,7 +143,13 @@ spec:
126143 image : oada/auth:{{ $tag }}
127144 imagePullPolicy : {{ $.Values.oada.imagePullPolicy }}
128145 command : ["/usr/bin/dumb-init", "--rewrite", "15:2", "--", "/bin/sh"]
129- args : ["-c", "yarn workspace @oada/auth run token create -u {{ .name }} -s {{ .scope | join "," }} ${TOKEN} "]
146+ args :
147+ - -c
148+ - >-
149+ yarn workspace @oada/auth run token create
150+ -u={{ .name }}
151+ -s=all:all
152+ ${TOKEN}
130153 resources :
131154 limits : {{- toYaml $.Values.oada.resources.limits | nindent 14 }}
132155 requests : {{- toYaml $.Values.oada.resources.limits | nindent 14 }}
0 commit comments