diff --git a/.github/workflows/go-coverage.yml b/.github/workflows/go-coverage.yml index 7d8fa41a1836..883115bffe67 100644 --- a/.github/workflows/go-coverage.yml +++ b/.github/workflows/go-coverage.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.20' check-latest: true cache: true - name: Run go test with coverage diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 59632c758792..876652e0806b 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.20" check-latest: true cache: true - name: golangci-lint diff --git a/Makefile b/Makefile index 6af7100c1d94..372d2eb6c047 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ SHELL := /bin/bash ARTIFACTS_BUCKET?=my-s3-bucket GIT_VERSION?=$(shell git describe --tag) GIT_TAG?=$(shell git tag -l "v*.*.*" --sort -v:refname | head -1) -GOLANG_VERSION?="1.21" +GOLANG_VERSION?="1.20" GO_VERSION ?= $(shell source ./scripts/common.sh && build::common::get_go_path $(GOLANG_VERSION)) GO ?= $(GO_VERSION)/go GO_TEST ?= $(GO) test @@ -381,7 +381,6 @@ update-attribution-files: generate-attribution scripts/create_pr.sh update-golden-files: -.PHONY: update-golden-files make -C release update-bundle-golden-files scripts/golden_create_pr.sh diff --git a/go.mod b/go.mod index a9ab6ad388af..3f72825d6062 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/aws/eks-anywhere go 1.21 +toolchain go1.21.6 + require ( github.com/Masterminds/sprig v2.22.0+incompatible github.com/aws/aws-sdk-go v1.42.23 diff --git a/go.sum b/go.sum index f6ef1053461d..1e5f7cdbf024 100644 --- a/go.sum +++ b/go.sum @@ -565,6 +565,8 @@ github.com/aws/etcdadm-controller v1.0.6-rc3 h1:hTu0pagWPU467scMtaR2rmaNIgMcFMNe github.com/aws/etcdadm-controller v1.0.6-rc3/go.mod h1:60QVQeYClyeV22MpI+SMBDx/dXVf/pZNdyiWDM2OBZc= github.com/aws/smithy-go v1.19.0 h1:KWFKQV80DpP3vJrrA9sVAHQ5gc2z8i4EzrLhLlWXcBM= github.com/aws/smithy-go v1.19.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= diff --git a/pkg/providers/nutanix/config/cp-template.yaml b/pkg/providers/nutanix/config/cp-template.yaml index d70119994bef..b98f5837cd3d 100644 --- a/pkg/providers/nutanix/config/cp-template.yaml +++ b/pkg/providers/nutanix/config/cp-template.yaml @@ -410,8 +410,8 @@ metadata: namespace: "{{.eksaSystemNamespace}}" data: nutanix-ccm.yaml: | - --- {{- if .nutanixAdditionalTrustBundle }} + --- apiVersion: v1 kind: ConfigMap metadata: diff --git a/pkg/providers/nutanix/config/secret-template.yaml b/pkg/providers/nutanix/config/secret-template.yaml index 23e7b5a7065f..6be901a10d3d 100644 --- a/pkg/providers/nutanix/config/secret-template.yaml +++ b/pkg/providers/nutanix/config/secret-template.yaml @@ -12,9 +12,24 @@ metadata: name: "{{.clusterName}}-nutanix-ccm-secret" namespace: "{{.eksaSystemNamespace}}" stringData: - nutanix-ccm-secret.yaml: "apiVersion: v1\nkind: Secret\nmetadata:\n name: nutanix-creds\n - \ namespace: kube-system\nstringData:\n credentials: |\n [\n {\n \"type\": - \"basic_auth\", \n \"data\": { \n \"prismCentral\":{\n \"username\": - \"{{ .nutanixPCUsername }}\",\n \"password\": \"{{ .nutanixPCPassword }}\"\n },\n - \ \"prismElements\": null\n }\n }\n ]\n" + nutanix-ccm-secret.yaml: | + apiVersion: v1 + kind: Secret + metadata: + name: nutanix-creds + namespace: kube-system + stringData: + credentials: |- + [ + { + "type": "basic_auth", + "data": { + "prismCentral": { + "username": "{{ .nutanixPCUsername }}", + "password": "{{ .nutanixPCPassword }}" + }, + "prismElements": null + } + } + ] type: addons.cluster.x-k8s.io/resource-set diff --git a/pkg/providers/nutanix/testdata/expected_cluster_api_server_cert_san_domain_name.yaml b/pkg/providers/nutanix/testdata/expected_cluster_api_server_cert_san_domain_name.yaml index a07115577bf8..a3f90efaa920 100644 --- a/pkg/providers/nutanix/testdata/expected_cluster_api_server_cert_san_domain_name.yaml +++ b/pkg/providers/nutanix/testdata/expected_cluster_api_server_cert_san_domain_name.yaml @@ -375,14 +375,6 @@ data: nutanix-ccm.yaml: | --- apiVersion: v1 - kind: ConfigMap - metadata: - name: user-ca-bundle - namespace: kube-system - binaryData: - ca.crt: - --- - apiVersion: v1 kind: ServiceAccount metadata: name: cloud-controller-manager diff --git a/pkg/providers/nutanix/testdata/expected_cluster_api_server_cert_san_ip.yaml b/pkg/providers/nutanix/testdata/expected_cluster_api_server_cert_san_ip.yaml index 0b0a6f16c5dd..8402426982f9 100644 --- a/pkg/providers/nutanix/testdata/expected_cluster_api_server_cert_san_ip.yaml +++ b/pkg/providers/nutanix/testdata/expected_cluster_api_server_cert_san_ip.yaml @@ -375,14 +375,6 @@ data: nutanix-ccm.yaml: | --- apiVersion: v1 - kind: ConfigMap - metadata: - name: user-ca-bundle - namespace: kube-system - binaryData: - ca.crt: - --- - apiVersion: v1 kind: ServiceAccount metadata: name: cloud-controller-manager diff --git a/pkg/providers/nutanix/testdata/expected_results_additional_categories.yaml b/pkg/providers/nutanix/testdata/expected_results_additional_categories.yaml index 7fcb6c834a91..531fbc8c1c75 100644 --- a/pkg/providers/nutanix/testdata/expected_results_additional_categories.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_additional_categories.yaml @@ -381,14 +381,6 @@ data: nutanix-ccm.yaml: | --- apiVersion: v1 - kind: ConfigMap - metadata: - name: user-ca-bundle - namespace: kube-system - binaryData: - ca.crt: - --- - apiVersion: v1 kind: ServiceAccount metadata: name: cloud-controller-manager diff --git a/pkg/providers/nutanix/testdata/expected_results_iamauth.yaml b/pkg/providers/nutanix/testdata/expected_results_iamauth.yaml index 64deaedec37b..f3ff1b23eb19 100644 --- a/pkg/providers/nutanix/testdata/expected_results_iamauth.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_iamauth.yaml @@ -420,14 +420,6 @@ data: nutanix-ccm.yaml: | --- apiVersion: v1 - kind: ConfigMap - metadata: - name: user-ca-bundle - namespace: kube-system - binaryData: - ca.crt: - --- - apiVersion: v1 kind: ServiceAccount metadata: name: cloud-controller-manager diff --git a/pkg/providers/nutanix/testdata/expected_results_irsa.yaml b/pkg/providers/nutanix/testdata/expected_results_irsa.yaml index bd76543cc74f..0d08866eeaee 100644 --- a/pkg/providers/nutanix/testdata/expected_results_irsa.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_irsa.yaml @@ -377,14 +377,6 @@ data: nutanix-ccm.yaml: | --- apiVersion: v1 - kind: ConfigMap - metadata: - name: user-ca-bundle - namespace: kube-system - binaryData: - ca.crt: - --- - apiVersion: v1 kind: ServiceAccount metadata: name: cloud-controller-manager diff --git a/pkg/providers/nutanix/testdata/expected_results_node_taints_labels.yaml b/pkg/providers/nutanix/testdata/expected_results_node_taints_labels.yaml index 1c046bf09a5f..5bd738cda5b2 100644 --- a/pkg/providers/nutanix/testdata/expected_results_node_taints_labels.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_node_taints_labels.yaml @@ -386,14 +386,6 @@ data: nutanix-ccm.yaml: | --- apiVersion: v1 - kind: ConfigMap - metadata: - name: user-ca-bundle - namespace: kube-system - binaryData: - ca.crt: - --- - apiVersion: v1 kind: ServiceAccount metadata: name: cloud-controller-manager diff --git a/pkg/providers/nutanix/testdata/expected_results_oidc.yaml b/pkg/providers/nutanix/testdata/expected_results_oidc.yaml index bb67533754c4..316c76216bbe 100644 --- a/pkg/providers/nutanix/testdata/expected_results_oidc.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_oidc.yaml @@ -378,14 +378,6 @@ data: nutanix-ccm.yaml: | --- apiVersion: v1 - kind: ConfigMap - metadata: - name: user-ca-bundle - namespace: kube-system - binaryData: - ca.crt: - --- - apiVersion: v1 kind: ServiceAccount metadata: name: cloud-controller-manager diff --git a/pkg/providers/nutanix/testdata/expected_results_project.yaml b/pkg/providers/nutanix/testdata/expected_results_project.yaml index 65d4616adeb0..89e301270974 100644 --- a/pkg/providers/nutanix/testdata/expected_results_project.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_project.yaml @@ -380,14 +380,6 @@ data: nutanix-ccm.yaml: | --- apiVersion: v1 - kind: ConfigMap - metadata: - name: user-ca-bundle - namespace: kube-system - binaryData: - ca.crt: - --- - apiVersion: v1 kind: ServiceAccount metadata: name: cloud-controller-manager diff --git a/pkg/providers/nutanix/testdata/expected_results_proxy.yaml b/pkg/providers/nutanix/testdata/expected_results_proxy.yaml index a22d0e5472a5..d08bd44192b6 100644 --- a/pkg/providers/nutanix/testdata/expected_results_proxy.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_proxy.yaml @@ -385,14 +385,6 @@ data: nutanix-ccm.yaml: | --- apiVersion: v1 - kind: ConfigMap - metadata: - name: user-ca-bundle - namespace: kube-system - binaryData: - ca.crt: - --- - apiVersion: v1 kind: ServiceAccount metadata: name: cloud-controller-manager diff --git a/pkg/providers/nutanix/testdata/expected_results_registry_mirror.yaml b/pkg/providers/nutanix/testdata/expected_results_registry_mirror.yaml index 01593007d879..17ed2712216f 100644 --- a/pkg/providers/nutanix/testdata/expected_results_registry_mirror.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_registry_mirror.yaml @@ -426,14 +426,6 @@ data: nutanix-ccm.yaml: | --- apiVersion: v1 - kind: ConfigMap - metadata: - name: user-ca-bundle - namespace: kube-system - binaryData: - ca.crt: - --- - apiVersion: v1 kind: ServiceAccount metadata: name: cloud-controller-manager diff --git a/pkg/providers/nutanix/testdata/templated_secret.yaml b/pkg/providers/nutanix/testdata/templated_secret.yaml index 1deebb1f3b81..cbd4869ce452 100644 --- a/pkg/providers/nutanix/testdata/templated_secret.yaml +++ b/pkg/providers/nutanix/testdata/templated_secret.yaml @@ -12,9 +12,24 @@ metadata: name: "eksa-unit-test-nutanix-ccm-secret" namespace: "eksa-system" stringData: - nutanix-ccm-secret.yaml: "apiVersion: v1\nkind: Secret\nmetadata:\n name: nutanix-creds\n - \ namespace: kube-system\nstringData:\n credentials: |\n [\n {\n \"type\": - \"basic_auth\", \n \"data\": { \n \"prismCentral\":{\n \"username\": - \"admin\",\n \"password\": \"password\"\n },\n - \ \"prismElements\": null\n }\n }\n ]\n" + nutanix-ccm-secret.yaml: | + apiVersion: v1 + kind: Secret + metadata: + name: nutanix-creds + namespace: kube-system + stringData: + credentials: |- + [ + { + "type": "basic_auth", + "data": { + "prismCentral": { + "username": "admin", + "password": "password" + }, + "prismElements": null + } + } + ] type: addons.cluster.x-k8s.io/resource-set diff --git a/pkg/providers/nutanix/testdata/templated_secret_eksa.yaml b/pkg/providers/nutanix/testdata/templated_secret_eksa.yaml index 5d3eea1213c8..7e0149ac5652 100644 --- a/pkg/providers/nutanix/testdata/templated_secret_eksa.yaml +++ b/pkg/providers/nutanix/testdata/templated_secret_eksa.yaml @@ -12,9 +12,24 @@ metadata: name: "eksa-unit-test-nutanix-ccm-secret" namespace: "eksa-system" stringData: - nutanix-ccm-secret.yaml: "apiVersion: v1\nkind: Secret\nmetadata:\n name: nutanix-creds\n - \ namespace: kube-system\nstringData:\n credentials: |\n [\n {\n \"type\": - \"basic_auth\", \n \"data\": { \n \"prismCentral\":{\n \"username\": - \"admin\",\n \"password\": \"password\"\n },\n - \ \"prismElements\": null\n }\n }\n ]\n" + nutanix-ccm-secret.yaml: | + apiVersion: v1 + kind: Secret + metadata: + name: nutanix-creds + namespace: kube-system + stringData: + credentials: |- + [ + { + "type": "basic_auth", + "data": { + "prismCentral": { + "username": "admin", + "password": "password" + }, + "prismElements": null + } + } + ] type: addons.cluster.x-k8s.io/resource-set diff --git a/release/api/v1alpha1/artifacts.go b/release/api/v1alpha1/artifacts.go index 043f0306ba71..a533656d607d 100644 --- a/release/api/v1alpha1/artifacts.go +++ b/release/api/v1alpha1/artifacts.go @@ -152,11 +152,15 @@ func (vb *VersionsBundle) TinkerbellImages() []Image { } func (vb *VersionsBundle) NutanixImages() []Image { - i := make([]Image, 0, 1) + i := make([]Image, 0, 2) if vb.Nutanix.ClusterAPIController.URI != "" { i = append(i, vb.Nutanix.ClusterAPIController) } + if vb.Nutanix.CloudProvider.URI != "" { + i = append(i, vb.Nutanix.CloudProvider) + } + return i }