Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate image-pushing jobs to use workload identity #16396

Merged
merged 13 commits into from
Feb 20, 2020
11 changes: 1 addition & 10 deletions config/jobs/image-pushing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ postsubmits:
branches:
- ^master$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20190906-d5d7ce3
command:
Expand All @@ -149,16 +150,6 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-cluster-api-gcb
- --env-passthrough=PULL_BASE_REF
- .
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
```

[gcr instructions]: https://github.com/kubernetes/k8s.io/blob/master/k8s.gcr.io/README.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ postsubmits:
branches:
- ^master$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -20,13 +21,3 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-kas-network-proxy-gcb
- --env-passthrough=PULL_BASE_REF
- .
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
55 changes: 5 additions & 50 deletions config/jobs/image-pushing/k8s-staging-apisnoop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ postsubmits:
branches:
- ^master$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -21,16 +22,6 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-apisnoop-gcb
- --env-passthrough=PULL_BASE_REF
- apps/webapp/
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
- name: apisnoop-push-kubemacs-images
cluster: test-infra-trusted
annotations:
Expand All @@ -42,6 +33,7 @@ postsubmits:
branches:
- ^master$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -52,16 +44,6 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-apisnoop-gcb
- --env-passthrough=PULL_BASE_REF
- apps/kubemacs/
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
- name: apisnoop-push-auditlogger-images
cluster: test-infra-trusted
annotations:
Expand All @@ -73,6 +55,7 @@ postsubmits:
branches:
- ^master$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -83,16 +66,6 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-apisnoop-gcb
- --env-passthrough=PULL_BASE_REF
- apps/auditlogger/
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
- name: apisnoop-push-postgres-images
cluster: test-infra-trusted
annotations:
Expand All @@ -104,6 +77,7 @@ postsubmits:
branches:
- ^master$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -114,16 +88,6 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-apisnoop-gcb
- --env-passthrough=PULL_BASE_REF
- apps/postgres/
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
- name: apisnoop-push-hasura-images
cluster: test-infra-trusted
annotations:
Expand All @@ -135,6 +99,7 @@ postsubmits:
branches:
- ^master$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -145,13 +110,3 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-apisnoop-gcb
- --env-passthrough=PULL_BASE_REF
- apps/hasura/
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
11 changes: 1 addition & 10 deletions config/jobs/image-pushing/k8s-staging-artifact-promoter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ postsubmits:
branches:
- ^master$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -20,13 +21,3 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-artifact-promoter-gcb
- --env-passthrough=PULL_BASE_REF
- .
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
11 changes: 1 addition & 10 deletions config/jobs/image-pushing/k8s-staging-capi-openstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ postsubmits:
branches:
- ^master$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -20,13 +21,3 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-capi-openstack-gcb
- --env-passthrough=PULL_BASE_REF
- .
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
55 changes: 5 additions & 50 deletions config/jobs/image-pushing/k8s-staging-cluster-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ postsubmits:
# this is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -23,16 +24,6 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-cluster-api-gcb
- --env-passthrough=PULL_BASE_REF
- .
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
kubernetes-sigs/cluster-api-provider-aws:
- name: post-cluster-api-provider-aws-push-images
cluster: test-infra-trusted
Expand All @@ -46,6 +37,7 @@ postsubmits:
# this is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -56,16 +48,6 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-cluster-api-aws-gcb
- --env-passthrough=PULL_BASE_REF
- .
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
kubernetes-sigs/cluster-api-provider-azure:
- name: post-cluster-api-provider-azure-push-images
cluster: test-infra-trusted
Expand All @@ -76,6 +58,7 @@ postsubmits:
branches:
- ^master$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -85,16 +68,6 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-cluster-api-azure-gcb
- --env-passthrough=PULL_BASE_REF
- .
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
kubernetes-sigs/cluster-api-provider-gcp:
- name: post-cluster-api-provider-gcp-push-images
cluster: test-infra-trusted
Expand All @@ -108,6 +81,7 @@ postsubmits:
# this is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -118,16 +92,6 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-cluster-api-gcp-gcb
- --env-passthrough=PULL_BASE_REF
- .
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
kubernetes-sigs/cluster-api-bootstrap-provider-kubeadm:
- name: post-cluster-api-bootstrap-provider-push-images
cluster: test-infra-trusted
Expand All @@ -140,6 +104,7 @@ postsubmits:
# this is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -150,13 +115,3 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-capi-kubeadm-gcb
- --env-passthrough=PULL_BASE_REF
- .
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
11 changes: 1 addition & 10 deletions config/jobs/image-pushing/k8s-staging-descheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ postsubmits:
# this is a regex for semver, from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
spec:
serviceAccountName: deployer # TODO(fejta): use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -26,13 +27,3 @@ postsubmits:
- --scratch-bucket=gs://k8s-staging-descheduler-gcb
- --env-passthrough=PULL_BASE_REF
- .
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
volumes:
- name: creds
secret:
secretName: deployer-service-account
9 changes: 1 addition & 8 deletions config/jobs/image-pushing/k8s-staging-e2e-test-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ postsubmits:
branches:
- ^master$
spec:
serviceAccountName: deployer # TODO(fejta)- use pusher
containers:
- image: gcr.io/k8s-testimages/image-builder:v20200213-0032cdb
command:
Expand All @@ -32,22 +33,14 @@ postsubmits:
- --env-passthrough=PULL_BASE_REF
- --build-dir=.
- test/images
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /creds/service-account.json
volumeMounts:
- name: creds
mountPath: /creds
- name: windows-cert
mountPath: /root/.docker-1809
- name: windows-cert
mountPath: /root/.docker-1903
- name: windows-cert
mountPath: /root/.docker-1909
volumes:
- name: creds
secret:
secretName: deployer-service-account
- name: windows-cert
secret:
secretName: windows-img-promoter-cert
Loading