v1alpha1

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the nginx v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=nginx.tsuru.io

Package v1alpha1 contains API Schema definitions for the nginx v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=nginx.tsuru.io

Index

Constants

View Source
const (
	// ConfigKindConfigMap is a Kind of configuration that points to a configmap
	ConfigKindConfigMap = ConfigKind("ConfigMap")
	// ConfigKindInline is a kinda of configuration that is setup as a annotation on the Pod
	// and is inject as a file on the container using the Downward API.
	ConfigKindInline = ConfigKind("Inline")
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "nginx.tsuru.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)

Functions

func RegisterDefaults

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 ConfigKind

type ConfigKind string

type ConfigRef

type ConfigRef struct {
	// Name of the config object. Required when Kind is ConfigKindConfigMap.
	// +optional
	Name string `json:"name,omitempty"`
	// Kind of the config object. Defaults to ConfigKindConfigMap.
	// +optional
	Kind ConfigKind `json:"kind,omitempty"`
	// Value is a inline configuration content. Required when Kind is ConfigKindInline.
	// +optional
	Value string `json:"value,omitempty"`
}

ConfigRef is a reference to a config object.

func (*ConfigRef) DeepCopy

func (in *ConfigRef) DeepCopy() *ConfigRef

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

func (*ConfigRef) DeepCopyInto

func (in *ConfigRef) DeepCopyInto(out *ConfigRef)

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

type FilesRef

type FilesRef struct {
	// Name points to a ConfigMap resource (in the same namespace) which holds
	// the files.
	Name string `json:"name"`
	// Files maps each key entry from the ConfigMap to its relative location on
	// the nginx filesystem.
	// +optional
	Files map[string]string `json:"files,omitempty"`
}

FilesRef is a reference to arbitrary files stored into a ConfigMap in the cluster.

func (*FilesRef) DeepCopy

func (in *FilesRef) DeepCopy() *FilesRef

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

func (*FilesRef) DeepCopyInto

func (in *FilesRef) DeepCopyInto(out *FilesRef)

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

type Nginx

type Nginx struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   NginxSpec   `json:"spec,omitempty"`
	Status NginxStatus `json:"status,omitempty"`
}

Nginx is the Schema for the nginxes API +kubebuilder:subresource:status +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.currentReplicas,selectorpath=.status.podSelector +k8s:openapi-gen=false

func (*Nginx) DeepCopy

func (in *Nginx) DeepCopy() *Nginx

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

func (*Nginx) DeepCopyInto

func (in *Nginx) DeepCopyInto(out *Nginx)

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

func (*Nginx) DeepCopyObject

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

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

type NginxCacheSpec

type NginxCacheSpec struct {
	// InMemory if set to true creates a memory backed volume.
	InMemory bool `json:"inMemory,omitempty"`
	// Path is the mount path for the cache volume.
	Path string `json:"path"`
	// Size is the maximum size allowed for the cache volume.
	// +optional
	Size *resource.Quantity `json:"size,omitempty"`
}

func (*NginxCacheSpec) DeepCopy

func (in *NginxCacheSpec) DeepCopy() *NginxCacheSpec

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

func (*NginxCacheSpec) DeepCopyInto

func (in *NginxCacheSpec) DeepCopyInto(out *NginxCacheSpec)

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

type NginxList

type NginxList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Nginx `json:"items"`
}

NginxList contains a list of Nginx

func (*NginxList) DeepCopy

func (in *NginxList) DeepCopy() *NginxList

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

func (*NginxList) DeepCopyInto

func (in *NginxList) DeepCopyInto(out *NginxList)

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

func (*NginxList) DeepCopyObject

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

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

type NginxPodTemplateSpec

type NginxPodTemplateSpec struct {
	// Affinity to be set on the nginx pod.
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
	// Annotations are custom annotations to be set into Pod.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// Labels are custom labels to be added into Pod.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
	// HostNetwork enabled causes the pod to use the host's network namespace.
	// +optional
	HostNetwork bool `json:"hostNetwork,omitempty"`
}

func (*NginxPodTemplateSpec) DeepCopy

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

func (*NginxPodTemplateSpec) DeepCopyInto

func (in *NginxPodTemplateSpec) DeepCopyInto(out *NginxPodTemplateSpec)

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

type NginxService

type NginxService struct {
	// Type is the type of the service. Defaults to the default service type value.
	// +optional
	Type corev1.ServiceType `json:"type,omitempty"`
	// LoadBalancerIP is an optional load balancer IP for the service.
	// +optional
	LoadBalancerIP string `json:"loadBalancerIP,omitempty"`
	// Labels are extra labels for the service.
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations are extra annotations for the service.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
}

func (*NginxService) DeepCopy

func (in *NginxService) DeepCopy() *NginxService

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

func (*NginxService) DeepCopyInto

func (in *NginxService) DeepCopyInto(out *NginxService)

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

type NginxSpec

