Skip to content

Commit

Permalink
Skip to inject the metrics-collector pods to the katib controller (#2203
Browse files Browse the repository at this point in the history
)

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
  • Loading branch information
tenzen-y committed Aug 16, 2023
1 parent bc5add9 commit 32e45a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifests/v1beta1/components/controller/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spec:
metadata:
labels:
katib.kubeflow.org/component: controller
katib.kubeflow.org/metrics-collector-injection: disabled
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
Expand Down
10 changes: 10 additions & 0 deletions manifests/v1beta1/components/webhook/webhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ webhooks:
namespaceSelector:
matchLabels:
katib.kubeflow.org/metrics-collector-injection: enabled
# Once the AdmissionWebhookMatchConditions feature gate is enabled by default, we should switch to control based on userInfo.
# REF:
# - AdmissionWebhookMatchConditions: https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchconditions
# - Tracking issue: https://github.com/kubeflow/katib/issues/2206
objectSelector:
matchExpressions:
- key: katib.kubeflow.org/metrics-collector-injection
operator: NotIn
values:
- disabled
rules:
- apiGroups:
- ""
Expand Down

0 comments on commit 32e45a9

Please sign in to comment.