-
Notifications
You must be signed in to change notification settings - Fork 159
Upgrade kustomize and use the set image command to patch the image name and version #242
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
Upgrade kustomize and use the set image command to patch the image name and version #242
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: msau42 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 |
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'm not familiar with Kustomize so I won't add the final LGTM, but the structure looks good
- name: REPLACEME/gcp-compute-persistent-disk-csi-driver | ||
# Replace this with your private image name | ||
newName: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver | ||
newTag: "v0.4.0-gke.0" |
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.
Should this be "latest"?
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.
We don't release any official "latest" tags, so I just put our latest supported image. What I expect developers to do, is to replace both newName and newTag with their own repo and tags.
newName: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver | ||
newTag: "v0.4.0-gke.0" | ||
- name: REPLACEME/csi-provisioner | ||
newName: quay.io/k8scsi/csi-provisioner |
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.
Why do we use quay here but GCR elsewhere?
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.
We have a bit of a chicken and egg problem. Currently in order to test a new deployment, we need to modify the staging deployment here, check it in, and then look at the staging test results.
Ideally, I want to be able to validate a new deployment in a pull job first before needing to check it in. So I want to use the dev overlay for that, but the pull jobs cannot access gke-staging images, so we need to use public images.
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.
Maybe I'll rename this template to pull instead of dev to make it more obvious what it's purpose is for
newName: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver | ||
newTag: "v0.4.0-gke.0" | ||
- name: REPLACEME/csi-provisioner | ||
newName: quay.io/k8scsi/csi-provisioner |
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 pull job should be using the gke release versions of sidecars right? and the REPLACEME/gcp-compute-persistent-disk-csi-driver
should actually be replaced by a pull request specific built container?
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.
Ideally the pull job should use the gke versions of sidecars, however, we have a chicken and egg problem when we want to test a new version of a sidecar but it's not available in gke-release yet. For example, enabling topology.
The other option, is to not test new sidecar features in the pull job (only test stable features), and only switch over pull jobs when we change stable. Actually, the pull job could just use the stable overlay.
- name: REPLACEME/gcp-compute-persistent-disk-csi-driver | ||
# Replace this with your private image names and tags | ||
newName: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver | ||
newTag: "v0.4.0-gke.0" |
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.
should this instead be not replaced instead. Therefore when someone tries to use a dev overlay without changing anything they get an image pull failure (saying REPLACEME
and reminding the user to replace to image) instead of failing silently by just giving them a working image.
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.
We currently use the dev overlay as our alpha features overlay too (for snapshot). I can create a separate overlay for alpha if we want to separate that out
resources: ["volumesnapshots"] | ||
verbs: ["get", "list"] | ||
|
||
- op: add |
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.
these have to be two seperate rules? We can't consolidate them somehow?
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.
Based on the syntax, I don't think it's possible to combine them. The value
field is not an array
@@ -1,5 +1,22 @@ | |||
apiVersion: kustomize.config.k8s.io/v1beta1 | |||
kind: Kustomization | |||
bases: | |||
- ../../base | |||
patches: |
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.
shouldn't the dev overlay also have the rbac_add_snapshotter.yaml
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.
Rebased dev overlay on top of alpha overlay
images: | ||
- name: REPLACEME/gcp-compute-persistent-disk-csi-driver | ||
newName: gcr.io/gke-release-staging/gcp-compute-persistent-disk-csi-driver | ||
newTag: "latest" |
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.
would it make more sense to rename this overlay prow-gke-release-staging
or something like that?
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.
wait nevermind, thats another overlay. prow-gke-release-staging-latest
?
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.
renamed all prow-gke overlays
/lgtm |
No description provided.