-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
add pull-k8sio-backup presubmit check #15398
Conversation
12a8e65
to
e99f047
Compare
/assign @cjwagner |
/hold cancel |
Oops, forgot that I need to provide the secret for this job to work. Re-holding... /hold Assigning to test-infra oncall: |
volumes: | ||
- name: creds | ||
secret: | ||
secretName: k8s-gcr-backup-test-prod-bak-service-account |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it safe to have these credentials used in a presubmit and hosted on the untrusted build cluster? You should assume that any presubmit job can mount and use credentials in that cluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes --- the cred will only ever have write access to the ephemeral test resources an GCP.
# Check that changes to backup scripts are valid. | ||
- name: pull-k8sio-backup | ||
decorate: true | ||
skip_report: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the default, you can omit it.
- name: pull-k8sio-backup | ||
decorate: true | ||
skip_report: false | ||
run_if_changed: 'infra/gcp/backup_tools/.*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: ^infra/gcp/backup_tools/
probably more closely matches what you want.
- image: gcr.io/k8s-testimages/kubekins-e2e:v20191124-4beb966-1.17 | ||
command: | ||
- infra/gcp/backup_tools/backup_test.sh | ||
env: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your indentation is off starting on this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other comments can be ignored, but I'm pretty sure this won't work as you expect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, I suppose it's troublesome that the presubmit checks passed regardless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a known issue, but I haven't addressed it out of fear that strictly parsing pod specs will fail if new fields that Prow doesn't know about are used. It may not be a legitimate concern though, it is kind of hard for me to tell if that would actually be a common problem. It may be fine if
- new podspec fields aren't used much in prowjobs
- we keep this dependency up to date and continue to keep prow.k8s.io up to date:
Lines 1448 to 1456 in 44c22ec
go_repository( name = "io_k8s_apimachinery", build_file_generation = "on", build_file_proto_mode = "disable", importpath = "k8s.io/apimachinery", replace = "k8s.io/apimachinery", sum = "h1:7Kns6qqhMAQWvGkxYOLSLRZ5hJO0/5pcE5lPGP2fxUw=", version = "v0.0.0-20190817020851-f2f3a405f61d", )
This checks the backup_tools scripts by testing them. Specifically, it runs the backup_test.sh script, which performs the backup from us.gcr.io/k8s-gcr-backup-test-prod to us.gcr.io/k8s-gcr-backup-test-prod-bak for a set of chosen images. Both this test and the real backup logic in backup_prod.sh share the same "build_gcrane" and "copy_with_date" functions --- the main difference is the repositories where the backups happen and the images that are backed up.
e99f047
to
85fcf2a
Compare
@cjwagner PTAL |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cjwagner, listx The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
@listx: Updated the
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This checks the backup_tools scripts by testing them. Specifically, it
runs the backup_test.sh script, which performs the backup from
for a set of chosen images. Both this test and the real backup logic in
backup_prod.sh share the same "build_gcrane" and "copy_with_date"
functions --- the main difference is the repositories where the backups
happen and the images that are backed up.
NOTE: I need to provide the test-environment secret
k8s-gcr-backup-test-prod-bak-service-account
(i.e.,k8s-infra-gcr-promoter@k8s-gcr-backup-test-prod-bak.iam.gserviceaccount.com
) for this job to work./hold
/cc @thockin @dims @justinsb