@@ -386,80 +386,19 @@ type KubernetesSpec struct {
386386 //
387387 // +optional
388388 Service * ServiceSpec `json:"service,omitempty"`
389-
390- // ReadinessProbe is the configuration for the NGINX Readiness probe.
391- //
392- // +optional
393- ReadinessProbe * ReadinessProbeSpec `json:"readinessProbe,omitempty"`
394- }
395-
396- // ReadinessProbeSpec defines the configuration for the NGINX readiness probe.
397- type ReadinessProbeSpec struct {
398- // Port is the port on which the readiness endpoint is exposed.
399- // If not specified, the default port is 8081.
400- //
401- // +optional
402- // +kubebuilder:default:=8081
403- // +kubebuilder:validation:Minimum=1
404- // +kubebuilder:validation:Maximum=65535
405- Port * int32 `json:"port,omitempty"`
406-
407- // InitialDelaySeconds is the number of seconds after the container has
408- // started before the readiness probe is initiated.
409- // If not specified, the default is 3 seconds.
410- // +optional
411- // +kubebuilder:default:=3
412- // +kubebuilder:validation:Minimum=0
413- // +kubebuilder:validation:Maximum=3600
414- InitialDelaySeconds * int32 `json:"initialDelaySeconds,omitempty"`
415-
416- // PeriodSeconds is the number of seconds between consecutive readiness probes.
417- // If not specified, the default is 10 seconds.
418- // +optional
419- // +kubebuilder:default:=10
420- // +kubebuilder:validation:Minimum=1
421- // +kubebuilder:validation:Maximum=3600
422- PeriodSeconds * int32 `json:"periodSeconds,omitempty"`
423-
424- // TimeoutSeconds is the number of seconds after which the readiness probe times out.
425- // If not specified, the default is 1 second.
426- //
427- // +optional
428- // +kubebuilder:default:=1
429- // +kubebuilder:validation:Minimum=1
430- // +kubebuilder:validation:Maximum=3600
431- TimeoutSeconds * int32 `json:"timeoutSeconds,omitempty"`
432389}
433390
434391// Deployment is the configuration for the NGINX Deployment.
435392type DeploymentSpec struct {
436- // Number of desired Pods.
437- //
438- // +optional
439- Replicas * int32 `json:"replicas,omitempty"`
440-
441- // Pod defines Pod-specific fields.
442- //
443- // +optional
444- Pod PodSpec `json:"pod"`
445-
446- // Container defines container fields for the NGINX container.
447- //
448- // +optional
449393 Container ContainerSpec `json:"container"`
394+ Replicas * int32 `json:"replicas,omitempty"`
395+ Pod PodSpec `json:"pod"`
450396}
451397
452398// DaemonSet is the configuration for the NGINX DaemonSet.
453399type DaemonSetSpec struct {
454- // Pod defines Pod-specific fields.
455- //
456- // +optional
457- Pod PodSpec `json:"pod"`
458-
459- // Container defines container fields for the NGINX container.
460- //
461- // +optional
462400 Container ContainerSpec `json:"container"`
401+ Pod PodSpec `json:"pod"`
463402}
464403
465404// PodSpec defines Pod-specific fields.
@@ -507,37 +446,30 @@ type PodSpec struct {
507446
508447// ContainerSpec defines container fields for the NGINX container.
509448type ContainerSpec struct {
510- // Debug enables debugging for NGINX by using the nginx-debug binary.
511- //
512- // +optional
513- Debug * bool `json:"debug,omitempty"`
514-
515- // Image is the NGINX image to use.
516- //
517- // +optional
518- Image * Image `json:"image,omitempty"`
519-
520- // Resources describes the compute resource requirements.
521- //
522- // +optional
523- Resources * corev1.ResourceRequirements `json:"resources,omitempty"`
524-
525- // Lifecycle describes actions that the management system should take in response to container lifecycle
526- // events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
527- // until the action is complete, unless the container process fails, in which case the handler is aborted.
528- //
529- // +optional
530- Lifecycle * corev1.Lifecycle `json:"lifecycle,omitempty"`
449+ Debug * bool `json:"debug,omitempty"`
450+ Image * Image `json:"image,omitempty"`
451+ Resources * corev1.ResourceRequirements `json:"resources,omitempty"`
452+ Lifecycle * corev1.Lifecycle `json:"lifecycle,omitempty"`
453+ ReadinessProbe * ReadinessProbeSpec `json:"readinessProbe,omitempty"`
454+ HostPorts []HostPort `json:"hostPorts,omitempty"`
455+ VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
456+ }
531457
532- // HostPorts are the list of ports to expose on the host.
458+ // ReadinessProbeSpec defines the configuration for the NGINX readiness probe.
459+ type ReadinessProbeSpec struct {
460+ // Port is the port on which the readiness endpoint is exposed.
461+ // If not specified, the default port is 8081.
533462 //
534463 // +optional
535- HostPorts []HostPort `json:"hostPorts,omitempty"`
464+ // +kubebuilder:default:=8081
465+ // +kubebuilder:validation:Minimum=1
466+ // +kubebuilder:validation:Maximum=65535
467+ Port * int32 `json:"port,omitempty"`
536468
537- // VolumeMounts describe the mounting of Volumes within a container .
469+ // Probe describes the Kubernetes Probe configuration .
538470 //
539471 // +optional
540- VolumeMounts [] corev1.VolumeMount `json:"volumeMounts,omitempty "`
472+ * corev1.Probe `json:",inline "`
541473}
542474
543475// Image is the NGINX image to use.
0 commit comments