Skip to content

Commit 4dbb49f

Browse files
authored
Skip to inject the metrics-collector pods to the katib controller (#2203)
Signed-off-by: Yuki Iwai <[email protected]>
1 parent 7f0d922 commit 4dbb49f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

manifests/v1beta1/components/controller/controller.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ spec:
1515
metadata:
1616
labels:
1717
katib.kubeflow.org/component: controller
18+
katib.kubeflow.org/metrics-collector-injection: disabled
1819
annotations:
1920
prometheus.io/scrape: "true"
2021
prometheus.io/port: "8080"

manifests/v1beta1/components/webhook/webhooks.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ webhooks:
6363
namespaceSelector:
6464
matchLabels:
6565
katib.kubeflow.org/metrics-collector-injection: enabled
66+
# Once the AdmissionWebhookMatchConditions feature gate is enabled by default, we should switch to control based on userInfo.
67+
# REF:
68+
# - AdmissionWebhookMatchConditions: https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchconditions
69+
# - Tracking issue: https://github.com/kubeflow/katib/issues/2206
70+
objectSelector:
71+
matchExpressions:
72+
- key: katib.kubeflow.org/metrics-collector-injection
73+
operator: NotIn
74+
values:
75+
- disabled
6676
rules:
6777
- apiGroups:
6878
- ""

0 commit comments

Comments
 (0)