Skip to content

Commit 6f3e712

Browse files
author
Ted Spinks
authored
CR-6432 Updates for codefresh-engine service account (#255)
* Add missing engine role/binding for codefresh-engine sa * Add ability to specify annotations for codefresh-engine sa
1 parent ef97774 commit 6f3e712

File tree

5 files changed

+40
-2
lines changed

5 files changed

+40
-2
lines changed

charts/cf-runtime/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.3
18+
version: 0.1.4
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: Role
3+
metadata:
4+
name: codefresh-engine
5+
labels: {{- include "cf-re.labels" . | nindent 4 }}
6+
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- secrets
11+
verbs:
12+
- get
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: RoleBinding
3+
metadata:
4+
name: codefresh-engine
5+
labels: {{- include "cf-re.labels" . | nindent 4 }}
6+
roleRef:
7+
apiGroup: rbac.authorization.k8s.io
8+
kind: Role
9+
name: codefresh-engine
10+
subjects:
11+
- kind: ServiceAccount
12+
name: codefresh-engine
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
apiVersion: v1
22
kind: ServiceAccount
33
metadata:
4-
{{/* has to be a constant */}}
4+
{{- /* has to be a constant */}}
55
name: codefresh-engine
66
labels: {{- include "cf-re.labels" . | nindent 4 }}
7+
{{- if .Values.re.serviceAccount }}
8+
annotations:
9+
{{- range $key, $value := .Values.re.serviceAccount.annotations }}
10+
{{ $key }}: {{ $value }}
11+
{{- end}}
12+
{{- end}}

charts/cf-runtime/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ monitor:
2020
token: ""
2121
env: { }
2222

23+
re: { }
24+
# Optionally add an AWS IAM role to your pipelines
25+
# More info: https://codefresh.io/docs/docs/administration/codefresh-runner/#injecting-aws-arn-roles-into-the-cluster
26+
# serviceAccount:
27+
# annotations: # will be set on codefresh-engine service account
28+
# foo: bar
29+
# eks.amazonaws.com/role-arn: "arn:aws:iam::<ACCOUNT_ID>:role/<IAM_ROLE_NAME>"
30+
2331
venona:
2432
image: "quay.io/codefresh/venona:1.6.7"
2533

0 commit comments

Comments
 (0)