Skip to content

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

Merged
merged 6 commits into from
Apr 17, 2019

Conversation

msau42
Copy link
Contributor

@msau42 msau42 commented Apr 4, 2019

No description provided.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 4, 2019
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 4, 2019
@k8s-ci-robot k8s-ci-robot requested review from saad-ali and verult April 4, 2019 00:25
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 4, 2019
@msau42 msau42 mentioned this pull request Apr 4, 2019
Copy link
Contributor

@verult verult left a 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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be "latest"?

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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"
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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:
Copy link
Contributor

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

Copy link
Contributor Author

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"
Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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

@davidz627
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 17, 2019
@k8s-ci-robot k8s-ci-robot merged commit f91162a into kubernetes-sigs:master Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants