@@ -90,10 +90,10 @@ type OpenTelemetryCollectorSpec struct {
90
90
// +optional
91
91
TargetAllocator TargetAllocatorEmbedded `json:"targetAllocator,omitempty"`
92
92
// Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar)
93
- // +optional
93
+ // +kubebuilder:validation:Enum=ModeDeployment;ModeDaemonSet;ModeStatefulSet;ModeSidecar
94
94
Mode Mode `json:"mode,omitempty"`
95
95
// UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed
96
- // +optional
96
+ // +kubebuilder:validation:Enum=UpgradeStrategyAutomatic
97
97
UpgradeStrategy UpgradeStrategy `json:"upgradeStrategy"`
98
98
// Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details.
99
99
// The empty objects e.g. batch: should be written as batch: {} otherwise they won't work with kustomize or kubectl edit.
@@ -110,14 +110,17 @@ type OpenTelemetryCollectorSpec struct {
110
110
// functionality is only available if one of the valid modes is set.
111
111
// Valid modes are: deployment, daemonset and statefulset.
112
112
// +optional
113
+ // +kubebuilder:validation:Enum=ModeDeployment;ModeDaemonSet;ModeStatefulSet;
113
114
Ingress Ingress `json:"ingress,omitempty"`
114
115
// Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension of the collector.
115
116
// It is only effective when healthcheckextension is configured in the OpenTelemetry Collector pipeline.
116
117
// +optional
118
+ // +kubebuilder:validation:Required
117
119
LivenessProbe * Probe `json:"livenessProbe,omitempty"`
118
120
// Readiness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension of the collector.
119
121
// It is only effective when healthcheckextension is configured in the OpenTelemetry Collector pipeline.
120
122
// +optional
123
+ // +kubebuilder:validation:Required
121
124
ReadinessProbe * Probe `json:"readinessProbe,omitempty"`
122
125
123
126
// ObservabilitySpec defines how telemetry data gets handled.
@@ -135,11 +138,13 @@ type OpenTelemetryCollectorSpec struct {
135
138
// https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec
136
139
// This is only applicable to Daemonset mode.
137
140
// +optional
141
+ // +kubebuilder:validation:Enum=ModeDaemonset
138
142
DaemonSetUpdateStrategy appsv1.DaemonSetUpdateStrategy `json:"daemonSetUpdateStrategy,omitempty"`
139
143
// UpdateStrategy represents the strategy the operator will take replacing existing Deployment pods with new pods
140
144
// https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/deployment-v1/#DeploymentSpec
141
145
// This is only applicable to Deployment mode.
142
146
// +optional
147
+ // +kubebuilder:validation:Enum=ModeDeployment
143
148
DeploymentUpdateStrategy appsv1.DeploymentStrategy `json:"deploymentUpdateStrategy,omitempty"`
144
149
}
145
150
0 commit comments