apiservicetrust

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package apiservicetrust keeps the aggregated API server's APIService trusting its serving CA.

The controller runs inside the aggregated API server process. It sets spec.caBundle of the v1alpha1.aggregation.coder.com APIService to the CA in the servingcert Secret and turns spec.insecureSkipTLSVerify off, in one merge patch and only when something differs. It reacts to a single-object informer on that APIService and to servingcert.Manager changes; it never polls, and failures never affect serving or readiness.

Index

Constants

View Source
const (
	// APIServiceName is the APIService registered by deploy/apiserver-apiservice.yaml.
	APIServiceName = "v1alpha1.aggregation.coder.com"
	// OptOutAnnotation set to "false" on the APIService makes the controller leave it alone, for
	// clusters where cert-manager or a GitOps tool owns spec.caBundle.
	OptOutAnnotation = "coder.com/manage-ca-bundle"
	// FieldManager identifies the controller's patches in managedFields.
	FieldManager = "coder-k8s-apiservice-cabundle"
	// DocsURL explains the RBAC, upgrade order, and opt-out.
	DocsURL = "https://coder.github.io/coder-k8s/how-to/deploy-aggregated-apiserver/#how-kube-apiserver-trusts-the-server"
)

Variables

View Source
var APIServiceGVR = schema.GroupVersionResource{Group: "apiregistration.k8s.io", Version: "v1", Resource: "apiservices"}

APIServiceGVR is the apiregistration.k8s.io/v1 APIService resource. kube-aggregator's typed client is not vendored, so the controller uses the dynamic client.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller keeps the APIService caBundle in sync with the servingcert Secret.

func New

func New(dyn dynamic.Interface, secrets kubernetes.Interface, namespace string) (*Controller, error)

New returns a Controller for the servingcert Secret in namespace.

func (*Controller) Enqueue

func (c *Controller) Enqueue()

Enqueue schedules a sync. It implements dynamiccertificates.Listener, so registering the controller with servingcert.Manager.AddListener reacts to CA changes.

func (*Controller) Run

func (c *Controller) Run(ctx context.Context)

Run syncs until ctx is done.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL