summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh4
-rw-r--r--magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert.yaml4
2 files changed, 8 insertions, 0 deletions
diff --git a/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh b/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh
index 452f984..30e9011 100644
--- a/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh
+++ b/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh
@@ -46,6 +46,10 @@ if [[ -n "${MASTER_HOSTNAME}" ]]; then
46fi 46fi
47sans="${sans},IP:127.0.0.1" 47sans="${sans},IP:127.0.0.1"
48 48
49KUBE_SERVICE_IP=$(echo $PORTAL_NETWORK_CIDR | awk 'BEGIN{FS="[./]"; OFS="."}{print $1,$2,$3,$4 + 1}')
50
51sans="${sans},IP:${KUBE_SERVICE_IP}"
52
49cert_dir=/srv/kubernetes 53cert_dir=/srv/kubernetes
50cert_conf_dir=${cert_dir}/conf 54cert_conf_dir=${cert_dir}/conf
51 55
diff --git a/magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert.yaml b/magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert.yaml
index bebc7cc..630ddaa 100644
--- a/magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert.yaml
+++ b/magnum/drivers/k8s_coreos_v1/templates/fragments/make-cert.yaml
@@ -63,6 +63,10 @@ write_files:
63 fi 63 fi
64 sans="${sans},IP:127.0.0.1" 64 sans="${sans},IP:127.0.0.1"
65 65
66 KUBE_SERVICE_IP=$(echo $PORTAL_NETWORK_CIDR | awk 'BEGIN{FS="[./]"; OFS="."}{print $1,$2,$3,$4 + 1}')
67
68 sans="${sans},IP:${KUBE_SERVICE_IP}"
69
66 cert_conf_dir=${KUBE_CERTS_PATH}/conf 70 cert_conf_dir=${KUBE_CERTS_PATH}/conf
67 71
68 mkdir -p ${cert_conf_dir} 72 mkdir -p ${cert_conf_dir}