diff --git a/pkg/providers/nutanix/config/cp-template.yaml b/pkg/providers/nutanix/config/cp-template.yaml index c9d7694166f8..a660cc953668 100644 --- a/pkg/providers/nutanix/config/cp-template.yaml +++ b/pkg/providers/nutanix/config/cp-template.yaml @@ -781,3 +781,31 @@ spec: name: user-ca-bundle {{- end }} strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "{{.clusterName}}-nutanix-ccm-secret" + namespace: "{{.eksaSystemNamespace}}" +stringData: + 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/controlplane.go b/pkg/providers/nutanix/controlplane.go index c2b1fc4fd898..d774f8ba0e81 100644 --- a/pkg/providers/nutanix/controlplane.go +++ b/pkg/providers/nutanix/controlplane.go @@ -27,6 +27,7 @@ type ControlPlane struct { BaseControlPlane ConfigMaps []*corev1.ConfigMap ClusterResourceSets []*addonsv1.ClusterResourceSet + Secrets []*corev1.Secret } // Objects returns the control plane objects associated with the Nutanix cluster. @@ -34,6 +35,7 @@ func (p ControlPlane) Objects() []kubernetes.Object { o := p.BaseControlPlane.Objects() o = appendKubeObjects[*corev1.ConfigMap](o, p.ConfigMaps) o = appendKubeObjects[*addonsv1.ClusterResourceSet](o, p.ClusterResourceSets) + o = appendKubeObjects[*corev1.Secret](o, p.Secrets) return o } @@ -154,6 +156,12 @@ func newControlPlaneParser(logger logr.Logger) (*yamlutil.Parser, *ControlPlaneB return &addonsv1.ClusterResourceSet{} }, ), + yamlutil.NewMapping( + constants.SecretKind, + func() yamlutil.APIObject { + return &corev1.Secret{} + }, + ), ) if err != nil { @@ -183,6 +191,8 @@ func buildObjects(cp *ControlPlane, lookup yamlutil.ObjectLookup) { cp.ConfigMaps = append(cp.ConfigMaps, obj.(*corev1.ConfigMap)) case constants.ClusterResourceSetKind: cp.ClusterResourceSets = append(cp.ClusterResourceSets, obj.(*addonsv1.ClusterResourceSet)) + case constants.SecretKind: + cp.Secrets = append(cp.Secrets, obj.(*corev1.Secret)) } } } diff --git a/pkg/providers/nutanix/reconciler/reconciler.go b/pkg/providers/nutanix/reconciler/reconciler.go index 1ad3ba8a9fb3..2db9ca70ca08 100644 --- a/pkg/providers/nutanix/reconciler/reconciler.go +++ b/pkg/providers/nutanix/reconciler/reconciler.go @@ -3,6 +3,7 @@ package reconciler import ( "context" "fmt" + "os" "reflect" "github.com/go-logr/logr" @@ -137,6 +138,7 @@ func (r *Reconciler) reconcileClusterSecret(ctx context.Context, log logr.Logger // Reconcile reconciles the cluster to the desired state. func (r *Reconciler) Reconcile(ctx context.Context, log logr.Logger, c *anywherev1.Cluster) (controller.Result, error) { log = log.WithValues("provider", "nutanix") + clusterSpec, err := cluster.BuildSpec(ctx, clientutil.NewKubeClient(r.client), c) if err != nil { return controller.Result{}, err @@ -182,6 +184,9 @@ func (r *Reconciler) ValidateClusterSpec(ctx context.Context, log logr.Logger, c return controller.ResultWithReturn(), nil } + os.Setenv(constants.EksaNutanixUsernameKey, creds.PrismCentral.Username) + os.Setenv(constants.EksaNutanixPasswordKey, creds.PrismCentral.Password) + return controller.Result{}, nil } @@ -198,13 +203,16 @@ func (r *Reconciler) ReconcileControlPlane(ctx context.Context, log logr.Logger, } func toClientControlPlane(cp *nutanix.ControlPlane) *clusters.ControlPlane { - other := make([]client.Object, 0, len(cp.ConfigMaps)+len(cp.ClusterResourceSets)+1) + other := make([]client.Object, 0, len(cp.ConfigMaps)+len(cp.ClusterResourceSets)+len(cp.Secrets)+1) for _, o := range cp.ClusterResourceSets { other = append(other, o) } for _, o := range cp.ConfigMaps { other = append(other, o) } + for _, o := range cp.Secrets { + other = append(other, o) + } return &clusters.ControlPlane{ Cluster: cp.Cluster, diff --git a/pkg/providers/nutanix/template.go b/pkg/providers/nutanix/template.go index f8bfe8738d1b..1b0f0034513a 100644 --- a/pkg/providers/nutanix/template.go +++ b/pkg/providers/nutanix/template.go @@ -59,7 +59,7 @@ func (ntb *TemplateBuilder) GenerateCAPISpecControlPlane(clusterSpec *cluster.Sp etcdMachineSpec = *ntb.etcdMachineSpec } - values, err := buildTemplateMapCP(ntb.datacenterSpec, clusterSpec, *ntb.controlPlaneMachineSpec, etcdMachineSpec) + values, err := buildTemplateMapCP(ntb.datacenterSpec, clusterSpec, *ntb.controlPlaneMachineSpec, etcdMachineSpec, ntb.creds) if err != nil { return nil, err } @@ -156,6 +156,7 @@ func buildTemplateMapCP( clusterSpec *cluster.Spec, controlPlaneMachineSpec v1alpha1.NutanixMachineConfigSpec, etcdMachineSpec v1alpha1.NutanixMachineConfigSpec, + creds credentials.BasicAuthCredential, ) (map[string]interface{}, error) { versionsBundle := clusterSpec.RootVersionsBundle() format := "cloud-config" @@ -218,6 +219,8 @@ func buildTemplateMapCP( "subnetName": controlPlaneMachineSpec.Subnet.Name, "subnetUUID": controlPlaneMachineSpec.Subnet.UUID, "apiServerCertSANs": clusterSpec.Cluster.Spec.ControlPlaneConfiguration.CertSANs, + "nutanixPCUsername": creds.PrismCentral.BasicAuth.Username, + "nutanixPCPassword": creds.PrismCentral.BasicAuth.Password, } if controlPlaneMachineSpec.Project != nil { diff --git a/pkg/providers/nutanix/template_test.go b/pkg/providers/nutanix/template_test.go index 37c52f79524b..9cdaf37f61a6 100644 --- a/pkg/providers/nutanix/template_test.go +++ b/pkg/providers/nutanix/template_test.go @@ -549,6 +549,9 @@ func TestTemplateBuilder_CertSANs(t *testing.T) { clusterSpec := test.NewFullClusterSpec(t, tc.Input) machineCfg := clusterSpec.NutanixMachineConfig(clusterSpec.Cluster.Spec.ControlPlaneConfiguration.MachineGroupRef.Name) + + t.Setenv(constants.EksaNutanixUsernameKey, "admin") + t.Setenv(constants.EksaNutanixPasswordKey, "password") creds := GetCredsFromEnv() bldr := NewNutanixTemplateBuilder(&clusterSpec.NutanixDatacenter.Spec, &machineCfg.Spec, nil, @@ -574,6 +577,9 @@ func TestTemplateBuilder_additionalTrustBundle(t *testing.T) { clusterSpec := test.NewFullClusterSpec(t, tc.Input) machineCfg := clusterSpec.NutanixMachineConfig(clusterSpec.Cluster.Spec.ControlPlaneConfiguration.MachineGroupRef.Name) + + t.Setenv(constants.EksaNutanixUsernameKey, "admin") + t.Setenv(constants.EksaNutanixPasswordKey, "password") creds := GetCredsFromEnv() bldr := NewNutanixTemplateBuilder(&clusterSpec.NutanixDatacenter.Spec, &machineCfg.Spec, nil, @@ -599,6 +605,9 @@ func TestTemplateBuilderEtcdEncryption(t *testing.T) { clusterSpec := test.NewFullClusterSpec(t, tc.Input) machineCfg := clusterSpec.NutanixMachineConfig(clusterSpec.Cluster.Spec.ControlPlaneConfiguration.MachineGroupRef.Name) + + t.Setenv(constants.EksaNutanixUsernameKey, "admin") + t.Setenv(constants.EksaNutanixPasswordKey, "password") creds := GetCredsFromEnv() bldr := NewNutanixTemplateBuilder(&clusterSpec.NutanixDatacenter.Spec, &machineCfg.Spec, nil, @@ -624,6 +633,9 @@ func TestTemplateBuilderEtcdEncryptionKubernetes129(t *testing.T) { clusterSpec := test.NewFullClusterSpec(t, tc.Input) machineCfg := clusterSpec.NutanixMachineConfig(clusterSpec.Cluster.Spec.ControlPlaneConfiguration.MachineGroupRef.Name) + + t.Setenv(constants.EksaNutanixUsernameKey, "admin") + t.Setenv(constants.EksaNutanixPasswordKey, "password") creds := GetCredsFromEnv() bldr := NewNutanixTemplateBuilder(&clusterSpec.NutanixDatacenter.Spec, &machineCfg.Spec, nil, diff --git a/pkg/providers/nutanix/testdata/expected_cluster_api_additional_trust_bundle.yaml b/pkg/providers/nutanix/testdata/expected_cluster_api_additional_trust_bundle.yaml index 8f7e16b55170..c7b78abe1447 100644 --- a/pkg/providers/nutanix/testdata/expected_cluster_api_additional_trust_bundle.yaml +++ b/pkg/providers/nutanix/testdata/expected_cluster_api_additional_trust_bundle.yaml @@ -641,3 +641,31 @@ spec: - kind: ConfigMap name: user-ca-bundle strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "eksa-unit-test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_cluster_api_server_cert_san_domain_name.yaml b/pkg/providers/nutanix/testdata/expected_cluster_api_server_cert_san_domain_name.yaml index a3f90efaa920..e07e818237ea 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 @@ -582,3 +582,31 @@ spec: - kind: Secret name: test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_cluster_api_server_cert_san_ip.yaml b/pkg/providers/nutanix/testdata/expected_cluster_api_server_cert_san_ip.yaml index 8402426982f9..be3eead5c104 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 @@ -582,3 +582,31 @@ spec: - kind: Secret name: test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_results_additional_categories.yaml b/pkg/providers/nutanix/testdata/expected_results_additional_categories.yaml index 1eb2c0b146c1..f291088809f1 100644 --- a/pkg/providers/nutanix/testdata/expected_results_additional_categories.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_additional_categories.yaml @@ -586,3 +586,31 @@ spec: - kind: Secret name: eksa-unit-test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "eksa-unit-test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_results_etcd_encryption.yaml b/pkg/providers/nutanix/testdata/expected_results_etcd_encryption.yaml index a51fa434fb18..833a2ec9d811 100644 --- a/pkg/providers/nutanix/testdata/expected_results_etcd_encryption.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_etcd_encryption.yaml @@ -631,3 +631,31 @@ spec: - kind: Secret name: test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_results_etcd_encryption_1_29.yaml b/pkg/providers/nutanix/testdata/expected_results_etcd_encryption_1_29.yaml index f9693fd1c865..9e212a7a23c2 100644 --- a/pkg/providers/nutanix/testdata/expected_results_etcd_encryption_1_29.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_etcd_encryption_1_29.yaml @@ -661,3 +661,31 @@ spec: - kind: Secret name: test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_results_external_etcd.yaml b/pkg/providers/nutanix/testdata/expected_results_external_etcd.yaml index d106949f640f..fe8fbcd9ccc6 100644 --- a/pkg/providers/nutanix/testdata/expected_results_external_etcd.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_external_etcd.yaml @@ -643,3 +643,31 @@ spec: - kind: Secret name: eksa-unit-test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "eksa-unit-test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_results_external_etcd_with_optional.yaml b/pkg/providers/nutanix/testdata/expected_results_external_etcd_with_optional.yaml index 0bb73d48d754..d60332022f26 100644 --- a/pkg/providers/nutanix/testdata/expected_results_external_etcd_with_optional.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_external_etcd_with_optional.yaml @@ -657,3 +657,31 @@ spec: - kind: Secret name: eksa-unit-test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "eksa-unit-test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_results_iamauth.yaml b/pkg/providers/nutanix/testdata/expected_results_iamauth.yaml index a63d85d72451..cded83bf575d 100644 --- a/pkg/providers/nutanix/testdata/expected_results_iamauth.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_iamauth.yaml @@ -625,3 +625,31 @@ spec: - kind: Secret name: eksa-unit-test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "eksa-unit-test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_results_irsa.yaml b/pkg/providers/nutanix/testdata/expected_results_irsa.yaml index a9ae7ec25f98..5f80eb7c2b1f 100644 --- a/pkg/providers/nutanix/testdata/expected_results_irsa.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_irsa.yaml @@ -582,3 +582,31 @@ spec: - kind: Secret name: eksa-unit-test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "eksa-unit-test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_results_node_taints_labels.yaml b/pkg/providers/nutanix/testdata/expected_results_node_taints_labels.yaml index 3327ef50f7f3..07326e5f9fee 100644 --- a/pkg/providers/nutanix/testdata/expected_results_node_taints_labels.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_node_taints_labels.yaml @@ -591,3 +591,31 @@ spec: - kind: Secret name: eksa-unit-test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "eksa-unit-test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_results_oidc.yaml b/pkg/providers/nutanix/testdata/expected_results_oidc.yaml index dc955647a810..0bafba10a28d 100644 --- a/pkg/providers/nutanix/testdata/expected_results_oidc.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_oidc.yaml @@ -583,3 +583,31 @@ spec: - kind: Secret name: eksa-unit-test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "eksa-unit-test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_results_project.yaml b/pkg/providers/nutanix/testdata/expected_results_project.yaml index 678fbae3c53f..f42167b0b87e 100644 --- a/pkg/providers/nutanix/testdata/expected_results_project.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_project.yaml @@ -585,3 +585,31 @@ spec: - kind: Secret name: eksa-unit-test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "eksa-unit-test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_results_proxy.yaml b/pkg/providers/nutanix/testdata/expected_results_proxy.yaml index ac8892124261..ce933ceca1ce 100644 --- a/pkg/providers/nutanix/testdata/expected_results_proxy.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_proxy.yaml @@ -590,3 +590,31 @@ spec: - kind: Secret name: eksa-unit-test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "eksa-unit-test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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/expected_results_registry_mirror.yaml b/pkg/providers/nutanix/testdata/expected_results_registry_mirror.yaml index eedffb23ace0..97c32981ec50 100644 --- a/pkg/providers/nutanix/testdata/expected_results_registry_mirror.yaml +++ b/pkg/providers/nutanix/testdata/expected_results_registry_mirror.yaml @@ -631,3 +631,31 @@ spec: - kind: Secret name: eksa-unit-test-nutanix-ccm-secret strategy: Reconcile +--- +apiVersion: v1 +kind: Secret +metadata: + name: "eksa-unit-test-nutanix-ccm-secret" + namespace: "eksa-system" +stringData: + 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