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
- Variables
- func RegisterDefaults(scheme *runtime.Scheme) error
- type ConfigKind
- type ConfigRef
- type FilesRef
- type Nginx
- type NginxCacheSpec
- type NginxLifecycle
- type NginxLifecycleHandler
- type NginxList
- type NginxPodTemplateSpec
- type NginxService
- type NginxSpec
- type NginxStatus
- type PodStatus
- type ServiceStatus
- type TLSSecret
- type TLSSecretItem
Constants ¶
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 ¶
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 ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigRef.
func (*ConfigRef) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FilesRef.
func (*FilesRef) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Nginx.
func (*Nginx) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Nginx) DeepCopyObject ¶
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 NginxLifecycle ¶ added in v0.3.1
type NginxLifecycle struct { PostStart *NginxLifecycleHandler `json:"postStart,omitempty"` PreStop *NginxLifecycleHandler `json:"preStop,omitempty"` }
func (*NginxLifecycle) DeepCopy ¶ added in v0.3.2
func (in *NginxLifecycle) DeepCopy() *NginxLifecycle
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxLifecycle.
func (*NginxLifecycle) DeepCopyInto ¶ added in v0.3.2
func (in *NginxLifecycle) DeepCopyInto(out *NginxLifecycle)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NginxLifecycleHandler ¶ added in v0.3.1
type NginxLifecycleHandler struct {
Exec *corev1.ExecAction `json:"exec,omitempty"`
}
func (*NginxLifecycleHandler) DeepCopy ¶ added in v0.3.2
func (in *NginxLifecycleHandler) DeepCopy() *NginxLifecycleHandler
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxLifecycleHandler.
func (*NginxLifecycleHandler) DeepCopyInto ¶ added in v0.3.2
func (in *NginxLifecycleHandler) DeepCopyInto(out *NginxLifecycleHandler)
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxList.
func (*NginxList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NginxList) DeepCopyObject ¶
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"` // NodeSelector to be set on the nginx pod. // +optional NodeSelector map[string]string `json:"nodeSelector,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"` // Ports is the list of ports used by nginx. // +optional Ports []corev1.ContainerPort `json:"ports,omitempty"` // TerminationGracePeriodSeconds defines the max duration seconds which the // pod needs to terminate gracefully. Defaults to pod's // terminationGracePeriodSeconds default value. // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` // SecurityContext configures security attributes for the nginx pod. // +optional SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"` // Volumes that will attach to nginx instances // +optional Volumes []corev1.Volume `json:"volumes,omitempty"` // VolumeMounts will mount volume declared above in directories // +optional VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` // InitContainers are executed in order prior to containers being started // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ InitContainers []corev1.Container `json:"initContainers,omitempty"` }
func (*NginxPodTemplateSpec) DeepCopy ¶
func (in *NginxPodTemplateSpec) DeepCopy() *NginxPodTemplateSpec
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"` // ExternalTrafficPolicy defines whether external traffic will be routed to // node-local or cluster-wide endpoints. Defaults to the default Service // externalTrafficPolicy value. // +optional ExternalTrafficPolicy corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"` // UsePodSelector defines whether Service should automatically map the // endpoints using the pod's label selector. Defaults to true. // +optional UsePodSelector *bool `json:"usePodSelector,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"` // Lifecycle describes actions that should be executed when // some event happens to nginx container. // +optional Lifecycle *NginxLifecycle `json:"lifecycle,omitempty"` }
NginxSpec defines the desired state of Nginx
func (*NginxSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxSpec.
func (*NginxSpec) DeepCopyInto ¶
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"` // HostIP is the IP where POD is running HostIP string `json:"hostIP"` }
func (*PodStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodStatus.
func (*PodStatus) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSecret.
func (*TLSSecret) DeepCopyInto ¶
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.