Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the wordpress v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/presslabs/wordpress-operator/pkg/apis/wordpress +k8s:defaulter-gen=TypeMeta +groupName=wordpress.presslabs.org
Package v1alpha1 contains API Schema definitions for the wordpress v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/presslabs/wordpress-operator/pkg/apis/wordpress +k8s:defaulter-gen=TypeMeta +groupName=wordpress.presslabs.org
Index ¶
- Variables
- type Domain
- type SecretRef
- type Wordpress
- func (in *Wordpress) DeepCopy() *Wordpress
- func (in *Wordpress) DeepCopyInto(out *Wordpress)
- func (in *Wordpress) DeepCopyObject() runtime.Object
- func (wp *Wordpress) GetDBUpgradeJobName(rt *WordpressRuntime) string
- func (wp *Wordpress) GetDeploymentName() string
- func (wp *Wordpress) GetImage(rt *WordpressRuntime) string
- func (wp *Wordpress) GetIngressName() string
- func (wp *Wordpress) GetMediaPVCName() string
- func (wp *Wordpress) GetServiceName() string
- func (wp *Wordpress) GetVersionHash(rt *WordpressRuntime) string
- func (wp *Wordpress) GetWPCronName() string
- func (wp *Wordpress) GetWebrootPVCName() string
- func (wp *Wordpress) JobPodTemplateSpec(rt *WordpressRuntime, cmd ...string) (out *corev1.PodTemplateSpec)
- func (wp *Wordpress) LabelsForComponent(component string) labels.Set
- func (wp *Wordpress) LabelsForTier(tier string) labels.Set
- func (wp *Wordpress) LabelsSet() labels.Set
- func (wp *Wordpress) SetDefaults()
- func (wp *Wordpress) WebPodLabels() labels.Set
- func (wp *Wordpress) WebPodTemplateSpec(rt *WordpressRuntime) (out *corev1.PodTemplateSpec)
- type WordpressList
- type WordpressRuntime
- type WordpressRuntimeList
- type WordpressRuntimeSpec
- type WordpressRuntimeStatus
- type WordpressSpec
- type WordpressStatus
- type WordpressVolumeSpec
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "wordpress.presslabs.org", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
Functions ¶
This section is empty.
Types ¶
type Wordpress ¶
type Wordpress struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec WordpressSpec `json:"spec,omitempty"` Status WordpressStatus `json:"status,omitempty"` }
Wordpress is the Schema for the wordpresses API +k8s:openapi-gen=true
func (*Wordpress) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Wordpress.
func (*Wordpress) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Wordpress) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Wordpress) GetDBUpgradeJobName ¶
func (wp *Wordpress) GetDBUpgradeJobName(rt *WordpressRuntime) string
GetDBUpgradeJobName returns database migration Job name relative to Wordpress resource
func (*Wordpress) GetDeploymentName ¶
GetDeploymentName returns wordpress Deployment name relative to Wordpress resource
func (*Wordpress) GetImage ¶
func (wp *Wordpress) GetImage(rt *WordpressRuntime) string
GetImage return the image for the Wordpress resource relative to the WordpressRuntime
func (*Wordpress) GetIngressName ¶
GetIngressName returns Ingress name relative to Wordpress resource
func (*Wordpress) GetMediaPVCName ¶
GetMediaPVCName returns media Persistent Volume Claim name relative to Wordpress resource
func (*Wordpress) GetServiceName ¶
GetServiceName returns web Service name relative to Wordpress resource
func (*Wordpress) GetVersionHash ¶
func (wp *Wordpress) GetVersionHash(rt *WordpressRuntime) string
GetVersionHash returns the Wordpress image version hash which can be used in kubernetes resource names
func (*Wordpress) GetWPCronName ¶
GetWPCronName returns wp-cron CronJob name relative to Wordpress resource
func (*Wordpress) GetWebrootPVCName ¶
GetWebrootPVCName returns webroot Persistent Volume Claim name relative to Wordpress resource
func (*Wordpress) JobPodTemplateSpec ¶
func (wp *Wordpress) JobPodTemplateSpec(rt *WordpressRuntime, cmd ...string) (out *corev1.PodTemplateSpec)
JobPodTemplateSpec generates a pod template spec suitable for WP CLI background jobs
func (*Wordpress) LabelsForComponent ¶
LabelsForComponent returns a label set object with component label filled in
func (*Wordpress) LabelsForTier ¶
LabelsForTier returns a label set object with tier label filled in
func (*Wordpress) LabelsSet ¶
LabelsSet returns a general label set to apply to objects, relative to the Wordpress API object
func (*Wordpress) SetDefaults ¶
func (wp *Wordpress) SetDefaults()
SetDefaults mutates a Wordpress object and sets default values Controller should always apply defaults before passing it down to workers
func (*Wordpress) WebPodLabels ¶
WebPodLabels returns the labels suitable Wordpress Web Pods
func (*Wordpress) WebPodTemplateSpec ¶
func (wp *Wordpress) WebPodTemplateSpec(rt *WordpressRuntime) (out *corev1.PodTemplateSpec)
WebPodTemplateSpec generates a pod template spec suitable for use in Wordpress deployment
type WordpressList ¶
type WordpressList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Wordpress `json:"items"` }
WordpressList contains a list of Wordpress
func (*WordpressList) DeepCopy ¶
func (in *WordpressList) DeepCopy() *WordpressList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WordpressList.
func (*WordpressList) DeepCopyInto ¶
func (in *WordpressList) DeepCopyInto(out *WordpressList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WordpressList) DeepCopyObject ¶
func (in *WordpressList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WordpressRuntime ¶
type WordpressRuntime struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec WordpressRuntimeSpec `json:"spec,omitempty"` Status WordpressRuntimeStatus `json:"status,omitempty"` }
WordpressRuntime is the Schema for the wordpressruntimes API +k8s:openapi-gen=true
func (*WordpressRuntime) DeepCopy ¶
func (in *WordpressRuntime) DeepCopy() *WordpressRuntime
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WordpressRuntime.
func (*WordpressRuntime) DeepCopyInto ¶
func (in *WordpressRuntime) DeepCopyInto(out *WordpressRuntime)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WordpressRuntime) DeepCopyObject ¶
func (in *WordpressRuntime) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*WordpressRuntime) SetDefaults ¶
func (rt *WordpressRuntime) SetDefaults()
SetDefaults mutates a WordpressRuntime object and sets default values Controller should always apply defaults before passing it down to workers
type WordpressRuntimeList ¶
type WordpressRuntimeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []WordpressRuntime `json:"items"` }
WordpressRuntimeList contains a list of WordpressRuntime
func (*WordpressRuntimeList) DeepCopy ¶
func (in *WordpressRuntimeList) DeepCopy() *WordpressRuntimeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WordpressRuntimeList.
func (*WordpressRuntimeList) DeepCopyInto ¶
func (in *WordpressRuntimeList) DeepCopyInto(out *WordpressRuntimeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WordpressRuntimeList) DeepCopyObject ¶
func (in *WordpressRuntimeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WordpressRuntimeSpec ¶
type WordpressRuntimeSpec struct { // DefaultImage is the image for the placeholder image. This image is used // in containers that specify "defaultImage" as their image // +kubebuilder:validation:MinLength=1 DefaultImage string `json:"defaultImage"` // DefaultPullPolicyImage is the pull policy which gets set for the // defaultImage // +kubebuilder:validation:Enum=Always,IfNotPresent,Never // +optional DefaultImagePullPolicy corev1.PullPolicy `json:"defaultImagePullPolicy,omitempty"` // WebrootVolumeSpec defines the volume for storing the wordpress // installation. // +optional WebrootVolumeSpec *WordpressVolumeSpec `json:"webrootVolumeSpec,omitempty"` // MediaVolumeSpec if specified, defines a separate volume for storing // media files. // +optional MediaVolumeSpec *WordpressVolumeSpec `json:"mediaVolumeSpec,omitempty"` // WebPodTemplate is the pod template for the WordPress web frontend. // // // *The globally defined volume mounts* are injected into all containers // // *The globally defined env* is injected into all containers WebPodTemplate *corev1.PodTemplateSpec `json:"webPodTemplate"` // CLIPodTemplate is the pod template for running wp-cli commands (eg. // wp-cron, wp database upgrades, etc.) // // *The globally defined volume mounts* are injected into all containers // // *The globally defined env* is injected into all containers // // The pod restart policy is set `Never`, regardless of the spec // CLIPodTemplate *corev1.PodTemplateSpec `json:"cliPodTemplate"` // If specified apply these annotations to the Ingress resource created for // this Wordpress Site. // +optional IngressAnnotations map[string]string `json:"ingressAnnotations,omitempty"` // ServiceSpec is the specification for the service created for this // WordPress Site // By default, a ClusterIP service which exposes http port of web pods // +optional ServiceSpec *corev1.ServiceSpec `json:"serviceSpec,omitempty"` }
WordpressRuntimeSpec defines the desired state of WordpressRuntime
func (*WordpressRuntimeSpec) DeepCopy ¶
func (in *WordpressRuntimeSpec) DeepCopy() *WordpressRuntimeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WordpressRuntimeSpec.
func (*WordpressRuntimeSpec) DeepCopyInto ¶
func (in *WordpressRuntimeSpec) DeepCopyInto(out *WordpressRuntimeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WordpressRuntimeStatus ¶
type WordpressRuntimeStatus struct{}
WordpressRuntimeStatus defines the observed state of WordpressRuntime
func (*WordpressRuntimeStatus) DeepCopy ¶
func (in *WordpressRuntimeStatus) DeepCopy() *WordpressRuntimeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WordpressRuntimeStatus.
func (*WordpressRuntimeStatus) DeepCopyInto ¶
func (in *WordpressRuntimeStatus) DeepCopyInto(out *WordpressRuntimeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WordpressSpec ¶
type WordpressSpec struct { // WordpressRuntime to use // +kubebuilder:validation:MinLength=1 Runtime string `json:"runtime"` // Number of desired web pods. This is a pointer to distinguish between // explicit zero and not specified. Defaults to 1. // +optional Replicas *int32 `json:"replicas,omitempty"` // Image overrides WordpressRuntime spec.defaultImage // +optional Image string `json:"image,omitempty"` // ImagePullPolicy overrides WordpressRuntime spec.imagePullPolicy // +kubebuilder:validation:Enum=Always,IfNotPresent,Never // +optional ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` // ImagePullSecrets defines additional secrets to use when pulling images ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use to run this // site's pods // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ // +optional ServiceAccountName string `json:"serviceAccountName,omitempty"` // Domains for which this this site answers. // The first item is set as the "main domain" (eg. WP_HOME and WP_SITEURL constants). // +kubebuilder:validation:MinItems=1 Domains []Domain `json:"domains"` // TLSSecretRef a secret containing the TLS certificates for this site. // +optional TLSSecretRef SecretRef `json:"tlsSecretRef,omitempty"` // WebrootVolumeSpec overrides WordpressRuntime spec.webrootVolumeSpec // This field is immutable. // +optional WebrootVolumeSpec *WordpressVolumeSpec `json:"webrootVolumeSpec,omitempty"` // MediaVolumeSpec overrides WordpressRuntime spec.mediaVolumeSpec // This field is immutable. // +optional MediaVolumeSpec *WordpressVolumeSpec `json:"mediaVolumeSpec,omitempty"` // Volumes defines additional volumes to get injected into web and cli pods // +optional Volumes []corev1.Volume `json:"volumes,omitempty"` // VolumeMountsSpec defines additional mounts which get injected into web // and cli pods. // +optional VolumeMountsSpec []corev1.VolumeMount `json:"volumeMountsSpec,omitempty"` // Env defines additional environment variables which get injected into web // and cli pods // +optional // +patchMergeKey=name // +patchStrategy=merge Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // EnvFrom defines additional envFrom's which get injected into web // and cli pods // +optional EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"` // IngressAnnotations for this Wordpress site // +optional IngressAnnotations map[string]string `json:"ingressAnnotations,omitempty"` // Labels to apply to generated resources Labels map[string]string `json:"labels,omitempty"` }
WordpressSpec defines the desired state of Wordpress
func (*WordpressSpec) DeepCopy ¶
func (in *WordpressSpec) DeepCopy() *WordpressSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WordpressSpec.
func (*WordpressSpec) DeepCopyInto ¶
func (in *WordpressSpec) DeepCopyInto(out *WordpressSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WordpressStatus ¶
type WordpressStatus struct { }
WordpressStatus defines the observed state of Wordpress
func (*WordpressStatus) DeepCopy ¶
func (in *WordpressStatus) DeepCopy() *WordpressStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WordpressStatus.
func (*WordpressStatus) DeepCopyInto ¶
func (in *WordpressStatus) DeepCopyInto(out *WordpressStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WordpressVolumeSpec ¶
type WordpressVolumeSpec struct { // EmptyDir to use if no PersistentVolumeClaim or HostPath is specified // +optional EmptyDir *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"` // HostPath to use instead of a PersistentVolumeClaim. // +optional HostPath *corev1.HostPathVolumeSource `json:"hostPath,omitempty"` // PersistentVolumeClaim to use. It has the highest level of precedence, // followed by HostPath and EmptyDir // +optional PersistentVolumeClaim *corev1.PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"` }
WordpressVolumeSpec is the desired spec of a wordpress volume
func (*WordpressVolumeSpec) DeepCopy ¶
func (in *WordpressVolumeSpec) DeepCopy() *WordpressVolumeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WordpressVolumeSpec.
func (*WordpressVolumeSpec) DeepCopyInto ¶
func (in *WordpressVolumeSpec) DeepCopyInto(out *WordpressVolumeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.