Skip to content

Commit

Permalink
Fix PR review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
adiantum committed Feb 9, 2024
1 parent a0307c8 commit 04ad6a5
Show file tree
Hide file tree
Showing 20 changed files with 73 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/nutanix/config/cp-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ metadata:
namespace: "{{.eksaSystemNamespace}}"
data:
nutanix-ccm.yaml: |
---
{{- if .nutanixAdditionalTrustBundle }}
---
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
25 changes: 20 additions & 5 deletions pkg/providers/nutanix/config/secret-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions pkg/providers/nutanix/testdata/expected_results_iamauth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions pkg/providers/nutanix/testdata/expected_results_irsa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions pkg/providers/nutanix/testdata/expected_results_oidc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions pkg/providers/nutanix/testdata/expected_results_project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions pkg/providers/nutanix/testdata/expected_results_proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 20 additions & 5 deletions pkg/providers/nutanix/testdata/templated_secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
25 changes: 20 additions & 5 deletions pkg/providers/nutanix/testdata/templated_secret_eksa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion release/api/v1alpha1/artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 04ad6a5

Please sign in to comment.