v1alpha1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the fleet v1alpha1 API group +kubebuilder:object:generate=true +groupName=fleet.kurator.dev +k8s:deepcopy-gen=package

Index

Constants

View Source
const ControlplaneAnnotation = "fleet.kurator.dev/controlplane"

ControlplaneAnnotation is the annotation that can be added to the fleet to indicate fleet manager to install control plane for the fleet. Current the supported value of the annotation is `karmada`.

View Source
const GroupName = "fleet.kurator.dev"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ChartConfig added in v0.4.0

type ChartConfig struct {
	// Repository defines the repository of chart.
	// Default value depends on the kind of the component.
	// +optional
	Repository string `json:"repository,omitempty"`
	// Name defines the name of the chart.
	// Default value depends on the kind of the component.
	// +optional
	Name string `json:"name,omitempty"`
	// Version defines the version of the chart.
	// Default value depends on the kind of the component.
	// +optional
	Version string `json:"version,omitempty"`
}

func (*ChartConfig) DeepCopy added in v0.4.0

func (in *ChartConfig) DeepCopy() *ChartConfig

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

func (*ChartConfig) DeepCopyInto added in v0.4.0

func (in *ChartConfig) DeepCopyInto(out *ChartConfig)

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

type Endpoints added in v0.4.0

type Endpoints []string

func (Endpoints) DeepCopy added in v0.4.0

func (in Endpoints) DeepCopy() Endpoints

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

func (Endpoints) DeepCopyInto added in v0.4.0

func (in Endpoints) DeepCopyInto(out *Endpoints)

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

type Fleet

type Fleet struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              FleetSpec   `json:"spec,omitempty"`
	Status            FleetStatus `json:"status,omitempty"`
}

Fleet represents a group of clusters, it is to consistently manage a group of clusters.

func (*Fleet) DeepCopy

func (in *Fleet) DeepCopy() *Fleet

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

func (*Fleet) DeepCopyInto

func (in *Fleet) DeepCopyInto(out *Fleet)

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

func (*Fleet) DeepCopyObject

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

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

type FleetList

type FleetList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Fleet `json:"items"`
}

FleetList contains a list of fleets. +kubebuilder:object:root=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*FleetList) DeepCopy

func (in *FleetList) DeepCopy() *FleetList

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

func (*FleetList) DeepCopyInto

func (in *FleetList) DeepCopyInto(out *FleetList)

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

func (*FleetList) DeepCopyObject

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

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

type FleetPhase added in v0.4.0

type FleetPhase string
const (
	// PendingPhase is the phase when the fleet is not processed.
	PendingPhase FleetPhase = "Pending"
	// RunningPhase is the phase when fleet control plane is being installed.
	RunningPhase FleetPhase = "Running"
	// FailedPhase is the phase when fleet control plane installation installed.
	FailedPhase FleetPhase = "Failed"
	// ReadyPhase is the phase when fleet control plane installation finished successfully.
	ReadyPhase FleetPhase = "Ready"
	// TerminatingPhase is the phase when fleet control plane is terminating.
	TerminatingPhase FleetPhase = "Terminating"
	// TerminateFailedPhase is the phase when fleet control plane terminate failed.
	TerminateFailedPhase FleetPhase = "TerminateFailed"
	// TerminateSucceededPhase is the phase when fleet control plane is terminated successfully.
	TerminateSucceededPhase FleetPhase = "TerminateSucceeded"
)

type FleetSpec

type FleetSpec struct {
	// Clusters represents the clusters that would be registered to the fleet.
	// +required
	Clusters []*corev1.ObjectReference `json:"clusters,omitempty"`

	// Plugin defines the plugins that would be installed in the fleet.
	// +optional
	Plugin *PluginConfig `json:"plugin,omitempty"`
}

FleetSpec defines the desired state of the fleet

func (*FleetSpec) DeepCopy

func (in *FleetSpec) DeepCopy() *FleetSpec

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

func (*FleetSpec) DeepCopyInto

func (in *FleetSpec) DeepCopyInto(out *FleetSpec)

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

type FleetStatus

type FleetStatus struct {
	// CredentialSecret is the secret name that holds credentials used for accessing the fleet control plane.
	CredentialSecret *string `json:"credentialSecret,omitempty"`

	// Phase represents the current phase of fleet.
	// E.g. Pending, Running, Terminating, Failed, Ready, etc.
	// +optional
	Phase FleetPhase `json:"phase,omitempty"`

	// A brief CamelCase message indicating details about why the fleet is in this state.
	// +optional
	Reason string `json:"reason,omitempty"`

	// PluginEndpoints is the endpoints of the plugins.
	PluginEndpoints map[string]Endpoints `json:"pluginEndpoints,omitempty"`

	// Total number of ready clusters, ready to deploy .
	ReadyClusters int32 `json:"readyClusters,omitempty"`

	// Total number of unready clusters, not ready for use.
	UnReadyClusters int32 `json:"unReadyClusters,omitempty"`
}

