v1alpha1

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 153

Documentation

Overview

+kubebuilder:validation:Optional +groupName=addon.open-cluster-management.io

Index

Constants

View Source
const (
	// RegistrationTypeKubeClient represents the KubeClient type registration of the addon agent.
	// For this type, the addon agent can access the hub kube apiserver with kube style API.
	// The signer name should be "kubernetes.io/kube-apiserver-client".
	RegistrationTypeKubeClient RegistrationType = "KubeClient"
	// RegistrationTypeCustomSigner represents the CustomSigner type registration of the addon agent.
	// For this type, the addon agent can access the hub cluster through user-defined endpoints.
	RegistrationTypeCustomSigner RegistrationType = "CustomSigner"

	// HubPermissionsBindingSingleNamespace means that will only allow the addon agent to access the
	// resources in a single user defined namespace on the hub cluster.
	HubPermissionsBindingSingleNamespace HubPermissionsBindingType = "SingleNamespace"
	// HubPermissionsBindingCurrentCluster means that will only allow the addon agent to access the
	// resources in managed cluster namespace on the hub cluster.
	// It is a specific case of the SingleNamespace type.
	HubPermissionsBindingCurrentCluster HubPermissionsBindingType = "CurrentCluster"
)
View Source
const (
	// AddonInstallStrategyManual is the addon install strategy representing no automatic addon installation
	AddonInstallStrategyManual string = "Manual"
	// AddonInstallStrategyPlacements is the addon install strategy representing the addon installation
	// is based on placement decisions.
	AddonInstallStrategyPlacements string = "Placements"
)
View Source
const (
	// AddonLifecycleAnnotationKey is an annotation key on ClusterManagementAddon to indicate the installation
	// and upgrade of addon should be handled by the general addon manager or addon itself. The valid values are
	// addon-manager and self. If the annotation is not set, addon lifecycle is handled by addon itself.
	AddonLifecycleAnnotationKey = "addon.open-cluster-management.io/lifecycle"
	// AddonLifecycleAddonManagerAnnotationValue is the value of annotation AddonLifecycleAnnotationKey indicating
	// that the addon installation and upgrade is handled by the general addon manager. This should be set only
	// when featugate AddonManager on hub is enabled
	AddonLifecycleAddonManagerAnnotationValue = "addon-manager"
	// AddonLifecycleSelfManageAnnotationValue is the value of annotation AddonLifecycleAnnotationKey indicating
	// that the addon installation and upgrade is handled the addon itself. The general addon manager will ignore
	// addons with this annotation.
	AddonLifecycleSelfManageAnnotationValue = "self"
)
View Source
const (

	// AddonLabelKey is the label key to set addon name. It is to set on the resources on the hub relating
	// to an addon
	AddonLabelKey = "open-cluster-management.io/addon-name"

	// DisableAddonAutomaticInstallationAnnotationKey is the annotation key for disabling the functionality of
	// installing addon automatically. it should be set on ManagedClusterAddon resource only.
	DisableAddonAutomaticInstallationAnnotationKey = "addon.open-cluster-management.io/disable-automatic-installation"

	// AddonNamespaceLabelKey is the label key to set namespace of ManagedClusterAddon.
	AddonNamespaceLabelKey = "open-cluster-management.io/addon-namespace"

	// AddonPreDeleteHookLabelKey is the label key to identify that a resource manifest is used as pre-delete hook for an addon
	// and should be created and deleted before the specified ManagedClusterAddon is deleted.
	// Deprecated, and will be removed in the future release, please use annotation AddonPreDeleteHookAnnotationKey from v0.10.0.
	AddonPreDeleteHookLabelKey = "open-cluster-management.io/addon-pre-delete"

	// AddonPreDeleteHookAnnotationKey is the annotation key to identify that a resource manifest is used as pre-delete hook for an addon
	// and should be created and deleted before the specified ManagedClusterAddon is deleted.
	AddonPreDeleteHookAnnotationKey = "addon.open-cluster-management.io/addon-pre-delete"

	// HostingClusterNameAnnotationKey is the annotation key for indicating the hosting cluster name, it should be set
	// on ManagedClusterAddon resource only.
	HostingClusterNameAnnotationKey = "addon.open-cluster-management.io/hosting-cluster-name"

	// DeletionOrphanAnnotationKey is an annotation for the manifest of addon indicating that it will not be cleaned up
	// after the addon is deleted.
	DeletionOrphanAnnotationKey = "addon.open-cluster-management.io/deletion-orphan"

	// HostedManifestLocationLabelKey is the label key to identify where a resource manifest of addon agent
	// with this label should be deployed in Hosted mode.
	// Deprecated, will be removed in the future release, please use annotation HostedManifestLocationAnnotationKey from v0.10.0.
	HostedManifestLocationLabelKey = "addon.open-cluster-management.io/hosted-manifest-location"

	// HostedManifestLocationAnnotationKey is the annotation key to identify where a resource manifest of addon agent
	// with this annotation should be deployed in Hosted mode.
	HostedManifestLocationAnnotationKey = "addon.open-cluster-management.io/hosted-manifest-location"

	// HostedManifestLocationManagedValue is a value of the annotation HostedManifestLocationAnnotationKey,
	// indicates the manifest will be deployed on the managed cluster in Hosted mode,
	// it is the default value of a manifest in Hosted mode.
	HostedManifestLocationManagedValue = "managed"
	// HostedManifestLocationHostingValue is a value of the annotation HostedManifestLocationAnnotationKey,
	// indicates the manifest will be deployed on the hosting cluster in Hosted mode.
	HostedManifestLocationHostingValue = "hosting"
	// HostedManifestLocationNoneValue is a value of the annotation HostedManifestLocationAnnotationKey,
	// indicates the manifest will not be deployed in Hosted mode.
	HostedManifestLocationNoneValue = "none"

	// AddonDeprecatedPreDeleteHookFinalizer is the finalizer for an addon which has deployed hook objects.
	// Deprecated: please use the AddonPreDeleteHookFinalizer instead.
	AddonDeprecatedPreDeleteHookFinalizer = "cluster.open-cluster-management.io/addon-pre-delete"
	// AddonDeprecatedHostingPreDeleteHookFinalizer is the finalizer for an addon which has deployed hook objects
	// on hosting cluster.
	// Deprecated: please use the AddonHostingPreDeleteHookFinalizer instead.
	AddonDeprecatedHostingPreDeleteHookFinalizer = "cluster.open-cluster-management.io/hosting-addon-pre-delete"
	// AddonDeprecatedHostingManifestFinalizer is the finalizer for an addon which has deployed manifests on the external
	// hosting cluster in Hosted mode.
	// Deprecated: please use the AddonHostingPreDeleteHookFinalizer instead.
	AddonDeprecatedHostingManifestFinalizer = "cluster.open-cluster-management.io/hosting-manifests-cleanup"

	// AddonPreDeleteHookFinalizer is the finalizer for an addon which has deployed hook objects.
	AddonPreDeleteHookFinalizer = "addon.open-cluster-management.io/addon-pre-delete"
	// AddonHostingPreDeleteHookFinalizer is the finalizer for an addon which has deployed hook objects
	// on hosting cluster.
	AddonHostingPreDeleteHookFinalizer = "addon.open-cluster-management.io/hosting-addon-pre-delete"
	// AddonHostingManifestFinalizer is the finalizer for an addon which has deployed manifests on the external
	// hosting cluster in Hosted mode.
	AddonHostingManifestFinalizer = "addon.open-cluster-management.io/hosting-manifests-cleanup"
)
View Source
const (
	// ManagedClusterAddOnConditionAvailable represents that the addon agent is running on the managed cluster
	ManagedClusterAddOnConditionAvailable string = "Available"

	// ManagedClusterAddOnConditionDegraded represents that the addon agent is providing degraded service on
	// the managed cluster.
	ManagedClusterAddOnConditionDegraded string = "Degraded"

	// ManagedClusterAddOnConditionConfigured represents that the addon agent is configured with its configuration
	ManagedClusterAddOnConditionConfigured string = "Configured"

	// ManagedClusterAddOnConditionProgressing represents that the addon agent is applying configurations.
	ManagedClusterAddOnConditionProgressing string = "Progressing"

	// ManagedClusterAddOnManifestApplied is a condition type representing whether the manifest of an addon is
	// applied correctly.
	ManagedClusterAddOnManifestApplied = "ManifestApplied"

	// ManagedClusterAddOnHookManifestCompleted is a condition type representing whether the addon hook is completed.
	ManagedClusterAddOnHookManifestCompleted = "HookManifestCompleted"

	// ManagedClusterAddOnHostingManifestApplied is a condition type representing whether the manifest of an addon
	// is applied on the hosting cluster correctly.
	ManagedClusterAddOnHostingManifestApplied = "HostingManifestApplied"

	// ManagedClusterAddOnHostingClusterValidity is a condition type representing whether the hosting cluster is
	// valid in Hosted mode.
	ManagedClusterAddOnHostingClusterValidity = "HostingClusterValidity"

	// ManagedClusterAddOnRegistrationApplied is a condition type representing whether the registration of
	// the addon agent is configured.
	ManagedClusterAddOnRegistrationApplied = "RegistrationApplied"
)

