From a5657cfbf6c96276896839ade7052bb0e734b06d Mon Sep 17 00:00:00 2001 From: Alessio Dionisi Date: Thu, 28 Nov 2024 15:11:11 +0100 Subject: [PATCH] Feat: release v0.30.0 (#553) * feat: EXPERIMENTAL add kapp support on furyctl * fix: tests and linting * fix: tests for kapp * feat: add has feature kapp * fix: wrong function name on download.go * fix: missing feature gate on validator.go for kapp * fix: validator test, bump mock version to 1.29.0 * test: add kapp tool dependency test * feat: do not try to download kapp if not in kfd.yaml * fix: support kapp only if defined in kfd.yaml * Add support for upcoming distribution versions * feat: add basic on-premises upgrade paths * fix: update fields to reflect new schema * feat: add upgrade path for ingress v3 * Add support for upcoming distribution versions * fix: update fields to reflect new schema * chore: pin version v1.30.0-rc.0 for fury-distribution * test: fix compatibility checks off-by-ones * test: fix compatibility checks off-by-ones * chore: pin version v1.30.0-rc.0 for fury-distribution * lint: use concatenation instead of fmt.Sprintf * feat: support upgrades 1.28.4-1.28.5 and 1.29.4-1.29.5 * feat: add all missing upgrade paths * deps: use fury-distribution v1.30.0-rc.4 * deps: fix go mod * deps: use fury-distribution v1.30.0-rc.6 * deps: use fury-distribution v1.30.0 * deps: use kubernetes client 1.30.7 * deps: sync go sum * docs: add 0.30.0 to matrix * docs: update comp matrix and readme * tests: add missing versions * docs: update comp matrix --------- Co-authored-by: Manuel Romei Co-authored-by: Samuele Chiocca Co-authored-by: Simone Bruzzese --- README.md | 8 +- .../1.26.5-1.26.6/pre-distribution.sh.tpl | 1 - .../1.27.9-1.28.5/post-distribution.sh.tpl | 36 +++++ .../1.27.9-1.28.5/pre-distribution.sh.tpl | 10 ++ .../1.28.4-1.28.5/post-distribution.sh.tpl | 36 +++++ .../1.28.4-1.28.5/pre-distribution.sh.tpl | 10 ++ .../1.28.4-1.29.5/post-distribution.sh.tpl | 36 +++++ .../1.28.4-1.29.5/pre-distribution.sh.tpl | 10 ++ .../1.28.5-1.29.5/pre-distribution.sh.tpl | 10 ++ .../1.29.4-1.29.5/post-distribution.sh.tpl | 36 +++++ .../1.29.4-1.29.5/pre-distribution.sh.tpl | 10 ++ .../1.29.4-1.30.0/post-distribution.sh.tpl | 36 +++++ .../1.29.4-1.30.0/pre-distribution.sh.tpl | 10 ++ .../1.29.5-1.30.0/pre-distribution.sh.tpl | 10 ++ .../1.27.9-1.28.5/post-distribution.sh.tpl | 36 +++++ .../1.27.9-1.28.5/pre-distribution.sh.tpl | 10 ++ .../1.28.4-1.28.5/post-distribution.sh.tpl | 36 +++++ .../1.28.4-1.28.5/pre-distribution.sh.tpl | 10 ++ .../1.28.4-1.29.5/post-distribution.sh.tpl | 36 +++++ .../1.28.4-1.29.5/pre-distribution.sh.tpl | 10 ++ .../1.28.5-1.29.5/pre-distribution.sh.tpl | 10 ++ .../1.29.4-1.29.5/post-distribution.sh.tpl | 36 +++++ .../1.29.4-1.29.5/pre-distribution.sh.tpl | 10 ++ .../1.29.4-1.30.0/post-distribution.sh.tpl | 36 +++++ .../1.29.4-1.30.0/pre-distribution.sh.tpl | 10 ++ .../1.29.5-1.30.0/pre-distribution.sh.tpl | 10 ++ .../1.27.9-1.28.5/post-distribution.sh.tpl | 36 +++++ .../1.27.9-1.28.5/pre-distribution.sh.tpl | 10 ++ .../1.27.9-1.28.5/pre-kubernetes.sh.tpl | 20 +++ .../1.28.4-1.28.5/post-distribution.sh.tpl | 36 +++++ .../1.28.4-1.28.5/pre-distribution.sh.tpl | 10 ++ .../1.28.4-1.28.5/pre-kubernetes.sh.tpl | 20 +++ .../1.28.4-1.29.5/post-distribution.sh.tpl | 36 +++++ .../1.28.4-1.29.5/pre-distribution.sh.tpl | 10 ++ .../1.28.4-1.29.5/pre-kubernetes.sh.tpl | 20 +++ .../1.28.5-1.29.5/pre-distribution.sh.tpl | 10 ++ .../1.28.5-1.29.5/pre-kubernetes.sh.tpl | 20 +++ .../1.29.4-1.29.5/post-distribution.sh.tpl | 36 +++++ .../1.29.4-1.29.5/pre-distribution.sh.tpl | 10 ++ .../1.29.4-1.29.5/pre-kubernetes.sh.tpl | 20 +++ .../1.29.4-1.30.0/post-distribution.sh.tpl | 36 +++++ .../1.29.4-1.30.0/pre-distribution.sh.tpl | 10 ++ .../1.29.4-1.30.0/pre-kubernetes.sh.tpl | 20 +++ .../1.29.5-1.30.0/pre-distribution.sh.tpl | 10 ++ .../1.29.5-1.30.0/pre-kubernetes.sh.tpl | 20 +++ docs/COMPATIBILITY_MATRIX.md | 47 +++--- go.mod | 69 ++++----- go.sum | 34 +++-- .../ekscluster/common/distribution.go | 4 +- internal/cluster/phase.go | 4 + internal/dependencies/tools/kapp.go | 74 ++++++++++ internal/dependencies/tools/kapp_test.go | 137 ++++++++++++++++++ .../tools/test_data/kapp/0.61.0/kapp | 7 + .../tools/test_data/kapp/0.62.0/kapp | 7 + internal/dependencies/tools/tool.go | 9 ++ internal/dependencies/tools/tool_test.go | 11 ++ internal/dependencies/tools/validator.go | 4 + internal/dependencies/tools/validator_test.go | 12 +- internal/distribution/compatibility.go | 51 +++++-- internal/distribution/compatibility_test.go | 99 +++++++++---- internal/distribution/features.go | 9 ++ internal/distribution/features_test.go | 38 ++++- internal/distribution/iac.go | 1 + internal/tool/kapp/runner.go | 107 ++++++++++++++ internal/tool/runner.go | 12 ++ pkg/dependencies/download.go | 4 + 66 files changed, 1514 insertions(+), 125 deletions(-) create mode 100644 configs/upgrades/ekscluster/1.27.9-1.28.5/post-distribution.sh.tpl create mode 100644 configs/upgrades/ekscluster/1.27.9-1.28.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/ekscluster/1.28.4-1.28.5/post-distribution.sh.tpl create mode 100644 configs/upgrades/ekscluster/1.28.4-1.28.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/ekscluster/1.28.4-1.29.5/post-distribution.sh.tpl create mode 100644 configs/upgrades/ekscluster/1.28.4-1.29.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/ekscluster/1.28.5-1.29.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/ekscluster/1.29.4-1.29.5/post-distribution.sh.tpl create mode 100644 configs/upgrades/ekscluster/1.29.4-1.29.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/ekscluster/1.29.4-1.30.0/post-distribution.sh.tpl create mode 100644 configs/upgrades/ekscluster/1.29.4-1.30.0/pre-distribution.sh.tpl create mode 100644 configs/upgrades/ekscluster/1.29.5-1.30.0/pre-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.27.9-1.28.5/post-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.27.9-1.28.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.28.4-1.28.5/post-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.28.4-1.28.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.28.4-1.29.5/post-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.28.4-1.29.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.28.5-1.29.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.29.4-1.29.5/post-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.29.4-1.29.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.29.4-1.30.0/post-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.29.4-1.30.0/pre-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.29.5-1.30.0/pre-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.27.9-1.28.5/post-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.27.9-1.28.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.27.9-1.28.5/pre-kubernetes.sh.tpl create mode 100644 configs/upgrades/onpremises/1.28.4-1.28.5/post-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.28.4-1.28.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.28.4-1.28.5/pre-kubernetes.sh.tpl create mode 100644 configs/upgrades/onpremises/1.28.4-1.29.5/post-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.28.4-1.29.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.28.4-1.29.5/pre-kubernetes.sh.tpl create mode 100644 configs/upgrades/onpremises/1.28.5-1.29.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.28.5-1.29.5/pre-kubernetes.sh.tpl create mode 100644 configs/upgrades/onpremises/1.29.4-1.29.5/post-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.29.4-1.29.5/pre-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.29.4-1.29.5/pre-kubernetes.sh.tpl create mode 100644 configs/upgrades/onpremises/1.29.4-1.30.0/post-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.29.4-1.30.0/pre-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.29.4-1.30.0/pre-kubernetes.sh.tpl create mode 100644 configs/upgrades/onpremises/1.29.5-1.30.0/pre-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.29.5-1.30.0/pre-kubernetes.sh.tpl create mode 100644 internal/dependencies/tools/kapp.go create mode 100644 internal/dependencies/tools/kapp_test.go create mode 100644 internal/dependencies/tools/test_data/kapp/0.61.0/kapp create mode 100644 internal/dependencies/tools/test_data/kapp/0.62.0/kapp create mode 100644 internal/tool/kapp/runner.go diff --git a/README.md b/README.md index 5fe6fa51f..e7dfdd693 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@

The Swiss Army Knife
for the Kubernetes Fury Distribution

[![Build Status](https://ci.sighup.io/api/badges/sighupio/furyctl/status.svg?ref=refs/heads/main)](https://ci.sighup.io/sighupio/furyctl) -![Release](https://img.shields.io/badge/furyctl-v0.29.10-blue) +![Release](https://img.shields.io/badge/furyctl-v0.30.0-blue) ![Slack](https://img.shields.io/badge/slack-@kubernetes/fury-yellow.svg?logo=slack) ![License](https://img.shields.io/github/license/sighupio/furyctl) [![Go Report Card](https://goreportcard.com/badge/github.com/sighupio/furyctl)](https://goreportcard.com/report/github.com/sighupio/furyctl) @@ -69,7 +69,7 @@ $ furyctl version ... goVersion: go1.23 osArch: amd64 -version: 0.29.10 +version: 0.30.0 ``` ### Installing from source @@ -117,7 +117,7 @@ Once you've ensured the above dependencies are installed, you can proceed with t gitCommit: 217cdcc8bf075fccfdb11c41ccc6bb317ec704bc goVersion: go1.23.2 osArch: arm64 - version: 0.29.10 + version: 0.30.0 ``` 5. (optional) move the binary to your `bin` folder, in macOS: @@ -167,7 +167,7 @@ Additionally, the schema of the file is versioned with the `apiVersion` field, s To scaffold a configuration file to use as a starter, you use the following command: ```bash -furyctl create config --version v1.29.4 --kind "EKSCluster" +furyctl create config --version v1.30.0 --kind "EKSCluster" ``` > 💡 **TIP** diff --git a/configs/upgrades/ekscluster/1.26.5-1.26.6/pre-distribution.sh.tpl b/configs/upgrades/ekscluster/1.26.5-1.26.6/pre-distribution.sh.tpl index 3fa5d0aab..7813a1375 100644 --- a/configs/upgrades/ekscluster/1.26.5-1.26.6/pre-distribution.sh.tpl +++ b/configs/upgrades/ekscluster/1.26.5-1.26.6/pre-distribution.sh.tpl @@ -9,7 +9,6 @@ kubectlbin="{{ .paths.kubectl }}" $kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration {{- end }} - # Always remove cerebro, it was removed $kubectlbin delete --ignore-not-found=true deployment cerebro -n logging diff --git a/configs/upgrades/ekscluster/1.27.9-1.28.5/post-distribution.sh.tpl b/configs/upgrades/ekscluster/1.27.9-1.28.5/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/ekscluster/1.27.9-1.28.5/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/ekscluster/1.27.9-1.28.5/pre-distribution.sh.tpl b/configs/upgrades/ekscluster/1.27.9-1.28.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/ekscluster/1.27.9-1.28.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/ekscluster/1.28.4-1.28.5/post-distribution.sh.tpl b/configs/upgrades/ekscluster/1.28.4-1.28.5/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/ekscluster/1.28.4-1.28.5/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/ekscluster/1.28.4-1.28.5/pre-distribution.sh.tpl b/configs/upgrades/ekscluster/1.28.4-1.28.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/ekscluster/1.28.4-1.28.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/ekscluster/1.28.4-1.29.5/post-distribution.sh.tpl b/configs/upgrades/ekscluster/1.28.4-1.29.5/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/ekscluster/1.28.4-1.29.5/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/ekscluster/1.28.4-1.29.5/pre-distribution.sh.tpl b/configs/upgrades/ekscluster/1.28.4-1.29.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/ekscluster/1.28.4-1.29.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/ekscluster/1.28.5-1.29.5/pre-distribution.sh.tpl b/configs/upgrades/ekscluster/1.28.5-1.29.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/ekscluster/1.28.5-1.29.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/ekscluster/1.29.4-1.29.5/post-distribution.sh.tpl b/configs/upgrades/ekscluster/1.29.4-1.29.5/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/ekscluster/1.29.4-1.29.5/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/ekscluster/1.29.4-1.29.5/pre-distribution.sh.tpl b/configs/upgrades/ekscluster/1.29.4-1.29.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/ekscluster/1.29.4-1.29.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/ekscluster/1.29.4-1.30.0/post-distribution.sh.tpl b/configs/upgrades/ekscluster/1.29.4-1.30.0/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/ekscluster/1.29.4-1.30.0/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/ekscluster/1.29.4-1.30.0/pre-distribution.sh.tpl b/configs/upgrades/ekscluster/1.29.4-1.30.0/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/ekscluster/1.29.4-1.30.0/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/ekscluster/1.29.5-1.30.0/pre-distribution.sh.tpl b/configs/upgrades/ekscluster/1.29.5-1.30.0/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/ekscluster/1.29.5-1.30.0/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/kfddistribution/1.27.9-1.28.5/post-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.27.9-1.28.5/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/kfddistribution/1.27.9-1.28.5/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/kfddistribution/1.27.9-1.28.5/pre-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.27.9-1.28.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/kfddistribution/1.27.9-1.28.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/kfddistribution/1.28.4-1.28.5/post-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.28.4-1.28.5/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/kfddistribution/1.28.4-1.28.5/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/kfddistribution/1.28.4-1.28.5/pre-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.28.4-1.28.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/kfddistribution/1.28.4-1.28.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/kfddistribution/1.28.4-1.29.5/post-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.28.4-1.29.5/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/kfddistribution/1.28.4-1.29.5/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/kfddistribution/1.28.4-1.29.5/pre-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.28.4-1.29.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/kfddistribution/1.28.4-1.29.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/kfddistribution/1.28.5-1.29.5/pre-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.28.5-1.29.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/kfddistribution/1.28.5-1.29.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/kfddistribution/1.29.4-1.29.5/post-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.29.4-1.29.5/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/kfddistribution/1.29.4-1.29.5/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/kfddistribution/1.29.4-1.29.5/pre-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.29.4-1.29.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/kfddistribution/1.29.4-1.29.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/kfddistribution/1.29.4-1.30.0/post-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.29.4-1.30.0/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/kfddistribution/1.29.4-1.30.0/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/kfddistribution/1.29.4-1.30.0/pre-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.29.4-1.30.0/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/kfddistribution/1.29.4-1.30.0/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/kfddistribution/1.29.5-1.30.0/pre-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.29.5-1.30.0/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/kfddistribution/1.29.5-1.30.0/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/onpremises/1.27.9-1.28.5/post-distribution.sh.tpl b/configs/upgrades/onpremises/1.27.9-1.28.5/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/onpremises/1.27.9-1.28.5/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/onpremises/1.27.9-1.28.5/pre-distribution.sh.tpl b/configs/upgrades/onpremises/1.27.9-1.28.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/onpremises/1.27.9-1.28.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/onpremises/1.27.9-1.28.5/pre-kubernetes.sh.tpl b/configs/upgrades/onpremises/1.27.9-1.28.5/pre-kubernetes.sh.tpl new file mode 100644 index 000000000..12e984f66 --- /dev/null +++ b/configs/upgrades/onpremises/1.27.9-1.28.5/pre-kubernetes.sh.tpl @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +set -e + +{{- if index .spec "kubernetes" }} + +## master upgrades - only one at a time +{{- range $h := .spec.kubernetes.masters.hosts }} +ansible-playbook 55.upgrade-control-plane.yml --limit "{{ $h.name }}" --become +{{- end }} + +{{- if ne .upgrade.skipNodesUpgrade true }} +{{- range $n := .spec.kubernetes.nodes }} + {{- range $h := $n.hosts }} +ansible-playbook 56.upgrade-worker-nodes.yml --limit "{{ $h.name }}" + {{- end }} +{{- end }} +{{- end }} + +{{- end }} diff --git a/configs/upgrades/onpremises/1.28.4-1.28.5/post-distribution.sh.tpl b/configs/upgrades/onpremises/1.28.4-1.28.5/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/onpremises/1.28.4-1.28.5/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/onpremises/1.28.4-1.28.5/pre-distribution.sh.tpl b/configs/upgrades/onpremises/1.28.4-1.28.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/onpremises/1.28.4-1.28.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/onpremises/1.28.4-1.28.5/pre-kubernetes.sh.tpl b/configs/upgrades/onpremises/1.28.4-1.28.5/pre-kubernetes.sh.tpl new file mode 100644 index 000000000..12e984f66 --- /dev/null +++ b/configs/upgrades/onpremises/1.28.4-1.28.5/pre-kubernetes.sh.tpl @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +set -e + +{{- if index .spec "kubernetes" }} + +## master upgrades - only one at a time +{{- range $h := .spec.kubernetes.masters.hosts }} +ansible-playbook 55.upgrade-control-plane.yml --limit "{{ $h.name }}" --become +{{- end }} + +{{- if ne .upgrade.skipNodesUpgrade true }} +{{- range $n := .spec.kubernetes.nodes }} + {{- range $h := $n.hosts }} +ansible-playbook 56.upgrade-worker-nodes.yml --limit "{{ $h.name }}" + {{- end }} +{{- end }} +{{- end }} + +{{- end }} diff --git a/configs/upgrades/onpremises/1.28.4-1.29.5/post-distribution.sh.tpl b/configs/upgrades/onpremises/1.28.4-1.29.5/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/onpremises/1.28.4-1.29.5/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/onpremises/1.28.4-1.29.5/pre-distribution.sh.tpl b/configs/upgrades/onpremises/1.28.4-1.29.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/onpremises/1.28.4-1.29.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/onpremises/1.28.4-1.29.5/pre-kubernetes.sh.tpl b/configs/upgrades/onpremises/1.28.4-1.29.5/pre-kubernetes.sh.tpl new file mode 100644 index 000000000..12e984f66 --- /dev/null +++ b/configs/upgrades/onpremises/1.28.4-1.29.5/pre-kubernetes.sh.tpl @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +set -e + +{{- if index .spec "kubernetes" }} + +## master upgrades - only one at a time +{{- range $h := .spec.kubernetes.masters.hosts }} +ansible-playbook 55.upgrade-control-plane.yml --limit "{{ $h.name }}" --become +{{- end }} + +{{- if ne .upgrade.skipNodesUpgrade true }} +{{- range $n := .spec.kubernetes.nodes }} + {{- range $h := $n.hosts }} +ansible-playbook 56.upgrade-worker-nodes.yml --limit "{{ $h.name }}" + {{- end }} +{{- end }} +{{- end }} + +{{- end }} diff --git a/configs/upgrades/onpremises/1.28.5-1.29.5/pre-distribution.sh.tpl b/configs/upgrades/onpremises/1.28.5-1.29.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/onpremises/1.28.5-1.29.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/onpremises/1.28.5-1.29.5/pre-kubernetes.sh.tpl b/configs/upgrades/onpremises/1.28.5-1.29.5/pre-kubernetes.sh.tpl new file mode 100644 index 000000000..12e984f66 --- /dev/null +++ b/configs/upgrades/onpremises/1.28.5-1.29.5/pre-kubernetes.sh.tpl @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +set -e + +{{- if index .spec "kubernetes" }} + +## master upgrades - only one at a time +{{- range $h := .spec.kubernetes.masters.hosts }} +ansible-playbook 55.upgrade-control-plane.yml --limit "{{ $h.name }}" --become +{{- end }} + +{{- if ne .upgrade.skipNodesUpgrade true }} +{{- range $n := .spec.kubernetes.nodes }} + {{- range $h := $n.hosts }} +ansible-playbook 56.upgrade-worker-nodes.yml --limit "{{ $h.name }}" + {{- end }} +{{- end }} +{{- end }} + +{{- end }} diff --git a/configs/upgrades/onpremises/1.29.4-1.29.5/post-distribution.sh.tpl b/configs/upgrades/onpremises/1.29.4-1.29.5/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/onpremises/1.29.4-1.29.5/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/onpremises/1.29.4-1.29.5/pre-distribution.sh.tpl b/configs/upgrades/onpremises/1.29.4-1.29.5/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/onpremises/1.29.4-1.29.5/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/onpremises/1.29.4-1.29.5/pre-kubernetes.sh.tpl b/configs/upgrades/onpremises/1.29.4-1.29.5/pre-kubernetes.sh.tpl new file mode 100644 index 000000000..12e984f66 --- /dev/null +++ b/configs/upgrades/onpremises/1.29.4-1.29.5/pre-kubernetes.sh.tpl @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +set -e + +{{- if index .spec "kubernetes" }} + +## master upgrades - only one at a time +{{- range $h := .spec.kubernetes.masters.hosts }} +ansible-playbook 55.upgrade-control-plane.yml --limit "{{ $h.name }}" --become +{{- end }} + +{{- if ne .upgrade.skipNodesUpgrade true }} +{{- range $n := .spec.kubernetes.nodes }} + {{- range $h := $n.hosts }} +ansible-playbook 56.upgrade-worker-nodes.yml --limit "{{ $h.name }}" + {{- end }} +{{- end }} +{{- end }} + +{{- end }} diff --git a/configs/upgrades/onpremises/1.29.4-1.30.0/post-distribution.sh.tpl b/configs/upgrades/onpremises/1.29.4-1.30.0/post-distribution.sh.tpl new file mode 100644 index 000000000..5d9e47d6e --- /dev/null +++ b/configs/upgrades/onpremises/1.29.4-1.30.0/post-distribution.sh.tpl @@ -0,0 +1,36 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Delete old resources after Ingress migration to v3 +{{- if eq .spec.distribution.modules.ingress.nginx.type "single" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} + +{{- if eq .spec.distribution.modules.ingress.nginx.type "dual" }} +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true configmap nginx-configuration-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-admission-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true service ingress-nginx-metrics -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true daemonset.apps nginx-ingress-controller-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-external -n ingress-nginx +$kubectlbin delete --ignore-not-found=true certificate.cert-manager.io ingress-nginx-tls-internal -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-ca -n ingress-nginx +$kubectlbin delete --ignore-not-found=true issuer.cert-manager.io ingress-nginx-selfsign -n ingress-nginx +$kubectlbin delete --ignore-not-found=true prometheusrule.monitoring.coreos.com ingress-nginx-k8s-rules -n ingress-nginx +$kubectlbin delete --ignore-not-found=true servicemonitor.monitoring.coreos.com ingress-nginx -n ingress-nginx +{{- end }} diff --git a/configs/upgrades/onpremises/1.29.4-1.30.0/pre-distribution.sh.tpl b/configs/upgrades/onpremises/1.29.4-1.30.0/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/onpremises/1.29.4-1.30.0/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/onpremises/1.29.4-1.30.0/pre-kubernetes.sh.tpl b/configs/upgrades/onpremises/1.29.4-1.30.0/pre-kubernetes.sh.tpl new file mode 100644 index 000000000..12e984f66 --- /dev/null +++ b/configs/upgrades/onpremises/1.29.4-1.30.0/pre-kubernetes.sh.tpl @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +set -e + +{{- if index .spec "kubernetes" }} + +## master upgrades - only one at a time +{{- range $h := .spec.kubernetes.masters.hosts }} +ansible-playbook 55.upgrade-control-plane.yml --limit "{{ $h.name }}" --become +{{- end }} + +{{- if ne .upgrade.skipNodesUpgrade true }} +{{- range $n := .spec.kubernetes.nodes }} + {{- range $h := $n.hosts }} +ansible-playbook 56.upgrade-worker-nodes.yml --limit "{{ $h.name }}" + {{- end }} +{{- end }} +{{- end }} + +{{- end }} diff --git a/configs/upgrades/onpremises/1.29.5-1.30.0/pre-distribution.sh.tpl b/configs/upgrades/onpremises/1.29.5-1.30.0/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/onpremises/1.29.5-1.30.0/pre-distribution.sh.tpl @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +kubectlbin="{{ .paths.kubectl }}" + +# Remove some validating webhooks during the upgrade +{{- if eq .spec.distribution.modules.policy.type "gatekeeper" }} +$kubectlbin delete --ignore-not-found=true validatingwebhookconfiguration gatekeeper-validating-webhook-configuration +{{- end }} diff --git a/configs/upgrades/onpremises/1.29.5-1.30.0/pre-kubernetes.sh.tpl b/configs/upgrades/onpremises/1.29.5-1.30.0/pre-kubernetes.sh.tpl new file mode 100644 index 000000000..12e984f66 --- /dev/null +++ b/configs/upgrades/onpremises/1.29.5-1.30.0/pre-kubernetes.sh.tpl @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +set -e + +{{- if index .spec "kubernetes" }} + +## master upgrades - only one at a time +{{- range $h := .spec.kubernetes.masters.hosts }} +ansible-playbook 55.upgrade-control-plane.yml --limit "{{ $h.name }}" --become +{{- end }} + +{{- if ne .upgrade.skipNodesUpgrade true }} +{{- range $n := .spec.kubernetes.nodes }} + {{- range $h := $n.hosts }} +ansible-playbook 56.upgrade-worker-nodes.yml --limit "{{ $h.name }}" + {{- end }} +{{- end }} +{{- end }} + +{{- end }} diff --git a/docs/COMPATIBILITY_MATRIX.md b/docs/COMPATIBILITY_MATRIX.md index b9a15819d..63562d1cb 100644 --- a/docs/COMPATIBILITY_MATRIX.md +++ b/docs/COMPATIBILITY_MATRIX.md @@ -7,29 +7,30 @@ Note: Always use the latest `furyctl` version, we make sure that is compatible w - If you are using version 0.29.1 or 0.29.2, please upgrade to 0.29.3 or later. - Versions < 0.27.5 do not work with the OnPremises provider, we fixed this issue in 0.27.5, so we recommend using this version or later. -| Furyctl / KFD | 1.29.4 | 1.29.3 | 1.29.2 | 1.29.1 | 1.29.0 | 1.28.4 | 1.28.3 | 1.28.2 | 1.28.1 | 1.28.0 | 1.27.9 | 1.27.8 | 1.27.7 | 1.27.6 | 1.27.5 | 1.27.4 | 1.27.3 | 1.27.2 | 1.27.1 | 1.27.0 | 1.26.6 | 1.26.5 | 1.26.4 | 1.26.3 | 1.25.10 | 1.25.9 | 1.25.8 | -| ------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| 0.29.10 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.29.9 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.29.8 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.29.7 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.29.6 | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.29.5 | | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | -| 0.29.4 | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.29.3 | | | | :white_check_mark: | :white_check_mark: | | | | :white_check_mark: | :white_check_mark: | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.29.2 | | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | -| 0.29.1 | | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | -| 0.29.0 | | | | | :white_check_mark: | | | | | :white_check_mark: | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.28.0 | | | | | | | | | | :white_check_mark: | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.27.8 | | | | | | | | | | | | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.27.7 | | | | | | | | | | | | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.27.6 | | | | | | | | | | | | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.27.5 | | | | | | | | | | | | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| 0.27.4 | | | | | | | | | | | | | | | | :warning: | :warning: | :warning: | :warning: | :warning: | | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | -| 0.27.3 | | | | | | | | | | | | | | | | :warning: | :warning: | :warning: | :warning: | :warning: | | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | -| 0.27.2 | | | | | | | | | | | | | | | | | :warning: | :warning: | :warning: | | | :warning: | :warning: | | :warning: | :warning: | :warning: | -| 0.27.1 | | | | | | | | | | | | | | | | | | :warning: | :warning: | | | :warning: | :warning: | | :warning: | :warning: | :warning: | -| 0.27.0 | | | | | | | | | | | | | | | | | | :warning: | :warning: | | | :warning: | :warning: | | :warning: | :warning: | :warning: | +| Furyctl / KFD | 1.30.0 | 1.29.5 | 1.29.4 | 1.29.3 | 1.29.2 | 1.29.1 | 1.29.0 | 1.28.5 | 1.28.4 | 1.28.3 | 1.28.2 | 1.28.1 | 1.28.0 | 1.27.9 | 1.27.8 | 1.27.7 | 1.27.6 | 1.27.5 | 1.27.4 | 1.27.3 | 1.27.2 | 1.27.1 | 1.27.0 | 1.26.6 | 1.26.5 | 1.26.4 | 1.26.3 | 1.25.10 | 1.25.9 | 1.25.8 | +| ------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | +| 0.30.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.29.10 | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.29.9 | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.29.8 | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.29.7 | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.29.6 | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.29.5 | | | | :warning: | :warning: | :warning: | :warning: | | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | +| 0.29.4 | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.29.3 | | | | | | :white_check_mark: | :white_check_mark: | | | | | :white_check_mark: | :white_check_mark: | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.29.2 | | | | :warning: | :warning: | :warning: | :warning: | | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | +| 0.29.1 | | | | :warning: | :warning: | :warning: | :warning: | | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | +| 0.29.0 | | | | | | | :white_check_mark: | | | | | | :white_check_mark: | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.28.0 | | | | | | | | | | | | | :white_check_mark: | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.27.8 | | | | | | | | | | | | | | | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.27.7 | | | | | | | | | | | | | | | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.27.6 | | | | | | | | | | | | | | | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.27.5 | | | | | | | | | | | | | | | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| 0.27.4 | | | | | | | | | | | | | | | | | | | :warning: | :warning: | :warning: | :warning: | :warning: | | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | +| 0.27.3 | | | | | | | | | | | | | | | | | | | :warning: | :warning: | :warning: | :warning: | :warning: | | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: | +| 0.27.2 | | | | | | | | | | | | | | | | | | | | :warning: | :warning: | :warning: | | | :warning: | :warning: | | :warning: | :warning: | :warning: | +| 0.27.1 | | | | | | | | | | | | | | | | | | | | | :warning: | :warning: | | | :warning: | :warning: | | :warning: | :warning: | :warning: | +| 0.27.0 | | | | | | | | | | | | | | | | | | | | | :warning: | :warning: | | | :warning: | :warning: | | :warning: | :warning: | :warning: | ## Furyctl and Providers compatibility diff --git a/go.mod b/go.mod index bc096a94b..1bb0ca02a 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/r3labs/diff/v3 v3.0.1 github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 github.com/shirou/gopsutil/v3 v3.24.5 - github.com/sighupio/fury-distribution v1.29.4 + github.com/sighupio/fury-distribution v1.30.0 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.19.0 @@ -28,7 +28,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/client-go v1.5.2 - k8s.io/kubernetes v1.29.7 + k8s.io/kubernetes v1.30.7 sigs.k8s.io/e2e-framework v0.4.0 ) @@ -113,6 +113,7 @@ require ( github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shopspring/decimal v1.4.0 // indirect + github.com/sighupio/go-jsonschema v0.15.3 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.7.0 // indirect @@ -152,8 +153,8 @@ require ( google.golang.org/protobuf v1.34.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - k8s.io/api v0.30.1 // indirect - k8s.io/apimachinery v0.30.1 // indirect + k8s.io/api v0.30.7 // indirect + k8s.io/apimachinery v0.30.7 // indirect k8s.io/cluster-bootstrap v0.0.0 // indirect k8s.io/component-base v0.30.1 // indirect k8s.io/klog/v2 v2.120.1 // indirect @@ -168,34 +169,34 @@ require ( // Pinned to kubernetes-1.29.7, thanks to https://github.com/kubernetes/kubernetes/issues/79384#issuecomment-521493597 // k8s.io/api v0.x.y -> Kubernetes v1.x.y replace ( - k8s.io/api => k8s.io/api v0.29.7 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.29.7 - k8s.io/apimachinery => k8s.io/apimachinery v0.29.7 - k8s.io/apiserver => k8s.io/apiserver v0.29.7 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.29.7 - k8s.io/client-go => k8s.io/client-go v0.29.7 - k8s.io/cloud-provider => k8s.io/cloud-provider v0.29.7 - k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.29.7 - k8s.io/code-generator => k8s.io/code-generator v0.29.7 - k8s.io/component-base => k8s.io/component-base v0.29.7 - k8s.io/component-helpers => k8s.io/component-helpers v0.29.7 - k8s.io/controller-manager => k8s.io/controller-manager v0.29.7 - k8s.io/cri-api => k8s.io/cri-api v0.29.7 - k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.29.7 - k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.29.7 - k8s.io/endpointslice => k8s.io/endpointslice v0.29.7 - k8s.io/kms => k8s.io/kms v0.29.7 - k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.29.7 - k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.29.7 - k8s.io/kube-proxy => k8s.io/kube-proxy v0.29.7 - k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.29.7 - k8s.io/kubectl => k8s.io/kubectl v0.29.7 - k8s.io/kubelet => k8s.io/kubelet v0.29.7 - k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.29.7 - k8s.io/metrics => k8s.io/metrics v0.29.7 - k8s.io/mount-utils => k8s.io/mount-utils v0.29.7 - k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.29.7 - k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.29.7 - k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.29.7 - k8s.io/sample-controller => k8s.io/sample-controller v0.29.7 + k8s.io/api => k8s.io/api v0.30.7 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.7 + k8s.io/apimachinery => k8s.io/apimachinery v0.30.7 + k8s.io/apiserver => k8s.io/apiserver v0.30.7 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.7 + k8s.io/client-go => k8s.io/client-go v0.30.7 + k8s.io/cloud-provider => k8s.io/cloud-provider v0.30.7 + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.30.7 + k8s.io/code-generator => k8s.io/code-generator v0.30.7 + k8s.io/component-base => k8s.io/component-base v0.30.7 + k8s.io/component-helpers => k8s.io/component-helpers v0.30.7 + k8s.io/controller-manager => k8s.io/controller-manager v0.30.7 + k8s.io/cri-api => k8s.io/cri-api v0.30.7 + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.30.7 + k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.30.7 + k8s.io/endpointslice => k8s.io/endpointslice v0.30.7 + k8s.io/kms => k8s.io/kms v0.30.7 + k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.30.7 + k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.30.7 + k8s.io/kube-proxy => k8s.io/kube-proxy v0.30.7 + k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.30.7 + k8s.io/kubectl => k8s.io/kubectl v0.30.7 + k8s.io/kubelet => k8s.io/kubelet v0.30.7 + k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.30.7 + k8s.io/metrics => k8s.io/metrics v0.30.7 + k8s.io/mount-utils => k8s.io/mount-utils v0.30.7 + k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.30.7 + k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.30.7 + k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.30.7 + k8s.io/sample-controller => k8s.io/sample-controller v0.30.7 ) diff --git a/go.sum b/go.sum index 645461bbb..ef068960a 100644 --- a/go.sum +++ b/go.sum @@ -539,8 +539,10 @@ github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= -github.com/sighupio/fury-distribution v1.29.4 h1:AA/GSBUYQx0/NobWBTxiZveoPNPCiy4G1PkJmd+kOCo= -github.com/sighupio/fury-distribution v1.29.4/go.mod h1:iYBnl0N/6zGPz3j3L2X6nzFC3nzNQtIkAzmaPfnO0zA= +github.com/sighupio/fury-distribution v1.30.0 h1:W0613gwh2xRER1BX1T/2JbMczKtG7dSHCu3tPGw3PLM= +github.com/sighupio/fury-distribution v1.30.0/go.mod h1:Ef6oeRJA+Ryt4KdKECSxd8GpRj0mfW+DjxRWJsA//ns= +github.com/sighupio/go-jsonschema v0.15.3 h1:q2EtYBbXFRQbRbc9/lkFyg2lmxrJFaa8737dvwm/0bo= +github.com/sighupio/go-jsonschema v0.15.3/go.mod h1:QOHAu5BGlMReCwWJx1Yf7FK+Z5D8TrVVT+SOgInHd5I= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= @@ -1167,24 +1169,24 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.29.7 h1:Q2/thp7YYESgy0MGzxT9RvA/6doLJHBXSFH8GGLxSbc= -k8s.io/api v0.29.7/go.mod h1:mPimdbyuIjwoLtBEVIGVUYb4BKOE+44XHt/n4IqKsLA= -k8s.io/apiextensions-apiserver v0.29.7 h1:X62u7vUGfwW5rYJB5jkZDr0uV2XSyEHJRdxnfD5PaLs= -k8s.io/apiextensions-apiserver v0.29.7/go.mod h1:JzBXxlZKKdtEYGr4yiN+s0eXheCTYgKDay8JXPfSGoQ= -k8s.io/apimachinery v0.29.7 h1:ICXzya58Q7hyEEfnTrbmdfX1n1schSepX2KUfC2/ykc= -k8s.io/apimachinery v0.29.7/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y= -k8s.io/client-go v0.29.7 h1:vTtiFrGBKlcBhxaeZC4eDrqui1e108nsTyue/KU63IY= -k8s.io/client-go v0.29.7/go.mod h1:69BvVqdRozgR/9TP45u/oO0tfrdbP+I8RqrcCJQshzg= -k8s.io/cluster-bootstrap v0.29.7 h1:e3bEQTIVdfSBm3akfsUIfGGePxWZbjjviSYGWoei4xU= -k8s.io/cluster-bootstrap v0.29.7/go.mod h1:GqBhCNVZ9QWc/aQTroEO8yLXO6pq1k6SmD39ShTcIJk= -k8s.io/component-base v0.29.7 h1:zXLJvZjvvDWdYmZCwZYk95E1Fd2oRXUz71mQukkRk5I= -k8s.io/component-base v0.29.7/go.mod h1:ddLTpIrjazaRI1EG83M41GNcYEAdskuQmx4JOOSXCOg= +k8s.io/api v0.30.7 h1:wB2eHI+IptVYsz5WsAQpI6+Dqi3+11wEWBqIh4fh980= +k8s.io/api v0.30.7/go.mod h1:bR0EwbmhYmJvUoeza7ZzBUmYCrVXccQ9JOdfv0BxhH0= +k8s.io/apiextensions-apiserver v0.30.7 h1:YR2iohbfRWmN6q5ukmiFrkKHFAij5Ic4+tSBZu2nvVc= +k8s.io/apiextensions-apiserver v0.30.7/go.mod h1:Uo13fs4VGPuu6SbQ/TTLTExbVQJBGvCtBNtPU526Uj4= +k8s.io/apimachinery v0.30.7 h1:CoQFxvzPFKwU1eJGN/8LgM3ZJBC3hKgvwGqRrL43uIY= +k8s.io/apimachinery v0.30.7/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/client-go v0.30.7 h1:DQRfuGWxDzxPEyyiTE/fxzAsZcj2p9sbc5671njR52w= +k8s.io/client-go v0.30.7/go.mod h1:oED9+njB91ExCc4BNPAotniB7WH1ig7CmiBx5pVA1yw= +k8s.io/cluster-bootstrap v0.30.7 h1:Q3uHJOyZ5xUFLwoPbDywJIpmVv+BRhsFgIsx7OpE+ug= +k8s.io/cluster-bootstrap v0.30.7/go.mod h1:zhrEdaVhfbaKRN2hrtvbfFseEqHRN9S1OLTDry1i00Y= +k8s.io/component-base v0.30.7 h1:wtbQWLzj5xAGjz+/U/nYNnAc8+wpTUvCqN0uZuCuFF8= +k8s.io/component-base v0.30.7/go.mod h1:UjPOkWiDcvUiQRTpbr3kghl+pFMtFSgqYbWKHKRcXJc= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/kubernetes v1.29.7 h1:cC7YHkNIbHJ6kxjeN6cLZDU4wFxuymyB89NZl3rKI3Y= -k8s.io/kubernetes v1.29.7/go.mod h1:28sDhcb87LX5z3GWAKYmLrhrifxi4W9bEWua4DRTIvk= +k8s.io/kubernetes v1.30.7 h1:02tPr+FPLzY0J+a14SRBIxSMaTkdmkKNHYibrRtwPVQ= +k8s.io/kubernetes v1.30.7/go.mod h1:hV3c+sqOEO0eVqgSo0KW5dOJ6UjGJ2l3Pd9+Qvft8UI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/internal/apis/kfd/v1alpha2/ekscluster/common/distribution.go b/internal/apis/kfd/v1alpha2/ekscluster/common/distribution.go index 32800ca3a..2447d571a 100644 --- a/internal/apis/kfd/v1alpha2/ekscluster/common/distribution.go +++ b/internal/apis/kfd/v1alpha2/ekscluster/common/distribution.go @@ -110,8 +110,8 @@ func (d *Distribution) injectDataPreTf(fMerger *merge.Merger) (*merge.Merger, er Data: private.SpecDistribution{ Modules: private.SpecDistributionModules{ Ingress: private.SpecDistributionModulesIngress{ - Dns: private.SpecDistributionModulesIngressDNS{ - Private: private.SpecDistributionModulesIngressDNSPrivate{ + Dns: &private.SpecDistributionModulesIngressDNS{ + Private: &private.SpecDistributionModulesIngressDNSPrivate{ VpcId: vpcID, }, }, diff --git a/internal/cluster/phase.go b/internal/cluster/phase.go index fed54422d..bc4fc89d8 100644 --- a/internal/cluster/phase.go +++ b/internal/cluster/phase.go @@ -160,6 +160,7 @@ type OperationPhase struct { YqPath string HelmPath string HelmfilePath string + KappPath string TerraformPlanPath string TerraformLogsPath string TerraformOutputsPath string @@ -181,6 +182,7 @@ func NewOperationPhase(folder string, kfdTools config.KFDTools, binPath string) yqPath := path.Join(binPath, "yq", kfdTools.Common.Yq.Version, "yq") helmPath := path.Join(binPath, "helm", kfdTools.Common.Helm.Version, "helm") helmfilePath := path.Join(binPath, "helmfile", kfdTools.Common.Helmfile.Version, "helmfile") + kappPath := path.Join(binPath, "kapp", kfdTools.Common.Kapp.Version, "kapp") planPath := path.Join(basePath, "terraform", "plan") logsPath := path.Join(basePath, "terraform", "logs") @@ -200,6 +202,7 @@ func NewOperationPhase(folder string, kfdTools config.KFDTools, binPath string) YqPath: yqPath, HelmPath: helmPath, HelmfilePath: helmfilePath, + KappPath: kappPath, } } @@ -300,6 +303,7 @@ func (op *OperationPhase) CopyPathsToConfig(cfg *template.Config) { "terraform": op.TerraformPath, "vendorPath": path.Join(op.Path, "..", "vendor"), "yq": op.YqPath, + "kapp": op.KappPath, } } diff --git a/internal/dependencies/tools/kapp.go b/internal/dependencies/tools/kapp.go new file mode 100644 index 000000000..3b69620a7 --- /dev/null +++ b/internal/dependencies/tools/kapp.go @@ -0,0 +1,74 @@ +// Copyright (c) 2017-present SIGHUP s.r.l All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package tools + +import ( + "fmt" + "path/filepath" + "regexp" + "runtime" + "strings" + + "github.com/sighupio/furyctl/internal/semver" + "github.com/sighupio/furyctl/internal/tool/kapp" + iox "github.com/sighupio/furyctl/internal/x/io" +) + +func NewKapp(runner *kapp.Runner, version string) *Kapp { + return &Kapp{ + arch: runtime.GOARCH, + os: runtime.GOOS, + version: version, + checker: &checker{ + regex: regexp.MustCompile("kapp version " + semver.Regex), + runner: runner, + splitFn: func(version string) []string { + return strings.Split(version, " ") + }, + trimFn: func(tokens []string) string { + return tokens[len(tokens)-1] + }, + }, + } +} + +type Kapp struct { + arch string + checker *checker + os string + version string +} + +func (*Kapp) SupportsDownload() bool { + return true +} + +func (k *Kapp) SrcPath() string { + return fmt.Sprintf( + "https://github.com/carvel-dev/kapp/releases/download/%s/kapp-%s-%s", + semver.EnsurePrefix(k.version), + k.os, + k.arch, + ) +} + +func (k *Kapp) Rename(basePath string) error { + oldPath := filepath.Join(basePath, fmt.Sprintf("kapp-%s-%s", k.os, k.arch)) + newPath := filepath.Join(basePath, "kapp") + + if err := iox.CopyFile(oldPath, newPath); err != nil { + return fmt.Errorf("error while renaming kapp: %w", err) + } + + return nil +} + +func (k *Kapp) CheckBinVersion() error { + if err := k.checker.version(k.version); err != nil { + return fmt.Errorf("kapp: %w", err) + } + + return nil +} diff --git a/internal/dependencies/tools/kapp_test.go b/internal/dependencies/tools/kapp_test.go new file mode 100644 index 000000000..1b5bbb721 --- /dev/null +++ b/internal/dependencies/tools/kapp_test.go @@ -0,0 +1,137 @@ +// Copyright (c) 2017-present SIGHUP s.r.l All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build unit + +package tools_test + +import ( + "fmt" + "os" + "path/filepath" + "runtime" + "strings" + "testing" + + "github.com/sighupio/furyctl/internal/dependencies/tools" + "github.com/sighupio/furyctl/internal/tool/kapp" + execx "github.com/sighupio/furyctl/internal/x/exec" +) + +func Test_Kapp_SupportsDownload(t *testing.T) { + a := tools.NewKapp(newKappRunner(), "3.5.3") + + if a.SupportsDownload() != true { + t.Errorf("kapp download must be supported") + } +} + +func Test_Kapp_SrcPath(t *testing.T) { + wantSrcPath := fmt.Sprintf( + "https://github.com/carvel-dev/kapp/releases/download/v3.5.3/kapp-%s-%s", + runtime.GOOS, + runtime.GOARCH, + ) + + testCases := []struct { + desc string + version string + }{ + { + desc: "3.5.3", + version: "3.5.3", + }, + { + desc: "v3.5.3", + version: "v3.5.3", + }, + } + for _, tC := range testCases { + t.Run(tC.desc, func(t *testing.T) { + fa := tools.NewKapp(newKappRunner(), tC.version) + if fa.SrcPath() != wantSrcPath { + t.Errorf("Wrong kapp src path: want = %s, got = %s", wantSrcPath, fa.SrcPath()) + } + }) + } +} + +func Test_Kapp_Rename(t *testing.T) { + tmpDir, err := os.MkdirTemp("", "furyctl-test-") + if err != nil { + t.Fatalf("error creating temp dir: %v", err) + } + + binaryName := fmt.Sprintf("kapp-%s-%s", runtime.GOOS, runtime.GOARCH) + + if _, err := os.Create(filepath.Join(tmpDir, binaryName)); err != nil { + t.Fatalf("error creating temp file: %v", err) + } + + fa := tools.NewKapp(newKappRunner(), "3.5.3") + + if err := fa.Rename(tmpDir); err != nil { + t.Fatalf("Error renaming kapp binary: %v", err) + } + + info, err := os.Stat(filepath.Join(tmpDir, "kapp")) + if err != nil { + t.Fatalf("Error stating kapp binary: %v", err) + } + + if info.IsDir() { + t.Errorf("kapp binary is a directory") + } +} + +func Test_Kapp_CheckBinVersion(t *testing.T) { + t.Parallel() + + testCases := []struct { + desc string + wantVersion string + wantErrMsg string + wantErr bool + }{ + { + desc: "correct version installed", + wantVersion: "0.62.0", + }, + { + desc: "wrong version installed", + wantVersion: "3.5.3", + wantErr: true, + wantErrMsg: "installed = 0.62.0, expected = 3.5.3", + }, + } + for _, tC := range testCases { + tC := tC + + t.Run(tC.desc, func(t *testing.T) { + t.Parallel() + + fa := tools.NewKapp(newKappRunner(), tC.wantVersion) + + err := fa.CheckBinVersion() + + if tC.wantErr && err == nil { + t.Errorf("expected error, got nil") + } + + if !tC.wantErr && err != nil { + t.Errorf("expected no error, got %v", err) + } + + if tC.wantErr && err != nil && !strings.Contains(err.Error(), tC.wantErrMsg) { + t.Errorf("expected error message '%s' to contain '%s'", err.Error(), tC.wantErrMsg) + } + }) + } +} + +func newKappRunner() *kapp.Runner { + return kapp.NewRunner(execx.NewFakeExecutor("TestHelperProcess"), kapp.Paths{ + Kapp: "kapp", + }, false) +} diff --git a/internal/dependencies/tools/test_data/kapp/0.61.0/kapp b/internal/dependencies/tools/test_data/kapp/0.61.0/kapp new file mode 100644 index 000000000..350f8e3f5 --- /dev/null +++ b/internal/dependencies/tools/test_data/kapp/0.61.0/kapp @@ -0,0 +1,7 @@ +#!/bin/sh + +cat < 0 { + args = append(args, params...) + } + + args = append(args, "-a", "kfd") + + args = append(args, "-n", "kube-system") + + args = append(args, "-f", manifestPath) + + cmd, id := r.newCmd(args, false) + defer r.deleteCmd(id) + + if _, err := execx.CombinedOutput(cmd); err != nil { + return fmt.Errorf("error applying manifests: %w", err) + } + + return nil +} + +func (r *Runner) Version() (string, error) { + args := []string{"version"} + + cmd, id := r.newCmd(args, false) + defer r.deleteCmd(id) + + out, err := execx.CombinedOutput(cmd) + if err != nil { + return "", fmt.Errorf("error getting kapp version: %w", err) + } + + return out, nil +} + +func (r *Runner) Stop() error { + for _, cmd := range r.cmds { + if err := cmd.Stop(); err != nil { + return fmt.Errorf("error stopping kapp runner: %w", err) + } + } + + return nil +} diff --git a/internal/tool/runner.go b/internal/tool/runner.go index d965b2c70..b9015aec1 100644 --- a/internal/tool/runner.go +++ b/internal/tool/runner.go @@ -13,6 +13,7 @@ import ( "github.com/sighupio/furyctl/internal/tool/git" "github.com/sighupio/furyctl/internal/tool/helm" "github.com/sighupio/furyctl/internal/tool/helmfile" + "github.com/sighupio/furyctl/internal/tool/kapp" "github.com/sighupio/furyctl/internal/tool/kubectl" "github.com/sighupio/furyctl/internal/tool/kustomize" "github.com/sighupio/furyctl/internal/tool/openvpn" @@ -39,6 +40,7 @@ const ( Helm Name = "helm" Helmfile Name = "helmfile" Sed Name = "sed" + Kapp Name = "kapp" ) type Runner interface { @@ -148,6 +150,16 @@ func (rf *RunnerFactory) Create(name Name, version, workDir string) Runner { WorkDir: workDir, }) + case Kapp: + return kapp.NewRunner( + rf.executor, + kapp.Paths{ + Kapp: filepath.Join(rf.paths.Bin, string(name), version, string(name)), + WorkDir: workDir, + }, + false, + ) + default: return nil } diff --git a/pkg/dependencies/download.go b/pkg/dependencies/download.go index 314791d21..a0a6d141b 100644 --- a/pkg/dependencies/download.go +++ b/pkg/dependencies/download.go @@ -372,6 +372,10 @@ func (dd *Downloader) DownloadTools(kfd config.KFD) ([]string, error) { return } + if (name == "kapp") && !distribution.HasFeature(kfd, distribution.FeatureKappSupport) { + return + } + tfc := dd.toolFactory.Create(tool.Name(name), toolCfg.Version) if tfc == nil || !tfc.SupportsDownload() { utsCh <- name