Skip to content

Commit

Permalink
Fix katib repo for the docker registry which doesn't support sub name…
Browse files Browse the repository at this point in the history
…space (kubeflow#2237)
  • Loading branch information
cheyang authored and k8s-ci-robot committed Jan 8, 2019
1 parent 84dc97a commit 51a3a81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/kfctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ createEnv() {
echo KUBEFLOW_VERSION=${KUBEFLOW_VERSION:-"master"} >> ${ENV_FILE}
echo KUBEFLOW_KS_DIR=${KUBEFLOW_KS_DIR:-"$(pwd)/ks_app"} >> ${ENV_FILE}
echo KUBEFLOW_DOCKER_REGISTRY=${KUBEFLOW_DOCKER_REGISTRY:-""} >> ${ENV_FILE}
echo DOCKER_REGISTRY_KATIB_NAMESPACE=${DOCKER_REGISTRY_KATIB_NAMESPACE:-""} >> ${ENV_FILE}

# Namespace where kubeflow is deployed
echo K8S_NAMESPACE=${K8S_NAMESPACE:-"kubeflow"} >> ${ENV_FILE}
Expand All @@ -56,6 +57,7 @@ createEnv() {
ack)
echo KUBEFLOW_PLATFORM=ack >> ${ENV_FILE}
echo KUBEFLOW_DOCKER_REGISTRY=registry.aliyuncs.com >> ${ENV_FILE}
echo DOCKER_REGISTRY_KATIB_NAMESPACE=katib >> ${ENV_FILE}
;;
gcp)
echo KUBEFLOW_PLATFORM=gke >> ${ENV_FILE}
Expand Down
6 changes: 6 additions & 0 deletions scripts/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,10 @@ customizeKsAppWithDockerImage() {
find ${KUBEFLOW_KS_DIR} -name "*.libsonnet" -o -name "*.jsonnet" | xargs sed -i -e "s%gcr.io%$KUBEFLOW_DOCKER_REGISTRY%g"
find ${KUBEFLOW_KS_DIR} -name "*.libsonnet" -o -name "*.jsonnet" | xargs sed -i -e "s%quay.io%$KUBEFLOW_DOCKER_REGISTRY%g"
fi

# The katib images like gcr.io/kubeflow-images-public/katib/tfevent-metrics-collector:v0.4.0 uses sub namespace kubeflow-images-public/katib in
# gcr.io repo, but it's not supported by other docker image repo. We need to consider how to support it in other docker repos.
if [[ ! -z "$DOCKER_REGISTRY_KATIB_NAMESPACE" ]]; then
find ${KUBEFLOW_KS_DIR} -name "*.libsonnet" -o -name "*.jsonnet" | xargs sed -i -e "s%kubeflow-images-public/katib%$DOCKER_REGISTRY_KATIB_NAMESPACE%g"
fi
}

0 comments on commit 51a3a81

Please sign in to comment.