Documentation
¶
Overview ¶
+kubebuilder:object:generate=true
+kubebuilder:object:generate=true
Index ¶
- Constants
- func AddPrefixToFieldError(prefix string) func(t1 *field.Error) *field.Error
- func ComputeEnvVar(prefix, format string, keys ...string) string
- func Env(key, value string) corev1.EnvVar
- func EnvFrom(key string, value *corev1.EnvVarSource) corev1.EnvVar
- func EnvFromWithPrefix(prefix, key string, value *corev1.EnvVarSource) corev1.EnvVar
- func EnvVarPlaceholder(key, prefix string) string
- func EnvWithPrefix(prefix, key, value string) corev1.EnvVar
- func RemoveCondition(object Object, conditionType string)
- func RemoveIngressCondition(object Object)
- func RemovePodCondition(object Object)
- func RemoveReadyCondition(object Object)
- func SelectRequiredConfigValueOrReference[VALUE interface{ ... }, SRC interface{ ... }](key, prefix string, v VALUE, src SRC) corev1.EnvVar
- func SetCertificateError(object Object, msg ...string)
- func SetCertificateReady(object Object, msg ...string)
- func SetCondition(object Object, conditionType string, status metav1.ConditionStatus, ...)
- func SetConfigMapError(object Object, msg ...string)
- func SetConfigMapReady(object Object, msg ...string)
- func SetDeploymentError(object Object, msg ...string)
- func SetDeploymentReady(object Object, msg ...string)
- func SetError(object Object, err error)
- func SetHPAError(object Object, msg ...string)
- func SetHPAReady(object Object, msg ...string)
- func SetIngressCdnError(object Object, msg ...string)
- func SetIngressCdnReady(object Object, msg ...string)
- func SetIngressError(object Object, msg ...string)
- func SetIngressReady(object Object, msg ...string)
- func SetNamespaceCreated(object Object, msg ...string)
- func SetNamespaceError(object Object, msg ...string)
- func SetPodError(object Object, msg ...string)
- func SetPodReady(object Object, msg ...string)
- func SetProgressing(object Object, msg ...string)
- func SetReady(object Object, msg ...string)
- func SetServiceError(object Object, msg ...string)
- func SetServiceReady(object Object, msg ...string)
- func ValidateRequiredConfigValueOrReference[T comparable, SRC interface{ ... }](key string, v T, source SRC) field.ErrorList
- func ValidateRequiredConfigValueOrReferenceOnly[T comparable, SRC interface{ ... }](key string, v T, source SRC) field.ErrorList
- type CommonServiceProperties
- type Condition
- type Conditions
- type ConfigSource
- type DevProperties
- type Dirty
- type IngressSpec
- type IngressTLS
- type Object
- type PostgresConfig
- func (in *PostgresConfig) DeepCopy() *PostgresConfig
- func (in *PostgresConfig) DeepCopyInto(out *PostgresConfig)
- func (c *PostgresConfig) Env(prefix string) []corev1.EnvVar
- func (c *PostgresConfig) EnvWithDiscriminator(prefix, discriminator string) []corev1.EnvVar
- func (c *PostgresConfig) Validate() field.ErrorList
- type PostgresConfigWithDatabase
- func (in *PostgresConfigWithDatabase) DeepCopy() *PostgresConfigWithDatabase
- func (in *PostgresConfigWithDatabase) DeepCopyInto(out *PostgresConfigWithDatabase)
- func (c *PostgresConfigWithDatabase) Env(prefix string) []corev1.EnvVar
- func (c *PostgresConfigWithDatabase) EnvWithDiscriminator(prefix, discriminator string) []corev1.EnvVar
- func (c *PostgresConfigWithDatabase) Validate() field.ErrorList
- type ReplicationStatus
- type Scalable
- type Status
- func (in *Status) DeepCopy() *Status
- func (in *Status) DeepCopyInto(out *Status)
- func (in *Status) GetCondition(conditionType string) *Condition
- func (in *Status) GetConditions() []Condition
- func (in *Status) IsDirty(reference Object) bool
- func (in *Status) RemoveCondition(v string)
- func (in *Status) SetCondition(condition Condition)
Constants ¶
const ( ConditionTypeReady = "Ready" ConditionTypeProgressing = "Progressing" ConditionTypeError = "Error" )
const ( ConditionTypeNamespaceReady = "NamespaceReady" ConditionTypeDeploymentReady = "DeploymentReady" )
const ( ConditionTypeIngressReady = "IngressReady" ConditionTypeIngressCdnReady = "IngressCdnReady" )
const (
ConditionTypeCertificateReady = "CertificateReady"
)
const (
ConditionTypeConfigMapReady = "ConfigMapReady"
)
const (
ConditionTypeHPAReady = "HPAReady"
)
const (
ConditionTypePodReady = "PodReady"
)
const (
ConditionTypeServiceReady = "ServiceReady"
)
Variables ¶
This section is empty.
Functions ¶
func AddPrefixToFieldError ¶
func ComputeEnvVar ¶
func EnvFromWithPrefix ¶
func EnvFromWithPrefix(prefix, key string, value *corev1.EnvVarSource) corev1.EnvVar
func EnvVarPlaceholder ¶
func EnvWithPrefix ¶
func RemoveCondition ¶
func RemoveIngressCondition ¶
func RemoveIngressCondition(object Object)
func RemovePodCondition ¶
func RemovePodCondition(object Object)
func RemoveReadyCondition ¶
func RemoveReadyCondition(object Object)
func SetCertificateError ¶ added in v1.0.11
func SetCertificateReady ¶ added in v1.0.11
func SetCondition ¶
func SetCondition(object Object, conditionType string, status metav1.ConditionStatus, msg ...string)
func SetConfigMapError ¶
func SetConfigMapReady ¶
func SetDeploymentError ¶
func SetDeploymentReady ¶
func SetHPAError ¶
func SetHPAReady ¶
func SetIngressCdnError ¶ added in v1.0.21
func SetIngressCdnReady ¶ added in v1.0.21
func SetIngressError ¶
func SetIngressReady ¶
func SetNamespaceCreated ¶
func SetNamespaceError ¶
func SetPodError ¶
func SetPodReady ¶
func SetProgressing ¶
func SetServiceError ¶
func SetServiceReady ¶
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 ¶
func (in *CommonServiceProperties) DeepCopy() *CommonServiceProperties
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
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 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) 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 ¶
func (in *PostgresConfigWithDatabase) DeepCopy() *PostgresConfigWithDatabase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresConfigWithDatabase.
func (*PostgresConfigWithDatabase) DeepCopyInto ¶
func (in *PostgresConfigWithDatabase) DeepCopyInto(out *PostgresConfigWithDatabase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PostgresConfigWithDatabase) Env ¶
func (c *PostgresConfigWithDatabase) Env(prefix string) []corev1.EnvVar
func (*PostgresConfigWithDatabase) EnvWithDiscriminator ¶
func (c *PostgresConfigWithDatabase) EnvWithDiscriminator(prefix, discriminator string) []corev1.EnvVar
func (*PostgresConfigWithDatabase) Validate ¶
func (c *PostgresConfigWithDatabase) Validate() field.ErrorList
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scalable.
func (*Scalable) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Scalable) GetHPASpec ¶
func (s Scalable) GetHPASpec(object client.Object) autoscallingv2.HorizontalPodAutoscalerSpec
func (Scalable) GetReplicas ¶
func (Scalable) WithReplicas ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.
func (*Status) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.