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: api/kuik/v1alpha1/clusterreplicatedimageset_types.go
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,13 @@ import (
5
5
)
6
6
7
7
// ClusterReplicatedImageSetSpec defines the desired state of ClusterReplicatedImageSet.
8
+
// +kubebuilder:validation:XValidation:rule="!has(self.filter) || ((!has(self.filter.include) || self.filter.include.all(i, !has(i.image))) && (!has(self.filter.exclude) || self.filter.exclude.all(i, !has(i.image))))",message="spec.filter image items are not supported on ClusterReplicatedImageSet; image selection is per-upstream via spec.upstreams[].imageFilter"
8
9
typeClusterReplicatedImageSetSpecstruct {
9
10
ReplicatedImageSetBase`json:",inline"`
10
11
11
-
// Filter selects which pods, namespaces and images this resource applies
12
-
// to. It replaces the deprecated imageFilter.
12
+
// Filter selects which pods and namespaces this resource applies to (label,
13
+
// annotation and namespace dimensions). The image dimension is not supported
14
+
// here: image selection is per-upstream via spec.upstreams[].imageFilter.
Copy file name to clipboardExpand all lines: api/kuik/v1alpha1/replicatedimageset_types.go
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -20,11 +20,13 @@ type ReplicatedImageSetBase struct {
20
20
}
21
21
22
22
// ReplicatedImageSetSpec defines the desired state of ReplicatedImageSet.
23
+
// +kubebuilder:validation:XValidation:rule="!has(self.filter) || ((!has(self.filter.include) || self.filter.include.all(i, !has(i.image))) && (!has(self.filter.exclude) || self.filter.exclude.all(i, !has(i.image))))",message="spec.filter image items are not supported on ReplicatedImageSet; image selection is per-upstream via spec.upstreams[].imageFilter"
23
24
typeReplicatedImageSetSpecstruct {
24
25
ReplicatedImageSetBase`json:",inline"`
25
26
26
-
// Filter selects which pods and images this resource applies to. It
27
-
// replaces the deprecated imageFilter.
27
+
// Filter selects which pods this resource applies to (label and annotation
28
+
// dimensions). The image dimension is not supported here: image selection is
Copy file name to clipboardExpand all lines: website/src/content/docs/crds.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ This is particularly useful for multi-homed projects (e.g., Thanos, Prometheus,
25
25
| Field | Required | Description |
26
26
| --- | --- | --- |
27
27
|`spec.priority`|| Controls ordering of alternatives relative to the original image and other CRs. Negative values place alternatives before the original image; positive values place them after. Default is `0` (original image first). |
28
-
|`spec.filter`|| Selects which pods and namespaces (cluster-scoped only) this resource applies to. The `image` dimension is **not** supported here and is **ignored**: image selection is done per-upstream via `spec.upstreams[].imageFilter`. See [Resource filtering](/resource-filtering/). |
28
+
|`spec.filter`|| Selects which pods and namespaces (cluster-scoped only) this resource applies to. The `image` dimension is **not** supported here and an `image` item is **rejected at admission**: image selection is done per-upstream via `spec.upstreams[].imageFilter`. See [Resource filtering](/resource-filtering/). |
29
29
|`spec.upstreams[]`|| List of upstream image sources that should be considered equivalent. |
30
30
|`spec.upstreams[].registry`| ✅ | Registry where the upstream image is hosted (e.g. `docker.io`, `quay.io`). |
31
31
|`spec.upstreams[].path`| ✅ | Path identifying the image in the registry (e.g. `/thanosio/thanos`). |
Copy file name to clipboardExpand all lines: website/src/content/docs/resource-filtering.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ Items are grouped by dimension (all `image` items together, all `label` items to
39
39
This makes the filter a faithful superset of the per-dimension filters it replaces: a resource applies to an `(pod, image)` pair when the image passes the image dimension, the namespace passes the namespace dimension, and the pod passes the label and annotation dimensions.
40
40
41
41
:::note
42
-
`(Cluster)ReplicatedImageSet` is the exception: it ignores the `image` dimension of `spec.filter` and selects images per-upstream instead. See [Per-upstream image filtering](#per-upstream-image-filtering-on-clusterreplicatedimageset).
42
+
`(Cluster)ReplicatedImageSet` is the exception: it has no `image` dimension in `spec.filter` (an `image` item is rejected at admission) and selects images per-upstream instead. See [Per-upstream image filtering](#per-upstream-image-filtering-on-clusterreplicatedimageset).
43
43
:::
44
44
45
45
:::caution
@@ -71,7 +71,7 @@ The operator also exposes a cluster-wide skip list (`skipLabels` / `skipAnnotati
71
71
72
72
`(Cluster)ReplicatedImageSet`selects images **per upstream** via `spec.upstreams[].imageFilter`, which chooses the images each upstream entry replicates. That field is unrelated to the deprecated top-level `imageFilter` below and is **not** affected by its deprecation.
73
73
74
-
Because image selection is per-upstream, the **`image` dimension of the top-level `spec.filter` is not supported and is ignored** on `(Cluster)ReplicatedImageSet`: any `image` `include` / `exclude` items there have no effect. Only the `label`, `annotation` and (cluster-scoped) `namespace` dimensions of `spec.filter` apply, as a resource-wide pod / namespace gate.
74
+
Because image selection is per-upstream, the **`image` dimension of the top-level `spec.filter` is not supported** on `(Cluster)ReplicatedImageSet`: an `image` `include` / `exclude` item is rejected at admission. Only the `label`, `annotation` and (cluster-scoped) `namespace` dimensions of `spec.filter` apply, as a resource-wide pod / namespace gate.
0 commit comments