Skip to content

Commit

Permalink
Fix issue of invalid ClusterRoleBinding in developer mode (kubeflow#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
fenglixa authored and k8s-ci-robot committed Dec 6, 2019
1 parent 5071b2f commit 6b1026f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ deploy: manifests

deploy-dev: manifests
./hack/image_patch_dev.sh development
./hack/update-clusterrolebinding.sh config/overlays/development
kustomize build config/overlays/development | kubectl apply -f -

deploy-local: manifests
Expand Down
34 changes: 34 additions & 0 deletions hack/update-clusterrolebinding.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# Copyright 2019 The Kubeflow Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Usage: update-clusterrolebinding.sh [CONFIG_DIR]

CONFIG_DIR=$1

set -o errexit
set -o nounset
set -o pipefail

TMPFILE="/tmp/tmp_$$"

if [ ! -d "${TMPFILE}" ]
then
mkdir ${TMPFILE}
fi

kustomize build ${CONFIG_DIR} -o ${TMPFILE}
for i in ${TMPFILE}/rbac.authorization.k8s.io*clusterrolebinding*.yaml; do kubectl auth reconcile -f $i; done
rm -rf ${TMPFILE}

0 comments on commit 6b1026f

Please sign in to comment.