type NginxSpec struct {
	// Replicas is the number of desired pods. Defaults to the default deployment
	// replicas value.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
	// Image is the container image name. Defaults to "nginx:latest".
	// +optional
	Image string `json:"image,omitempty"`
	// Config is a reference to the NGINX config object which stores the NGINX
	// configuration file. When provided the file is mounted in NGINX container on
	// "/etc/nginx/nginx.conf".
	// +optional
	Config *ConfigRef `json:"config,omitempty"`
	// Certificates refers to a Secret containing one or more certificate-key
	// pairs.
	// +optional
	Certificates *TLSSecret `json:"certificates,omitempty"`
	// Template used to configure the nginx pod.
	// +optional
	PodTemplate NginxPodTemplateSpec `json:"podTemplate,omitempty"`
	// Service to expose the nginx pod
	// +optional
	Service *NginxService `json:"service,omitempty"`
	// ExtraFiles references to additional files into a object in the cluster.
	// These additional files will be mounted on `/etc/nginx/extra_files`.
	// +optional
	ExtraFiles *FilesRef `json:"extraFiles,omitempty"`
	// HealthcheckPath defines the endpoint used to check whether instance is
	// working or not.
	// +optional
	HealthcheckPath string `json:"healthcheckPath,omitempty"`
	// Resources requirements to be set on the NGINX container.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// Cache allows configuring a cache volume for nginx to use.
	// +optional
	Cache NginxCacheSpec `json:"cache,omitempty"`
	// SecurityContext configures security attributes for the nginx container.
	// +optional
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
}

NginxSpec defines the desired state of Nginx

func (*NginxSpec) DeepCopy

func (in *NginxSpec) DeepCopy() *NginxSpec

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

func (*NginxSpec) DeepCopyInto

func (in *NginxSpec) DeepCopyInto(out *NginxSpec)

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

type NginxStatus

type NginxStatus struct {
	// CurrentReplicas is the last observed number from the NGINX object.
	CurrentReplicas int32 `json:"currentReplicas,omitempty"`
	// PodSelector is the NGINX's pod label selector.
	PodSelector string          `json:"podSelector,omitempty"`
	Pods        []PodStatus     `json:"pods,omitempty"`
	Services    []ServiceStatus `json:"services,omitempty"`
}

NginxStatus defines the observed state of Nginx

func (*NginxStatus) DeepCopy

func (in *NginxStatus) DeepCopy() *NginxStatus

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

func (*NginxStatus) DeepCopyInto

func (in *NginxStatus) DeepCopyInto(out *NginxStatus)

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

type PodStatus

type PodStatus struct {
	// Name is the name of the POD running nginx
	Name string `json:"name"`
	// PodIP is the IP if the POD
	PodIP string `json:"podIP"`
}

func (*PodStatus) DeepCopy

func (in *PodStatus) DeepCopy() *PodStatus

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

func (*PodStatus) DeepCopyInto

func (in *PodStatus) DeepCopyInto(out *PodStatus)

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

type ServiceStatus

type ServiceStatus struct {
	// Name is the name of the Service created by nginx
	Name string `json:"name"`
}

func (*ServiceStatus) DeepCopy

func (in *ServiceStatus) DeepCopy() *ServiceStatus

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

func (*ServiceStatus) DeepCopyInto

func (in *ServiceStatus) DeepCopyInto(out *ServiceStatus)

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

type TLSSecret

type TLSSecret struct {
	// SecretName refers to the Secret holding the certificates and keys pairs.
	SecretName string `json:"secretName"`
	// Items maps the key and path where the certificate-key pairs should be
	// mounted on nginx container.
	Items []TLSSecretItem `json:"items"`
}

TLSSecret is a reference to TLS certificate and key pairs stored in a Secret.

func (*TLSSecret) DeepCopy

func (in *TLSSecret) DeepCopy() *TLSSecret

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

func (*TLSSecret) DeepCopyInto

func (in *TLSSecret) DeepCopyInto(out *TLSSecret)

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

type TLSSecretItem

type TLSSecretItem struct {
	// CertificateField is the field name that contains the certificate.
	CertificateField string `json:"certificateField"`
	// CertificatePath holds the path where the certificate should be stored
	// inside the nginx container. Defaults to same as CertificatedField.
	// +optional
	CertificatePath string `json:"certificatePath,omitempty"`
	// KeyField is the field name that contains the key.
	KeyField string `json:"keyField"`
	// KeyPath holds the path where the key should be store inside the nginx
	// container. Defaults to same as KeyField.
	// +optional
	KeyPath string `json:"keyPath,omitempty"`
}

TLSSecretItem maps each certificate and key pair against a key-value data from a Secret object.

func (*TLSSecretItem) DeepCopy

func (in *TLSSecretItem) DeepCopy() *TLSSecretItem

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

func (*TLSSecretItem) DeepCopyInto

func (in *TLSSecretItem) DeepCopyInto(out *TLSSecretItem)

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