FleetStatus defines the observed state of the fleet

func (*FleetStatus) DeepCopy

func (in *FleetStatus) DeepCopy() *FleetStatus

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

func (*FleetStatus) DeepCopyInto

func (in *FleetStatus) DeepCopyInto(out *FleetStatus)

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

type GrafanaConfig added in v0.4.0

type GrafanaConfig struct {
	// Chart defines the helm chart config of the grafana.
	// default values is
	//
	// chart:
	//   repository: oci://registry-1.docker.io/bitnamicharts
	//   name: grafana
	//   version: 8.2.33
	//
	// +optional
	Chart *ChartConfig `json:"chart,omitempty"`
	// ExtraArgs is the set of extra arguments for Grafana chart.
	//
	// For Example, using following configuration to change replica count.
	// extraArgs:
	//   grafana:
	//     replicaCount: 2
	//
	// +optional
	ExtraArgs apiextensionsv1.JSON `json:"extraArgs,omitempty"`
}

func (*GrafanaConfig) DeepCopy added in v0.4.0

func (in *GrafanaConfig) DeepCopy() *GrafanaConfig

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

func (*GrafanaConfig) DeepCopyInto added in v0.4.0

func (in *GrafanaConfig) DeepCopyInto(out *GrafanaConfig)

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

type KyvernoConfig added in v0.4.0

type KyvernoConfig struct {
	// Chart defines the helm chart config of the kyverno.
	// default values is
	// chart:
	//   repository: https://kyverno.github.io/kyverno/
	//   name: kyverno
	//   version: 3.0.0
	//
	// +optional
	Chart *ChartConfig `json:"chart,omitempty"`
	// PodSecurity defines the pod security configuration for the kyverno.
	// +optional
	PodSecurity *PodSecurityPolicy `json:"podSecurity,omitempty"`
	// ExtraArgs is the set of extra arguments for Grafana chart.
	//
	// For Example, using following configuration to change image pull policy.
	// extraArgs:
	//   image:
	//     pullPolicy: Always
	//
	// +optional
	ExtraArgs apiextensionsv1.JSON `json:"extraArgs,omitempty"`
}

func (*KyvernoConfig) DeepCopy added in v0.4.0

func (in *KyvernoConfig) DeepCopy() *KyvernoConfig

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

func (*KyvernoConfig) DeepCopyInto added in v0.4.0

func (in *KyvernoConfig) DeepCopyInto(out *KyvernoConfig)

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

type MetricConfig added in v0.4.0

type MetricConfig struct {
	// Thanos defines the configuration for the thanos querier and store gateway.
	Thanos ThanosConfig `json:"thanos,omitempty"`
	// Prometheus defines the configuration for the prometheus installation
	// in the clusters observed by the thanos,
	// by default thanos sidecar will be installed in thanos sidecar mode.
	Prometheus PrometheusConfig `json:"prometheus,omitempty"`
}

func (*MetricConfig) DeepCopy added in v0.4.0

func (in *MetricConfig) DeepCopy() *MetricConfig

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

func (*MetricConfig) DeepCopyInto added in v0.4.0

func (in *MetricConfig) DeepCopyInto(out *MetricConfig)

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

type ObjectStoreConfig added in v0.4.0

type ObjectStoreConfig struct {
	// SecretName is the name of the secret that holds the object store configuration.
	// The path of object store configuration must be `objstore.yml`
	// +required
	SecretName string `json:"secretName"`
}

func (*ObjectStoreConfig) DeepCopy added in v0.4.0

func (in *ObjectStoreConfig) DeepCopy() *ObjectStoreConfig

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

func (*ObjectStoreConfig) DeepCopyInto added in v0.4.0

func (in *ObjectStoreConfig) DeepCopyInto(out *ObjectStoreConfig)

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

type PluginConfig added in v0.4.0

type PluginConfig struct {
	// Metric defines the configuration for the monitoring system installation and metrics collection..
	// +optional
	Metric *MetricConfig `json:"metric,omitempty"`
	// Grafana defines the configuration for the grafana installation and observation.
	// +optional
	Grafana *GrafanaConfig `json:"grafana,omitempty"`
	// Policy defines the configuration for the ploicy management.
	Policy *PolicyConfig `json:"policy,omitempty"`
}

func (*PluginConfig) DeepCopy added in v0.4.0

func (in *PluginConfig) DeepCopy() *PluginConfig

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

func (*PluginConfig) DeepCopyInto added in v0.4.0

func (in *PluginConfig) DeepCopyInto(out *PluginConfig)

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

type PodSecurityPolicy added in v0.4.0

