From 7f12590e3f776ae16556737198e3aad9dd4384af Mon Sep 17 00:00:00 2001 From: Alessio Pragliola Date: Tue, 23 Jan 2024 15:42:04 +0100 Subject: [PATCH 1/8] feat: added new kfd 1.27.2 e2e tests --- test/expensive/ekscluster/furyctl_test.go | 7 +- .../furyctl-public-minimal.yaml.tpl | 86 +++++++++++++++++++ .../expensive/kfddistribution/furyctl_test.go | 8 ++ .../furyctl-minimal.yaml.tpl | 32 +++++++ .../kind-config.yml | 16 ++++ .../furyctl-minimal.yaml.tpl | 32 +++++++ .../kind-config.yml | 16 ++++ test/expensive/onpremises/furyctl_test.go | 8 ++ .../furyctl-minimal.yaml.tpl | 72 ++++++++++++++++ .../furyctl-minimal.yaml.tpl | 72 ++++++++++++++++ 10 files changed, 346 insertions(+), 3 deletions(-) create mode 100644 test/expensive/ekscluster/testdata/ekscluster-v1-27-2-create-and-delete/furyctl-public-minimal.yaml.tpl create mode 100644 test/expensive/kfddistribution/testdata/kfddistribution-v1-27-1-create-and-delete/furyctl-minimal.yaml.tpl create mode 100644 test/expensive/kfddistribution/testdata/kfddistribution-v1-27-1-create-and-delete/kind-config.yml create mode 100644 test/expensive/kfddistribution/testdata/kfddistribution-v1-27-2-create-and-delete/furyctl-minimal.yaml.tpl create mode 100644 test/expensive/kfddistribution/testdata/kfddistribution-v1-27-2-create-and-delete/kind-config.yml create mode 100644 test/expensive/onpremises/testdata/onpremises-v1-27-1-create-and-delete/furyctl-minimal.yaml.tpl create mode 100644 test/expensive/onpremises/testdata/onpremises-v1-27-2-create-and-delete/furyctl-minimal.yaml.tpl diff --git a/test/expensive/ekscluster/furyctl_test.go b/test/expensive/ekscluster/furyctl_test.go index 524fcac90..965138f3a 100644 --- a/test/expensive/ekscluster/furyctl_test.go +++ b/test/expensive/ekscluster/furyctl_test.go @@ -148,7 +148,7 @@ var ( _ = Describe("furyctl & distro v1.25.8 - public minimal", CreateAndDeleteTestScenario("1.25.8", false)) _ = Describe("furyctl & distro v1.25.9 - public minimal", CreateAndDeleteTestScenario("1.25.9", false)) - _ = Describe("furyctl & distro v1.27.1 - public minimal - ephemeral", CreateAndDeleteTestScenario("1.25.9", true)) + _ = Describe("furyctl & distro v1.25.9 - public minimal - ephemeral", CreateAndDeleteTestScenario("1.25.9", true)) _ = Describe("furyctl & distro v1.26.0 - public minimal", CreateAndDeleteTestScenario("1.26.0", false)) _ = Describe("furyctl & distro v1.26.1 - public minimal", CreateAndDeleteTestScenario("1.26.1", false)) @@ -156,10 +156,11 @@ var ( _ = Describe("furyctl & distro v1.26.3 - public minimal", CreateAndDeleteTestScenario("1.26.3", false)) _ = Describe("furyctl & distro v1.26.4 - public minimal", CreateAndDeleteTestScenario("1.26.4", false)) - _ = Describe("furyctl & distro v1.27.1 - public minimal - ephemeral", CreateAndDeleteTestScenario("1.26.4", true)) + _ = Describe("furyctl & distro v1.26.4 - public minimal - ephemeral", CreateAndDeleteTestScenario("1.26.4", true)) _ = Describe("furyctl & distro v1.27.0 - public minimal", CreateAndDeleteTestScenario("1.27.0", false)) _ = Describe("furyctl & distro v1.27.1 - public minimal", CreateAndDeleteTestScenario("1.27.1", false)) + _ = Describe("furyctl & distro v1.27.2 - public minimal", CreateAndDeleteTestScenario("1.27.2", false)) - _ = Describe("furyctl & distro v1.27.1 - public minimal - ephemeral", CreateAndDeleteTestScenario("1.27.1", true)) + _ = Describe("furyctl & distro v1.27.2 - public minimal - ephemeral", CreateAndDeleteTestScenario("1.27.2", true)) ) diff --git a/test/expensive/ekscluster/testdata/ekscluster-v1-27-2-create-and-delete/furyctl-public-minimal.yaml.tpl b/test/expensive/ekscluster/testdata/ekscluster-v1-27-2-create-and-delete/furyctl-public-minimal.yaml.tpl new file mode 100644 index 000000000..a6c68881f --- /dev/null +++ b/test/expensive/ekscluster/testdata/ekscluster-v1-27-2-create-and-delete/furyctl-public-minimal.yaml.tpl @@ -0,0 +1,86 @@ +# This file represents a minimal config for a public EKS cluster with 1.25.9 version +# and the least amount of modules enabled. +--- +apiVersion: kfd.sighup.io/v1alpha2 +kind: EKSCluster +metadata: + name: __CLUSTER_NAME__ +spec: + distributionVersion: v1.27.2 + toolsConfiguration: + terraform: + state: + s3: + bucketName: __CLUSTER_NAME__ + keyPrefix: swe-dev/__CLUSTER_NAME__ + region: eu-west-1 + region: eu-west-1 + tags: + env: "swe-dev" + k8s: "__CLUSTER_NAME__" + githubOrg: "sighupio" + githubRepo: "furyctl" + infrastructure: + vpc: + network: + cidr: 10.10.0.0/16 + subnetsCidrs: + private: + - 10.10.0.0/20 + - 10.10.16.0/20 + - 10.10.32.0/20 + - 10.10.48.0/20 + public: + - 10.10.192.0/24 + - 10.10.193.0/24 + - 10.10.194.0/24 + kubernetes: + apiServer: + privateAccess: false + publicAccess: true + privateAccessCidrs: ["0.0.0.0/0"] + publicAccessCidrs: ["0.0.0.0/0"] + nodeAllowedSshPublicKey: "{file://./id_ed25519.pub}" + nodePoolsLaunchKind: "launch_templates" + logRetentionDays: 1 + nodePools: + - name: workers + size: + min: 1 + max: 2 + instance: + type: t3.xlarge + spot: true + volumeSize: 50 + tags: + k8s.io/cluster-autoscaler/node-template/label/nodepool: "workers" + k8s.io/cluster-autoscaler/node-template/label/node.kubernetes.io/role: "workers" + distribution: + modules: + auth: + provider: + type: none + ingress: + baseDomain: internal.example.dev + nginx: + type: none + tls: + provider: none + certManager: + clusterIssuer: + name: letsencrypt-fury + email: engineering@sighup.io + type: http01 + dns: + public: + name: "example.dev" + create: true + private: + name: "internal.example.dev" + create: true + logging: + type: none + policy: + type: none + dr: + type: none diff --git a/test/expensive/kfddistribution/furyctl_test.go b/test/expensive/kfddistribution/furyctl_test.go index 152a37658..41d705d26 100644 --- a/test/expensive/kfddistribution/furyctl_test.go +++ b/test/expensive/kfddistribution/furyctl_test.go @@ -229,6 +229,10 @@ var ( _ = Describe("furyctl & distro v1.27.0 - minimal", Ordered, Serial, CreateAndDeleteTestScenario("1.27.0", "v1.27.3", false)) + _ = Describe("furyctl & distro v1.27.1 - minimal", Ordered, Serial, CreateAndDeleteTestScenario("1.27.1", "v1.27.3", false)) + + _ = Describe("furyctl & distro v1.27.2 - minimal", Ordered, Serial, CreateAndDeleteTestScenario("1.27.2", "v1.27.3", false)) + _ = Describe("furyctl & distro v1.27.0 - minimal - ephemeral", Ordered, Serial, CreateAndDeleteTestScenario("1.27.0", "v1.27.3", true)) _ = Describe("furyctl & distro v1.25.4 - minimal - by phase", Ordered, Serial, CreateAndDeleteByPhaseTestScenario("1.25.4", "v1.25.11", false)) @@ -252,4 +256,8 @@ var ( _ = Describe("furyctl & distro v1.26.4 - minimal - by phase", Ordered, Serial, CreateAndDeleteByPhaseTestScenario("1.26.4", "v1.26.6", false)) _ = Describe("furyctl & distro v1.27.0 - minimal - by phase", Ordered, Serial, CreateAndDeleteByPhaseTestScenario("1.27.0", "v1.27.3", false)) + + _ = Describe("furyctl & distro v1.27.1 - minimal - by phase", Ordered, Serial, CreateAndDeleteByPhaseTestScenario("1.27.1", "v1.27.3", false)) + + _ = Describe("furyctl & distro v1.27.2 - minimal - by phase", Ordered, Serial, CreateAndDeleteByPhaseTestScenario("1.27.2", "v1.27.3", false)) ) diff --git a/test/expensive/kfddistribution/testdata/kfddistribution-v1-27-1-create-and-delete/furyctl-minimal.yaml.tpl b/test/expensive/kfddistribution/testdata/kfddistribution-v1-27-1-create-and-delete/furyctl-minimal.yaml.tpl new file mode 100644 index 000000000..59eab8b00 --- /dev/null +++ b/test/expensive/kfddistribution/testdata/kfddistribution-v1-27-1-create-and-delete/furyctl-minimal.yaml.tpl @@ -0,0 +1,32 @@ +# 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. + +--- +apiVersion: kfd.sighup.io/v1alpha2 +kind: KFDDistribution +metadata: + name: __CLUSTER_NAME__ +spec: + distributionVersion: v1.27.1 + distribution: + kubeconfig: __KUBECONFIG__ + modules: + auth: + provider: + type: none + ingress: + baseDomain: internal.example.dev + nginx: + type: none + tls: + provider: none + logging: + type: none + networking: + type: calico + policy: + type: none + dr: + type: on-premises + velero: {} diff --git a/test/expensive/kfddistribution/testdata/kfddistribution-v1-27-1-create-and-delete/kind-config.yml b/test/expensive/kfddistribution/testdata/kfddistribution-v1-27-1-create-and-delete/kind-config.yml new file mode 100644 index 000000000..cdb5eadd0 --- /dev/null +++ b/test/expensive/kfddistribution/testdata/kfddistribution-v1-27-1-create-and-delete/kind-config.yml @@ -0,0 +1,16 @@ +# 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. + +--- +apiVersion: kind.x-k8s.io/v1alpha4 +kind: Cluster +nodes: +- role: control-plane + extraPortMappings: + - containerPort: 30080 + hostPort: 80 + protocol: TCP + - containerPort: 30443 + hostPort: 443 + protocol: TCP diff --git a/test/expensive/kfddistribution/testdata/kfddistribution-v1-27-2-create-and-delete/furyctl-minimal.yaml.tpl b/test/expensive/kfddistribution/testdata/kfddistribution-v1-27-2-create-and-delete/furyctl-minimal.yaml.tpl new file mode 100644 index 000000000..810683757 --- /dev/null +++ b/test/expensive/kfddistribution/testdata/kfddistribution-v1-27-2-create-and-delete/furyctl-minimal.yaml.tpl @@ -0,0 +1,32 @@ +# 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. + +--- +apiVersion: kfd.sighup.io/v1alpha2 +kind: KFDDistribution +metadata: + name: __CLUSTER_NAME__ +spec: + distributionVersion: v1.27.2 + distribution: + kubeconfig: __KUBECONFIG__ + modules: + auth: + provider: + type: none + ingress: + baseDomain: internal.example.dev + nginx: + type: none + tls: + provider: none + logging: + type: none + networking: + type: calico + policy: + type: none + dr: + type: on-premises + velero: {} diff --git a/test/expensive/kfddistribution/testdata/kfddistribution-v1-27-2-create-and-delete/kind-config.yml b/test/expensive/kfddistribution/testdata/kfddistribution-v1-27-2-create-and-delete/kind-config.yml new file mode 100644 index 000000000..cdb5eadd0 --- /dev/null +++ b/test/expensive/kfddistribution/testdata/kfddistribution-v1-27-2-create-and-delete/kind-config.yml @@ -0,0 +1,16 @@ +# 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. + +--- +apiVersion: kind.x-k8s.io/v1alpha4 +kind: Cluster +nodes: +- role: control-plane + extraPortMappings: + - containerPort: 30080 + hostPort: 80 + protocol: TCP + - containerPort: 30443 + hostPort: 443 + protocol: TCP diff --git a/test/expensive/onpremises/furyctl_test.go b/test/expensive/onpremises/furyctl_test.go index 3eac77af6..a87b5cae9 100644 --- a/test/expensive/onpremises/furyctl_test.go +++ b/test/expensive/onpremises/furyctl_test.go @@ -624,6 +624,10 @@ var ( _ = Describe("furyctl & distro v1.27.0 - minimal", Ordered, Serial, CreateAndDeleteTestScenario("1.27.0", false)) + _ = Describe("furyctl & distro v1.27.1 - minimal", Ordered, Serial, CreateAndDeleteTestScenario("1.27.1", false)) + + _ = Describe("furyctl & distro v1.27.2 - minimal", Ordered, Serial, CreateAndDeleteTestScenario("1.27.2", false)) + _ = Describe("furyctl & distro v1.27.0 - minimal - ephemeral", Ordered, Serial, CreateAndDeleteTestScenario("1.27.0", true)) _ = Describe("furyctl & distro v1.25.9 - minimal - by phase", Ordered, Serial, CreateAndDeleteByPhaseTestScenario("1.25.9", false)) @@ -635,4 +639,8 @@ var ( _ = Describe("furyctl & distro v1.26.4 - minimal - by phase", Ordered, Serial, CreateAndDeleteByPhaseTestScenario("1.26.4", false)) _ = Describe("furyctl & distro v1.27.0 - minimal - by phase", Ordered, Serial, CreateAndDeleteByPhaseTestScenario("1.27.0", false)) + + _ = Describe("furyctl & distro v1.27.1 - minimal - by phase", Ordered, Serial, CreateAndDeleteByPhaseTestScenario("1.27.1", false)) + + _ = Describe("furyctl & distro v1.27.2 - minimal - by phase", Ordered, Serial, CreateAndDeleteByPhaseTestScenario("1.27.2", false)) ) diff --git a/test/expensive/onpremises/testdata/onpremises-v1-27-1-create-and-delete/furyctl-minimal.yaml.tpl b/test/expensive/onpremises/testdata/onpremises-v1-27-1-create-and-delete/furyctl-minimal.yaml.tpl new file mode 100644 index 000000000..b2eff4c1e --- /dev/null +++ b/test/expensive/onpremises/testdata/onpremises-v1-27-1-create-and-delete/furyctl-minimal.yaml.tpl @@ -0,0 +1,72 @@ +# 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. + +--- +apiVersion: kfd.sighup.io/v1alpha2 +kind: OnPremises +metadata: + name: __CLUSTER_NAME__ +spec: + distributionVersion: v1.27.1 + kubernetes: + pkiFolder: ./infra/secrets/pki + ssh: + username: ubuntu + keyPath: ./infra/secrets/ssh-private-key.pem + dnsZone: __CLUSTER_NAME__.internal + controlPlaneAddress: __CONTROL_PLANE_IP__:6443 + podCidr: 172.16.128.0/17 + svcCidr: 172.16.0.0/17 + loadBalancers: + enabled: false + hosts: + - name: haproxy1 + ip: 0.0.0.0 + keepalived: + enabled: false + interface: eth1 + ip: 192.168.1.201/24 + virtualRouterId: "201" + passphrase: "123aaaccc321" + stats: + username: admin + password: password + masters: + hosts: + - name: master1 + ip: __CONTROL_PLANE_IP__ + nodes: + - name: worker + hosts: + - name: worker1 + ip: __NODE_1_IP__ + - name: worker2 + ip: __NODE_2_IP__ + - name: worker3 + ip: __NODE_3_IP__ + distribution: + modules: + auth: + provider: + type: none + ingress: + baseDomain: internal.example.dev + nginx: + type: none + tls: + provider: none + certManager: + clusterIssuer: + name: letsencrypt-fury + email: engineering+fury-distribution@sighup.io + type: http01 + logging: + type: loki + networking: + type: calico + policy: + type: gatekeeper + dr: + type: on-premises + velero: {} diff --git a/test/expensive/onpremises/testdata/onpremises-v1-27-2-create-and-delete/furyctl-minimal.yaml.tpl b/test/expensive/onpremises/testdata/onpremises-v1-27-2-create-and-delete/furyctl-minimal.yaml.tpl new file mode 100644 index 000000000..55530f153 --- /dev/null +++ b/test/expensive/onpremises/testdata/onpremises-v1-27-2-create-and-delete/furyctl-minimal.yaml.tpl @@ -0,0 +1,72 @@ +# 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. + +--- +apiVersion: kfd.sighup.io/v1alpha2 +kind: OnPremises +metadata: + name: __CLUSTER_NAME__ +spec: + distributionVersion: v1.27.2 + kubernetes: + pkiFolder: ./infra/secrets/pki + ssh: + username: ubuntu + keyPath: ./infra/secrets/ssh-private-key.pem + dnsZone: __CLUSTER_NAME__.internal + controlPlaneAddress: __CONTROL_PLANE_IP__:6443 + podCidr: 172.16.128.0/17 + svcCidr: 172.16.0.0/17 + loadBalancers: + enabled: false + hosts: + - name: haproxy1 + ip: 0.0.0.0 + keepalived: + enabled: false + interface: eth1 + ip: 192.168.1.201/24 + virtualRouterId: "201" + passphrase: "123aaaccc321" + stats: + username: admin + password: password + masters: + hosts: + - name: master1 + ip: __CONTROL_PLANE_IP__ + nodes: + - name: worker + hosts: + - name: worker1 + ip: __NODE_1_IP__ + - name: worker2 + ip: __NODE_2_IP__ + - name: worker3 + ip: __NODE_3_IP__ + distribution: + modules: + auth: + provider: + type: none + ingress: + baseDomain: internal.example.dev + nginx: + type: none + tls: + provider: none + certManager: + clusterIssuer: + name: letsencrypt-fury + email: engineering+fury-distribution@sighup.io + type: http01 + logging: + type: loki + networking: + type: calico + policy: + type: gatekeeper + dr: + type: on-premises + velero: {} From 8edcce668cd22f46f4cb91a547164166ee53e9bf Mon Sep 17 00:00:00 2001 From: Alessio Pragliola Date: Tue, 23 Jan 2024 15:43:03 +0100 Subject: [PATCH 2/8] feat: added upgrade paths to 1.27.2 --- .../ekscluster/1.27.1-1.27.2/pre-distribution.sh.tpl | 10 ++++++++++ .../1.27.1-1.27.2/pre-distribution.sh.tpl | 10 ++++++++++ .../onpremises/1.27.1-1.27.2/pre-distribution.sh.tpl | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 configs/upgrades/ekscluster/1.27.1-1.27.2/pre-distribution.sh.tpl create mode 100644 configs/upgrades/kfddistribution/1.27.1-1.27.2/pre-distribution.sh.tpl create mode 100644 configs/upgrades/onpremises/1.27.1-1.27.2/pre-distribution.sh.tpl diff --git a/configs/upgrades/ekscluster/1.27.1-1.27.2/pre-distribution.sh.tpl b/configs/upgrades/ekscluster/1.27.1-1.27.2/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/ekscluster/1.27.1-1.27.2/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.1-1.27.2/pre-distribution.sh.tpl b/configs/upgrades/kfddistribution/1.27.1-1.27.2/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/kfddistribution/1.27.1-1.27.2/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.1-1.27.2/pre-distribution.sh.tpl b/configs/upgrades/onpremises/1.27.1-1.27.2/pre-distribution.sh.tpl new file mode 100644 index 000000000..2eeeb36a4 --- /dev/null +++ b/configs/upgrades/onpremises/1.27.1-1.27.2/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 }} From d1d68737f09c24d598ecb7373bd06ac5d0023db9 Mon Sep 17 00:00:00 2001 From: Alessio Pragliola Date: Tue, 23 Jan 2024 15:43:36 +0100 Subject: [PATCH 3/8] chore: update README file --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b887e2e1b..f933a96a7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![Build Status](https://ci.sighup.io/api/badges/sighupio/furyctl/status.svg)](https://ci.sighup.io/sighupio/furyctl) -![Release](https://img.shields.io/badge/furyctl-v0.27.1-blue) +![Release](https://img.shields.io/badge/furyctl-v0.27.2-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) @@ -76,7 +76,7 @@ $ furyctl version ... goVersion: go1.21 osArch: amd64 -version: 0.27.1 +version: 0.27.2 ``` ### Installing from source @@ -169,7 +169,7 @@ Additionaly, the schema of the file is versioned with the `apiVersion` field, so To scaffold a configuration file to use as a starter, you use the following command: ```console -furyctl create config --version v1.27.1 --kind "EKSCluster" +furyctl create config --version v1.27.2 --kind "EKSCluster" ``` > 💡 **TIP** From e459e6ff9d4bdfcd2afd5165292cd887c6438e72 Mon Sep 17 00:00:00 2001 From: Alessio Pragliola Date: Tue, 23 Jan 2024 15:43:48 +0100 Subject: [PATCH 4/8] chore: go mod tidy --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index f7c72f68e..30cc63b4d 100644 --- a/go.sum +++ b/go.sum @@ -549,8 +549,6 @@ github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnj github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/sighupio/fury-distribution v1.27.0 h1:3JTmmc8aPftWiA46RU30WROvZJIeyCHAgXRUwR7Vuqs= -github.com/sighupio/fury-distribution v1.27.0/go.mod h1:iYBnl0N/6zGPz3j3L2X6nzFC3nzNQtIkAzmaPfnO0zA= github.com/sighupio/fury-distribution v1.27.1 h1:kZvHCJXQt4to7eL1FmJcmwbsS0VIq1l4cDWH5XaJBKM= github.com/sighupio/fury-distribution v1.27.1/go.mod h1:iYBnl0N/6zGPz3j3L2X6nzFC3nzNQtIkAzmaPfnO0zA= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= From ffe9ec76809bac2a6792780e39a431b9d69681ca Mon Sep 17 00:00:00 2001 From: Alessio Pragliola Date: Tue, 23 Jan 2024 17:41:13 +0100 Subject: [PATCH 5/8] fix: added new fields --- .../furyctl-minimal.yaml.tpl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/expensive/onpremises/testdata/onpremises-v1-27-2-create-and-delete/furyctl-minimal.yaml.tpl b/test/expensive/onpremises/testdata/onpremises-v1-27-2-create-and-delete/furyctl-minimal.yaml.tpl index 55530f153..5694037fc 100644 --- a/test/expensive/onpremises/testdata/onpremises-v1-27-2-create-and-delete/furyctl-minimal.yaml.tpl +++ b/test/expensive/onpremises/testdata/onpremises-v1-27-2-create-and-delete/furyctl-minimal.yaml.tpl @@ -67,6 +67,9 @@ spec: type: calico policy: type: gatekeeper + gatekeeper: + enforcementAction: deny + installDefaultPolicies: true dr: type: on-premises velero: {} From 28d60759aea2b1cb0af850ef7874657e2b057404 Mon Sep 17 00:00:00 2001 From: Alessio Pragliola Date: Tue, 23 Jan 2024 17:42:35 +0100 Subject: [PATCH 6/8] fix: removed error when upgrading with reducer --- .../kfd/v1alpha2/common/create/preupgrade.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/apis/kfd/v1alpha2/common/create/preupgrade.go b/internal/apis/kfd/v1alpha2/common/create/preupgrade.go index 30bae5bcd..f1e55b8d0 100644 --- a/internal/apis/kfd/v1alpha2/common/create/preupgrade.go +++ b/internal/apis/kfd/v1alpha2/common/create/preupgrade.go @@ -29,12 +29,11 @@ import ( ) var ( - errUpgradeCanceled = errors.New("upgrade canceled by user") - errUpgradeFlagNotSet = errors.New("upgrade flag not set by user") - errUpgradeWithReducersNotAllowed = errors.New("upgrade with reducers not allowed") - errUpgradePathNotFound = errors.New("upgrade path not found") - errGettingDistroVersionFrom = errors.New("error while getting distribution version from") - errGettingDistroVersionTo = errors.New("error while getting distribution version to") + errUpgradeCanceled = errors.New("upgrade canceled by user") + errUpgradeFlagNotSet = errors.New("upgrade flag not set by user") + errUpgradePathNotFound = errors.New("upgrade path not found") + errGettingDistroVersionFrom = errors.New("error while getting distribution version from") + errGettingDistroVersionTo = errors.New("error while getting distribution version to") ) type PreUpgrade struct { @@ -216,9 +215,10 @@ func (p *PreUpgrade) Exec() error { return fmt.Errorf("error checking upgrade path: %w", err) } - if len(p.reducers) > 0 { - return errUpgradeWithReducersNotAllowed - } + // We should find a smarer way to stop the process if the reducers are from the upgrade or not + // if len(p.reducers) > 0 { + // return errUpgradeWithReducersNotAllowed + // }. if !p.forceFlag { if _, err := fmt.Println("Are you sure you want to continue? Only 'yes' will be accepted to confirm."); err != nil { From 11d445a755efcd302c920f934835a565ef73c42a Mon Sep 17 00:00:00 2001 From: Alessio Pragliola Date: Tue, 23 Jan 2024 18:19:10 +0100 Subject: [PATCH 7/8] chore: update go.mod go.sum --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 78d5a8b65..73d81059a 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,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.23.10 - github.com/sighupio/fury-distribution v1.27.1 + github.com/sighupio/fury-distribution v1.27.2-rc.22 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.17.0 diff --git a/go.sum b/go.sum index 30cc63b4d..9b14ea45a 100644 --- a/go.sum +++ b/go.sum @@ -551,6 +551,8 @@ github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5g github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sighupio/fury-distribution v1.27.1 h1:kZvHCJXQt4to7eL1FmJcmwbsS0VIq1l4cDWH5XaJBKM= github.com/sighupio/fury-distribution v1.27.1/go.mod h1:iYBnl0N/6zGPz3j3L2X6nzFC3nzNQtIkAzmaPfnO0zA= +github.com/sighupio/fury-distribution v1.27.2-rc.22 h1:PhI/I4mQPyXT/E5IrPmlyOawGTZhgFMhKvV4Ib/i6Ig= +github.com/sighupio/fury-distribution v1.27.2-rc.22/go.mod h1:iYBnl0N/6zGPz3j3L2X6nzFC3nzNQtIkAzmaPfnO0zA= 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= From 24fce1f2d27babea78b18ea7047496384d72442a Mon Sep 17 00:00:00 2001 From: Samuele Chiocca Date: Tue, 23 Jan 2024 23:00:47 +0100 Subject: [PATCH 8/8] feat: update fury-distribution library to 1.27.2 --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 73d81059a..fc5a49f79 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,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.23.10 - github.com/sighupio/fury-distribution v1.27.2-rc.22 + github.com/sighupio/fury-distribution v1.27.2 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.17.0 diff --git a/go.sum b/go.sum index 9b14ea45a..0169f1d76 100644 --- a/go.sum +++ b/go.sum @@ -553,6 +553,8 @@ github.com/sighupio/fury-distribution v1.27.1 h1:kZvHCJXQt4to7eL1FmJcmwbsS0VIq1l github.com/sighupio/fury-distribution v1.27.1/go.mod h1:iYBnl0N/6zGPz3j3L2X6nzFC3nzNQtIkAzmaPfnO0zA= github.com/sighupio/fury-distribution v1.27.2-rc.22 h1:PhI/I4mQPyXT/E5IrPmlyOawGTZhgFMhKvV4Ib/i6Ig= github.com/sighupio/fury-distribution v1.27.2-rc.22/go.mod h1:iYBnl0N/6zGPz3j3L2X6nzFC3nzNQtIkAzmaPfnO0zA= +github.com/sighupio/fury-distribution v1.27.2 h1:EiB/OoAD0mOAvmTUs/nM5KCUH1XjP7YJ9pTrpLrVPIg= +github.com/sighupio/fury-distribution v1.27.2/go.mod h1:iYBnl0N/6zGPz3j3L2X6nzFC3nzNQtIkAzmaPfnO0zA= 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=