crdvalidation

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHook

func NewHook() hooks.PreStartHook

NewHook creates a new CRD validation hook with the default singleton client

func NewHookWithClient

func NewHookWithClient(c client.Client) hooks.PreStartHook

NewHookWithClient creates a new CRD validation hook with a specified client for improved testability and dependency injection

Types

type Hook

type Hook struct {
	client.Client
}

Hook validates that CRDs installed in the cluster are compatible with enabled feature gates. This prevents silent data corruption by failing fast at startup if CRDs are out of date.

func (*Hook) Name

func (h *Hook) Name() string

Name returns the hook name for logging

func (*Hook) Run

func (h *Hook) Run(ctx context.Context) error

Run executes the CRD validation logic. It checks if compression-related feature gates are enabled and validates that the ApplicationRevision CRD supports the required compression fields.

Jump to

Keyboard shortcuts

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