Browse Source

Merge "Remove the unused kolla_kubernetes script from keystone"

tags/7.0.0.0b3
Zuul 11 months ago
parent
commit
b4ff157327

+ 0
- 18
docker/keystone/keystone/extend_start.sh View File

@@ -1,16 +1,5 @@
1 1
 #!/bin/bash
2 2
 
3
-function kolla_kubernetes {
4
-    KUBE_TOKEN=$(</var/run/secrets/kubernetes.io/serviceaccount/token)
5
-    bootstrap_url=$(curl -sSk -H "Authorization: Bearer $KUBE_TOKEN" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCPORT/api/v1/namespaces/default/pods | grep /api/v1/namespaces/default/pods/keystone-bootstrap | cut -d '"' -f 4) || true
6
-    KEYSTONE_BOOTSTRAPPED=$(curl -sSk -H "Authorization: Bearer $KUBE_TOKEN" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCPORT$bootstrap_url | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["status"]["phase"]') || KEYSTONE_BOOTSTRAPPED='Succeeded'
7
-
8
-    if [[ "$KEYSTONE_BOOTSTRAPPED" != "Succeeded" ]]; then
9
-        echo "Keystone bootstrapping isn't complete"
10
-        exit 1
11
-    fi
12
-}
13
-
14 3
 # NOTE(pbourke): httpd will not clean up after itself in some cases which
15 4
 # results in the container not being able to restart. (bug #1489676, 1557036)
16 5
 if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
@@ -67,10 +56,3 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
67 56
 fi
68 57
 
69 58
 ARGS="-DFOREGROUND"
70
-
71
-#***** KOLLA-KUBERNETES *****
72
-# TODO: Add a kolla_kubernetes script at build time when templating is complete
73
-if [[ "${!KOLLA_KUBERNETES[@]}" ]]; then
74
-    kolla_kubernetes
75
-fi
76
-#***** KOLLA-KUBERNETES *****

+ 0
- 18
docker/keystone/keystone/keystone_bootstrap.sh View File

@@ -28,24 +28,6 @@ function exit_json {
28 28
     echo '{"failed": false, "changed": '"${changed}"'}'
29 29
 }
30 30
 
31
-function kolla_kubernetes {
32
-    KUBE_TOKEN=$(</var/run/secrets/kubernetes.io/serviceaccount/token)
33
-    bootstrap_url=$(curl -sSk -H "Authorization: Bearer $KUBE_TOKEN" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCPORT/api/v1/namespaces/default/pods | grep /api/v1/namespaces/default/pods/keystone-bootstrap | cut -d '"' -f 4) || true
34
-    KEYSTONE_BOOTSTRAPPED=$(curl -sSk -H "Authorization: Bearer $KUBE_TOKEN" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCPORT$bootstrap_url | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["status"]["phase"]') || KEYSTONE_BOOTSTRAPPED='Succeeded'
35
-
36
-    if [[ "$KEYSTONE_BOOTSTRAPPED" != "Succeeded" ]]; then
37
-        echo "Keystone bootstrapping isn't complete"
38
-        exit 1
39
-    fi
40
-}
41
-
42
-#***** KOLLA-KUBERNETES *****
43
-# TODO: Add a kolla_kubernetes script at build time when templating is complete
44
-if [[ "${!KOLLA_KUBERNETES[@]}" ]]; then
45
-    kolla_kubernetes
46
-fi
47
-#***** KOLLA-KUBERNETES *****
48
-
49 31
 changed="false"
50 32
 keystone_bootstrap=$(keystone-manage bootstrap --bootstrap-username "${USERNAME}" --bootstrap-password "${PASSWORD}" --bootstrap-project-name "${PROJECT}" --bootstrap-role-name "${ROLE}" --bootstrap-admin-url "${ADMIN_URL}" --bootstrap-internal-url "${INTERNAL_URL}" --bootstrap-public-url "${PUBLIC_URL}" --bootstrap-service-name "keystone" --bootstrap-region-id "${REGION}" 2>&1)
51 33
 if [[ $? != 0 ]]; then

Loading…
Cancel
Save