v1alpha1

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the conventions v1alpha1 API group +kubebuilder:object:generate=true

Package v1alpha1 contains API Schema definitions for the conventions v1alpha1 API group +kubebuilder:object:generate=true +groupName=conventions.carto.run

Index

Constants

View Source
const (
	PodIntentConditionReady              = apis.ConditionReady
	PodIntentConditionConventionsApplied = "ConventionsApplied"
)
View Source
const (
	AppliedConventionsAnnotationKey = "conventions.carto.run/applied-conventions"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "conventions.carto.run", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ClusterPodConvention

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

	Spec ClusterPodConventionSpec `json:"spec"`
}

func (*ClusterPodConvention) DeepCopy

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

func (*ClusterPodConvention) DeepCopyInto

func (in *ClusterPodConvention) DeepCopyInto(out *ClusterPodConvention)

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

func (*ClusterPodConvention) DeepCopyObject

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

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

func (*ClusterPodConvention) Default

func (r *ClusterPodConvention) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*ClusterPodConvention) ValidateCreate

func (r *ClusterPodConvention) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*ClusterPodConvention) ValidateDelete

func (c *ClusterPodConvention) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*ClusterPodConvention) ValidateUpdate

func (c *ClusterPodConvention) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ClusterPodConventionList

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

func (*ClusterPodConventionList) DeepCopy

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

func (*ClusterPodConventionList) DeepCopyInto

func (in *ClusterPodConventionList) DeepCopyInto(out *ClusterPodConventionList)

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

func (*ClusterPodConventionList) DeepCopyObject

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

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

type ClusterPodConventionSpec

type ClusterPodConventionSpec struct {
	// Label selector for workloads.
	// It must match the workload's pod template's labels.
	Selectors []metav1.LabelSelector `json:"selectors,omitempty"`
	// +optional
	SelectorTarget SelectorTargetSource         `json:"selectorTarget"`
	Priority       PriorityLevel                `json:"priority,omitempty"`
	Webhook        *ClusterPodConventionWebhook `json:"webhook,omitempty"`
}

func (*ClusterPodConventionSpec) DeepCopy

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

func (*ClusterPodConventionSpec) DeepCopyInto

func (in *ClusterPodConventionSpec) DeepCopyInto(out *ClusterPodConventionSpec)

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

func (*ClusterPodConventionSpec) Default

func (s *ClusterPodConventionSpec) Default()

type ClusterPodConventionWebhook

type ClusterPodConventionWebhook struct {
	// ClientConfig defines how to communicate with the convention.
	ClientConfig admissionregistrationv1.WebhookClientConfig `json:"clientConfig"`
	// Certificate references a cert-manager Certificate resource whose CA should be trusted.
	Certificate *ClusterPodConventionWebhookCertificate `json:"certificate,omitempty"`
}

func (*ClusterPodConventionWebhook) DeepCopy

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

func (*ClusterPodConventionWebhook) DeepCopyInto

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

func (*ClusterPodConventionWebhook) Default

func (s *ClusterPodConventionWebhook) Default()

type ClusterPodConventionWebhookCertificate added in v0.1.0

type ClusterPodConventionWebhookCertificate struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

func (*ClusterPodConventionWebhookCertificate) DeepCopy added in v0.1.0

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

func (*ClusterPodConventionWebhookCertificate) DeepCopyInto added in v0.1.0

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

type ObjectMeta

type ObjectMeta struct {
	Name         string            `json:"name,omitempty"`
	GenerateName string            `json:"generateName,omitempty"`
	Namespace    string            `json:"namespace,omitempty"`
	Labels       map[string]string `json:"labels,omitempty"`
	Annotations  map[string]string `json:"annotations,omitempty"`
}

func (*ObjectMeta) AsObjectMeta

func (m *ObjectMeta) AsObjectMeta() metav1.ObjectMeta

func (*ObjectMeta) DeepCopy

func (in *ObjectMeta) DeepCopy() *ObjectMeta

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

func (*ObjectMeta) DeepCopyInto

