Commit 271784e5 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #21167 from andyzheng0831/trusty-release

Auto commit by PR queue bot
parents 3994e5f7 242b9977
...@@ -925,12 +925,9 @@ function kube::release::package_salt_tarball() { ...@@ -925,12 +925,9 @@ function kube::release::package_salt_tarball() {
} }
# This will pack kube-system manifests files for distros without using salt # This will pack kube-system manifests files for distros without using salt
# such as Ubuntu Trusty. # such as Ubuntu Trusty. For Trusty, we directly copy manifests from cluster/addons
# # and cluster/saltbase/salt. The script of cluster initialization will remove
# There are two sources of manifests files: (1) some manifests in the directory # the salt configuration and evaluate the variables in the manifests.
# cluster/saltbase/salt and cluster/addons can be used directly or after minor
# revision, so we copy them from there; (2) otherwise, we will maintain separate
# copies in cluster/gce/<distro>/kube-manifests.
function kube::release::package_kube_manifests_tarball() { function kube::release::package_kube_manifests_tarball() {
kube::log::status "Building tarball: manifests" kube::log::status "Building tarball: manifests"
...@@ -938,7 +935,6 @@ function kube::release::package_kube_manifests_tarball() { ...@@ -938,7 +935,6 @@ function kube::release::package_kube_manifests_tarball() {
rm -rf "${release_stage}" rm -rf "${release_stage}"
mkdir -p "${release_stage}/trusty" mkdir -p "${release_stage}/trusty"
# Source 1: manifests from cluster/saltbase/salt and cluster/addons
local salt_dir="${KUBE_ROOT}/cluster/saltbase/salt" local salt_dir="${KUBE_ROOT}/cluster/saltbase/salt"
cp "${salt_dir}/fluentd-es/fluentd-es.yaml" "${release_stage}/" cp "${salt_dir}/fluentd-es/fluentd-es.yaml" "${release_stage}/"
cp "${salt_dir}/fluentd-gcp/fluentd-gcp.yaml" "${release_stage}/" cp "${salt_dir}/fluentd-gcp/fluentd-gcp.yaml" "${release_stage}/"
...@@ -946,6 +942,8 @@ function kube::release::package_kube_manifests_tarball() { ...@@ -946,6 +942,8 @@ function kube::release::package_kube_manifests_tarball() {
cp "${salt_dir}/kube-proxy/kube-proxy.manifest" "${release_stage}/" cp "${salt_dir}/kube-proxy/kube-proxy.manifest" "${release_stage}/"
cp "${salt_dir}/etcd/etcd.manifest" "${release_stage}/trusty" cp "${salt_dir}/etcd/etcd.manifest" "${release_stage}/trusty"
cp "${salt_dir}/kube-scheduler/kube-scheduler.manifest" "${release_stage}/trusty" cp "${salt_dir}/kube-scheduler/kube-scheduler.manifest" "${release_stage}/trusty"
cp "${salt_dir}/kube-apiserver/kube-apiserver.manifest" "${release_stage}/trusty"
cp "${salt_dir}/kube-controller-manager/kube-controller-manager.manifest" "${release_stage}/trusty"
cp "${salt_dir}/kube-addons/namespace.yaml" "${release_stage}/trusty" cp "${salt_dir}/kube-addons/namespace.yaml" "${release_stage}/trusty"
cp "${salt_dir}/kube-addons/kube-addons.sh" "${release_stage}/trusty" cp "${salt_dir}/kube-addons/kube-addons.sh" "${release_stage}/trusty"
cp "${salt_dir}/kube-addons/kube-addon-update.sh" "${release_stage}/trusty" cp "${salt_dir}/kube-addons/kube-addon-update.sh" "${release_stage}/trusty"
...@@ -954,10 +952,7 @@ function kube::release::package_kube_manifests_tarball() { ...@@ -954,10 +952,7 @@ function kube::release::package_kube_manifests_tarball() {
objects=$(cd "${KUBE_ROOT}/cluster/addons" && find . \( -name \*.yaml -or -name \*.yaml.in -or -name \*.json \) | grep -v demo) objects=$(cd "${KUBE_ROOT}/cluster/addons" && find . \( -name \*.yaml -or -name \*.yaml.in -or -name \*.json \) | grep -v demo)
tar c -C "${KUBE_ROOT}/cluster/addons" ${objects} | tar x -C "${release_stage}/trusty" tar c -C "${KUBE_ROOT}/cluster/addons" ${objects} | tar x -C "${release_stage}/trusty"
# Source 2: manifests from cluster/gce/<distro>/kube-manifests. # This is for coreos only. ContainerVM or Trusty does not use it.
# TODO(andyzheng0831): Avoid using separate copies for trusty. We should use whatever
# from cluster/saltbase/salt to minimize maintenance cost.
cp "${KUBE_ROOT}/cluster/gce/trusty/kube-manifests/"* "${release_stage}/trusty"
cp -r "${KUBE_ROOT}/cluster/gce/coreos/kube-manifests"/* "${release_stage}/" cp -r "${KUBE_ROOT}/cluster/gce/coreos/kube-manifests"/* "${release_stage}/"
kube::release::clean_cruft kube::release::clean_cruft
......
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"name":"kube-apiserver",
"namespace": "kube-system"
},
"spec":{
"hostNetwork": true,
"containers":[
{
"name": "kube-apiserver",
"image": "{{kube_docker_registry}}/kube-apiserver:{{kube-apiserver_docker_tag}}",
"resources": {
"requests": {
"cpu": "250m"
}
},
"command": [
"/bin/sh",
"-c",
"/usr/local/bin/kube-apiserver {{params}} 1>>/var/log/kube-apiserver.log 2>&1"
],
"livenessProbe": {
"httpGet": {
"host": "127.0.0.1",
"port": 8080,
"path": "/healthz"
},
"initialDelaySeconds": 15,
"timeoutSeconds": 15
},
"ports":[
{ "name": "https",
"containerPort": 443,
"hostPort": 443},{
"name": "local",
"containerPort": 8080,
"hostPort": 8080}
],
"volumeMounts": [
{{cloud_config_mount}}
{ "name": "srvkube",
"mountPath": "/etc/srv/kubernetes",
"readOnly": true},
{ "name": "logfile",
"mountPath": "/var/log/kube-apiserver.log",
"readOnly": false},
{ "name": "etcssl",
"mountPath": "/etc/ssl",
"readOnly": true},
{ "name": "varssl",
"mountPath": "/var/ssl",
"readOnly": true},
{ "name": "etcopenssl",
"mountPath": "/etc/openssl",
"readOnly": true},
{ "name": "etcpkitls",
"mountPath": "/etc/pki/tls",
"readOnly": true},
{ "name": "srvsshproxy",
"mountPath": "/etc/srv/sshproxy",
"readOnly": false}
]
}
],
"volumes":[
{{cloud_config_volume}}
{ "name": "srvkube",
"hostPath": {
"path": "/etc/srv/kubernetes"}
},
{ "name": "logfile",
"hostPath": {
"path": "/var/log/kube-apiserver.log"}
},
{ "name": "etcssl",
"hostPath": {
"path": "/etc/ssl"}
},
{ "name": "varssl",
"hostPath": {
"path": "/var/ssl"}
},
{ "name": "etcopenssl",
"hostPath": {
"path": "/etc/openssl"}
},
{ "name": "etcpkitls",
"hostPath": {
"path": "/etc/pki/tls"}
},
{ "name": "srvsshproxy",
"hostPath": {
"path": "/etc/srv/sshproxy"}
}
]
}}
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"name":"kube-controller-manager",
"namespace": "kube-system"
},
"spec":{
"hostNetwork": true,
"containers":[
{
"name": "kube-controller-manager",
"image": "{{kube_docker_registry}}/kube-controller-manager:{{kube-controller-manager_docker_tag}}",
"resources": {
"requests": {
"cpu": "200m"
}
},
"command": [
"/bin/sh",
"-c",
"/usr/local/bin/kube-controller-manager {{params}} 1>>/var/log/kube-controller-manager.log 2>&1"
],
"livenessProbe": {
"httpGet": {
"host": "127.0.0.1",
"port": 10252,
"path": "/healthz"
},
"initialDelaySeconds": 15,
"timeoutSeconds": 15
},
"volumeMounts": [
{{cloud_config_mount}}
{ "name": "srvkube",
"mountPath": "/etc/srv/kubernetes",
"readOnly": true},
{ "name": "logfile",
"mountPath": "/var/log/kube-controller-manager.log",
"readOnly": false},
{ "name": "etcssl",
"mountPath": "/etc/ssl",
"readOnly": true},
{ "name": "varssl",
"mountPath": "/var/ssl",
"readOnly": true},
{ "name": "etcopenssl",
"mountPath": "/etc/openssl",
"readOnly": true},
{ "name": "etcpkitls",
"mountPath": "/etc/pki/tls",
"readOnly": true}
]
}
],
"volumes":[
{{cloud_config_volume}}
{ "name": "srvkube",
"hostPath": {
"path": "/etc/srv/kubernetes"}
},
{ "name": "logfile",
"hostPath": {
"path": "/var/log/kube-controller-manager.log"}
},
{ "name": "etcssl",
"hostPath": {
"path": "/etc/ssl"}
},
{ "name": "varssl",
"hostPath": {
"path": "/var/ssl"}
},
{ "name": "etcopenssl",
"hostPath": {
"path": "/etc/openssl"}
},
{ "name": "etcpkitls",
"hostPath": {
"path": "/etc/pki/tls"}
}
]
}}
...@@ -264,8 +264,7 @@ Content-Disposition: attachment; filename="kube-node-health-monitoring.conf" ...@@ -264,8 +264,7 @@ Content-Disposition: attachment; filename="kube-node-health-monitoring.conf"
description "Kubenetes node health monitoring" description "Kubenetes node health monitoring"
# The termination of kube-proxy upstart job indicates that kubelet and docker are ready. start on stopped kube-docker
start on stopped kube-proxy
respawn respawn
......
...@@ -7,6 +7,11 @@ ...@@ -7,6 +7,11 @@
{% set cloud_config = "" -%} {% set cloud_config = "" -%}
{% set cloud_config_mount = "" -%} {% set cloud_config_mount = "" -%}
{% set cloud_config_volume = "" -%} {% set cloud_config_volume = "" -%}
{% set additional_cloud_config_mount = "{\"name\": \"usrsharessl\",\"mountPath\": \"/usr/share/ssl\", \"readOnly\": true}, {\"name\": \"usrssl\",\"mountPath\": \"/usr/ssl\", \"readOnly\": true}, {\"name\": \"usrlibssl\",\"mountPath\": \"/usr/lib/ssl\", \"readOnly\": true}, {\"name\": \"usrlocalopenssl\",\"mountPath\": \"/usr/local/openssl\", \"readOnly\": true}," -%}
{% set additional_cloud_config_volume = "{\"name\": \"usrsharessl\",\"hostPath\": {\"path\": \"/usr/share/ssl\"}}, {\"name\": \"usrssl\",\"hostPath\": {\"path\": \"/usr/ssl\"}}, {\"name\": \"usrlibssl\",\"hostPath\": {\"path\": \"/usr/lib/ssl\"}}, {\"name\": \"usrlocalopenssl\",\"hostPath\": {\"path\": \"/usr/local/openssl\"}}," -%}
{% set srv_kube_path = "/srv/kubernetes" -%}
{% set srv_sshproxy_path = "/srv/sshproxy" -%}
{% if grains.cloud is defined -%} {% if grains.cloud is defined -%}
{% if grains.cloud not in ['vagrant', 'vsphere'] -%} {% if grains.cloud not in ['vagrant', 'vsphere'] -%}
...@@ -141,8 +146,9 @@ ...@@ -141,8 +146,9 @@
], ],
"volumeMounts": [ "volumeMounts": [
{{cloud_config_mount}} {{cloud_config_mount}}
{{additional_cloud_config_mount}}
{ "name": "srvkube", { "name": "srvkube",
"mountPath": "/srv/kubernetes", "mountPath": "{{srv_kube_path}}",
"readOnly": true}, "readOnly": true},
{ "name": "logfile", { "name": "logfile",
"mountPath": "/var/log/kube-apiserver.log", "mountPath": "/var/log/kube-apiserver.log",
...@@ -150,21 +156,9 @@ ...@@ -150,21 +156,9 @@
{ "name": "etcssl", { "name": "etcssl",
"mountPath": "/etc/ssl", "mountPath": "/etc/ssl",
"readOnly": true}, "readOnly": true},
{ "name": "usrsharessl",
"mountPath": "/usr/share/ssl",
"readOnly": true},
{ "name": "varssl", { "name": "varssl",
"mountPath": "/var/ssl", "mountPath": "/var/ssl",
"readOnly": true}, "readOnly": true},
{ "name": "usrssl",
"mountPath": "/usr/ssl",
"readOnly": true},
{ "name": "usrlibssl",
"mountPath": "/usr/lib/ssl",
"readOnly": true},
{ "name": "usrlocalopenssl",
"mountPath": "/usr/local/openssl",
"readOnly": true},
{ "name": "etcopenssl", { "name": "etcopenssl",
"mountPath": "/etc/openssl", "mountPath": "/etc/openssl",
"readOnly": true}, "readOnly": true},
...@@ -172,16 +166,17 @@ ...@@ -172,16 +166,17 @@
"mountPath": "/etc/pki/tls", "mountPath": "/etc/pki/tls",
"readOnly": true}, "readOnly": true},
{ "name": "srvsshproxy", { "name": "srvsshproxy",
"mountPath": "/srv/sshproxy", "mountPath": "{{srv_sshproxy_path}}",
"readOnly": false} "readOnly": false}
] ]
} }
], ],
"volumes":[ "volumes":[
{{cloud_config_volume}} {{cloud_config_volume}}
{{additional_cloud_config_volume}}
{ "name": "srvkube", { "name": "srvkube",
"hostPath": { "hostPath": {
"path": "/srv/kubernetes"} "path": "{{srv_kube_path}}"}
}, },
{ "name": "logfile", { "name": "logfile",
"hostPath": { "hostPath": {
...@@ -191,26 +186,10 @@ ...@@ -191,26 +186,10 @@
"hostPath": { "hostPath": {
"path": "/etc/ssl"} "path": "/etc/ssl"}
}, },
{ "name": "usrsharessl",
"hostPath": {
"path": "/usr/share/ssl"}
},
{ "name": "varssl", { "name": "varssl",
"hostPath": { "hostPath": {
"path": "/var/ssl"} "path": "/var/ssl"}
}, },
{ "name": "usrssl",
"hostPath": {
"path": "/usr/ssl"}
},
{ "name": "usrlibssl",
"hostPath": {
"path": "/usr/lib/ssl"}
},
{ "name": "usrlocalopenssl",
"hostPath": {
"path": "/usr/local/openssl"}
},
{ "name": "etcopenssl", { "name": "etcopenssl",
"hostPath": { "hostPath": {
"path": "/etc/openssl"} "path": "/etc/openssl"}
...@@ -221,7 +200,7 @@ ...@@ -221,7 +200,7 @@
}, },
{ "name": "srvsshproxy", { "name": "srvsshproxy",
"hostPath": { "hostPath": {
"path": "/srv/sshproxy"} "path": "{{srv_sshproxy_path}}"}
} }
] ]
}} }}
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
{% set cloud_config = "" -%} {% set cloud_config = "" -%}
{% set cloud_config_mount = "" -%} {% set cloud_config_mount = "" -%}
{% set cloud_config_volume = "" -%} {% set cloud_config_volume = "" -%}
{% set additional_cloud_config_mount = "{\"name\": \"usrsharessl\",\"mountPath\": \"/usr/share/ssl\", \"readOnly\": true}, {\"name\": \"usrssl\",\"mountPath\": \"/usr/ssl\", \"readOnly\": true}, {\"name\": \"usrlibssl\",\"mountPath\": \"/usr/lib/ssl\", \"readOnly\": true}, {\"name\": \"usrlocalopenssl\",\"mountPath\": \"/usr/local/openssl\", \"readOnly\": true}," -%}
{% set additional_cloud_config_volume = "{\"name\": \"usrsharessl\",\"hostPath\": {\"path\": \"/usr/share/ssl\"}}, {\"name\": \"usrssl\",\"hostPath\": {\"path\": \"/usr/ssl\"}}, {\"name\": \"usrlibssl\",\"hostPath\": {\"path\": \"/usr/lib/ssl\"}}, {\"name\": \"usrlocalopenssl\",\"hostPath\": {\"path\": \"/usr/local/openssl\"}}," -%}
{% set srv_kube_path = "/srv/kubernetes" -%}
{% if grains.cloud is defined -%} {% if grains.cloud is defined -%}
{% if grains.cloud not in ['vagrant', 'vsphere'] -%} {% if grains.cloud not in ['vagrant', 'vsphere'] -%}
...@@ -94,8 +97,9 @@ ...@@ -94,8 +97,9 @@
}, },
"volumeMounts": [ "volumeMounts": [
{{cloud_config_mount}} {{cloud_config_mount}}
{{additional_cloud_config_mount}}
{ "name": "srvkube", { "name": "srvkube",
"mountPath": "/srv/kubernetes", "mountPath": "{{srv_kube_path}}",
"readOnly": true}, "readOnly": true},
{ "name": "logfile", { "name": "logfile",
"mountPath": "/var/log/kube-controller-manager.log", "mountPath": "/var/log/kube-controller-manager.log",
...@@ -103,21 +107,9 @@ ...@@ -103,21 +107,9 @@
{ "name": "etcssl", { "name": "etcssl",
"mountPath": "/etc/ssl", "mountPath": "/etc/ssl",
"readOnly": true}, "readOnly": true},
{ "name": "usrsharessl",
"mountPath": "/usr/share/ssl",
"readOnly": true},
{ "name": "varssl", { "name": "varssl",
"mountPath": "/var/ssl", "mountPath": "/var/ssl",
"readOnly": true}, "readOnly": true},
{ "name": "usrssl",
"mountPath": "/usr/ssl",
"readOnly": true},
{ "name": "usrlibssl",
"mountPath": "/usr/lib/ssl",
"readOnly": true},
{ "name": "usrlocalopenssl",
"mountPath": "/usr/local/openssl",
"readOnly": true},
{ "name": "etcopenssl", { "name": "etcopenssl",
"mountPath": "/etc/openssl", "mountPath": "/etc/openssl",
"readOnly": true}, "readOnly": true},
...@@ -129,9 +121,10 @@ ...@@ -129,9 +121,10 @@
], ],
"volumes":[ "volumes":[
{{cloud_config_volume}} {{cloud_config_volume}}
{{additional_cloud_config_volume}}
{ "name": "srvkube", { "name": "srvkube",
"hostPath": { "hostPath": {
"path": "/srv/kubernetes"} "path": "{{srv_kube_path}}"}
}, },
{ "name": "logfile", { "name": "logfile",
"hostPath": { "hostPath": {
...@@ -141,26 +134,10 @@ ...@@ -141,26 +134,10 @@
"hostPath": { "hostPath": {
"path": "/etc/ssl"} "path": "/etc/ssl"}
}, },
{ "name": "usrsharessl",
"hostPath": {
"path": "/usr/share/ssl"}
},
{ "name": "varssl", { "name": "varssl",
"hostPath": { "hostPath": {
"path": "/var/ssl"} "path": "/var/ssl"}
}, },
{ "name": "usrssl",
"hostPath": {
"path": "/usr/ssl"}
},
{ "name": "usrlibssl",
"hostPath": {
"path": "/usr/lib/ssl"}
},
{ "name": "usrlocalopenssl",
"hostPath": {
"path": "/usr/local/openssl"}
},
{ "name": "etcopenssl", { "name": "etcopenssl",
"hostPath": { "hostPath": {
"path": "/etc/openssl"} "path": "/etc/openssl"}
......
...@@ -13,6 +13,7 @@ cluster/gce/configure-vm.sh: cloud_config: ${CLOUD_CONFIG} ...@@ -13,6 +13,7 @@ cluster/gce/configure-vm.sh: cloud_config: ${CLOUD_CONFIG}
cluster/gce/configure-vm.sh: env-to-grains "runtime_config" cluster/gce/configure-vm.sh: env-to-grains "runtime_config"
cluster/gce/configure-vm.sh: kubelet_api_servers: '${KUBELET_APISERVER}' cluster/gce/configure-vm.sh: kubelet_api_servers: '${KUBELET_APISERVER}'
cluster/gce/coreos/helper.sh:# cloud_config yaml file should be passed cluster/gce/coreos/helper.sh:# cloud_config yaml file should be passed
cluster/gce/trusty/configure.sh: sed -i -e "s@{{pillar\['allow_privileged'\]}}@true@g" "${src_file}"
cluster/gce/util.sh: local node_ip=$(gcloud compute instances describe --project "${PROJECT}" --zone "${ZONE}" \ cluster/gce/util.sh: local node_ip=$(gcloud compute instances describe --project "${PROJECT}" --zone "${ZONE}" \
cluster/juju/charms/trusty/kubernetes-master/files/controller-manager.upstart.tmpl: --address=%(bind_address)s \ cluster/juju/charms/trusty/kubernetes-master/files/controller-manager.upstart.tmpl: --address=%(bind_address)s \
cluster/juju/charms/trusty/kubernetes-master/files/scheduler.upstart.tmpl: --address=%(bind_address)s \ cluster/juju/charms/trusty/kubernetes-master/files/scheduler.upstart.tmpl: --address=%(bind_address)s \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment