Updating /cluster to use v1beta 3 specs, and change a lot of polling to

healthz instead of api endpoints.
pull/6/head
Kris Rousey 2015-05-13 11:01:35 -07:00
parent 82913c3112
commit 98c457c397
8 changed files with 13 additions and 11 deletions

View File

@ -27,7 +27,7 @@ spec:
name: grafana
env:
- name: INFLUXDB_EXTERNAL_URL
value: /api/v1beta1/proxy/services/monitoring-grafana/db/
value: /api/v1beta3/proxy/namespaces/default/services/monitoring-grafana/db/
- name: INFLUXDB_HOST
value: monitoring-influxdb
- name: INFLUXDB_PORT

View File

@ -627,7 +627,7 @@ function kube-up {
echo
until $(curl --insecure --user ${KUBE_USER}:${KUBE_PASSWORD} --max-time 5 \
--fail --output $LOG --silent https://${KUBE_MASTER_IP}/api/v1beta1/pods); do
--fail --output $LOG --silent https://${KUBE_MASTER_IP}/healthz); do
printf "."
sleep 2
done

View File

@ -398,7 +398,7 @@ function kube-up {
echo
until curl --insecure --user "${KUBE_USER}:${KUBE_PASSWORD}" --max-time 5 \
--fail --output /dev/null --silent "https://${KUBE_MASTER_IP}/api/v1beta1/pods"; do
--fail --output /dev/null --silent "https://${KUBE_MASTER_IP}/healthz"; do
printf "."
sleep 2
done

View File

@ -86,7 +86,7 @@ function wait-for-master() {
echo "== Waiting for new master to respond to API requests =="
until curl --insecure --user "${KUBE_USER}:${KUBE_PASSWORD}" --max-time 5 \
--fail --output /dev/null --silent "https://${KUBE_MASTER_IP}/api/v1beta1/pods"; do
--fail --output /dev/null --silent "https://${KUBE_MASTER_IP}/healthz"; do
printf "."
sleep 2
done

View File

@ -37,12 +37,12 @@ class TestRegistrator():
@patch('json.loads')
@patch('httplib.HTTPConnection')
def test_register(self, httplibmock, jsonmock):
result = self.r.register('foo', 80, '/v1beta1/test')
result = self.r.register('foo', 80, '/v1beta3/test')
httplibmock.assert_called_with('foo', 80)
requestmock = httplibmock().request
requestmock.assert_called_with(
"POST", "/v1beta1/test",
"POST", "/v1beta3/test",
json.dumps(self.r.data),
{"Content-type": "application/json",
"Accept": "application/json"})

View File

@ -311,7 +311,7 @@ kube-up() {
#This will fail until apiserver salt is updated
until $(curl --insecure --user ${KUBE_USER}:${KUBE_PASSWORD} --max-time 5 \
--fail --output /dev/null --silent https://${KUBE_MASTER_IP}/api/v1beta1/pods); do
--fail --output /dev/null --silent https://${KUBE_MASTER_IP}/healthz); do
printf "."
sleep 2
done

View File

@ -50,11 +50,13 @@ current-context: service-account-context
EOF
local -r kubeconfig_base64=$(echo "${kubeconfig}" | base64 -w0)
read -r -d '' secretyaml <<EOF
apiVersion: v1beta1
kind: Secret
id: token-${safe_username}
apiVersion: v1beta3
data:
kubeconfig: ${kubeconfig_base64}
kind: Secret
metadata:
name: token-${safe_username}
type: Opaque
EOF
create-resource-from-string "${secretyaml}" 100 10 "Secret-for-token-for-user-${username}" &
# TODO: label the secrets with special label so kubectl does not show these?

View File

@ -344,7 +344,7 @@ function kube-up {
printf "Waiting for ${KUBE_MASTER} to become available..."
until curl --insecure --user "${KUBE_USER}:${KUBE_PASSWORD}" --max-time 5 \
--fail --output /dev/null --silent "https://${KUBE_MASTER_IP}/api/v1beta1/pods"; do
--fail --output /dev/null --silent "https://${KUBE_MASTER_IP}/healthz"; do
printf "."
sleep 2
done