Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

fix: use a LocalObjectReference for credentials Secret #37

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions api/v1alpha1/addon_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ type CSIProvider struct {
Strategy AddonStrategy `json:"strategy"`

// +optional
Credentials *corev1.SecretReference `json:"credentials,omitempty"`
Credentials *corev1.LocalObjectReference `json:"credentials,omitempty"`
}

type StorageClassConfig struct {
Expand Down Expand Up @@ -257,9 +257,6 @@ func (CSIProvider) VariableSchema() clusterv1.VariableSchema {
"name": {
Type: "string",
},
"namespace": {
Type: "string",
},
},
},
"storageClassConfig": {
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/handlers/generic/lifecycle/csi/nutanix-csi/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func (n *NutanixCSI) Apply(
Kind: "Secret",
},
ObjectMeta: metav1.ObjectMeta{
Namespace: provider.Credentials.Name,
Name: provider.Credentials.Namespace,
Name: provider.Credentials.Name,
Namespace: req.Cluster.Namespace,
},
}
err := n.client.Get(
Expand Down