v1alpha1

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: Apache-2.0 Imports: 5 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.

Types

type CodeVolumeSpec added in v0.2.0

type CodeVolumeSpec struct {
	// ReadOnly specifies if the volume should be mounted read-only inside the
	// wordpress runtime container
	ReadOnly bool
	// MountPath spechfies where should the code volume be mounted.
	// Defaults to /var/www/site/web/wp-content
	// +optional
	MountPath string `json:"mountPath,omitempty"`
	// ContentSubPath specifies where within the code volumes, the wp-content
	// folder resides.
	// Defaults to wp-content/
	// +optional
	ContentSubPath string `json:"contentSubPath,omitempty"`
	// GitDir specifies the git repo to use for code cloning. It has the highest
	// level of precedence over EmptyDir, HostPath and PersistentVolumeClaim
	// +optional
	GitDir *GitVolumeSource `json:"git,omitempty"`
	// PersistentVolumeClaim to use if no GitDir is specified
	// +optional
	PersistentVolumeClaim *corev1.PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"`
	// HostPath to use if no PersistentVolumeClaim is specified
	// +optional
	HostPath *corev1.HostPathVolumeSource `json:"hostPath,omitempty"`
	// EmptyDir to use if no HostPath is specified
	// +optional
	EmptyDir *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"`
}

CodeVolumeSpec is the desired spec for mounting code into the wordpress runtime container

func (*CodeVolumeSpec) DeepCopy added in v0.2.0

func (in *CodeVolumeSpec) DeepCopy() *CodeVolumeSpec

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

func (*CodeVolumeSpec) DeepCopyInto added in v0.2.0

func (in *CodeVolumeSpec) DeepCopyInto(out *CodeVolumeSpec)

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

type Domain

type Domain string

Domain represents a valid domain name

type GCSVolumeSource added in v0.2.0

type GCSVolumeSource struct {
	// Bucket for storing media files
	// +kubebuilder:validation:MinLength=1
	Bucket string `json:"bucket"`
	// PathPrefix is the prefix for media files in bucket
	PathPrefix string `json:"prefix,omitempty"`
	// Env variables for accessing gcs bucket. Taken into account are:
	// GOOGLE_APPLICATION_CREDENTIALS_JSON
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
}

GCSVolumeSource is the desired spec for accessing media files using google cloud storage object store

func (*GCSVolumeSource) DeepCopy added in v0.2.0

func (in *GCSVolumeSource) DeepCopy() *GCSVolumeSource

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

func (*GCSVolumeSource) DeepCopyInto added in v0.2.0

func (in *GCSVolumeSource) DeepCopyInto(out *GCSVolumeSource)

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

type GitVolumeSource added in v0.2.0

type GitVolumeSource struct {
	// Repository is the git repository for the code
	Repository string `json:"repository"`
	// GitRef to clone (can be a branch name, but it should point to a tag or a
	// commit hash)
	// +optional
	GitRef string `json:"reference,omitempty"`
	// Env defines env variables  which get passed to the git clone container
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
	// EnvFrom defines envFrom which get passed to the git clone container
	// +optional
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
	// EmptyDir volume to use for git cloning.
	// +optional
	EmptyDir *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"`
}

GitVolumeSource is the desired spec for git code source

func (*GitVolumeSource) DeepCopy added in v0.2.0

func (in *GitVolumeSource) DeepCopy() *GitVolumeSource

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

func (*GitVolumeSource) DeepCopyInto added in v0.2.0

func (in *GitVolumeSource) DeepCopyInto(out *GitVolumeSource)

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

type MediaVolumeSpec added in v0.2.0

