Skip to content

Commit

Permalink
UPSTREAM: <carry>: Ensure service ca is mounted for projected tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
soltysh authored and sairameshv committed Dec 4, 2023
1 parent 3378e5e commit b46b771
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/kube-controller-manager/app/certificates.go
Expand Up @@ -226,7 +226,15 @@ func startRootCACertificatePublisherController(ctx context.Context, controllerCo
return nil, true, nil
}

func startServiceCACertPublisher(ctx context.Context, controllerContext ControllerContext) (controller.Interface, bool, error) {
func newServiceCACertPublisher() *ControllerDescriptor {
return &ControllerDescriptor{
name: names.ServiceCACertificatePublisherController,
aliases: []string{"service-ca-cert-publisher"},
initFunc: startServiceCACertPublisher,
}
}

func startServiceCACertPublisher(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) {
sac, err := servicecacertpublisher.NewPublisher(
controllerContext.InformerFactory.Core().V1().ConfigMaps(),
controllerContext.InformerFactory.Core().V1().Namespaces(),
Expand Down
1 change: 1 addition & 0 deletions cmd/kube-controller-manager/app/controllermanager.go
Expand Up @@ -594,6 +594,7 @@ func NewControllerDescriptors() map[string]*ControllerDescriptor {
register(newPersistentVolumeProtectionControllerDescriptor())
register(newTTLAfterFinishedControllerDescriptor())
register(newRootCACertificatePublisherControllerDescriptor())
register(newServiceCACertPublisher())
register(newEphemeralVolumeControllerDescriptor())

// feature gated
Expand Down

0 comments on commit b46b771

Please sign in to comment.