webhooks

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 14 Imported by: 1 module, 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 webhooks serves the CRD conversion webhook that converts LinodeNodeClass objects between API versions.

Index

Constants

View Source
const CertDir = "/etc/karpenter/webhook-certs"

CertDir is where the certificate Secret is mounted. The Helm chart mounts the Secret at this path.

View Source
const ConversionPath = "/convert"

ConversionPath is the path the apiserver calls to convert custom resources.

Variables

View Source
var LinodeNodeClassCRDName = "linodenodeclasses." + apis.Group

LinodeNodeClassCRDName is the CRD that serves multiple versions and therefore needs the conversion webhook.

Functions

func NewConversionHandler

func NewConversionHandler() (http.Handler, error)

NewConversionHandler returns the handler converting LinodeNodeClass between its versions.

func NewScheme

func NewScheme() (*runtime.Scheme, error)

NewScheme returns a scheme with every LinodeNodeClass version registered, along with its conversions.

func Register

func Register(mgr manager.Manager, config Config) error

Register adds the conversion webhook server and the certificate rotator to the manager. The rotator keeps a self-signed serving certificate in the Config's Secret and publishes its CA to the CRD, which must already declare the conversion webhook (the Helm chart does this).

Types

type Config

type Config struct {
	// Namespace is the namespace of the Karpenter Service and certificate Secret.
	Namespace string
	// ServiceName is the Service fronting the webhook server. The certificate Secret is named <ServiceName>-cert.
	ServiceName string
	// Port is the port the webhook server listens on.
	Port int
}

Config describes how the conversion webhook is exposed in the cluster.

Jump to

Keyboard shortcuts

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