Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/v1.5] Use vmware-system-csi namespace when generating certs for the vSphere CSI webhooks #2374

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
6 changes: 3 additions & 3 deletions pkg/addons/applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func csiWebhookCerts(s *state.State, data *templateData, csiMigration bool, kube
if err := webhookCerts(data.Certificates,
webhookCertsCSI,
resources.GenericCSIWebhookName,
resources.GenericCSIWebhookNamespace,
resources.VsphereCSIWebhookNamespace,
s.Cluster.ClusterNetwork.ServiceDomainName,
kubeCAPrivateKey,
kubeCACert,
Expand All @@ -293,7 +293,7 @@ func csiWebhookCerts(s *state.State, data *templateData, csiMigration bool, kube
if err := webhookCerts(data.Certificates,
"CSIMigration",
resources.VsphereCSIWebhookName,
resources.GenericCSIWebhookNamespace,
resources.VsphereCSIWebhookNamespace,
s.Cluster.ClusterNetwork.ServiceDomainName,
kubeCAPrivateKey,
kubeCACert,
Expand All @@ -317,7 +317,7 @@ func csiWebhookCerts(s *state.State, data *templateData, csiMigration bool, kube
return nil
}

func webhookCerts(certs map[string]string, prefix, webhookName, webhookNamespace, serviceDomainName string, kubeCAPrivateKey *rsa.PrivateKey, kubeCACert *x509.Certificate) error { //nolint:unparam
func webhookCerts(certs map[string]string, prefix, webhookName, webhookNamespace, serviceDomainName string, kubeCAPrivateKey *rsa.PrivateKey, kubeCACert *x509.Certificate) error {
certsMap, err := certificate.NewSignedTLSCert(
webhookName,
webhookNamespace,
Expand Down
1 change: 1 addition & 0 deletions pkg/templates/resources/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ const (
MetricsServerNamespace = metav1.NamespaceSystem

VsphereCSIWebhookName = "vsphere-webhook-svc"
VsphereCSIWebhookNamespace = "vmware-system-csi"
NutanixCSIWebhookName = "csi-snapshot-webhook"
GenericCSIWebhookName = "snapshot-validation-service"
GenericCSIWebhookNamespace = metav1.NamespaceSystem
Expand Down