capabilities

package
v0.1.89 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 16 Imported by: ? modules, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateEnabledCapabilities added in v0.1.57

func CalculateEnabledCapabilities(capabilities *hyperv1.Capabilities, releaseVersion semver.Version) []configv1.ClusterVersionCapability

CalculateEnabledCapabilities returns the net enabled capabilities, by using the default set of capabilities (minus baremetal, ClusterAPI and MachineAPI capabilities) and the explicitly enabled and disabled capabilities, in alphabetical order.

MachineAPI is removed from the default set because HyperShift manages guest cluster machines via its own CAPI-based NodePools and the guest CVO rejects MachineAPI without ClusterAPI (openshift/api#3145).

func FilterByKnownCapabilities added in v0.1.80

func FilterByKnownCapabilities(desired []configv1.ClusterVersionCapability, knownCapabilities []configv1.ClusterVersionCapability) []configv1.ClusterVersionCapability

FilterByKnownCapabilities returns only the capabilities from desired that are present in knownCapabilities. When knownCapabilities is empty (e.g. on first reconcile before the CVO has reported status), all desired capabilities are returned unfiltered.

func HasDisabledCapabilities added in v0.1.60

func HasDisabledCapabilities(capabilities *hyperv1.Capabilities) bool

HasDisabledCapabilities returns true if any capabilities are disabled; otherwise, it returns false.

func IsImageRegistryCapabilityEnabled added in v0.1.57

func IsImageRegistryCapabilityEnabled(capabilities *hyperv1.Capabilities) bool

IsImageRegistryCapabilityEnabled returns true if the Image Registry capability is enabled, or false if disabled.

The Image Registry capability is enabled by default.

func IsIngressCapabilityEnabled added in v0.1.66

func IsIngressCapabilityEnabled(capabilities *hyperv1.Capabilities) bool

IsIngressCapabilityEnabled returns true if the Ingress capability is enabled, or false if disabled.

func IsNodeTuningCapabilityEnabled added in v0.1.66

func IsNodeTuningCapabilityEnabled(capabilities *hyperv1.Capabilities) bool

IsNodeTuningCapabilityEnabled returns true if the NodeTuning capability is enabled, or false if disabled.

func SupportsCompatibilityRequirements added in v0.1.87

func SupportsCompatibilityRequirements(releaseVersion semver.Version) bool

SupportsCompatibilityRequirements reports whether the release payload includes the CRD compatibility checker, which is enabled in the default feature set.

Types

type CapabilityType

type CapabilityType int
const (
	// CapabilityRoute indicates if the management cluster supports routes
	CapabilityRoute CapabilityType = iota

	// CapabilitySecurityContextConstraint indicates if the management cluster
	// supports security context constraints
	CapabilitySecurityContextConstraint

	// CapabilityImage indicates if the cluster supports the
	// image.config.openshift.io api
	CapabilityImage

	// CapabilityInfrastructure indicates if the cluster supports the
	// infrastructures.config.openshift.io api
	CapabilityInfrastructure

	// CapabilityIngress indicates if the cluster supports the
	// ingresses.config.openshift.io api
	CapabilityIngress

	// CapabilityProxy indicates if the cluster supports the
	// proxies.config.openshift.io api
	CapabilityProxy

	// CapabilityDNS indicates if the cluster supports the
	// dnses.config.openshift.io api
	CapabilityDNS

	// CapabilityNetworks indicates if the cluster supports the
	// networks.config.openshift.io api
	CapabilityNetworks

	// CapabilityICSP indicates if the cluster supports ImageContentSourcePolicy CRDs
	CapabilityICSP

	// CapabilityIDMS indicates if the cluster supports ImageDigestMirrorSet CRDs
	CapabilityIDMS

	// CapabilityImageStream indicates if the cluster supports ImageStream
	// image.openshift.io
	CapabilityImageStream

	// CapabilityValidatingAdmissionPolicy indicates if the cluster supports ValidatingAdmissionPolicy
	// admissionregistration.k8s.io/v1
	CapabilityValidatingAdmissionPolicy

	// CapabilityNativeSidecarContainers indicates if the management cluster supports native sidecar
	// containers (K8s >= 1.29, where the SidecarContainers feature gate is beta and enabled by default).
	CapabilityNativeSidecarContainers

	// CapabilityAPIServer indicates if the cluster supports api server
	// configuration by means of a custom resource.
	CapabilityAPIServer
)

type CapabiltyChecker

type CapabiltyChecker interface {
	Has(capabilities ...CapabilityType) bool
}

type ManagementClusterCapabilities

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

ManagementClusterCapabilities holds all information about optional capabilities of the management cluster.

func (*ManagementClusterCapabilities) Has

func (m *ManagementClusterCapabilities) Has(capabilities ...CapabilityType) bool

type ManagementClusterDiscoveryClient added in v0.1.75

type ManagementClusterDiscoveryClient interface {
	discovery.ServerResourcesInterface
	discovery.ServerVersionInterface
}

ManagementClusterDiscoveryClient combines the interfaces needed for detecting management cluster capabilities: API resource checks and server version checks.

type MockCapabilityChecker added in v0.1.26

type MockCapabilityChecker struct {
	MockHas func(capabilities ...CapabilityType) bool
}

func (*MockCapabilityChecker) Has added in v0.1.26

func (m *MockCapabilityChecker) Has(capabilities ...CapabilityType) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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