func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta)

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

func (*ObjectMeta) GetAnnotations

func (m *ObjectMeta) GetAnnotations() map[string]string

func (*ObjectMeta) GetCreationTimestamp

func (m *ObjectMeta) GetCreationTimestamp() metav1.Time

func (*ObjectMeta) GetDeletionGracePeriodSeconds

func (m *ObjectMeta) GetDeletionGracePeriodSeconds() *int64

func (*ObjectMeta) GetDeletionTimestamp

func (m *ObjectMeta) GetDeletionTimestamp() *metav1.Time

func (*ObjectMeta) GetFinalizers

func (m *ObjectMeta) GetFinalizers() []string

func (*ObjectMeta) GetGenerateName

func (m *ObjectMeta) GetGenerateName() string

func (*ObjectMeta) GetGeneration

func (m *ObjectMeta) GetGeneration() int64

func (*ObjectMeta) GetLabels

func (m *ObjectMeta) GetLabels() map[string]string

func (*ObjectMeta) GetManagedFields

func (m *ObjectMeta) GetManagedFields() []metav1.ManagedFieldsEntry

func (*ObjectMeta) GetName

func (m *ObjectMeta) GetName() string

func (*ObjectMeta) GetNamespace

func (m *ObjectMeta) GetNamespace() string

func (*ObjectMeta) GetOwnerReferences

func (m *ObjectMeta) GetOwnerReferences() []metav1.OwnerReference

func (*ObjectMeta) GetResourceVersion

func (m *ObjectMeta) GetResourceVersion() string
func (m *ObjectMeta) GetSelfLink() string

func (*ObjectMeta) GetUID

func (m *ObjectMeta) GetUID() types.UID

func (*ObjectMeta) SetAnnotations

func (m *ObjectMeta) SetAnnotations(annotations map[string]string)

func (*ObjectMeta) SetCreationTimestamp

func (m *ObjectMeta) SetCreationTimestamp(timestamp metav1.Time)

func (*ObjectMeta) SetDeletionGracePeriodSeconds

func (m *ObjectMeta) SetDeletionGracePeriodSeconds(*int64)

func (*ObjectMeta) SetDeletionTimestamp

func (m *ObjectMeta) SetDeletionTimestamp(timestamp *metav1.Time)

func (*ObjectMeta) SetFinalizers

func (m *ObjectMeta) SetFinalizers(finalizers []string)

func (*ObjectMeta) SetGenerateName

func (m *ObjectMeta) SetGenerateName(name string)

func (*ObjectMeta) SetGeneration

func (m *ObjectMeta) SetGeneration(generation int64)

func (*ObjectMeta) SetLabels

func (m *ObjectMeta) SetLabels(labels map[string]string)

func (*ObjectMeta) SetManagedFields

func (m *ObjectMeta) SetManagedFields(managedFields []metav1.ManagedFieldsEntry)

func (*ObjectMeta) SetName

func (m *ObjectMeta) SetName(name string)

func (*ObjectMeta) SetNamespace

func (m *ObjectMeta) SetNamespace(namespace string)

func (*ObjectMeta) SetOwnerReferences

func (m *ObjectMeta) SetOwnerReferences([]metav1.OwnerReference)

func (*ObjectMeta) SetResourceVersion

func (m *ObjectMeta) SetResourceVersion(version string)
func (m *ObjectMeta) SetSelfLink(selfLink string)

func (*ObjectMeta) SetUID

func (m *ObjectMeta) SetUID(uid types.UID)

type PodIntent

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

	Spec PodIntentSpec `json:"spec"`
	// +optional
	Status PodIntentStatus `json:"status"`
}

func (*PodIntent) DeepCopy

func (in *PodIntent) DeepCopy() *PodIntent

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

func (*PodIntent) DeepCopyInto

func (in *PodIntent) DeepCopyInto(out *PodIntent)

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

func (*PodIntent) DeepCopyObject

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

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

func (*PodIntent) Default

func (r *PodIntent) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*PodIntent) GetConditionSet

func (s *PodIntent) GetConditionSet() apis.ConditionSet

func (*PodIntent) GetConditionsAccessor

func (s *PodIntent) GetConditionsAccessor() apis.ConditionsAccessor

func (*PodIntent) ValidateCreate

func (r *PodIntent) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*PodIntent) ValidateDelete

func (r *PodIntent) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*PodIntent) ValidateUpdate

func (r *PodIntent) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type PodIntentList

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

func (*PodIntentList) DeepCopy

func (in *PodIntentList) DeepCopy() *PodIntentList

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

func (*PodIntentList) DeepCopyInto

func (in *PodIntentList) DeepCopyInto(out *PodIntentList)

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

func (*PodIntentList) DeepCopyObject

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

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

type PodIntentSpec

type PodIntentSpec struct {
	// ServiceAccountName is the name of the Kubernetes ServiceAccount used to authenticate
	// the image pull if the service account has attached pull secrets. For more information:
	// https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// ImagePullSecrets contains the names of the Kubernetes Secrets containing registry login
	// information to resolve image metadata.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// Template defines the workload pod temple
	Template PodTemplateSpec `json:"template"`
}

func (*PodIntentSpec) DeepCopy

func (in *PodIntentSpec) DeepCopy() *PodIntentSpec

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

func (*PodIntentSpec) DeepCopyInto

func (in *PodIntentSpec) DeepCopyInto(out *PodIntentSpec)

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

func (*PodIntentSpec) Default

func (s *PodIntentSpec) Default()

type PodIntentStatus

type PodIntentStatus struct {
	apis.Status `json:",inline"`
	Template    *PodTemplateSpec `json:"template,omitempty"`
}

func (*PodIntentStatus) DeepCopy

func (in *PodIntentStatus) DeepCopy() *PodIntentStatus

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

func (*PodIntentStatus) DeepCopyInto

func (in *PodIntentStatus) DeepCopyInto(out *PodIntentStatus)

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

func (*PodIntentStatus) InitializeConditions

func (s *PodIntentStatus) InitializeConditions()

type PodTemplateSpec

type PodTemplateSpec struct {
	ObjectMeta `json:"metadata,omitempty"`
	Spec       corev1.PodSpec `json:"spec,omitempty"`
}

PodTemplateSpec mirrors corev1.PodTemplateSpec with a simplified ObjectMeta. This hacks around an issue with controller-gen where it doesn't generate the correct structural scheme that results in all ObjectMeta fields being lost. See https://github.com/kubernetes-sigs/controller-tools/issues/448

func NewPodTemplateSpec

func NewPodTemplateSpec(pts *corev1.PodTemplateSpec) *PodTemplateSpec

func (*PodTemplateSpec) AsPodTemplateSpec

func (p *PodTemplateSpec) AsPodTemplateSpec() *corev1.PodTemplateSpec

func (*PodTemplateSpec) DeepCopy

func (in *PodTemplateSpec) DeepCopy() *PodTemplateSpec

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

func (*PodTemplateSpec) DeepCopyInto

func (in *PodTemplateSpec) DeepCopyInto(out *PodTemplateSpec)

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

func (*PodTemplateSpec) GetObjectMeta

func (p *PodTemplateSpec) GetObjectMeta() metav1.Object

type PriorityLevel

type PriorityLevel string
const (
	// EarlyPriority defines Early priority level for ClusterPodConvention
	EarlyPriority PriorityLevel = "Early"
	// NormalPriority defines Normal priority level for ClusterPodConvention
	NormalPriority PriorityLevel = "Normal"
	// LatePriority defines Late priority level for ClusterPodConvention
	LatePriority PriorityLevel = "Late"
)

type SelectorTargetSource added in v0.2.0

type SelectorTargetSource string
const (
	PodTemplateSpecLabels SelectorTargetSource = "PodTemplateSpec"
	PodIntentLabels       SelectorTargetSource = "PodIntent"
)

Jump to

Keyboard shortcuts

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