addon status condition types

View Source
const (
	// AddonAvailableReasonWorkNotFound is the reason of condition Available indicating the addon manifestWorks
	// are not found.
	AddonAvailableReasonWorkNotFound = "WorkNotFound"

	// AddonAvailableReasonWorkApplyFailed is the reason of condition Available indicating the addon manifestWorks
	// are failed to apply.
	AddonAvailableReasonWorkApplyFailed = "WorkApplyFailed"

	// AddonAvailableReasonWorkNotApply is the reason of condition Available indicating the addon manifestWorks
	// are not applied.
	AddonAvailableReasonWorkNotApply = "WorkNotApplied"

	// AddonAvailableReasonWorkApply is the reason of condition Available indicating the addon manifestWorks
	// are applied.
	AddonAvailableReasonWorkApply = "WorkApplied"

	// AddonAvailableReasonNoProbeResult is the reason of condition Available indicating no probe result found in
	// the manifestWorks for the health check.
	AddonAvailableReasonNoProbeResult = "NoProbeResult"

	// AddonAvailableReasonProbeUnavailable is the reason of condition Available indicating the probe result found
	// does not meet the health check.
	AddonAvailableReasonProbeUnavailable = "ProbeUnavailable"

	// AddonAvailableReasonProbeAvailable is the reason of condition Available indicating the probe result found
	// meets the health check.
	AddonAvailableReasonProbeAvailable = "ProbeAvailable"

	// AddonAvailableReasonLeaseUpdateStopped is the reason if condition Available indicating the lease stops updating
	// during health check.
	AddonAvailableReasonLeaseUpdateStopped = "ManagedClusterAddOnLeaseUpdateStopped"

	// AddonAvailableReasonLeaseLeaseNotFound is the reason if condition Available indicating the lease is not found
	// during health check.
	AddonAvailableReasonLeaseLeaseNotFound = "ManagedClusterAddOnLeaseNotFound"

	// AddonAvailableReasonLeaseLeaseUpdated is the reason if condition Available indicating the lease is updated
	// during health check.
	AddonAvailableReasonLeaseLeaseUpdated = "ManagedClusterAddOnLeaseUpdated"
)

the reasons of condition ManagedClusterAddOnConditionAvailable

View Source
const (
	// AddonManifestAppliedReasonWorkApplyFailed is the reason of condition AddonManifestApplied indicating
	// the failure of apply manifestWork of the manifests.
	AddonManifestAppliedReasonWorkApplyFailed = "ManifestWorkApplyFailed"

	// AddonManifestAppliedReasonManifestsApplied is the reason of condition AddonManifestApplied indicating
	// the manifests is applied on the managedCluster.
	AddonManifestAppliedReasonManifestsApplied = "AddonManifestApplied"

	// AddonManifestAppliedReasonManifestsApplyFailed is the reason of condition AddonManifestApplied indicating
	// the failure to apply manifests on the managedCluster.
	AddonManifestAppliedReasonManifestsApplyFailed = "AddonManifestAppliedFailed"
)

the reasons of condition ManagedClusterAddOnManifestApplied

View Source
const (
	// HostingClusterValidityReasonValid is the reason of condition HostingClusterValidity indicating the hosting
	// cluster is valid.
	HostingClusterValidityReasonValid = "HostingClusterValid"

	// HostingClusterValidityReasonInvalid is the reason of condition HostingClusterValidity indicating the hosting
	// cluster is invalid.
	HostingClusterValidityReasonInvalid = "HostingClusterInvalid"
)

the reasons of condition ManagedClusterAddOnHostingClusterValidity

View Source
const (
	// ProgressingReasonProgressing is the reason of condition Progressing indicating the addon configuration is
	// applying.
	ProgressingReasonProgressing = "Progressing"

	// ProgressingReasonCompleted is the reason of condition Progressing indicating the addon configuration is
	// applied successfully.
	ProgressingReasonCompleted = "Completed"

	// ProgressingReasonFailed is the reason of condition Progressing indicating the addon configuration
	// failed to apply.
	ProgressingReasonFailed = "Failed"

	// ProgressingReasonWaitingForCanary is the reason of condition Progressing indicating the addon configuration
	// upgrade is pending and waiting for canary is done.
	ProgressingReasonWaitingForCanary = "WaitingForCanary"

	// ProgressingReasonConfigurationUnsupported is the reason of condition Progressing indicating the addon configuration
	// is not supported.
	ProgressingReasonConfigurationUnsupported = "ConfigurationUnsupported"
)

the reason of condition ManagedClusterAddOnConditionProgressing

View Source
const (
	// RegistrationAppliedNilRegistration is the reason of condition RegistrationApplied indicating that there is no
	// registration option.
	RegistrationAppliedNilRegistration = "NilRegistration"

	// RegistrationAppliedSetPermissionFailed is the reason of condition RegistrationApplied indicating that it is
	// failed to set up rbac for the addon agent.
	RegistrationAppliedSetPermissionFailed = "SetPermissionFailed"

	// RegistrationAppliedSetPermissionApplied is the reason of condition RegistrationApplied indicating that it is
	// successful to set up rbac for the addon agent.
	RegistrationAppliedSetPermissionApplied = "SetPermissionApplied"
)

the reasons of condition ManagedClusterAddOnRegistrationApplied

Variables

