Unify image registry value in kubemark setup scripts

pull/6/head
Shyam Jeedigunta 2018-02-08 14:30:16 +01:00
parent b922ffc491
commit f3cc62d870
No known key found for this signature in database
GPG Key ID: 745AA51D657EAD2C
3 changed files with 4 additions and 13 deletions

View File

@ -17,4 +17,5 @@
CLOUD_PROVIDER="${CLOUD_PROVIDER:-gce}"
CONTAINER_REGISTRY="${CONTAINER_REGISTRY:-gcr.io}"
PROJECT="${PROJECT:-}"
FULL_REGISTRY="${CONTAINER_REGISTRY}/${PROJECT}"
KUBEMARK_IMAGE_MAKE_TARGET="${KUBEMARK_IMAGE_MAKE_TARGET:-gcloudpush}"

View File

@ -35,7 +35,7 @@ spec:
emptyDir: {}
containers:
- name: hollow-kubelet
image: {{registry}}/{{project}}/kubemark:latest
image: {{full_registry}}/kubemark:latest
ports:
- containerPort: 4194
- containerPort: 10250
@ -67,7 +67,7 @@ spec:
securityContext:
privileged: true
- name: hollow-proxy
image: {{registry}}/{{project}}/kubemark:latest
image: {{full_registry}}/kubemark:latest
env:
- name: CONTENT_TYPE
valueFrom:

View File

@ -395,8 +395,7 @@ current-context: kubemark-context")
proxy_mem=$((100 * 1024 + ${proxy_mem_per_node}*${NUM_NODES}))
sed -i'' -e "s/{{HOLLOW_PROXY_CPU}}/${proxy_cpu}/g" "${RESOURCE_DIRECTORY}/hollow-node.yaml"
sed -i'' -e "s/{{HOLLOW_PROXY_MEM}}/${proxy_mem}/g" "${RESOURCE_DIRECTORY}/hollow-node.yaml"
sed -i'' -e "s/{{registry}}/${CONTAINER_REGISTRY}/g" "${RESOURCE_DIRECTORY}/hollow-node.yaml"
sed -i'' -e "s/{{project}}/${PROJECT}/g" "${RESOURCE_DIRECTORY}/hollow-node.yaml"
sed -i'' -e "s'{{full_registry}}'${FULL_REGISTRY}'g" "${RESOURCE_DIRECTORY}/hollow-node.yaml"
sed -i'' -e "s/{{master_ip}}/${MASTER_IP}/g" "${RESOURCE_DIRECTORY}/hollow-node.yaml"
sed -i'' -e "s/{{kubelet_verbosity_level}}/${KUBELET_TEST_LOG_LEVEL}/g" "${RESOURCE_DIRECTORY}/hollow-node.yaml"
sed -i'' -e "s/{{kubeproxy_verbosity_level}}/${KUBEPROXY_TEST_LOG_LEVEL}/g" "${RESOURCE_DIRECTORY}/hollow-node.yaml"
@ -457,15 +456,6 @@ write-local-kubeconfig
copy-resource-files-to-master
start-master-components
# TODO: Simplify. The caller should have to pass a full registry or nothing.
if [[ -n "${CONTAINER_REGISTRY}" && -n "${PROJECT}" ]]; then
FULL_REGISTRY="${CONTAINER_REGISTRY}/${PROJECT}"
elif [[ -n "${CONTAINER_REGISTRY}" ]]; then
FULL_REGISTRY="${CONTAINER_REGISTRY}"
else
FULL_REGISTRY=staging-k8s.gcr.io
fi
# Setup for hollow-nodes.
echo ""
echo -e "${color_yellow}STARTING SETUP FOR HOLLOW-NODES${color_norm}"