Skip to content
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
4 changes: 2 additions & 2 deletions pkg/addons/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ func (a *applier) getManifestsFromDirectory(st *state.State, fsys fs.FS, addonNa
)

if !disableTemplating && addonsToMutate.Has(addonName) {
if st.Cluster.CABundle != "" {
if st.Cluster.CertificateAuthority.Bundle != "" {
if err = mutatePodTemplateSpec(manifests, func(podTpl *corev1.PodTemplateSpec) {
cabundle.Inject(st.Cluster.CABundle, podTpl)
cabundle.Inject(st.Cluster.CertificateAuthority.Bundle, podTpl)
}); err != nil {
return "", err
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/tasks/certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func ensureCABundleConfigMap(s *state.State) error {

s.Logger.Infoln("Creating ca-bundle configMap...")

cm := cabundle.ConfigMap(s.Cluster.CABundle, metav1.NamespaceSystem)
cm := cabundle.ConfigMap(s.Cluster.CertificateAuthority.Bundle, metav1.NamespaceSystem)

return clientutil.CreateOrUpdate(s.Context, s.DynamicClient, cm)
}
Expand All @@ -170,13 +170,13 @@ func ensureVsphereCSICABundleConfigMap(s *state.State) error {
}
s.Logger.Infoln("Creating ca-bundle configmap for vSphere CSI...")

cm := cabundle.ConfigMap(s.Cluster.CABundle, resources.VsphereCSINamespace)
cm := cabundle.ConfigMap(s.Cluster.CertificateAuthority.Bundle, resources.VsphereCSINamespace)

return clientutil.CreateOrUpdate(s.Context, s.DynamicClient, cm)
}

func saveCABundle(s *state.State) error {
s.Configuration.AddFile("ca-certs/"+cabundle.FileName, s.Cluster.CABundle)
s.Configuration.AddFile("ca-certs/"+cabundle.FileName, s.Cluster.CertificateAuthority.Bundle)

return s.RunTaskOnControlPlane(saveCABundleOnControlPlane, state.RunParallel)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/tasks/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func patchStaticPods(s *state.State) error {
}

cacertDir := cabundle.OriginalCertsDir
if s.Cluster.CABundle != "" {
if s.Cluster.CertificateAuthority.Bundle != "" {
cacertDir = cabundle.CustomCertsDir
}

Expand Down
9 changes: 5 additions & 4 deletions pkg/tasks/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func WithResources(t Tasks) Tasks {
{
Fn: saveCABundle,
Predicate: func(s *state.State) bool {
return s.Cluster.CABundle != ""
return s.Cluster.CertificateAuthority.Bundle != ""
},
},
{
Expand Down Expand Up @@ -278,7 +278,7 @@ func WithResources(t Tasks) Tasks {
Fn: ensureCABundleConfigMap,
Operation: "ensuring caBundle configMap",
Description: "ensure caBundle configMap",
Predicate: func(s *state.State) bool { return s.Cluster.CABundle != "" },
Predicate: func(s *state.State) bool { return s.Cluster.CertificateAuthority.Bundle != "" },
},
{
Fn: labelNodes,
Expand Down Expand Up @@ -321,7 +321,7 @@ func WithResources(t Tasks) Tasks {
Operation: "ensure vSphere CSI caBundle configMap",
Description: "ensure vSphere CSI caBundle configMap",
Predicate: func(s *state.State) bool {
return s.Cluster.CABundle != "" && s.Cluster.CloudProvider.Vsphere != nil && s.Cluster.CloudProvider.External && !s.Cluster.CloudProvider.DisableBundledCSIDrivers
return s.Cluster.CertificateAuthority.Bundle != "" && s.Cluster.CloudProvider.Vsphere != nil && s.Cluster.CloudProvider.External && !s.Cluster.CloudProvider.DisableBundledCSIDrivers
},
},
{
Expand Down Expand Up @@ -427,7 +427,8 @@ func WithReset(t Tasks) Tasks {
Operation: "remove load balancer services",
Predicate: func(s *state.State) bool {
return s.RemoveLBServices
}},
},
},
{
Fn: RemoveVolumes,
Operation: "remove dynamically provisioned and unretained volumes",
Expand Down