You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: kubernetes/operator/api/v1alpha1/openrag_types.go
+28-14Lines changed: 28 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -47,46 +47,60 @@ type ComponentSpec struct {
47
47
// Labels are custom labels to add to the Deployment/StatefulSet object metadata.
48
48
// These labels appear on the workload resource itself, not the pods.
49
49
// Useful for querying and grouping Deployment/StatefulSet objects.
50
-
// Label keys must be valid Kubernetes label keys: optional prefix (DNS subdomain) + name.
51
-
// Label values must be 63 characters or less, alphanumeric with '-', '_', '.'.
52
50
// +optional
53
51
// +kubebuilder:validation:MaxProperties=64
54
-
// +kubebuilder:validation:XValidation:rule="self.all(key, size(key) <= 253 && (key.contains('/') ? key.split('/')[0].matches('^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$') && key.split('/')[1].matches('^([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$') : key.matches('^([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$')))",message="label keys must be valid Kubernetes label keys (prefix/name or name)"
55
-
// +kubebuilder:validation:XValidation:rule="self.all(key, size(self[key]) <= 63 && self[key].matches('^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$'))",message="label values must be 63 characters or less and match regex ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$"
56
52
Labelsmap[string]string`json:"labels,omitempty"`
57
53
58
54
// Annotations are custom annotations to add to the Deployment/StatefulSet object metadata.
59
55
// These annotations appear on the workload resource itself, not the pods.
60
56
// Useful for GitOps metadata, deployment tracking, and automation tools.
61
-
// Annotation keys must be valid Kubernetes annotation keys: optional prefix (DNS subdomain) + name.
62
-
// Annotation values can be arbitrary strings.
63
57
// +optional
64
58
// +kubebuilder:validation:MaxProperties=64
65
-
// +kubebuilder:validation:XValidation:rule="self.all(key, size(key) <= 253 && (key.contains('/') ? key.split('/')[0].matches('^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$') && key.split('/')[1].matches('^([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$') : key.matches('^([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$')))",message="annotation keys must be valid Kubernetes annotation keys (prefix/name or name)"
// PodLabels are custom labels to add to the pod template.
69
62
// These labels appear on the actual pods created by the Deployment/StatefulSet.
70
63
// Useful for pod selectors, monitoring queries, network policies, and service mesh.
71
64
// Merged with operator-managed labels (app.kubernetes.io/*).
72
65
// Cannot override operator-managed labels.
73
-
// Label keys must be valid Kubernetes label keys: optional prefix (DNS subdomain) + name.
74
-
// Label values must be 63 characters or less, alphanumeric with '-', '_', '.'.
75
66
// +optional
76
67
// +kubebuilder:validation:MaxProperties=64
77
-
// +kubebuilder:validation:XValidation:rule="self.all(key, size(key) <= 253 && (key.contains('/') ? key.split('/')[0].matches('^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$') && key.split('/')[1].matches('^([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$') : key.matches('^([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$')))",message="label keys must be valid Kubernetes label keys (prefix/name or name)"
78
-
// +kubebuilder:validation:XValidation:rule="self.all(key, size(self[key]) <= 63 && self[key].matches('^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$'))",message="label values must be 63 characters or less and match regex ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$"
0 commit comments