Skip to content

Commit dfd5c9a

Browse files
committed
Disable pipeline SA
The service account permissions are too open by default. Therefore the account needs to be disabled. It has been replaced with an account with more limited permissions. Signed-off-by: Romain Arnaud <[email protected]>
1 parent 5067cae commit dfd5c9a

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

operator/gitops/argocd/pipeline-service/openshift-pipelines/tekton-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ metadata:
88
# the CRD will be applied and the resource can be created once the required dependencies are met.
99
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
1010
spec:
11-
# params:
12-
# - name: createRbacResource
13-
# value: "false"
11+
params:
12+
- name: createRbacResource
13+
value: "false"
1414
platforms:
1515
openshift:
1616
pipelinesAsCode:

operator/gitops/argocd/pipeline-service/tekton-chains/chains-secrets-config.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,34 @@ spec:
161161
terminationGracePeriodSeconds: 30
162162
serviceAccount: chains-secrets-admin
163163
serviceAccountName: chains-secrets-admin
164+
---
165+
apiVersion: batch/v1
166+
kind: Job
167+
metadata:
168+
name: tekton-chains-trusted-cabundle
169+
namespace: tekton-chains
170+
annotations:
171+
spec:
172+
template:
173+
spec:
174+
containers:
175+
- name: config-trusted-cabundle-generation
176+
image: registry.redhat.io/openshift4/ose-cli:v4.12@sha256:9f0cdc00b1b1a3c17411e50653253b9f6bb5329ea4fb82ad983790a6dbf2d9ad
177+
imagePullPolicy: Always
178+
command:
179+
- /bin/bash
180+
- -c
181+
- |
182+
if oc get cm config-trusted-cabundle -n tekton-chains; then
183+
echo "ConfigMap config-trusted-cabundle found"
184+
else
185+
echo "Create ConfigMap config-trusted-cabundle"
186+
oc create configmap config-trusted-cabundle --namespace tekton-chains
187+
oc label configmap config-trusted-cabundle config.openshift.io/inject-trusted-cabundle="true"
188+
fi
189+
echo "Done"
190+
dnsPolicy: ClusterFirst
191+
restartPolicy: OnFailure
192+
terminationGracePeriodSeconds: 30
193+
serviceAccount: chains-secrets-admin
194+
serviceAccountName: chains-secrets-admin

operator/test/manifests/test/tekton-chains/public-key.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ spec:
2020
set -x
2121
PUBLIC_KEY=$(oc get secret public-key -n tekton-chains -o jsonpath='{.data.cosign\.pub}')
2222
echo "$PUBLIC_KEY" | base64 -d
23-
serviceAccountName: pipeline
23+
serviceAccountName: chains-test

operator/test/manifests/test/tekton-chains/simple-copy-pipeline.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ spec:
6767
fi
6868
securityContext:
6969
runAsNonRoot: true
70-
runAsUser: 65532
7170
params:
7271
- name: IMAGE_SRC
7372
value: $(params.image-src)

0 commit comments

Comments
 (0)