crd

package
v1.77.0 Latest Latest
Warning

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

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

Documentation

Overview

Package crd installs CustomResourceDefinitions bundled with Deckhouse packages (modules) and reports the GroupVersionKinds of Deckhouse-managed CRDs present in the cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service applies CRDs found in package paths and reports the GroupVersionKinds of Deckhouse-managed CRDs. It records the GVKs each module applies at install time, so GetManagedGVKs is served from memory without listing the cluster. It is safe for concurrent use.

func NewService

func NewService(client *client.Client, logger *log.Logger) *Service

NewService returns a Service that applies CRDs via the given Kubernetes client.

func (*Service) GetManagedGVKs

func (s *Service) GetManagedGVKs(enabledModules []string) []string

GetManagedGVKs returns the GroupVersionKinds of the CRDs applied for the given enabled modules, as "group/version/kind" strings. The set is built from what each module's Install recorded, so a module whose CRDs have not been ensured (or that is not enabled) contributes nothing. Results are deduplicated. Returns nil when no modules are enabled.

func (*Service) Install

func (s *Service) Install(ctx context.Context, name, path string) error

Install scans the package's crds directory and applies every CRD manifest found, labelling them as Deckhouse-managed so GetGVKs can list them back. It is a no-op when the package ships no CRDs.

Jump to

Keyboard shortcuts

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