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

add compare targets to diff images from previous release; update readme #203

Merged
merged 2 commits into from Mar 26, 2021

Conversation

kwmonroe
Copy link
Member

Adds a couple compare targets so users (and CI) can generate a list of images that have changed since a previous release. It works like this:

$ make compare-images
...
v1.21.0-beta.1-upstream: docker.io/coredns/coredns:1.8.3 docker.io/k8scloudprovider/cinder-csi-plugin:v1.20.0 docker.io/k8scloudprovider/k8s-keystone-auth:v1.20.0 docker.io/k8scloudprovider/openstack-cloud-controller-manager:v1.20.0 docker.io/kubernetesui/dashboard:v2.2.0 docker.io/kubernetesui/metrics-scraper:v1.0.6 k8s.gcr.io/k8s-dns-dnsmasq-nanny:1.15.10 k8s.gcr.io/k8s-dns-kube-dns:1.15.10 k8s.gcr.io/k8s-dns-sidecar:1.15.10 k8s.gcr.io/metrics-server-{{ arch }}:v0.3.6 k8s.gcr.io/sig-storage/csi-attacher:v2.2.1 k8s.gcr.io/sig-storage/csi-node-driver-registrar:v1.3.0 k8s.gcr.io/sig-storage/csi-provisioner:v1.6.1 k8s.gcr.io/sig-storage/csi-resizer:v0.5.1 k8s.gcr.io/sig-storage/csi-snapshotter:v2.1.3 k8s.gcr.io/sig-storage/livenessprobe:v2.1.0 nvcr.io/nvidia/k8s-device-plugin:v0.9.0 quay.io/cephcsi/cephcsi:v2.1.2 quay.io/coreos/kube-state-metrics:v1.9.8 quay.io/k8scsi/csi-attacher:v2.1.1 quay.io/k8scsi/csi-node-driver-registrar:v1.3.0 quay.io/k8scsi/csi-provisioner:v1.4.0 quay.io/k8scsi/csi-resizer:v0.5.0 quay.io/k8scsi/csi-snapshotter:v1.2.2 rocks.canonical.com/cdk/addon-resizer-{{ arch }}:1.8.9
...
v1.21.0-beta.1-versus-release-1.20: docker.io/coredns/coredns:1.8.3 docker.io/k8scloudprovider/cinder-csi-plugin:v1.20.0 docker.io/k8scloudprovider/k8s-keystone-auth:v1.20.0 docker.io/k8scloudprovider/openstack-cloud-controller-manager:v1.20.0 docker.io/kubernetesui/dashboard:v2.2.0 docker.io/kubernetesui/metrics-scraper:v1.0.6 k8s.gcr.io/sig-storage/csi-attacher:v2.2.1 k8s.gcr.io/sig-storage/csi-node-driver-registrar:v1.3.0 k8s.gcr.io/sig-storage/csi-provisioner:v1.6.1 k8s.gcr.io/sig-storage/csi-resizer:v0.5.1 k8s.gcr.io/sig-storage/csi-snapshotter:v2.1.3 k8s.gcr.io/sig-storage/livenessprobe:v2.1.0 quay.io/coreos/kube-state-metrics:v1.9.8

The releases default to latest k8s release compared to latest stable cdk-addons release, but can be overridden with KUBE_VERSION and PREV_RELEASE variables.

Partial fix for https://bugs.launchpad.net/cdk-addons/+bug/1891530; the rest will come from the jenkins job that uses this target to help the doc team highlight image changes in our release notes.

Makefile Outdated
@@ -42,3 +46,15 @@ upstream-images: prep
# NB: sed cleans up image prefix, quotes, and matches '{{ registry|default('k8s.gcr.io') }}/foo-{{ bar }}:latest', replacing the first {{..}} with the specified default registry
$(eval UPSTREAM_IMAGES := $(shell echo ${RAW_IMAGES} | sed -E -e "s/image: //g" -e "s/\{\{ registry\|default\(([^}]*)\) }}/\1/g" -e "s/['\"]//g"))
@echo "${KUBE_VERSION}-upstream: ${UPSTREAM_IMAGES}"

compare-prep:
git clone --branch ${PREV_RELEASE} --single-branch https://github.com/charmed-kubernetes/cdk-addons.git ${PREV_RELEASE}
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding --depth 1 for a smaller download if you don't need git history.

Copy link
Contributor

@Cynerva Cynerva left a comment

Choose a reason for hiding this comment

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

LGTM

@kwmonroe kwmonroe merged commit 9df68b7 into master Mar 26, 2021
@kwmonroe kwmonroe deleted the lp1891530/compare-images branch March 26, 2021 09:46
kwmonroe added a commit that referenced this pull request Mar 26, 2021
…me (#203)

* add compare targets to diff images from previous release; update readme

* add depth=1 to the shallow branch clone
kwmonroe added a commit that referenced this pull request Mar 26, 2021
…me (#203)

* add compare targets to diff images from previous release; update readme

* add depth=1 to the shallow branch clone
kwmonroe added a commit that referenced this pull request Mar 26, 2021
…me (#203)

* add compare targets to diff images from previous release; update readme

* add depth=1 to the shallow branch clone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants