Skip to content

Commit e7c25c3

Browse files
authored
fix(udash-agent): correctly set service account (#32)
Signed-off-by: Olivier Vernin <olivier@vernin.me>
1 parent 5d6282e commit e7c25c3

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

charts/udash-agent/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ description: Udash Agent, is the Updatecli DASHboard agent running Updatecli to
44
icon: https://www.updatecli.io/images/updatecli_transparent.png
55
name: udash-agent
66
type: application
7-
version: 0.16.0
7+
version: 0.16.1

charts/udash-agent/templates/argoworkflow.yaml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ kind: WorkflowTemplate
33
metadata:
44
name: run-updatecli-diff
55
spec:
6+
serviceAccountName: updatecli-workflow-sa
67
entrypoint: main
78
arguments:
89
parameters:
@@ -45,40 +46,37 @@ spec:
4546
- git-clone
4647
command: [sh, -c]
4748
env:
48-
# {{- range $env, $value := $.Values.secrets.agent.environments }}
49+
# {{- range $env, $value := $.Values.secrets.agent.environments }}
4950
- name: "{{ $env }}"
5051
valueFrom:
5152
secretKeyRef:
5253
name: '{{ include "udash.secretName" $ }}'
5354
key: "{{ $env }}"
5455
# {{- end }}
55-
resources:
56-
{{- toYaml $.Values.resources | nindent 14 }}
56+
resources: {{ - toYaml $.Values.resources | nindent 14 }}
5757
args:
5858
- |
5959
cd /workspace
6060
updatecli udash login --experimental --api-url http://agentrelay/api {{ default "agentrelay" (include "udash.host" . )}};
6161
updatecli compose diff --experimental --file /workspace/{{ "{{" }} inputs.parameters.updatecli-compose-file {{ "}}" }};
6262
updatecli udash logout --experimental {{ default "agentrelay " (include "udash.host" .)}};
6363
---
64-
6564
apiVersion: v1
6665
kind: ServiceAccount
6766
metadata:
6867
name: updatecli-workflow-sa
6968
---
70-
7169
apiVersion: rbac.authorization.k8s.io/v1
7270
kind: Role
7371
metadata:
7472
name: updatecli-workflow-role
7573
rules:
7674
- apiGroups: [""]
77-
resources: ["pods", "pods/log", "persistentvolumeclaims"]
75+
resources: ["pods", "persistentvolumeclaims"]
7876
verbs: ["create", "get", "watch", "list", "delete"]
7977
- apiGroups: [""]
80-
resources: ["secrets"]
81-
verbs: ["get"]
78+
resources: ["pods/log"]
79+
verbs: ["get", "watch"]
8280
- apiGroups: [""]
8381
resources: ["secrets"]
8482
verbs: ["get"]
@@ -107,7 +105,7 @@ kind: CronWorkflow
107105
metadata:
108106
name: cron-run-updatecli-diff-{{ $id }}
109107
spec:
110-
schedule: '{{ $workflow.schedule | default $.Values.defaultSchedule }}'
108+
schedule: "{{ $workflow.schedule | default $.Values.defaultSchedule }}"
111109
timezone: "UTC"
112110
successfulJobsHistoryLimit: 1
113111
failedJobsHistoryLimit: 1
@@ -119,9 +117,9 @@ spec:
119117
arguments:
120118
parameters:
121119
- name: repo-url
122-
value: {{ $workflow.url }}
120+
value: {{$workflow.url}}
123121
- name: repo-branch
124-
value: {{ $workflow.branch }}
122+
value: {{$workflow.branch}}
125123
- name: updatecli-compose-file
126-
value: {{ $workflow.composefile }}
124+
value: {{$workflow.composefile}}
127125
#{{ end }}

0 commit comments

Comments
 (0)