From c01a0583f75b22e7512558f64d4180a1b40beb95 Mon Sep 17 00:00:00 2001 From: Prashanth Balasubramanian Date: Sat, 28 May 2016 16:24:40 -0700 Subject: [PATCH] Trusty deployment --- build/common.sh | 1 + cluster/gce/gci/configure-helper.sh | 16 ++++++++++++---- cluster/saltbase/salt/l7-gcp/glbc.manifest | 14 +++++++------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/build/common.sh b/build/common.sh index 2a40f21a964..41be8354b39 100755 --- a/build/common.sh +++ b/build/common.sh @@ -926,6 +926,7 @@ function kube::release::package_kube_manifests_tarball() { cp "${salt_dir}/kube-apiserver/abac-authz-policy.jsonl" "${dst_dir}" cp "${salt_dir}/kube-controller-manager/kube-controller-manager.manifest" "${dst_dir}" cp "${salt_dir}/kube-addons/kube-addon-manager.yaml" "${dst_dir}" + cp "${salt_dir}/l7-gcp/glbc.manifest" "${dst_dir}" cp "${KUBE_ROOT}/cluster/gce/trusty/configure-helper.sh" "${dst_dir}/trusty-configure-helper.sh" cp "${KUBE_ROOT}/cluster/gce/gci/configure-helper.sh" "${dst_dir}/gci-configure-helper.sh" cp "${KUBE_ROOT}/cluster/gce/gci/health-monitor.sh" "${dst_dir}/health-monitor.sh" diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 406b1c8d238..c4acd352ddb 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -558,7 +558,6 @@ function start-kube-apiserver { function start-kube-controller-manager { echo "Start kubernetes controller-manager" prepare-log-file /var/log/kube-controller-manager.log - # Calculate variables and assemble the command line. local params="${CONTROLLER_MANAGER_TEST_LOG_LEVEL:-"--v=2"} ${CONTROLLER_MANAGER_TEST_ARGS:-}" params+=" --cloud-provider=gce" @@ -706,9 +705,6 @@ function start-kube-addons { fi if [[ "${ENABLE_L7_LOADBALANCING:-}" == "glbc" ]]; then setup-addon-manifests "addons" "cluster-loadbalancing/glbc" - local -r glbc_yaml="${dst_dir}/cluster-loadbalancing/glbc/glbc.yaml" - remove-salt-config-comments "${glbc_yaml}" - sed -i -e "s@{{ *kube_uid *}}@${KUBE_UID:-}@g" "${glbc_yaml}" fi if [[ "${ENABLE_CLUSTER_DNS:-}" == "true" ]]; then setup-addon-manifests "addons" "dns" @@ -761,6 +757,17 @@ function start-fluentd { fi } +# Starts a l7 loadbalancing controller for ingress. +function start-lb-controller { + if [[ "${ENABLE_L7_LOADBALANCING:-}" == "glbc" ]]; then + echo "Starting GCE L7 pod" + prepare-log-file /var/log/glbc.log + local -r src_file="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/glbc.manifest" + cp "${src_file}" /etc/kubernetes/manifests/ + fi +} + + function reset-motd { # kubelet is installed both on the master and nodes, and the version is easy to parse (unlike kubectl) local -r version="$(/usr/bin/kubelet --version=true | cut -f2 -d " ")" @@ -829,6 +836,7 @@ if [[ "${KUBERNETES_MASTER:-}" == "true" ]]; then start-kube-scheduler start-kube-addons start-cluster-autoscaler + start-lb-controller else start-kube-proxy # Kube-registry-proxy. diff --git a/cluster/saltbase/salt/l7-gcp/glbc.manifest b/cluster/saltbase/salt/l7-gcp/glbc.manifest index d386ded7cce..1db2b4a6992 100644 --- a/cluster/saltbase/salt/l7-gcp/glbc.manifest +++ b/cluster/saltbase/salt/l7-gcp/glbc.manifest @@ -1,20 +1,18 @@ apiVersion: v1 kind: Pod metadata: - name: l7-lb-controller-v0.6.0 + name: l7-lb-controller-v0.6.3 namespace: kube-system labels: k8s-app: glbc - version: v0.6.0 + version: v0.6.3 kubernetes.io/cluster-service: "true" kubernetes.io/name: "GLBC" spec: terminationGracePeriodSeconds: 600 hostNetwork: true containers: - # TODO: Push thing image once kubernetes/contrib/pull/680 is in. - - image: bprashanth/glbc:0.6.3 - imagePullPolicy: Always + - image: gcr.io/google_containers/glbc:0.6.3 livenessProbe: httpGet: path: /healthz @@ -33,11 +31,13 @@ spec: name: logfile readOnly: false resources: + # Request and limits are set to accomodate this pod alongside the other + # master components on a single core master. limits: - cpu: 100m + cpu: 50m memory: 100Mi requests: - cpu: 100m + cpu: 10m memory: 50Mi command: # TODO: split this out into args when we no longer need to pipe stdout to a file #6428