[devstack] Support config image repository for kubeadm
In some places of which network environment was limited, kubeadm can't pull images from k8s.gcr.io. This patch add a variable `KURYR_KUBEADMIN_IMAGE_REPOSITORY` in order to the developer who located in these places can set the kubeadm to pull container images from repository that they can access. Change-Id: Id966747d8c09ea14bb37880f8fb37447591564b5
This commit is contained in:
parent
cb1554a0dd
commit
8655bb49c8
@ -68,6 +68,7 @@ function kubeadm_init {
|
||||
cat >> ${output_dir}/kubeadm-init.yaml << EOF
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
kind: ClusterConfiguration
|
||||
imageRepository: "${KURYR_KUBEADMIN_IMAGE_REPOSITORY}"
|
||||
etcd:
|
||||
external:
|
||||
endpoints:
|
||||
@ -118,6 +119,7 @@ address: "0.0.0.0"
|
||||
enableServer: true
|
||||
cgroupDriver: $cgroup_driver
|
||||
EOF
|
||||
sudo kubeadm config images pull --image-repository=${KURYR_KUBEADMIN_IMAGE_REPOSITORY}
|
||||
args="--config ${output_dir}/kubeadm-init.yaml"
|
||||
# NOTE(gryf): skip installing kube proxy, kuryr will handle services.
|
||||
args+=" --skip-phases=addon/kube-proxy"
|
||||
|
@ -93,3 +93,6 @@ KURYR_OVERCLOUD_VM_PORT=${KURYR_OVERCLOUD_VM_PORT:-port0}
|
||||
KURYR_IPV6=${KURYR_IPV6:-False}
|
||||
KURYR_DUAL_STACK=${KURYR_DUAL_STACK:-False}
|
||||
SUBNETPOOL_KURYR_NAME_V6=${SUBNETPOOL_KURYR_NAME_V6:-"shared-kuryr-subnetpool-v6"}
|
||||
|
||||
# Kubeadmin
|
||||
KURYR_KUBEADMIN_IMAGE_REPOSITORY=${KURYR_KUBEADMIN_IMAGE_REPOSITORY:-"k8s.gcr.io"}
|
||||
|
@ -59,6 +59,9 @@ Now edit ``devstack/local.conf`` to set up some initial options:
|
||||
network interface.
|
||||
* If you already have Docker installed on the machine, you can comment out line
|
||||
starting with ``enable_plugin devstack-plugin-container``.
|
||||
* If you can't pull images from k8s.gcr.io, you can add the variable
|
||||
``KURYR_KUBEADMIN_IMAGE_REPOSITORY`` to ``devstack/local.conf`` and set it's
|
||||
value to the repository that you can access.
|
||||
|
||||
Once ``local.conf`` is configured, you can start the installation:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user