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

kinder: improve the no-addons workflow #3138

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ tasks:
- --loglevel=debug
- --kubeadm-verbosity={{ .vars.kubeadmVerbosity }}
timeout: 5m
- name: patch-cluster-configuration
description: |
Patch ClusterConfiguration to disable the addons.
cmd: /bin/sh
args:
- -c
- |
docker exec {{ .vars.clusterName }}-control-plane-1 bash -c "kubectl get cm kubeadm-config -n kube-system --kubeconfig /etc/kubernetes/admin.conf -o yaml | sed s/' proxy: {}/ proxy:\n disabled: true'/ | kubectl --kubeconfig /etc/kubernetes/admin.conf apply -f -"
docker exec {{ .vars.clusterName }}-control-plane-1 bash -c "kubectl get cm kubeadm-config -n kube-system --kubeconfig /etc/kubernetes/admin.conf -o yaml | sed s/' dns: {}/ dns:\n disabled: true'/ | kubectl --kubeconfig /etc/kubernetes/admin.conf apply -f -"
timeout: 5m
- name: upgrade-control-plane
description: |
Upgrades the control-plane node to the same version of the existing control-plane. This verifies
Expand All @@ -93,6 +103,16 @@ tasks:
docker exec {{ .vars.clusterName }}-control-plane-1 kubeadm upgrade plan --ignore-preflight-errors=CoreDNSMigration,CoreDNSUnsupportedPlugins --v={{ .vars.kubeadmVerbosity }} {{ .vars.initVersion }}
docker exec {{ .vars.clusterName }}-control-plane-1 kubeadm upgrade apply -f --ignore-preflight-errors=CoreDNSMigration,CoreDNSUnsupportedPlugins --v={{ .vars.kubeadmVerbosity }} {{ .vars.initVersion }}
timeout: 5m
- name: check-addons-after-upgrade
description: |
Make sure the addon ConfigMaps were not recreated after upgrade.
cmd: /bin/sh
args:
- -c
- |
docker exec {{ .vars.clusterName }}-control-plane-1 kubectl get cm kube-proxy -n kube-system --kubeconfig /etc/kubernetes/admin.conf && exit 1
docker exec {{ .vars.clusterName }}-control-plane-1 kubectl get cm coredns -n kube-system --kubeconfig /etc/kubernetes/admin.conf && exit 1
timeout: 5m
- name: delete
description: |
Deletes the cluster
Expand Down
20 changes: 20 additions & 0 deletions kinder/ci/workflows/upgrade-no-addon-config-maps-tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ tasks:
- --loglevel=debug
- --kubeadm-verbosity={{ .vars.kubeadmVerbosity }}
timeout: 5m
- name: patch-cluster-configuration
description: |
Patch ClusterConfiguration to disable the addons.
cmd: /bin/sh
args:
- -c
- |
docker exec {{ .vars.clusterName }}-control-plane-1 bash -c "kubectl get cm kubeadm-config -n kube-system --kubeconfig /etc/kubernetes/admin.conf -o yaml | sed s/' proxy: {}/ proxy:\n disabled: true'/ | kubectl --kubeconfig /etc/kubernetes/admin.conf apply -f -"
docker exec {{ .vars.clusterName }}-control-plane-1 bash -c "kubectl get cm kubeadm-config -n kube-system --kubeconfig /etc/kubernetes/admin.conf -o yaml | sed s/' dns: {}/ dns:\n disabled: true'/ | kubectl --kubeconfig /etc/kubernetes/admin.conf apply -f -"
timeout: 5m
- name: upgrade-control-plane
description: |
Upgrades the control-plane node to the same version of the existing control-plane. This verifies
Expand All @@ -94,6 +104,16 @@ tasks:
docker exec {{ .vars.clusterName }}-control-plane-1 kubeadm upgrade plan --ignore-preflight-errors=CoreDNSMigration,CoreDNSUnsupportedPlugins --v={{ .vars.kubeadmVerbosity }} {{ .vars.initVersion }}
docker exec {{ .vars.clusterName }}-control-plane-1 kubeadm upgrade apply -f --ignore-preflight-errors=CoreDNSMigration,CoreDNSUnsupportedPlugins --v={{ .vars.kubeadmVerbosity }} {{ .vars.initVersion }}
timeout: 5m
- name: check-addons-after-upgrade
description: |
Make sure the addon ConfigMaps were not recreated after upgrade.
cmd: /bin/sh
args:
- -c
- |
docker exec {{ .vars.clusterName }}-control-plane-1 kubectl get cm kube-proxy -n kube-system --kubeconfig /etc/kubernetes/admin.conf && exit 1
docker exec {{ .vars.clusterName }}-control-plane-1 kubectl get cm coredns -n kube-system --kubeconfig /etc/kubernetes/admin.conf && exit 1
timeout: 5m
- name: delete
description: |
Deletes the cluster
Expand Down