Documentation
¶
Overview ¶
Package webhooks serves the CRD conversion webhook that converts LinodeNodeClass objects between API versions.
Index ¶
Constants ¶
const CertDir = "/etc/karpenter/webhook-certs"
CertDir is where the certificate Secret is mounted. The Helm chart mounts the Secret at this path.
const ConversionPath = "/convert"
ConversionPath is the path the apiserver calls to convert custom resources.
Variables ¶
var LinodeNodeClassCRDName = "linodenodeclasses." + apis.Group
LinodeNodeClassCRDName is the CRD that serves multiple versions and therefore needs the conversion webhook.
Functions ¶
func NewConversionHandler ¶
NewConversionHandler returns the handler converting LinodeNodeClass between its versions.
func NewScheme ¶
NewScheme returns a scheme with every LinodeNodeClass version registered, along with its conversions.
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.