File tree Expand file tree Collapse file tree 8 files changed +167
-7
lines changed
infra/gcp/terraform/k8s-infra-prow Expand file tree Collapse file tree 8 files changed +167
-7
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,11 @@ module "prow_bucket" {
115
115
role = " roles/storage.objectAdmin"
116
116
member = " serviceAccount:prow-build-trusted@k8s-infra-prow-build-trusted.iam.gserviceaccount.com"
117
117
},
118
+ {
119
+ // IBM build clusters, pods in the test-pods namespace only
120
+ role = " roles/storage.objectAdmin"
121
+ member = " principalSet://iam.googleapis.com/projects/16065310909/locations/global/workloadIdentityPools/ibm-clusters/attribute.namespace/test-pods"
122
+ },
118
123
{
119
124
role = " roles/storage.objectViewer"
120
125
member = " allUsers"
Original file line number Diff line number Diff line change @@ -13,26 +13,26 @@ spec:
13
13
operator : Exists
14
14
template :
15
15
metadata :
16
- name : ' external-secrets-{{ .name }}'
16
+ name : " external-secrets-{{ .name }}"
17
17
spec :
18
18
destination :
19
19
namespace : external-secrets
20
20
server : " {{ .server }}"
21
21
project : default
22
22
sources :
23
23
- chart : external-secrets
24
- repoURL : ' https://charts.external-secrets.io'
25
- targetRevision : 0.10.3
24
+ repoURL : " https://charts.external-secrets.io"
25
+ targetRevision : 0.14.4
26
26
helm :
27
27
releaseName : external-secrets
28
28
parameters :
29
29
- name : installCRDs
30
- value : ' true'
30
+ value : " true"
31
31
- name : serviceAccount.name
32
32
value : external-secrets
33
33
valueFiles :
34
- - $values/kubernetes/{{ .name }}/helm/external-secrets.yaml
35
- - repoURL : ' https://github.com/kubernetes/k8s.io.git'
34
+ - $values/kubernetes/{{ .name }}/helm/external-secrets.yaml
35
+ - repoURL : " https://github.com/kubernetes/k8s.io.git"
36
36
targetRevision : main
37
37
ref : values
38
38
syncPolicy :
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ resources:
5
5
- atlantis.yaml
6
6
- external-secrets.yaml
7
7
- cert-manager.yaml
8
+ - kyverno.yaml
8
9
- prow.yaml
9
10
- istio.yaml
10
11
- oauth2-proxy.yaml
Original file line number Diff line number Diff line change
1
+ apiVersion : argoproj.io/v1alpha1
2
+ kind : ApplicationSet
3
+ metadata :
4
+ name : kyverno
5
+ spec :
6
+ goTemplate : true
7
+ generators :
8
+ - clusters :
9
+ selector :
10
+ matchLabels :
11
+ cloud : ibm
12
+ template :
13
+ metadata :
14
+ name : " kyverno-{{ .name }}"
15
+ spec :
16
+ destination :
17
+ namespace : kyverno
18
+ server : " {{ .server }}"
19
+ project : default
20
+ sources :
21
+ - chart : kyverno
22
+ repoURL : " https://kyverno.github.io/kyverno"
23
+ targetRevision : 3.3.7
24
+ helm :
25
+ releaseName : kyverno
26
+ valueFiles :
27
+ - $values/kubernetes/{{ .name }}/helm/kyverno.yaml
28
+ - repoURL : " https://github.com/kubernetes/k8s.io.git"
29
+ targetRevision : main
30
+ ref : values
31
+ syncPolicy :
32
+ automated :
33
+ prune : true
34
+ selfHeal : true
35
+ syncOptions :
36
+ - CreateNamespace=true
Original file line number Diff line number Diff line change @@ -7,3 +7,47 @@ extraObjects:
7
7
provider :
8
8
gcpsm :
9
9
projectID : k8s-infra-prow-build
10
+ - apiVersion : v1
11
+ kind : ConfigMap
12
+ metadata :
13
+ name : google-adc
14
+ data :
15
+ adc.json : |
16
+ {
17
+ "universe_domain": "googleapis.com",
18
+ "type": "external_account",
19
+ "audience": "//iam.googleapis.com/projects/16065310909/locations/global/workloadIdentityPools/ibm-clusters/providers/ppc64le",
20
+ "subject_token_type": "urn:ietf:params:oauth:token-type:jwt",
21
+ "token_url": "https://sts.googleapis.com/v1/token",
22
+ "credential_source": {
23
+ "file": "/var/run/secrets/google-iam-token/serviceaccount/token",
24
+ "format": {
25
+ "type": "text"
26
+ }
27
+ }
28
+ }
29
+
30
+ extraVolumes :
31
+ - name : google-iam-token
32
+ projected :
33
+ defaultMode : 420
34
+ sources :
35
+ - serviceAccountToken :
36
+ audience : sts.googleapis.com
37
+ expirationSeconds : 86400
38
+ path : token
39
+ - name : google-adc
40
+ configMap :
41
+ name : google-adc
42
+
43
+ extraEnv :
44
+ - name : GOOGLE_APPLICATION_CREDENTIALS
45
+ value : /etc/google/adc.json
46
+
47
+ extraVolumeMounts :
48
+ - mountPath : /var/run/secrets/google-iam-token/serviceaccount
49
+ name : google-iam-token
50
+ readOnly : true
51
+ - mountPath : /etc/google
52
+ name : google-adc
53
+ readOnly : true
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ resources:
7
7
- boskos-reaper.yaml
8
8
- boskos-resources-configmap.yaml
9
9
- boskos.yaml
10
- - build-serviceaccounts .yaml
10
+ - kyverno .yaml
11
11
- limit-range.yaml
12
+ - secrets.yaml
13
+ - oidc.yaml
12
14
- test-pods-poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
1
+ apiVersion : kyverno.io/v1
2
+ kind : ClusterPolicy
3
+ metadata :
4
+ name : insert-gcp-credentials
5
+ spec :
6
+ rules :
7
+ - name : add-creds
8
+ match :
9
+ any :
10
+ - resources :
11
+ kinds :
12
+ - Pod
13
+ preconditions :
14
+ any :
15
+ - key : ' {{request.object.metadata.labels."created-by-prow"}}'
16
+ operator : Equals
17
+ value : " true"
18
+ mutate :
19
+ patchStrategicMerge :
20
+ spec :
21
+ initContainers :
22
+ # pod order matters
23
+ - name : clonerefs
24
+ - (name) : " initupload"
25
+ # prow passes the json path directly, uncomment this once the feature is disabled in prow
26
+ # env:
27
+ # - name: GOOGLE_APPLICATION_CREDENTIALS
28
+ # value: /secrets/gcs/service-account.json
29
+ volumeMounts :
30
+ - mountPath : /var/run/secrets/google-iam-token/serviceaccount
31
+ name : google-iam-token
32
+ readOnly : true
33
+ containers :
34
+ - name : test
35
+ - (name) : sidecar
36
+ # prow passes the json path directly, uncomment this once the feature is disabled in prow
37
+ # env:
38
+ # - name: GOOGLE_APPLICATION_CREDENTIALS
39
+ # value: /secrets/gcs/service-account.json
40
+ volumeMounts :
41
+ - mountPath : /var/run/secrets/google-iam-token/serviceaccount
42
+ name : google-iam-token
43
+ readOnly : true
44
+ volumes :
45
+ - name : google-iam-token
46
+ projected :
47
+ defaultMode : 420
48
+ sources :
49
+ - serviceAccountToken :
50
+ audience : sts.googleapis.com
51
+ expirationSeconds : 86400
52
+ path : token
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Secret
3
+ metadata :
4
+ name : service-account
5
+ namespace : test-pods
6
+ stringData :
7
+ service-account.json : |
8
+ {
9
+ "universe_domain": "googleapis.com",
10
+ "type": "external_account",
11
+ "audience": "//iam.googleapis.com/projects/16065310909/locations/global/workloadIdentityPools/ibm-clusters/providers/ppc64le",
12
+ "subject_token_type": "urn:ietf:params:oauth:token-type:jwt",
13
+ "token_url": "https://sts.googleapis.com/v1/token",
14
+ "credential_source": {
15
+ "file": "/var/run/secrets/google-iam-token/serviceaccount/token",
16
+ "format": {
17
+ "type": "text"
18
+ }
19
+ }
20
+ }
You can’t perform that action at this time.
0 commit comments