View Source
var (
	GroupName    = "addon.open-cluster-management.io"
	GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

	// Install is a function which adds this version to a scheme
	Install = schemeBuilder.AddToScheme

	// SchemeGroupVersion generated code relies on this name
	// Deprecated
	SchemeGroupVersion = GroupVersion
	// AddToScheme exists solely to keep the old generators creating valid code
	// DEPRECATED
	AddToScheme = schemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource generated code relies on this being here, but it logically belongs to the group DEPRECATED

Types

type AddOnConfig added in v0.9.0

type AddOnConfig struct {
	// group and resource of add-on configuration.
	ConfigGroupResource `json:",inline"`

	// name and namespace of add-on configuration.
	ConfigReferent `json:",inline"`
}

func (*AddOnConfig) DeepCopy added in v0.9.0

func (in *AddOnConfig) DeepCopy() *AddOnConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddOnConfig.

func (*AddOnConfig) DeepCopyInto added in v0.9.0

func (in *AddOnConfig) DeepCopyInto(out *AddOnConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AddOnDeploymentConfig added in v0.9.0

type AddOnDeploymentConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec represents a desired configuration for an add-on.
	// +required
	Spec AddOnDeploymentConfigSpec `json:"spec"`
}

AddOnDeploymentConfig represents a configuration to customize the deployments of an add-on. For example, you can specify the NodePlacement to control the scheduling of the add-on agents.

func (*AddOnDeploymentConfig) DeepCopy added in v0.9.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddOnDeploymentConfig.

func (*AddOnDeploymentConfig) DeepCopyInto added in v0.9.0

func (in *AddOnDeploymentConfig) DeepCopyInto(out *AddOnDeploymentConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AddOnDeploymentConfig) DeepCopyObject added in v0.9.0

func (in *AddOnDeploymentConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (AddOnDeploymentConfig) SwaggerDoc added in v0.9.0

func (AddOnDeploymentConfig) SwaggerDoc() map[string]string

type AddOnDeploymentConfigList added in v0.9.0

type AddOnDeploymentConfigList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of add-on deployment config.
	Items []AddOnDeploymentConfig `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object AddOnDeploymentConfigList is a collection of add-on deployment config.

func (*AddOnDeploymentConfigList) DeepCopy added in v0.9.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddOnDeploymentConfigList.

func (*AddOnDeploymentConfigList) DeepCopyInto added in v0.9.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AddOnDeploymentConfigList) DeepCopyObject added in v0.9.0

func (in *AddOnDeploymentConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (AddOnDeploymentConfigList) SwaggerDoc added in v0.9.0

func (AddOnDeploymentConfigList) SwaggerDoc() map[string]string

type AddOnDeploymentConfigSpec added in v0.9.0

type AddOnDeploymentConfigSpec struct {
	// CustomizedVariables is a list of name-value variables for the current add-on deployment.
	// The add-on implementation can use these variables to render its add-on deployment.
	// The default is an empty list.
	// +optional
	// +listType=map
	// +listMapKey=name
	CustomizedVariables []CustomizedVariable `json:"customizedVariables,omitempty"`

	// NodePlacement enables explicit control over the scheduling of the add-on agents on the
	// managed cluster.
	// All add-on agent pods are expected to comply with this node placement.
	// If the placement is nil, the placement is not specified, it will be omitted.
	// If the placement is an empty object, the placement will match all nodes and tolerate nothing.
	// +optional
	NodePlacement *NodePlacement `json:"nodePlacement,omitempty"`

	// Registries describes how to override images used by the addon agent on the managed cluster.
	// the following example will override image "quay.io/open-cluster-management/addon-agent" to
	// "quay.io/ocm/addon-agent" when deploying the addon agent
	//
	// registries:
	//   - source: quay.io/open-cluster-management/addon-agent
	//     mirror: quay.io/ocm/addon-agent
	//
	// +optional
	Registries []ImageMirror `json:"registries,omitempty"`

	// ProxyConfig holds proxy settings for add-on agent on the managed cluster.
	// Empty means no proxy settings is available.
	// +optional
	ProxyConfig ProxyConfig `json:"proxyConfig,omitempty"`

	// AgentInstallNamespace is the namespace where the add-on agent should be installed on the managed cluster.
	// +optional
	// +kubebuilder:default=open-cluster-management-agent-addon
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
	AgentInstallNamespace string `json:"agentInstallNamespace,omitempty"`
}

func (*AddOnDeploymentConfigSpec) DeepCopy added in v0.9.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddOnDeploymentConfigSpec.

func (*AddOnDeploymentConfigSpec) DeepCopyInto added in v0.9.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (AddOnDeploymentConfigSpec) SwaggerDoc added in v0.9.0

func (AddOnDeploymentConfigSpec) SwaggerDoc() map[string]string

type AddOnMeta

type AddOnMeta struct {
	// displayName represents the name of add-on that will be displayed.
	// +optional
	DisplayName string `json:"displayName,omitempty"`

	// description represents the detailed description of the add-on.
	// +optional
	Description string `json:"description,omitempty"`
}

AddOnMeta represents a collection of metadata information for the add-on.

func (*AddOnMeta) DeepCopy

func (in *AddOnMeta) DeepCopy() *AddOnMeta

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddOnMeta.

func (*AddOnMeta) DeepCopyInto

func (in *AddOnMeta) DeepCopyInto(out *AddOnMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (AddOnMeta) SwaggerDoc

func (AddOnMeta) SwaggerDoc() map[string]string

type AddOnTemplate added in v0.12.0

type AddOnTemplate struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	// spec holds the registration configuration for the addon and the
	// addon agent resources yaml description.
	// +kubebuilder:validation:Required
	// +required
	Spec AddOnTemplateSpec `json:"spec"`
}

AddOnTemplate is the Custom Resource object, it is used to describe how to deploy the addon agent and how to register the addon.

AddOnTemplate is a cluster-scoped resource, and will only be used on the hub cluster.

func (*AddOnTemplate) DeepCopy added in v0.12.0

func (in *AddOnTemplate) DeepCopy() *AddOnTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddOnTemplate.

func (*AddOnTemplate) DeepCopyInto added in v0.12.0

func (in *AddOnTemplate) DeepCopyInto(out *AddOnTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AddOnTemplate) DeepCopyObject added in v0.12.0

func (in *AddOnTemplate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (AddOnTemplate) SwaggerDoc added in v0.12.0

func (AddOnTemplate) SwaggerDoc() map[string]string

type AddOnTemplateList added in v0.12.0

type AddOnTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of addon templates.
	Items []AddOnTemplate `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object AddOnTemplateList is a collection of addon templates.

func (*AddOnTemplateList) DeepCopy added in v0.12.0

func (in *AddOnTemplateList) DeepCopy() *AddOnTemplateList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddOnTemplateList.

func (*AddOnTemplateList) DeepCopyInto added in v0.12.0

func (in *AddOnTemplateList) DeepCopyInto(out *AddOnTemplateList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AddOnTemplateList) DeepCopyObject added in v0.12.0

func (in *AddOnTemplateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (AddOnTemplateList) SwaggerDoc added in v0.12.0

func (AddOnTemplateList) SwaggerDoc() map[string]string

type AddOnTemplateSpec added in v0.12.0

type AddOnTemplateSpec struct {
	// AddonName represents the name of the addon which the template belongs to
	// +kubebuilder:validation:Required
	// +required
	AddonName string `json:"addonName"`

	// AgentSpec describes what/how the kubernetes resources of the addon agent to be deployed on a managed cluster.
	// +kubebuilder:validation:Required
	// +required
	AgentSpec work.ManifestWorkSpec `json:"agentSpec"`

	// Registration holds the registration configuration for the addon
	// +optional
	Registration []RegistrationSpec `json:"registration"`
}

AddOnTemplateSpec defines the template of an addon agent which will be deployed on managed clusters.

func (*AddOnTemplateSpec) DeepCopy added in v0.12.0

func (in *AddOnTemplateSpec) DeepCopy() *AddOnTemplateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddOnTemplateSpec.

func (*AddOnTemplateSpec) DeepCopyInto added in v0.12.0

func (in *AddOnTemplateSpec) DeepCopyInto(out *AddOnTemplateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (AddOnTemplateSpec) SwaggerDoc added in v0.12.0

func (AddOnTemplateSpec) SwaggerDoc() map[string]string

type ClusterManagementAddOn

type ClusterManagementAddOn struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec represents a desired configuration for the agent on the cluster management add-on.
	// +required
	Spec ClusterManagementAddOnSpec `json:"spec"`

	// status represents the current status of cluster management add-on.
	// +optional
	Status ClusterManagementAddOnStatus `json:"status,omitempty"`
}

ClusterManagementAddOn represents the registration of an add-on to the cluster manager. This resource allows you to discover which add-ons are available for the cluster manager and provides metadata information about the add-ons. The ClusterManagementAddOn name is used for the namespace-scoped ManagedClusterAddOn resource. ClusterManagementAddOn is a cluster-scoped resource.

func (*ClusterManagementAddOn) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterManagementAddOn.

func (*ClusterManagementAddOn) DeepCopyInto

func (in *ClusterManagementAddOn) DeepCopyInto(out *ClusterManagementAddOn)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterManagementAddOn) DeepCopyObject

func (in *ClusterManagementAddOn) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (ClusterManagementAddOn) SwaggerDoc

func (ClusterManagementAddOn) SwaggerDoc() map[string]string

type ClusterManagementAddOnList

type ClusterManagementAddOnList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is a list of cluster management add-ons.
	Items []ClusterManagementAddOn `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object ClusterManagementAddOnList is a collection of cluster management add-ons.

func (*ClusterManagementAddOnList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterManagementAddOnList.

func (*ClusterManagementAddOnList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterManagementAddOnList) DeepCopyObject

func (in *ClusterManagementAddOnList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (ClusterManagementAddOnList) SwaggerDoc

func (ClusterManagementAddOnList) SwaggerDoc() map[string]string

type ClusterManagementAddOnSpec

type ClusterManagementAddOnSpec struct {
	// addOnMeta is a reference to the metadata information for the add-on.
	// +optional
	AddOnMeta AddOnMeta `json:"addOnMeta,omitempty"`

	// Deprecated: Use supportedConfigs filed instead
	// addOnConfiguration is a reference to configuration information for the add-on.
	// In scenario where a multiple add-ons share the same add-on CRD, multiple ClusterManagementAddOn
	// resources need to be created and reference the same AddOnConfiguration.
	// +optional
	AddOnConfiguration ConfigCoordinates `json:"addOnConfiguration,omitempty"`

	// supportedConfigs is a list of configuration types supported by add-on.
	// An empty list means the add-on does not require configurations.
	// The default is an empty list
	// +optional
	// +listType=map
	// +listMapKey=group
	// +listMapKey=resource
	SupportedConfigs []ConfigMeta `json:"supportedConfigs,omitempty"`

	// InstallStrategy represents that related ManagedClusterAddOns should be installed
	// on certain clusters.
	// +optional
	// +kubebuilder:default={type: Manual}
	InstallStrategy InstallStrategy `json:"installStrategy,omitempty"`
}

ClusterManagementAddOnSpec provides information for the add-on.

func (*ClusterManagementAddOnSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterManagementAddOnSpec.

func (*ClusterManagementAddOnSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ClusterManagementAddOnSpec) SwaggerDoc

func (ClusterManagementAddOnSpec) SwaggerDoc() map[string]string

type ClusterManagementAddOnStatus

type ClusterManagementAddOnStatus struct {
	// defaultconfigReferences is a list of current add-on default configuration references.
	// +optional
	DefaultConfigReferences []DefaultConfigReference `json:"defaultconfigReferences,omitempty"`
	// installProgression is a list of current add-on configuration references per placement.
	// +optional
	InstallProgressions []InstallProgression `json:"installProgressions,omitempty"`
}

ClusterManagementAddOnStatus represents the current status of cluster management add-on.

func (*ClusterManagementAddOnStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterManagementAddOnStatus.

func (*ClusterManagementAddOnStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ClusterManagementAddOnStatus) SwaggerDoc

func (ClusterManagementAddOnStatus) SwaggerDoc() map[string]string

type ConfigCoordinates

type ConfigCoordinates struct {
	// crdName is the name of the CRD used to configure instances of the managed add-on.
	// This field should be configured if the add-on have a CRD that controls the configuration of the add-on.
	// +optional
	CRDName string `json:"crdName,omitempty"`

	// crName is the name of the CR used to configure instances of the managed add-on.
	// This field should be configured if add-on CR have a consistent name across the all of the ManagedCluster instaces.
	// +optional
	CRName string `json:"crName,omitempty"`

	// lastObservedGeneration is the observed generation of the custom resource for the configuration of the addon.
	// +optional
	LastObservedGeneration int64 `json:"lastObservedGeneration,omitempty"`
}

ConfigCoordinates represents the information for locating the CRD and CR that configures the add-on.

func (*ConfigCoordinates) DeepCopy

func (in *ConfigCoordinates) DeepCopy() *ConfigCoordinates

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigCoordinates.

func (*ConfigCoordinates) DeepCopyInto

func (in *ConfigCoordinates) DeepCopyInto(out *ConfigCoordinates)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ConfigCoordinates) SwaggerDoc

func (ConfigCoordinates) SwaggerDoc() map[string]string

type ConfigGroupResource added in v0.9.0

type ConfigGroupResource struct {
	// group of the add-on configuration.
	// +optional
	// +kubebuilder:default=""
	Group string `json:"group"`

	// resource of the add-on configuration.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength:=1
	Resource string `json:"resource"`
}

ConfigGroupResource represents the GroupResource of the add-on configuration

func (*ConfigGroupResource) DeepCopy added in v0.9.0

func (in *ConfigGroupResource) DeepCopy() *ConfigGroupResource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigGroupResource.

func (*ConfigGroupResource) DeepCopyInto added in v0.9.0

func (in *ConfigGroupResource) DeepCopyInto(out *ConfigGroupResource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ConfigGroupResource) SwaggerDoc added in v0.9.0

func (ConfigGroupResource) SwaggerDoc() map[string]string

type ConfigMeta added in v0.9.0

type ConfigMeta struct {
	// group and resouce of the add-on configuration.
	ConfigGroupResource `json:",inline"`

	// defaultConfig represents the namespace and name of the default add-on configuration.
	// In scenario where all add-ons have a same configuration.
	// +optional
	DefaultConfig *ConfigReferent `json:"defaultConfig,omitempty"`
}

ConfigMeta represents a collection of metadata information for add-on configuration.

func (*ConfigMeta) DeepCopy added in v0.9.0

func (in *ConfigMeta) DeepCopy() *ConfigMeta

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMeta.

func (*ConfigMeta) DeepCopyInto added in v0.9.0

func (in *ConfigMeta) DeepCopyInto(out *ConfigMeta)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ConfigMeta) SwaggerDoc added in v0.9.0

func (ConfigMeta) SwaggerDoc() map[string]string

type ConfigReference added in v0.9.0

type ConfigReference struct {
	// This field is synced from ClusterManagementAddOn configGroupResource field.
	ConfigGroupResource `json:",inline"`

	// Deprecated: Use DesiredConfig instead
	// This field is synced from ClusterManagementAddOn defaultConfig and ManagedClusterAddOn config fields.
	// If both of them are defined, the ManagedClusterAddOn configs will overwrite the ClusterManagementAddOn
	// defaultConfigs.
	ConfigReferent `json:",inline"`

	// Deprecated: Use LastAppliedConfig instead
	// lastObservedGeneration is the observed generation of the add-on configuration.
	LastObservedGeneration int64 `json:"lastObservedGeneration"`

	// desiredConfig record the desired config spec hash.
	// +optional
	DesiredConfig *ConfigSpecHash `json:"desiredConfig"`

	// lastAppliedConfig record the config spec hash when the corresponding ManifestWork is applied successfully.
	// +optional
	LastAppliedConfig *ConfigSpecHash `json:"lastAppliedConfig"`
}

ConfigReference is a reference to the current add-on configuration. This resource is used to locate the configuration resource for the current add-on.

func (*ConfigReference) DeepCopy added in v0.9.0

func (in *ConfigReference) DeepCopy() *ConfigReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigReference.

func (*ConfigReference) DeepCopyInto added in v0.9.0

func (in *ConfigReference) DeepCopyInto(out *ConfigReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ConfigReference) SwaggerDoc added in v0.9.0

func (ConfigReference) SwaggerDoc() map[string]string

type ConfigReferent added in v0.9.0

type ConfigReferent struct {
	// namespace of the add-on configuration.
	// If this field is not set, the configuration is in the cluster scope.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// name of the add-on configuration.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength:=1
	Name string `json:"name"`
}

ConfigReferent represents the namespace and name for an add-on configuration.

func (*ConfigReferent) DeepCopy added in v0.9.0

func (in *ConfigReferent) DeepCopy() *ConfigReferent

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigReferent.

func (*ConfigReferent) DeepCopyInto added in v0.9.0

func (in *ConfigReferent) DeepCopyInto(out *ConfigReferent)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ConfigReferent) SwaggerDoc added in v0.9.0

func (ConfigReferent) SwaggerDoc() map[string]string

type ConfigSpecHash added in v0.11.0

type ConfigSpecHash struct {
	// namespace and name for an add-on configuration.
	ConfigReferent `json:",inline"`

	// spec hash for an add-on configuration.
	SpecHash string `json:"specHash"`
}

ConfigSpecHash represents the namespace,name and spec hash for an add-on configuration.

func (*ConfigSpecHash) DeepCopy added in v0.11.0

func (in *ConfigSpecHash) DeepCopy() *ConfigSpecHash

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpecHash.

func (*ConfigSpecHash) DeepCopyInto added in v0.11.0

func (in *ConfigSpecHash) DeepCopyInto(out *ConfigSpecHash)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ConfigSpecHash) SwaggerDoc added in v0.11.0

func (ConfigSpecHash) SwaggerDoc() map[string]string

type CurrentClusterBindingConfig added in v0.12.0

type CurrentClusterBindingConfig struct {
	// ClusterRoleName is the name of the clusterrole the addon agent is bound. A rolebinding
	// will be created referring to this cluster role in each cluster namespace.
	// The user must make sure the clusterrole exists on the hub cluster.
	// +kubebuilder:validation:Required
	ClusterRoleName string `json:"clusterRoleName"`
}

func (*CurrentClusterBindingConfig) DeepCopy added in v0.12.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CurrentClusterBindingConfig.

func (*CurrentClusterBindingConfig) DeepCopyInto added in v0.12.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (CurrentClusterBindingConfig) SwaggerDoc added in v0.12.0

func (CurrentClusterBindingConfig) SwaggerDoc() map[string]string

type CustomSignerRegistrationConfig added in v0.12.0

type CustomSignerRegistrationConfig struct {
	// signerName is the name of signer that addon agent will use to create csr.
	// +required
	// +kubebuilder:validation:MaxLength=571
	// +kubebuilder:validation:MinLength=5
	// +kubebuilder:validation:Pattern=^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$
	SignerName string `json:"signerName"`

	// Subject is the user subject of the addon agent to be registered to the hub.
	// If it is not set, the addon agent will have the default subject
	// "subject": {
	//   "user": "system:open-cluster-management:cluster:{clusterName}:addon:{addonName}:agent:{agentName}",
	//   "groups: ["system:open-cluster-management:cluster:{clusterName}:addon:{addonName}",
	//             "system:open-cluster-management:addon:{addonName}", "system:authenticated"]
	// }
	Subject *Subject `json:"subject,omitempty"`

	// SigningCA represents the reference of the secret on the hub cluster to sign the CSR
	// the secret must be in the namespace where the addon-manager is located, and the secret
	// type must be "kubernetes.io/tls"
	// Note: The addon manager will not have permission to access the secret by default, so
	// the user must grant the permission to the addon manager(by creating rolebinding for
	// the addon-manager serviceaccount "addon-manager-controller-sa").
	// +kubebuilder:validation:Required
	SigningCA SigningCARef `json:"signingCA"`
}

func (*CustomSignerRegistrationConfig) DeepCopy added in v0.12.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomSignerRegistrationConfig.

func (*CustomSignerRegistrationConfig) DeepCopyInto added in v0.12.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (CustomSignerRegistrationConfig) SwaggerDoc added in v0.12.0

func (CustomSignerRegistrationConfig) SwaggerDoc() map[string]string

type CustomizedVariable added in v0.9.0

type CustomizedVariable struct {
	// Name of this variable.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MaxLength=255
	// +kubebuilder:validation:Pattern=^[a-zA-Z_][_a-zA-Z0-9]*$
	Name string `json:"name"`

	// Value of this variable.
	// +kubebuilder:validation:MaxLength=1024
	Value string `json:"value"`
}

CustomizedVariable represents a customized variable for add-on deployment.

func (*CustomizedVariable) DeepCopy added in v0.9.0

func (in *CustomizedVariable) DeepCopy() *CustomizedVariable

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomizedVariable.

func (*CustomizedVariable) DeepCopyInto added in v0.9.0

func (in *CustomizedVariable) DeepCopyInto(out *CustomizedVariable)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (CustomizedVariable) SwaggerDoc added in v0.9.0

func (CustomizedVariable) SwaggerDoc() map[string]string

type DefaultConfigReference added in v0.11.0

type DefaultConfigReference struct {
	// This field is synced from ClusterManagementAddOn Configurations.
	ConfigGroupResource `json:",inline"`

	// desiredConfig record the desired config spec hash.
	DesiredConfig *ConfigSpecHash `json:"desiredConfig"`
}

DefaultConfigReference is a reference to the current add-on configuration. This resource is used to record the configuration resource for the current add-on.

func (*DefaultConfigReference) DeepCopy added in v0.11.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultConfigReference.

func (*DefaultConfigReference) DeepCopyInto added in v0.11.0

func (in *DefaultConfigReference) DeepCopyInto(out *DefaultConfigReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (DefaultConfigReference) SwaggerDoc added in v0.11.0

func (DefaultConfigReference) SwaggerDoc() map[string]string

type HealthCheck added in v0.6.0

type HealthCheck struct {
	// mode indicates which mode will be used to check the healthiness status of the addon.
	// +optional
	// +kubebuilder:default=Lease
	Mode HealthCheckMode `json:"mode,omitempty"`
}

func (*HealthCheck) DeepCopy added in v0.6.0

func (in *HealthCheck) DeepCopy() *HealthCheck

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheck.

func (*HealthCheck) DeepCopyInto added in v0.6.0

func (in *HealthCheck) DeepCopyInto(out *HealthCheck)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (HealthCheck) SwaggerDoc added in v0.6.0

func (HealthCheck) SwaggerDoc() map[string]string

type HealthCheckMode added in v0.6.0

type HealthCheckMode string

HealthCheckMode indicates the mode for the addon to check its healthiness status +kubebuilder:validation:Enum=Lease;Customized

const (
	// HealthCheckModeLease, the addon maintains a lease in its installation namespace with
	// its status, the registration agent will check this lease to maintain the addon healthiness
	// status.
	HealthCheckModeLease HealthCheckMode = "Lease"

	// HealthCheckModeCustomized, the addon maintains its healthiness status by itself.
	HealthCheckModeCustomized HealthCheckMode = "Customized"
)

type HubPermissionConfig added in v0.12.0

type HubPermissionConfig struct {
	// Type of the permissions setting. It defines how to bind the roleRef on the hub cluster. It can be:
	// - CurrentCluster: Bind the roleRef to the namespace with the same name as the managedCluster.
	// - SingleNamespace: Bind the roleRef to the namespace specified by SingleNamespaceBindingConfig.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum:=CurrentCluster;SingleNamespace
	Type HubPermissionsBindingType `json:"type"`

	// CurrentCluster contains the configuration of CurrentCluster type binding.
	// It is required when the type is CurrentCluster.
	CurrentCluster *CurrentClusterBindingConfig `json:"currentCluster,omitempty"`

	// SingleNamespace contains the configuration of SingleNamespace type binding.
	// It is required when the type is SingleNamespace
	SingleNamespace *SingleNamespaceBindingConfig `json:"singleNamespace,omitempty"`
}

HubPermissionConfig configures the permission of the addon agent to access the hub cluster. Will create a RoleBinding in the same namespace as the managedClusterAddon to bind the user provided ClusterRole/Role to the "system:open-cluster-management:cluster:<cluster-name>:addon:<addon-name>" Group.

func (*HubPermissionConfig) DeepCopy added in v0.12.0

func (in *HubPermissionConfig) DeepCopy() *HubPermissionConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HubPermissionConfig.

func (*HubPermissionConfig) DeepCopyInto added in v0.12.0

func (in *HubPermissionConfig) DeepCopyInto(out *HubPermissionConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (HubPermissionConfig) SwaggerDoc added in v0.12.0

func (HubPermissionConfig) SwaggerDoc() map[string]string

type HubPermissionsBindingType added in v0.12.0

type HubPermissionsBindingType string

HubPermissionsBindingType represent how to bind permission resources(role/clusterrole) on the hub cluster for the addon agent

type ImageMirror added in v0.11.0

type ImageMirror struct {
	// Mirror is the mirrored registry of the Source. Will be ignored if Mirror is empty.
	// +kubebuilder:validation:Required
	// +required
	Mirror string `json:"mirror"`

	// Source is the source registry. All image registries will be replaced by Mirror if Source is empty.
	// +optional
	Source string `json:"source"`
}

ImageMirror describes how to mirror images from a source

func (*ImageMirror) DeepCopy added in v0.11.0

func (in *ImageMirror) DeepCopy() *ImageMirror

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageMirror.

func (*ImageMirror) DeepCopyInto added in v0.11.0

func (in *ImageMirror) DeepCopyInto(out *ImageMirror)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ImageMirror) SwaggerDoc added in v0.11.0

func (ImageMirror) SwaggerDoc() map[string]string

type InstallConfigReference added in v0.11.0

type InstallConfigReference struct {
	// This field is synced from ClusterManagementAddOn Configurations.
	ConfigGroupResource `json:",inline"`

	// desiredConfig record the desired config name and spec hash.
	DesiredConfig *ConfigSpecHash `json:"desiredConfig"`

	// lastKnownGoodConfig records the last known good config spec hash.
	// For fresh install or rollout with type UpdateAll or RollingUpdate, the
	// lastKnownGoodConfig is the same as lastAppliedConfig.
	// For rollout with type RollingUpdateWithCanary, the lastKnownGoodConfig
	// is the last successfully applied config spec hash of the canary placement.
	LastKnownGoodConfig *ConfigSpecHash `json:"lastKnownGoodConfig"`

	// lastAppliedConfig records the config spec hash when the all the corresponding
	// ManagedClusterAddOn are applied successfully.
	LastAppliedConfig *ConfigSpecHash `json:"lastAppliedConfig"`
}

InstallConfigReference is a reference to the current add-on configuration. This resource is used to record the configuration resource for the current add-on.

func (*InstallConfigReference) DeepCopy added in v0.11.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstallConfigReference.

func (*InstallConfigReference) DeepCopyInto added in v0.11.0

func (in *InstallConfigReference) DeepCopyInto(out *InstallConfigReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (InstallConfigReference) SwaggerDoc added in v0.11.0

func (InstallConfigReference) SwaggerDoc() map[string]string

type InstallProgression added in v0.11.0

type InstallProgression struct {
	PlacementRef `json:",inline"`

	// configReferences is a list of current add-on configuration references.
	// +optional
	ConfigReferences []InstallConfigReference `json:"configReferences,omitempty"`

	// conditions describe the state of the managed and monitored components for the operator.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"  patchStrategy:"merge" patchMergeKey:"type"`
}

func (*InstallProgression) DeepCopy added in v0.11.0

func (in *InstallProgression) DeepCopy() *InstallProgression

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstallProgression.

func (*InstallProgression) DeepCopyInto added in v0.11.0

func (in *InstallProgression) DeepCopyInto(out *InstallProgression)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (InstallProgression) SwaggerDoc added in v0.11.0

func (InstallProgression) SwaggerDoc() map[string]string

type InstallStrategy added in v0.11.0

type InstallStrategy struct {
	// Type is the type of the install strategy, it can be:
	// - Manual: no automatic install
	// - Placements: install to clusters selected by placements.
	// +kubebuilder:validation:Enum=Manual;Placements
	// +kubebuilder:default:=Manual
	// +optional
	Type string `json:"type"`
	// Placements is a list of placement references honored when install strategy type is
	// Placements. All clusters selected by these placements will install the addon
	// If one cluster belongs to multiple placements, it will only apply the strategy defined
	// later in the order. That is to say, The latter strategy overrides the previous one.
	// +optional
	// +listType=map
	// +listMapKey=namespace
	// +listMapKey=name
	Placements []PlacementStrategy `json:"placements,omitempty"`
}

InstallStrategy represents that related ManagedClusterAddOns should be installed on certain clusters.

func (*InstallStrategy) DeepCopy added in v0.11.0

func (in *InstallStrategy) DeepCopy() *InstallStrategy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstallStrategy.

func (*InstallStrategy) DeepCopyInto added in v0.11.0

func (in *InstallStrategy) DeepCopyInto(out *InstallStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (InstallStrategy) SwaggerDoc added in v0.11.0

func (InstallStrategy) SwaggerDoc() map[string]string

type KubeClientRegistrationConfig added in v0.12.0

type KubeClientRegistrationConfig struct {
	// HubPermissions represent the permission configurations of the addon agent to access the hub cluster
	// +optional
	HubPermissions []HubPermissionConfig `json:"hubPermissions,omitempty"`
}

func (*KubeClientRegistrationConfig) DeepCopy added in v0.12.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeClientRegistrationConfig.

func (*KubeClientRegistrationConfig) DeepCopyInto added in v0.12.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (KubeClientRegistrationConfig) SwaggerDoc added in v0.12.0

func (KubeClientRegistrationConfig) SwaggerDoc() map[string]string

type ManagedClusterAddOn

type ManagedClusterAddOn struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	// spec holds configuration that could apply to any operator.
	// +kubebuilder:validation:Required
	// +required
	Spec ManagedClusterAddOnSpec `json:"spec"`

	// status holds the information about the state of an operator.  It is consistent with status information across
	// the Kubernetes ecosystem.
	// +optional
	Status ManagedClusterAddOnStatus `json:"status"`
}

ManagedClusterAddOn is the Custom Resource object which holds the current state of an add-on. This object is used by add-on operators to convey their state. This resource should be created in the ManagedCluster namespace.

func (*ManagedClusterAddOn) DeepCopy

func (in *ManagedClusterAddOn) DeepCopy() *ManagedClusterAddOn

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterAddOn.

func (*ManagedClusterAddOn) DeepCopyInto

func (in *ManagedClusterAddOn) DeepCopyInto(out *ManagedClusterAddOn)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ManagedClusterAddOn) DeepCopyObject

