Skip to content

Commit

Permalink
fix(backend): Cache Deployer - Fixed grep call (#4568)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark-kun authored Sep 30, 2020
1 parent aed37c7 commit 24217ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/src/cache/deployer/deploy-cache-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

set -ex

# Warning: grep in this image does not support long option names like --word-regexp

echo "Start deploying cache service to existing cluster:"

NAMESPACE=${NAMESPACE_TO_WATCH:-kubeflow}
Expand Down Expand Up @@ -72,7 +74,7 @@ echo "Signed certificate generated for cache server"
# Kubernetes v1.15+ supports better filtering, but it's not trivial to detect since the API version was only bumped to v1 in v1.16.
# Kubernetes has broken it's versioning policy here. https://github.com/kubernetes/kubernetes/pull/78505#commitcomment-41870735
# We still want to support filtering on v1.15, so we need to detect it.
if kubectl api-versions | grep --word-regexp 'admissionregistration.k8s.io/v1'; then
if kubectl api-versions | grep -w 'admissionregistration.k8s.io/v1'; then
cache_webhook_config_template="cache-webhook-config.v1.yaml.template"
elif kubectl version | grep 'Server Version: version.Info{Major:"1", Minor:"15'; then
cache_webhook_config_template="cache-webhook-config.v1beta1.v1.15.yaml.template"
Expand Down

0 comments on commit 24217ff

Please sign in to comment.