v1beta1

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true

+kubebuilder:object:generate=true

Index

Constants

View Source
const (
	ConditionTypeReady       = "Ready"
	ConditionTypeProgressing = "Progressing"
	ConditionTypeError       = "Error"
)
View Source
const (
	ConditionTypeNamespaceReady  = "NamespaceReady"
	ConditionTypeDeploymentReady = "DeploymentReady"
)
View Source
const (
	ConditionTypeIngressReady    = "IngressReady"
	ConditionTypeIngressCdnReady = "IngressCdnReady"
)
View Source
const (
	ConditionTypeCertificateReady = "CertificateReady"
)
View Source
const (
	ConditionTypeConfigMapReady = "ConfigMapReady"
)
View Source
const (
	ConditionTypeHPAReady = "HPAReady"
)
View Source
const (
	ConditionTypePodReady = "PodReady"
)
View Source
const (
	ConditionTypeServiceReady = "ServiceReady"
)

Variables

This section is empty.

Functions

func AddPrefixToFieldError

func AddPrefixToFieldError(prefix string) func(t1 *field.Error) *field.Error

func ComputeEnvVar

func ComputeEnvVar(prefix, format string, keys ...string) string

func Env

func Env(key, value string) corev1.EnvVar

func EnvFrom

func EnvFrom(key string, value *corev1.EnvVarSource) corev1.EnvVar

func EnvFromWithPrefix

func EnvFromWithPrefix(prefix, key string, value *corev1.EnvVarSource) corev1.EnvVar

func EnvVarPlaceholder

func EnvVarPlaceholder(key, prefix string) string

func EnvWithPrefix

func EnvWithPrefix(prefix, key, value string) corev1.EnvVar

func RemoveCondition

func RemoveCondition(object Object, conditionType string)

func RemoveIngressCondition

func RemoveIngressCondition(object Object)

func RemovePodCondition

func RemovePodCondition(object Object)

func RemoveReadyCondition

func RemoveReadyCondition(object Object)

func SelectRequiredConfigValueOrReference

func SelectRequiredConfigValueOrReference[VALUE interface {
	string |
		int | int8 | int16 | int32 | int64 |
		uint | uint8 | uint16 | uint32 | uint64
}, SRC interface {
	*ConfigSource | *corev1.EnvVarSource
}](key, prefix string, v VALUE, src SRC) corev1.EnvVar

func SetCertificateError added in v1.0.11

func SetCertificateError(object Object, msg ...string)

func SetCertificateReady added in v1.0.11

func SetCertificateReady(object Object, msg ...string)

func SetCondition

func SetCondition(object Object, conditionType string, status metav1.ConditionStatus, msg ...string)

func SetConfigMapError

func SetConfigMapError(object Object, msg ...string)

func SetConfigMapReady

func SetConfigMapReady(object Object, msg ...string)

func SetDeploymentError

func SetDeploymentError(object Object, msg ...string)

func SetDeploymentReady

func SetDeploymentReady(object Object, msg ...string)

func SetError

func SetError(object Object, err error)

func SetHPAError

func SetHPAError(object Object, msg ...string)

func SetHPAReady

func SetHPAReady(object Object, msg ...string)

func SetIngressCdnError added in v1.0.21

func SetIngressCdnError(object Object, msg ...string)

func SetIngressCdnReady added in v1.0.21

func SetIngressCdnReady(object Object, msg ...string)

func SetIngressError

func SetIngressError(object Object, msg ...string)

func SetIngressReady

func SetIngressReady(object Object, msg ...string)

func SetNamespaceCreated

func SetNamespaceCreated(object Object, msg ...string)

func SetNamespaceError

func SetNamespaceError(object Object, msg ...string)

func SetPodError

func SetPodError(object Object, msg ...string)

func SetPodReady

func SetPodReady(object Object, msg ...string)

func SetProgressing

func SetProgressing(object Object, msg ...string)

func SetReady

func SetReady(object Object, msg ...string)

func SetServiceError

func SetServiceError(object Object, msg ...string)

func SetServiceReady

func SetServiceReady(object Object, msg ...string)

func ValidateRequiredConfigValueOrReference

func ValidateRequiredConfigValueOrReference[T comparable, SRC interface {
	*ConfigSource | *corev1.EnvVarSource
}](key string, v T, source SRC) field.ErrorList

func ValidateRequiredConfigValueOrReferenceOnly

func ValidateRequiredConfigValueOrReferenceOnly[T comparable, SRC interface {
	*ConfigSource | *corev1.EnvVarSource
}](key string, v T, source SRC) field.ErrorList

Types

type CommonServiceProperties

type CommonServiceProperties struct {
	DevProperties `json:",inline"`
	// +optional
	//+kubebuilder:default:="latest"
	Version string `json:"version,omitempty"`
}

func (*CommonServiceProperties) DeepCopy

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

func (*CommonServiceProperties) DeepCopyInto

func (in *CommonServiceProperties) DeepCopyInto(out *CommonServiceProperties)

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

func (CommonServiceProperties) GetVersion

func (p CommonServiceProperties) GetVersion() string

type Condition

type Condition struct {
	// type of condition in CamelCase or in foo.example.com/CamelCase.
	// ---
	// Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
	// useful (see .node.status.conditions), the ability to deconflict is important.
	// The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$`
	// +kubebuilder:validation:MaxLength=316
	Type string `json:"type" protobuf:"bytes,1,opt,name=type"`
	// status of the condition, one of True, False, Unknown.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum=True;False;Unknown
	Status metav1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"`
	// observedGeneration represents the .metadata.generation that the condition was set based upon.
	// For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
	// with respect to the current state of the instance.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Minimum=0
	ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
	// lastTransitionTime is the last time the condition transitioned from one status to another.
	// This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=date-time
	LastTransitionTime metav1.Time `json:"lastTransitionTime" protobuf:"bytes,4,opt,name=lastTransitionTime"`
	// message is a human readable message indicating details about the transition.
	// This may be an empty string.
	// +required
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:MaxLength=32768
	Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
}

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type Conditions

type Conditions []Condition

func (Conditions) DeepCopy

func (in Conditions) DeepCopy() Conditions

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

func (Conditions) DeepCopyInto

func (in Conditions) DeepCopyInto(out *Conditions)

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

func (*Conditions) Remove

func (c *Conditions) Remove(t string)

func (*Conditions) Set

func (conditions *Conditions) Set(condition Condition)

type ConfigSource

type ConfigSource struct {
	// Selects a key of a ConfigMap.
	// +optional
	ConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty" protobuf:"bytes,3,opt,name=configMapKeyRef"`
	// Selects a key of a secret in the pod's namespace
	// +optional
	SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty" protobuf:"bytes,4,opt,name=secretKeyRef"`
}

func (*ConfigSource) DeepCopy

func (in *ConfigSource) DeepCopy() *ConfigSource

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

func (*ConfigSource) DeepCopyInto

func (in *ConfigSource) DeepCopyInto(out *ConfigSource)

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

func (*ConfigSource) Env

func (c *ConfigSource) Env() *corev1.EnvVarSource

type DevProperties

type DevProperties struct {
	// +optional
	Debug bool `json:"debug"`
	// +optional
	Dev bool `json:"dev"`
}

func (*DevProperties) DeepCopy

func (in *DevProperties) DeepCopy() *DevProperties

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

func (*DevProperties) DeepCopyInto

func (in *DevProperties) DeepCopyInto(out *DevProperties)

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

func (DevProperties) Env

func (d DevProperties) Env() []v1.EnvVar

func (DevProperties) EnvWithPrefix

func (d DevProperties) EnvWithPrefix(prefix string) []v1.EnvVar

type Dirty

type Dirty interface {
	IsDirty(t Object) bool
}

+kubebuilder:object:generate=false

type IngressSpec

type IngressSpec struct {
	// +optional
	Annotations map[string]string `json:"annotations"`
	Path        string            `json:"path"`
	Host        string            `json:"host"`
	// +optional
	TLS *IngressTLS `json:"tls"`
}

func (*IngressSpec) DeepCopy

func (in *IngressSpec) DeepCopy() *IngressSpec

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

func (*IngressSpec) DeepCopyInto

func (in *IngressSpec) DeepCopyInto(out *IngressSpec)

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

type IngressTLS

type IngressTLS struct {
	// SecretName is the name of the secret used to terminate TLS traffic on
	// port 443. Field is left optional to allow TLS routing based on SNI
	// hostname alone. If the SNI host in a listener conflicts with the "Host"
	// header field used by an IngressRule, the SNI host is used for termination
	// and value of the Host header is used for routing.
	// +optional
	SecretName string `json:"secretName,omitempty" protobuf:"bytes,2,opt,name=secretName"`
}

func (*IngressTLS) AsK8SIngressTLSSlice

func (t *IngressTLS) AsK8SIngressTLSSlice() []networkingv1.IngressTLS

func (*IngressTLS) DeepCopy

func (in *IngressTLS) DeepCopy() *IngressTLS

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

func (*IngressTLS) DeepCopyInto

func (in *IngressTLS) DeepCopyInto(out *IngressTLS)

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

type Object

type Object interface {
	client.Object
	Dirty
	GetStatus() Dirty
	GetConditions() *Conditions
}