func (in *ManagedClusterAddOn) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (ManagedClusterAddOn) SwaggerDoc

func (ManagedClusterAddOn) SwaggerDoc() map[string]string

type ManagedClusterAddOnList

type ManagedClusterAddOnList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []ManagedClusterAddOn `json:"items"`
}

ManagedClusterAddOnList is a list of ManagedClusterAddOn resources. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ManagedClusterAddOnList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterAddOnList.

func (*ManagedClusterAddOnList) DeepCopyInto

func (in *ManagedClusterAddOnList) DeepCopyInto(out *ManagedClusterAddOnList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ManagedClusterAddOnList) DeepCopyObject

func (in *ManagedClusterAddOnList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (ManagedClusterAddOnList) SwaggerDoc

func (ManagedClusterAddOnList) SwaggerDoc() map[string]string

type ManagedClusterAddOnSpec

type ManagedClusterAddOnSpec struct {
	// installNamespace is the namespace on the managed cluster to install the addon agent.
	// If it is not set, open-cluster-management-agent-addon namespace is used to install the addon agent.
	// +optional
	// +kubebuilder:default=open-cluster-management-agent-addon
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
	InstallNamespace string `json:"installNamespace,omitempty"`

	// configs is a list of add-on configurations.
	// In scenario where the current add-on has its own configurations.
	// An empty list means there are no default configurations for add-on.
	// The default is an empty list
	// +optional
	Configs []AddOnConfig `json:"configs,omitempty"`
}

ManagedClusterAddOnSpec defines the install configuration of an addon agent on managed cluster.

func (*ManagedClusterAddOnSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterAddOnSpec.

func (*ManagedClusterAddOnSpec) DeepCopyInto

func (in *ManagedClusterAddOnSpec) DeepCopyInto(out *ManagedClusterAddOnSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ManagedClusterAddOnSpec) SwaggerDoc

func (ManagedClusterAddOnSpec) SwaggerDoc() map[string]string

type ManagedClusterAddOnStatus

type ManagedClusterAddOnStatus struct {
	// conditions describe the state of the managed and monitored components for the operator.
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"  patchStrategy:"merge" patchMergeKey:"type"`

	// relatedObjects is a list of objects that are "interesting" or related to this operator. Common uses are:
	// 1. the detailed resource driving the operator
	// 2. operator namespaces
	// 3. operand namespaces
	// 4. related ClusterManagementAddon resource
	// +optional
	RelatedObjects []ObjectReference `json:"relatedObjects,omitempty"`

	// addOnMeta is a reference to the metadata information for the add-on.
	// This should be same as the addOnMeta for the corresponding ClusterManagementAddOn resource.
	// +optional
	AddOnMeta AddOnMeta `json:"addOnMeta,omitempty"`

	// Deprecated: Use configReferences instead.
	// addOnConfiguration is a reference to configuration information for the add-on.
	// This resource is used to locate the configuration resource for the add-on.
	// +optional
	AddOnConfiguration ConfigCoordinates `json:"addOnConfiguration,omitempty"`

	// SupportedConfigs is a list of configuration types that are allowed to override the add-on configurations defined
	// in ClusterManagementAddOn spec.
	// The default is an empty list, which means the add-on configurations can not be overridden.
	// +optional
	// +listType=map
	// +listMapKey=group
	// +listMapKey=resource
	SupportedConfigs []ConfigGroupResource `json:"supportedConfigs,omitempty"`

	// configReferences is a list of current add-on configuration references.
	// This will be overridden by the clustermanagementaddon configuration references.
	// +optional
	ConfigReferences []ConfigReference `json:"configReferences,omitempty"`

	// namespace is the namespace on the managedcluster to put registration secret or lease for the addon. It is
	// required when registration is set or healthcheck mode is Lease.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// registrations is the configurations for the addon agent to register to hub. It should be set by each addon controller
	// on hub to define how the addon agent on managedcluster is registered. With the registration defined,
	// The addon agent can access to kube apiserver with kube style API or other endpoints on hub cluster with client
	// certificate authentication. A csr will be created per registration configuration. If more than one
	// registrationConfig is defined, a csr will be created for each registration configuration. It is not allowed that
	// multiple registrationConfigs have the same signer name. After the csr is approved on the hub cluster, the klusterlet
	// agent will create a secret in the installNamespace for the registrationConfig. If the signerName is
	// "kubernetes.io/kube-apiserver-client", the secret name will be "{addon name}-hub-kubeconfig" whose contents includes
	// key/cert and kubeconfig. Otherwise, the secret name will be "{addon name}-{signer name}-client-cert" whose contents includes key/cert.
	// +optional
	Registrations []RegistrationConfig `json:"registrations,omitempty"`

	// healthCheck indicates how to check the healthiness status of the current addon. It should be
	// set by each addon implementation, by default, the lease mode will be used.
	// +optional
	HealthCheck HealthCheck `json:"healthCheck,omitempty"`
}

ManagedClusterAddOnStatus provides information about the status of the operator. +k8s:deepcopy-gen=true

func (*ManagedClusterAddOnStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterAddOnStatus.

func (*ManagedClusterAddOnStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ManagedClusterAddOnStatus) SwaggerDoc

func (ManagedClusterAddOnStatus) SwaggerDoc() map[string]string

type NodePlacement added in v0.9.0

type NodePlacement struct {
	// NodeSelector defines which Nodes the Pods are scheduled on.
	// If the selector is an empty list, it will match all nodes.
	// The default is an empty list.
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Tolerations is attached by pods to tolerate any taint that matches
	// the triple <key,value,effect> using the matching operator <operator>.
	// If the tolerations is an empty list, it will tolerate nothing.
	// The default is an empty list.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
}

NodePlacement describes node scheduling configuration for the pods.

func (*NodePlacement) DeepCopy added in v0.9.0

func (in *NodePlacement) DeepCopy() *NodePlacement

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePlacement.

func (*NodePlacement) DeepCopyInto added in v0.9.0

func (in *NodePlacement) DeepCopyInto(out *NodePlacement)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (NodePlacement) SwaggerDoc added in v0.9.0

func (NodePlacement) SwaggerDoc() map[string]string

type ObjectReference

type ObjectReference struct {
	// group of the referent.
	// +kubebuilder:validation:Required
	// +required
	Group string `json:"group"`
	// resource of the referent.
	// +kubebuilder:validation:Required
	// +required
	Resource string `json:"resource"`
	// namespace of the referent.
	// +optional
	Namespace string `json:"namespace,omitempty"`
	// name of the referent.
	// +kubebuilder:validation:Required
	// +required
	Name string `json:"name"`
}

ObjectReference contains enough information to let you inspect or modify the referred object.

func (*ObjectReference) DeepCopy

func (in *ObjectReference) DeepCopy() *ObjectReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.

func (*ObjectReference) DeepCopyInto

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ObjectReference) SwaggerDoc

func (ObjectReference) SwaggerDoc() map[string]string

type PlacementRef added in v0.11.0

type PlacementRef struct {
	// Namespace is the namespace of the placement
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength:=1
	Namespace string `json:"namespace"`
	// Name is the name of the placement
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength:=1
	Name string `json:"name"`
}

func (*PlacementRef) DeepCopy added in v0.11.0

func (in *PlacementRef) DeepCopy() *PlacementRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementRef.

func (*PlacementRef) DeepCopyInto added in v0.11.0

func (in *PlacementRef) DeepCopyInto(out *PlacementRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PlacementRef) SwaggerDoc added in v0.11.0

func (PlacementRef) SwaggerDoc() map[string]string

type PlacementStrategy added in v0.11.0

type PlacementStrategy struct {
	PlacementRef `json:",inline"`
	// Configs is the configuration of managedClusterAddon during installation.
	// User can override the configuration by updating the managedClusterAddon directly.
	// +optional
	Configs []AddOnConfig `json:"configs,omitempty"`
	// The rollout strategy to apply addon configurations change.
	// The rollout strategy only watches the addon configurations defined in ClusterManagementAddOn.
	// +kubebuilder:default={type: All}
	// +optional
	RolloutStrategy clusterv1alpha1.RolloutStrategy `json:"rolloutStrategy,omitempty"`
}

func (*PlacementStrategy) DeepCopy added in v0.11.0

func (in *PlacementStrategy) DeepCopy() *PlacementStrategy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementStrategy.

func (*PlacementStrategy) DeepCopyInto added in v0.11.0

func (in *PlacementStrategy) DeepCopyInto(out *PlacementStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PlacementStrategy) SwaggerDoc added in v0.11.0

func (PlacementStrategy) SwaggerDoc() map[string]string

type ProxyConfig added in v0.12.0

type ProxyConfig struct {
	// HTTPProxy is the URL of the proxy for HTTP requests
	// +optional
	HTTPProxy string `json:"httpProxy,omitempty"`

	// HTTPSProxy is the URL of the proxy for HTTPS requests
	// +optional
	HTTPSProxy string `json:"httpsProxy,omitempty"`

	// CABundle is a CA certificate bundle to verify the proxy server.
	// And it's only useful when HTTPSProxy is set and a HTTPS proxy server is specified.
	// +optional
	CABundle []byte `json:"caBundle,omitempty"`

	// NoProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy
	// should not be used.
	// +optional
	NoProxy string `json:"noProxy,omitempty"`
}

ProxyConfig describes the proxy settings for the add-on agent

func (*ProxyConfig) DeepCopy added in v0.12.0

func (in *ProxyConfig) DeepCopy() *ProxyConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfig.

func (*ProxyConfig) DeepCopyInto added in v0.12.0

func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ProxyConfig) SwaggerDoc added in v0.12.0

func (ProxyConfig) SwaggerDoc() map[string]string

type RegistrationConfig

type RegistrationConfig struct {
	// signerName is the name of signer that addon agent will use to create csr.
	// +required
	// +kubebuilder:validation:MaxLength=571
	// +kubebuilder:validation:MinLength=5
	// +kubebuilder:validation:Pattern=^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$
	SignerName string `json:"signerName"`

	// subject is the user subject of the addon agent to be registered to the hub.
	// If it is not set, the addon agent will have the default subject
	// "subject": {
	//   "user": "system:open-cluster-management:cluster:{clusterName}:addon:{addonName}:agent:{agentName}",
	//   "groups: ["system:open-cluster-management:cluster:{clusterName}:addon:{addonName}",
	//             "system:open-cluster-management:addon:{addonName}", "system:authenticated"]
	// }
	//
	// +optional
	Subject Subject `json:"subject,omitempty"`
}

RegistrationConfig defines the configuration of the addon agent to register to hub. The Klusterlet agent will create a csr for the addon agent with the registrationConfig.

func (*RegistrationConfig) DeepCopy

func (in *RegistrationConfig) DeepCopy() *RegistrationConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistrationConfig.

func (*RegistrationConfig) DeepCopyInto

func (in *RegistrationConfig) DeepCopyInto(out *RegistrationConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (RegistrationConfig) SwaggerDoc

func (RegistrationConfig) SwaggerDoc() map[string]string

type RegistrationSpec added in v0.12.0

type RegistrationSpec struct {
	// Type of the registration configuration, it supports:
	// - KubeClient: the addon agent can access the hub kube apiserver with kube style API.
	//   the signer name should be "kubernetes.io/kube-apiserver-client". When this type is
	//   used, the KubeClientRegistrationConfig can be used to define the permission of the
	//   addon agent to access the hub cluster
	// - CustomSigner: the addon agent can access the hub cluster through user-defined endpoints.
	//   When this type is used, the CustomSignerRegistrationConfig can be used to define how
	//   to issue the client certificate for the addon agent.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum:=KubeClient;CustomSigner
	Type RegistrationType `json:"type"`

	// KubeClient holds the configuration of the KubeClient type registration
	// +optional
	KubeClient *KubeClientRegistrationConfig `json:"kubeClient,omitempty"`

	// CustomSigner holds the configuration of the CustomSigner type registration
	// required when the Type is CustomSigner
	CustomSigner *CustomSignerRegistrationConfig `json:"customSigner,omitempty"`
}

RegistrationSpec describes how to register an addon agent to the hub cluster. With the registration defined, The addon agent can access to kube apiserver with kube style API or other endpoints on hub cluster with client certificate authentication. During the addon registration process, a csr will be created for each Registration on the hub cluster. The CSR will be approved automatically, After the csr is approved on the hub cluster, the klusterlet agent will create a secret in the installNamespace for the addon agent. If the RegistrationType type is KubeClient, the secret name will be "{addon name}-hub-kubeconfig" whose content includes key/cert and kubeconfig. Otherwise, If the RegistrationType type is CustomSigner the secret name will be "{addon name}-{signer name}-client-cert" whose content includes key/cert.

func (*RegistrationSpec) DeepCopy added in v0.12.0

func (in *RegistrationSpec) DeepCopy() *RegistrationSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistrationSpec.

func (*RegistrationSpec) DeepCopyInto added in v0.12.0

func (in *RegistrationSpec) DeepCopyInto(out *RegistrationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (RegistrationSpec) SwaggerDoc added in v0.12.0

func (RegistrationSpec) SwaggerDoc() map[string]string

type RegistrationType added in v0.12.0

type RegistrationType string

RegistrationType represents the type of the registration configuration, it could be KubeClient or CustomSigner

type SigningCARef added in v0.12.0

type SigningCARef struct {
	// Name of the signing CA secret
	// +kubebuilder:validation:Required
	Name string `json:"name"`
}

SigningCARef is the reference to the signing CA secret which type must be "kubernetes.io/tls" and which namespace must be the same as the addon-manager.

func (*SigningCARef) DeepCopy added in v0.12.0

func (in *SigningCARef) DeepCopy() *SigningCARef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SigningCARef.

func (*SigningCARef) DeepCopyInto added in v0.12.0

func (in *SigningCARef) DeepCopyInto(out *SigningCARef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (SigningCARef) SwaggerDoc added in v0.12.0

func (SigningCARef) SwaggerDoc() map[string]string

type SingleNamespaceBindingConfig added in v0.12.0

type SingleNamespaceBindingConfig struct {
	// Namespace is the namespace the addon agent has permissions to bind to. A rolebinding
	// will be created in this namespace referring to the RoleRef.
	// +kubebuilder:validation:Required
	Namespace string `json:"namespace"`

	// RoleRef is an reference to the permission resource. it could be a role or a cluster role,
	// the user must make sure it exist on the hub cluster.
	// +kubebuilder:validation:Required
	RoleRef rbacv1.RoleRef `json:"roleRef"`
}

func (*SingleNamespaceBindingConfig) DeepCopy added in v0.12.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SingleNamespaceBindingConfig.

func (*SingleNamespaceBindingConfig) DeepCopyInto added in v0.12.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (SingleNamespaceBindingConfig) SwaggerDoc added in v0.12.0

func (SingleNamespaceBindingConfig) SwaggerDoc() map[string]string

type Subject

type Subject struct {
	// user is the user name of the addon agent.
	User string `json:"user"`

	// groups is the user group of the addon agent.
	// +optional
	Groups []string `json:"groups,omitempty"`

	// organizationUnit is the ou of the addon agent
	// +optional
	OrganizationUnits []string `json:"organizationUnit,omitempty"`
}

Subject is the user subject of the addon agent to be registered to the hub.

func (*Subject) DeepCopy

func (in *Subject) DeepCopy() *Subject

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subject.

func (*Subject) DeepCopyInto

func (in *Subject) DeepCopyInto(out *Subject)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Subject) SwaggerDoc

func (Subject) SwaggerDoc() map[string]string

Jump to

Keyboard shortcuts

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