v1alpha1

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: Apache-2.0 Imports: 6 Imported by: 2

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

Constants

This section is empty.

Variables

View Source
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

func RegisterDefaults added in v0.1.1

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func SetDefaults_WordpressRuntimeSpec added in v0.1.1

func SetDefaults_WordpressRuntimeSpec(spec *WordpressRuntimeSpec)

nolint: golint

func SetDefaults_WordpressSpec added in v0.1.1

func SetDefaults_WordpressSpec(spec *WordpressSpec)

nolint: golint

func SetObjectDefaults_Wordpress added in v0.1.1

func SetObjectDefaults_Wordpress(in *Wordpress)

func SetObjectDefaults_WordpressList added in v0.1.1

func SetObjectDefaults_WordpressList(in *WordpressList)

func SetObjectDefaults_WordpressRuntime added in v0.1.1

func SetObjectDefaults_WordpressRuntime(in *WordpressRuntime)

func SetObjectDefaults_WordpressRuntimeList added in v0.1.1

func SetObjectDefaults_WordpressRuntimeList(in *WordpressRuntimeList)

Types

type Domain

type Domain string

Domain represents a valid domain name

type SecretRef

type SecretRef string

SecretRef represents a reference to a Secret

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

func (in *Wordpress) DeepCopy() *Wordpress

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

func (*Wordpress) DeepCopyInto

func (in *Wordpress) DeepCopyInto(out *Wordpress)

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

func (*Wordpress) DeepCopyObject

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

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

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.

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

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

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

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.

Jump to

Keyboard shortcuts

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