From 2cfdc4480317e578ded4157440934a876e01de45 Mon Sep 17 00:00:00 2001 From: luisreciomelero Date: Fri, 24 May 2024 11:27:08 +0200 Subject: [PATCH 1/2] added installedCRDs --- .../templates/common/28/cert-manager-helm-values.tmpl | 1 + .../templates/common/29/cert-manager-helm-values.tmpl | 1 + .../templates/common/30/cert-manager-helm-values.tmpl | 1 + pkg/commons/cluster.go | 1 - pkg/commons/utils.go | 2 +- 5 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/cluster/internal/create/actions/createworker/templates/common/28/cert-manager-helm-values.tmpl b/pkg/cluster/internal/create/actions/createworker/templates/common/28/cert-manager-helm-values.tmpl index 7ad5b15a1d..a4332b927e 100644 --- a/pkg/cluster/internal/create/actions/createworker/templates/common/28/cert-manager-helm-values.tmpl +++ b/pkg/cluster/internal/create/actions/createworker/templates/common/28/cert-manager-helm-values.tmpl @@ -1,3 +1,4 @@ +installCRDs: true image: repository: {{ if $.Private }}{{ $.KeosRegUrl }}{{ else }}quay.io{{ end }}/jetstack/cert-manager-controller acmesolver: diff --git a/pkg/cluster/internal/create/actions/createworker/templates/common/29/cert-manager-helm-values.tmpl b/pkg/cluster/internal/create/actions/createworker/templates/common/29/cert-manager-helm-values.tmpl index 7ad5b15a1d..a4332b927e 100644 --- a/pkg/cluster/internal/create/actions/createworker/templates/common/29/cert-manager-helm-values.tmpl +++ b/pkg/cluster/internal/create/actions/createworker/templates/common/29/cert-manager-helm-values.tmpl @@ -1,3 +1,4 @@ +installCRDs: true image: repository: {{ if $.Private }}{{ $.KeosRegUrl }}{{ else }}quay.io{{ end }}/jetstack/cert-manager-controller acmesolver: diff --git a/pkg/cluster/internal/create/actions/createworker/templates/common/30/cert-manager-helm-values.tmpl b/pkg/cluster/internal/create/actions/createworker/templates/common/30/cert-manager-helm-values.tmpl index 7ad5b15a1d..a4332b927e 100644 --- a/pkg/cluster/internal/create/actions/createworker/templates/common/30/cert-manager-helm-values.tmpl +++ b/pkg/cluster/internal/create/actions/createworker/templates/common/30/cert-manager-helm-values.tmpl @@ -1,3 +1,4 @@ +installCRDs: true image: repository: {{ if $.Private }}{{ $.KeosRegUrl }}{{ else }}quay.io{{ end }}/jetstack/cert-manager-controller acmesolver: diff --git a/pkg/commons/cluster.go b/pkg/commons/cluster.go index 3c16519427..83a78e69f8 100644 --- a/pkg/commons/cluster.go +++ b/pkg/commons/cluster.go @@ -461,7 +461,6 @@ func GetClusterDescriptor(descriptorPath string) (*KeosCluster, *ClusterConfig, if err != nil { return nil, nil, err } - err = validate.Struct(clusterConfig) if err != nil { return nil, nil, err diff --git a/pkg/commons/utils.go b/pkg/commons/utils.go index 776f35e781..02c8cdee71 100644 --- a/pkg/commons/utils.go +++ b/pkg/commons/utils.go @@ -246,7 +246,7 @@ func ExecuteCommand(n nodes.Node, command string, timeout int, retries int, envV if len(envVars) > 0 { cmd.SetEnv(envVars[0]...) } - retryConditions := []string{"dial tcp: lookup", "NotFound", "context deadline exceeded", "timed out waiting for the condition on"} + retryConditions := []string{"dial tcp: lookup", "NotFound", "context deadline exceeded", "timed out waiting for the condition"} provisionCommands := strings.Contains(command, "kubectl") || strings.Contains(command, "helm") || strings.Contains(command, "clusterctl") for i := 0; i < retries; i++ { raw = bytes.Buffer{} From faf3e65552aa3b191fbe87130f423ea6152b68e2 Mon Sep 17 00:00:00 2001 From: luisreciomelero Date: Tue, 28 May 2024 13:04:00 +0200 Subject: [PATCH 2/2] fixed tigera-operator version --- .../internal/create/actions/createworker/aws.go | 12 ++++++------ .../internal/create/actions/createworker/azure.go | 6 +++--- .../internal/create/actions/createworker/gcp.go | 6 +++--- pkg/cluster/internal/validate/common.go | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkg/cluster/internal/create/actions/createworker/aws.go b/pkg/cluster/internal/create/actions/createworker/aws.go index 8832251da9..d1418e80eb 100644 --- a/pkg/cluster/internal/create/actions/createworker/aws.go +++ b/pkg/cluster/internal/create/actions/createworker/aws.go @@ -114,39 +114,39 @@ var awsCharts = ChartsDictionary{ "managed": { "aws-load-balancer-controller": {Repository: "https://aws.github.io/eks-charts", Version: "1.8.0", Namespace: "kube-system", Pull: false}, "cluster-autoscaler": {Repository: "https://kubernetes.github.io/autoscaler", Version: "9.34.1", Namespace: "kube-system", Pull: false}, - "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.28.0", Namespace: "tigera-operator", Pull: false}, + "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.27.3", Namespace: "tigera-operator", Pull: false}, }, "unmanaged": { "aws-cloud-controller-manager": {Repository: "https://kubernetes.github.io/cloud-provider-aws", Version: "0.0.8", Namespace: "kube-system", Pull: true}, "aws-ebs-csi-driver": {Repository: "https://kubernetes-sigs.github.io/aws-ebs-csi-driver", Version: "2.31.0", Namespace: "kube-system", Pull: false}, "cluster-autoscaler": {Repository: "https://kubernetes.github.io/autoscaler", Version: "9.34.1", Namespace: "kube-system", Pull: false}, - "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.28.0", Namespace: "tigera-operator", Pull: true}, + "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.27.3", Namespace: "tigera-operator", Pull: true}, }, }, "29": { "managed": { "aws-load-balancer-controller": {Repository: "https://aws.github.io/eks-charts", Version: "1.8.0", Namespace: "kube-system", Pull: false}, "cluster-autoscaler": {Repository: "https://kubernetes.github.io/autoscaler", Version: "9.35.0", Namespace: "kube-system", Pull: false}, - "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.28.0", Namespace: "tigera-operator", Pull: false}, + "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.27.3", Namespace: "tigera-operator", Pull: false}, }, "unmanaged": { "aws-cloud-controller-manager": {Repository: "https://kubernetes.github.io/cloud-provider-aws", Version: "0.0.8", Namespace: "kube-system", Pull: true}, "aws-ebs-csi-driver": {Repository: "https://kubernetes-sigs.github.io/aws-ebs-csi-driver", Version: "2.31.0", Namespace: "kube-system", Pull: false}, "cluster-autoscaler": {Repository: "https://kubernetes.github.io/autoscaler", Version: "9.35.0", Namespace: "kube-system", Pull: false}, - "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.28.0", Namespace: "tigera-operator", Pull: true}, + "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.27.3", Namespace: "tigera-operator", Pull: true}, }, }, "30": { "managed": { "aws-load-balancer-controller": {Repository: "https://aws.github.io/eks-charts", Version: "1.8.0", Namespace: "kube-system", Pull: false}, "cluster-autoscaler": {Repository: "https://kubernetes.github.io/autoscaler", Version: "9.37.0", Namespace: "kube-system", Pull: false}, - "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.28.0", Namespace: "tigera-operator", Pull: false}, + "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.27.3", Namespace: "tigera-operator", Pull: false}, }, "unmanaged": { "aws-cloud-controller-manager": {Repository: "https://kubernetes.github.io/cloud-provider-aws", Version: "0.0.8", Namespace: "kube-system", Pull: true}, "aws-ebs-csi-driver": {Repository: "https://kubernetes-sigs.github.io/aws-ebs-csi-driver", Version: "2.31.0", Namespace: "kube-system", Pull: false}, "cluster-autoscaler": {Repository: "https://kubernetes.github.io/autoscaler", Version: "9.37.0", Namespace: "kube-system", Pull: false}, - "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.28.0", Namespace: "tigera-operator", Pull: true}, + "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.27.3", Namespace: "tigera-operator", Pull: true}, }, }, }, diff --git a/pkg/cluster/internal/create/actions/createworker/azure.go b/pkg/cluster/internal/create/actions/createworker/azure.go index 8119e5b8db..d4c831f2b9 100644 --- a/pkg/cluster/internal/create/actions/createworker/azure.go +++ b/pkg/cluster/internal/create/actions/createworker/azure.go @@ -62,7 +62,7 @@ var azureCharts = ChartsDictionary{ "azurefile-csi-driver": {Repository: "https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/charts", Namespace: "kube-system", Version: "v1.28.7", Pull: false}, "cloud-provider-azure": {Repository: "https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo", Namespace: "kube-system", Version: "v1.28.9", Pull: true}, "cluster-autoscaler": {Repository: "https://kubernetes.github.io/autoscaler", Version: "9.34.1", Namespace: "kube-system", Pull: false}, - "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.28.0", Namespace: "tigera-operator", Pull: true}, + "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.27.3", Namespace: "tigera-operator", Pull: true}, }, }, "29": { @@ -72,7 +72,7 @@ var azureCharts = ChartsDictionary{ "azurefile-csi-driver": {Repository: "https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/charts", Namespace: "kube-system", Version: "v1.29.5", Pull: false}, "cloud-provider-azure": {Repository: "https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo", Namespace: "kube-system", Version: "v1.29.6", Pull: true}, "cluster-autoscaler": {Repository: "https://kubernetes.github.io/autoscaler", Version: "9.35.0", Namespace: "kube-system", Pull: false}, - "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.28.0", Namespace: "tigera-operator", Pull: true}, + "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.27.3", Namespace: "tigera-operator", Pull: true}, }, }, "30": { @@ -82,7 +82,7 @@ var azureCharts = ChartsDictionary{ "azurefile-csi-driver": {Repository: "https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/charts", Namespace: "kube-system", Version: "v1.30.2", Pull: false}, "cloud-provider-azure": {Repository: "https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo", Namespace: "kube-system", Version: "v1.30.2", Pull: true}, "cluster-autoscaler": {Repository: "https://kubernetes.github.io/autoscaler", Version: "9.37.0", Namespace: "kube-system", Pull: false}, - "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.28.0", Namespace: "tigera-operator", Pull: true}, + "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.27.3", Namespace: "tigera-operator", Pull: true}, }, }, }, diff --git a/pkg/cluster/internal/create/actions/createworker/gcp.go b/pkg/cluster/internal/create/actions/createworker/gcp.go index 4de3d2f5e1..1c9671abc1 100644 --- a/pkg/cluster/internal/create/actions/createworker/gcp.go +++ b/pkg/cluster/internal/create/actions/createworker/gcp.go @@ -55,21 +55,21 @@ var googleCharts = ChartsDictionary{ "managed": {}, "unmanaged": { "cluster-autoscaler": {Repository: "https://kubernetes.github.io/autoscaler", Version: "9.34.1", Namespace: "kube-system", Pull: false}, - "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.28.0", Namespace: "tigera-operator", Pull: true}, + "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.27.3", Namespace: "tigera-operator", Pull: true}, }, }, "29": { "managed": {}, "unmanaged": { "cluster-autoscaler": {Repository: "https://kubernetes.github.io/autoscaler", Version: "9.35.0", Namespace: "kube-system", Pull: false}, - "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.28.0", Namespace: "tigera-operator", Pull: true}, + "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.27.3", Namespace: "tigera-operator", Pull: true}, }, }, "30": { "managed": {}, "unmanaged": { "cluster-autoscaler": {Repository: "https://kubernetes.github.io/autoscaler", Version: "9.37.0", Namespace: "kube-system", Pull: false}, - "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.28.0", Namespace: "tigera-operator", Pull: true}, + "tigera-operator": {Repository: "https://docs.projectcalico.org/charts", Version: "v3.27.3", Namespace: "tigera-operator", Pull: true}, }, }, }, diff --git a/pkg/cluster/internal/validate/common.go b/pkg/cluster/internal/validate/common.go index f0bcea03cf..f63d18e9db 100644 --- a/pkg/cluster/internal/validate/common.go +++ b/pkg/cluster/internal/validate/common.go @@ -32,7 +32,7 @@ const ( MinWorkerNodeNameLength = 3 ) -var k8sVersionSupported = []string{"1.24", "1.25", "1.26", "1.27", "1.28"} +var k8sVersionSupported = []string{"1.28", "1.29"} func validateCommon(spec commons.KeosSpec, clusterConfigSpec commons.ClusterConfigSpec) error { var err error