type MediaVolumeSpec struct {
	// ReadOnly specifies if the volume should be mounted read-only inside the
	// wordpress runtime container
	ReadOnly bool
	// S3VolumeSource specifies the S3 object storage configuration for media
	// files. It has the highest level of precedence over EmptyDir, HostPath
	// and PersistentVolumeClaim
	// +optional
	S3VolumeSource *S3VolumeSource `json:"s3,omitempty"`
	// GCSVolumeSource specifies the google cloud storage object storage
	// configuration for media files. It has the highest level of precedence
	// over EmptyDir, HostPath and PersistentVolumeClaim
	// +optional
	GCSVolumeSource *GCSVolumeSource `json:"gcs,omitempty"`
	// PersistentVolumeClaim to use if no S3VolumeSource or GCSVolumeSource are
	// specified
	// +optional
	PersistentVolumeClaim *corev1.PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"`
	// HostPath to use if no PersistentVolumeClaim is specified
	// +optional
	HostPath *corev1.HostPathVolumeSource `json:"hostPath,omitempty"`
	// EmptyDir to use if no HostPath is specified
	// +optional
	EmptyDir *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"`
}

MediaVolumeSpec is the desired spec for mounting code into the wordpress runtime container

func (*MediaVolumeSpec) DeepCopy added in v0.2.0

func (in *MediaVolumeSpec) DeepCopy() *MediaVolumeSpec

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

func (*MediaVolumeSpec) DeepCopyInto added in v0.2.0

func (in *MediaVolumeSpec) DeepCopyInto(out *MediaVolumeSpec)

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

type S3VolumeSource added in v0.2.0

type S3VolumeSource struct {
	// Bucket for storing media files
	// +kubebuilder:validation:MinLength=1
	Bucket string `json:"bucket"`
	// PathPrefix is the prefix for media files in bucket
	PathPrefix string `json:"prefix,omitempty"`
	// Env variables for accessing S3 bucket. Taken into account are:
	// ACCESS_KEY, SECRET_ACCESS_KEY
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
}

S3VolumeSource is the desired spec for accessing media files over S3 compatible object store

func (*S3VolumeSource) DeepCopy added in v0.2.0

func (in *S3VolumeSource) DeepCopy() *S3VolumeSource

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

func (*S3VolumeSource) DeepCopyInto added in v0.2.0

func (in *S3VolumeSource) DeepCopyInto(out *S3VolumeSource)

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

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 +kubebuilder:subresource:status +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas

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 WordpressSpec

type WordpressSpec struct {
	// 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"`
	// 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"`
	// WordPress runtime image to use. Defaults to quay.io/presslabs/wordpress-runtime
	// +optional
	Image string `json:"image,omitempty"`
	// Image tag to use. Defaults to latest
	// +optional
	Tag string `json:"tag,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"`
	// TLSSecretRef a secret containing the TLS certificates for this site.
	// +optional
	TLSSecretRef SecretRef `json:"tlsSecretRef,omitempty"`
	// CodeVolumeSpec specifies how the site's code gets mounted into the
	// container. If not specified, a code volume won't get mounted at all.
	// +optional
	CodeVolumeSpec *CodeVolumeSpec `json:"code,omitempty"`
	// MediaVolumeSpec specifies how media files get mounted into the runtime
	// container. If not specified, a media volume won't be mounted at all.
	// +optional
	MediaVolumeSpec *MediaVolumeSpec `json:"media,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
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
	// Env defines environment variables which get passed into web and cli pods
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
	// EnvFrom defines envFrom's which get passed into web and cli containers
	// +optional
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
	// If specified, the resources required by wordpress container.
	// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// If specified, Pod node selector
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// If specified, the pod's tolerations.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// If specified, the pod's scheduling constraints
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
	// If specified, indicates the pod's priority class
	// +optional
	PriorityClassName string `json:"priorityClassName,omitempty"`
	// IngressAnnotations for this Wordpress site
	// +optional
	IngressAnnotations map[string]string `json:"ingressAnnotations,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 {
	// Total number of non-terminated pods targeted by web deployment
	// This is copied over from the deployment object
	// +optional
	Replicas int32 `json:"replicas,omitempty"`
}

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.

Jump to

Keyboard shortcuts

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