type PodSecurityPolicy struct {
	// Standard defines the pod security standard.
	// More details: https://kubernetes.io/docs/concepts/security/pod-security-standards
	// +kubebuilder:validation:Enum=privileged;baseline;restricted
	// +kubebuilder:default=baseline
	// +optional
	Standard string `json:"standard,omitempty"`
	// Severity indicates policy check result criticality in a policy report.
	// +kubebuilder:validation:Enum=low;medium;high
	// +kubebuilder:default=medium
	// +optional
	Severity string `json:"severity,omitempty"`
	// ValidationFailureAction indicates the action to take when a pod creation fails to validate.
	// For more info https://kyverno.io/docs/writing-policies/validate/#validation-failure-action
	// +kubebuilder:validation:Enum=Enforce;Audit
	// +kubebuilder:default=Audit
	// +optional
	ValidationFailureAction string `json:"validationFailureAction,omitempty"`
}

func (*PodSecurityPolicy) DeepCopy added in v0.4.0

func (in *PodSecurityPolicy) DeepCopy() *PodSecurityPolicy

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

func (*PodSecurityPolicy) DeepCopyInto added in v0.4.0

func (in *PodSecurityPolicy) DeepCopyInto(out *PodSecurityPolicy)

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

type PolicyConfig added in v0.4.0

type PolicyConfig struct {
	// Kyverno defines the configuration for the kyverno installation and policy management.
	// +optional
	Kyverno *KyvernoConfig `json:"kyverno,omitempty"`
}

func (*PolicyConfig) DeepCopy added in v0.4.0

func (in *PolicyConfig) DeepCopy() *PolicyConfig

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

func (*PolicyConfig) DeepCopyInto added in v0.4.0

func (in *PolicyConfig) DeepCopyInto(out *PolicyConfig)

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

type PrometheusConfig added in v0.4.0

type PrometheusConfig struct {
	// Chart defines the helm chart config of the prometheus.
	// default values is
	//
	// chart:
	//   repository: oci://registry-1.docker.io/bitnamicharts
	//   name: kube-prometheus
	//   version: 8.9.1
	//
	// +optional
	Chart *ChartConfig `json:"chart,omitempty"`
	// NodeExporter defines the configuration for the node exporter.
	// +optional
	NodeExporter *PrometheusExporterConfig `json:"nodeExporter,omitempty"`
	// KubeStateMetrics defines the configuration for the kube-state-metrics.
	// +optional
	KubeStateMetrics *PrometheusExporterConfig `json:"kubeStateMetrics,omitempty"`
	// ExtraArgs is the set of extra arguments for Prometheus chart.
	//
	// For Example, using following configuration to create a ServiceMonitor to monitor prometheus itself.
	// extraArgs:
	//   prometheus:
	//     serviceMonitor:
	//       enabled: true
	//
	// +optional
	ExtraArgs apiextensionsv1.JSON `json:"extraArgs,omitempty"`
}

func (*PrometheusConfig) DeepCopy added in v0.4.0

func (in *PrometheusConfig) DeepCopy() *PrometheusConfig

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

func (*PrometheusConfig) DeepCopyInto added in v0.4.0

func (in *PrometheusConfig) DeepCopyInto(out *PrometheusConfig)

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

type PrometheusExporterConfig added in v0.4.0

type PrometheusExporterConfig struct {
	// Enabled indicates whether the exporters are enabled.
	Enabled bool `json:"enabled,omitempty"`
}

func (*PrometheusExporterConfig) DeepCopy added in v0.4.0

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

func (*PrometheusExporterConfig) DeepCopyInto added in v0.4.0

func (in *PrometheusExporterConfig) DeepCopyInto(out *PrometheusExporterConfig)

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

type ThanosConfig added in v0.4.0

type ThanosConfig struct {
	// Chart defines the helm chart config of the thanos.
	// default values is
	//
	// chart:
	//   repository: oci://registry-1.docker.io/bitnamicharts
	//   name: thanos
	//   version: 12.5.1
	//
	// +optional
	Chart *ChartConfig `json:"chart,omitempty"`
	// ObjectStoreConfig is the secret reference of the object store.
	// Configuration must follow the definition of the thanos: https://thanos.io/tip/thanos/storage.md/.
	// +required
	ObjectStoreConfig ObjectStoreConfig `json:"objectStoreConfig"`
	// ExtraArgs is the set of extra arguments for Thanos chart.
	//
	// For Example, using following configuration to enable query frontend.
	// extraArgs:
	//   queryFrontend:
	//     enabled: true
	//
	// +optional
	ExtraArgs apiextensionsv1.JSON `json:"extraArgs,omitempty"`
}

func (*ThanosConfig) DeepCopy added in v0.4.0

func (in *ThanosConfig) DeepCopy() *ThanosConfig

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

func (*ThanosConfig) DeepCopyInto added in v0.4.0

func (in *ThanosConfig) DeepCopyInto(out *ThanosConfig)

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

Jump to

Keyboard shortcuts

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