forked from kubeflow/pipelines
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(backend): Caching - Only send cache-enabled pods to the caching w…
…ebhook (kubeflow#4429) * Backend - Caching - Only send cache-enabled pods to the caching webhook The caching webhook already checks whether the pod is cache-enabled, but this change makes the check happen sooner - even before calling the webhook. This way the webhook cannot possibly affect any non-KFP pods. This feature requires API v1 and Kubernetes v1.15, so we use it conditionally. * Support filtering on Kubernetes v1.15 as well
- Loading branch information
Showing
4 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
backend/src/cache/deployer/cache-webhook-config.v1.yaml.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
name: cache-webhook-${NAMESPACE} | ||
webhooks: | ||
- name: cache-server.${NAMESPACE}.svc | ||
clientConfig: | ||
service: | ||
name: cache-server | ||
namespace: ${NAMESPACE} | ||
path: "/mutate" | ||
caBundle: ${CA_BUNDLE} | ||
rules: | ||
- operations: [ "CREATE" ] | ||
apiGroups: [""] | ||
apiVersions: ["v1"] | ||
resources: ["pods"] | ||
timeoutSeconds: 5 | ||
objectSelector: | ||
matchLabels: | ||
pipelines.kubeflow.org/cache_enabled: "true" | ||
|
22 changes: 22 additions & 0 deletions
22
backend/src/cache/deployer/cache-webhook-config.v1beta1.v1.15.yaml.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: admissionregistration.k8s.io/v1beta1 | ||
kind: MutatingWebhookConfiguration | ||
metadata: | ||
name: cache-webhook-${NAMESPACE} | ||
webhooks: | ||
- name: cache-server.${NAMESPACE}.svc | ||
clientConfig: | ||
service: | ||
name: cache-server | ||
namespace: ${NAMESPACE} | ||
path: "/mutate" | ||
caBundle: ${CA_BUNDLE} | ||
rules: | ||
- operations: [ "CREATE" ] | ||
apiGroups: [""] | ||
apiVersions: ["v1"] | ||
resources: ["pods"] | ||
timeoutSeconds: 5 | ||
objectSelector: | ||
matchLabels: | ||
pipelines.kubeflow.org/cache_enabled: "true" | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters