File tree Expand file tree Collapse file tree 8 files changed +58
-181
lines changed
tssc-infrastructure/templates/openshift-pipelines/tektonconfig
templates/openshift-pipelines Expand file tree Collapse file tree 8 files changed +58
-181
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22{{- include "common.serviceAccount" . }}
33---
44{{- include "common.clusterRoleBindingClusterAdmin" . }}
5+ ---
6+ {{- include "pipelines.TektonConfigRbac" . }}
Original file line number Diff line number Diff line change 11{{- define "pipelines.TektonConfigPatch" -}}
2+ metadata:
3+ annotations:
4+ meta.helm.sh/release-name: {{ .Chart.Name }}
5+ meta.helm.sh/release-namespace: {{ .Release.Namespace }}
6+ labels:
7+ app.kubernetes.io/managed-by: Helm
28spec:
39 chain:
410 transparency.enabled: 'true'
Original file line number Diff line number Diff line change 1+ apiVersion : batch/v1
2+ kind : Job
3+ metadata :
4+ name : patch-tekton-config
5+ namespace : {{ .Release.Namespace }}
6+ annotations :
7+ " helm.sh/hook " : post-install
8+ " helm.sh/hook-delete-policy " : hook-succeeded
9+ spec :
10+ backoffLimit : 30
11+ template :
12+ spec :
13+ serviceAccountName : {{ .Release.Name }}
14+ restartPolicy : OnFailure
15+ containers :
16+ - name : patch-tekton-config
17+ image : quay.io/openshift/origin-cli:latest
18+ resources :
19+ ephemeral-storage : 100Mi
20+ limits :
21+ memory : 128Mi
22+ requests :
23+ memory : 100Mi
24+ cpu : 0.1
25+ command :
26+ - /bin/bash
27+ - -c
28+ - |
29+ if [[ "{{ .Values.subscriptions.openshiftPipelines.managed }}" != "true" ]]; then
30+ echo "Skipping TektonConfig resource as pipeline subscription is not managed"
31+ echo "Success"
32+ exit 0
33+ fi
34+
35+ if ! oc get tektonconfig config >/dev/null; then
36+ echo "Waiting for the default TektonConfig to be instanciated"
37+ sleep 10
38+ exit 1
39+ fi
40+
41+ echo "Patching the TektonConfig resource"
42+ oc patch tektonconfig config --type=merge -p '{{ fromYaml (include "pipelines.TektonConfigPatch" .) | toJson }}'
43+ echo "Success"
Original file line number Diff line number Diff line change 1- apiVersion : v1
2- kind : ServiceAccount
3- metadata :
4- name : delete-tekton-config-sa
5- namespace : {{ .Release.Namespace }}
6- labels : {{- include "common.postDeployDeleteLabels" . | nindent 4 }}
7- ---
1+ {{- define "pipelines.TektonConfigRbac" -}}
82apiVersion : rbac.authorization.k8s.io/v1
93kind : ClusterRole
104metadata :
11- name : delete -tekton-config-role
5+ name : patch -tekton-config-role
126 labels : {{- include "common.postDeployDeleteLabels" . | nindent 4 }}
137rules :
148 - apiGroups : ["operator.tekton.dev"]
159 resources : ["tektonconfigs"]
16- verbs : ["get", "delete "]
10+ verbs : ["get", "patch "]
1711---
1812apiVersion : rbac.authorization.k8s.io/v1
1913kind : ClusterRoleBinding
2014metadata :
21- name : delete -tekton-config-rolebinding
15+ name : patch -tekton-config-rolebinding
2216 labels : {{- include "common.postDeployDeleteLabels" . | nindent 4 }}
2317subjects :
2418 - kind : ServiceAccount
25- name : delete -tekton-config-sa
19+ name : patch -tekton-config-sa
2620 namespace : {{ .Release.Namespace }}
2721roleRef :
2822 kind : ClusterRole
29- name : delete -tekton-config-role
23+ name : patch -tekton-config-role
3024 apiGroup : rbac.authorization.k8s.io
25+ {{- end -}}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -40,10 +40,6 @@ subscriptions:
4040 channel : pipelines-1.18
4141 source : redhat-operators
4242 sourceNamespace : openshift-marketplace
43- config :
44- env :
45- - name : AUTOINSTALL_COMPONENTS
46- value : " false"
4743 openshiftTrustedArtifactSigner :
4844 enabled : false
4945 description : Red Hat Trusted Artifact Signer Operator
You can’t perform that action at this time.
0 commit comments