apigroup

package
v1.42.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package apigroup tracks which Calico API group the operator should configure on the workloads it manages. The value is set once at startup (or when a datastore migration completes) and read by the component handler to inject the CALICO_API_GROUP env var into all workload containers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvVars

func EnvVars() []corev1.EnvVar

EnvVars returns the env vars to inject into workload containers, or nil if no explicit API group has been configured.

func Set

func Set(g APIGroup)

Set records the active API group. If V3, subsequent calls to EnvVars will return a CALICO_API_GROUP env var for injection into workload containers.

Types

type APIGroup

type APIGroup int

APIGroup identifies which Calico CRD API group to use.

const (
	// Unknown means the API group hasn't been determined yet.
	Unknown APIGroup = iota
	// V1 uses crd.projectcalico.org/v1 (legacy, via aggregated API server).
	V1
	// V3 uses projectcalico.org/v3 (native CRDs, no API server).
	V3
)

func Get

func Get() APIGroup

Get returns the current API group.

Jump to

Keyboard shortcuts

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