+kubebuilder:object:generate=false

type PostgresConfig

type PostgresConfig struct {
	// +optional
	Port int `json:"port"`
	// +optional
	PortFrom *ConfigSource `json:"portFrom"`
	// +optional
	Host string `json:"host"`
	// +optional
	HostFrom *ConfigSource `json:"hostFrom"`
	// +optional
	Username string `json:"username"`
	// +optional
	UsernameFrom *ConfigSource `json:"usernameFrom"`
	// +optional
	Password string `json:"password"`
	// +optional
	PasswordFrom *ConfigSource `json:"passwordFrom"`
	// +optional
	DisableSSLMode bool `json:"disableSSLMode"`
}

func (*PostgresConfig) DeepCopy

func (in *PostgresConfig) DeepCopy() *PostgresConfig

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

func (*PostgresConfig) DeepCopyInto

func (in *PostgresConfig) DeepCopyInto(out *PostgresConfig)

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

func (*PostgresConfig) Env

func (c *PostgresConfig) Env(prefix string) []corev1.EnvVar

func (*PostgresConfig) EnvWithDiscriminator

func (c *PostgresConfig) EnvWithDiscriminator(prefix, discriminator string) []corev1.EnvVar

func (*PostgresConfig) Validate

func (c *PostgresConfig) Validate() field.ErrorList

type PostgresConfigWithDatabase

type PostgresConfigWithDatabase struct {
	PostgresConfig `json:",inline"`
	// +optional
	Database string `json:"database"`
	// +optional
	DatabaseFrom *ConfigSource `json:"databaseFrom"`
}

func (*PostgresConfigWithDatabase) DeepCopy

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

func (*PostgresConfigWithDatabase) DeepCopyInto

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

func (*PostgresConfigWithDatabase) Env

func (*PostgresConfigWithDatabase) EnvWithDiscriminator

func (c *PostgresConfigWithDatabase) EnvWithDiscriminator(prefix, discriminator string) []corev1.EnvVar

func (*PostgresConfigWithDatabase) Validate

type ReplicationStatus

type ReplicationStatus struct {
	Status `json:",inline"`
	// +optional
	Replicas int32 `json:"replicas"`
	// +optional
	Selector string `json:"selector"`
}

func (*ReplicationStatus) DeepCopy

func (in *ReplicationStatus) DeepCopy() *ReplicationStatus

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

func (*ReplicationStatus) DeepCopyInto

func (in *ReplicationStatus) DeepCopyInto(out *ReplicationStatus)

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

type Scalable

type Scalable struct {
	// +optional
	// +kubebuilder:default:=1
	Replicas *int32 `json:"replicas,omitempty"`
	// minReplicas is the lower limit for the number of replicas to which the autoscaler
	// can scale down.  It defaults to 1 pod.  minReplicas is allowed to be 0 if the
	// alpha feature gate HPAScaleToZero is enabled and at least one Object or External
	// metric is configured.  Scaling is active as long as at least one metric value is
	// available.
	// +optional
	MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
	// upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
	// If not specified, the default will be 10
	// +optional
	// +kubebuilder:default:=10
	MaxReplicas int32 `json:"maxReplicas,omitempty" protobuf:"varint,3,opt,name=maxReplicas"`
	// metrics contains the specifications for which to use to calculate the
	// desired replica count (the maximum replica count across all metrics will
	// be used).  The desired replica count is calculated multiplying the
	// ratio between the target value and the current value by the current
	// number of pods.  Ergo, metrics used must decrease as the pod count is
	// increased, and vice-versa.  See the individual metric source types for
	// more information about how each type of metric must respond.
	// +optional
	Metrics []autoscallingv2.MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"`
}

func (*Scalable) DeepCopy

func (in *Scalable) DeepCopy() *Scalable

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

func (*Scalable) DeepCopyInto

func (in *Scalable) DeepCopyInto(out *Scalable)

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

func (Scalable) GetHPASpec

func (Scalable) GetReplicas

func (s Scalable) GetReplicas() *int32

func (Scalable) WithReplicas

func (s Scalable) WithReplicas(replicas *int32) Scalable

type Status

type Status struct {
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions Conditions `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

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

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

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

func (*Status) GetCondition

func (in *Status) GetCondition(conditionType string) *Condition

func (*Status) GetConditions

func (in *Status) GetConditions() []Condition

func (*Status) IsDirty

func (in *Status) IsDirty(reference Object) bool

func (*Status) RemoveCondition

func (in *Status) RemoveCondition(v string)

func (*Status) SetCondition

func (in *Status) SetCondition(condition Condition)

Jump to

Keyboard shortcuts

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