remove proxy. update to kubeadm 1.8.0rc1

This commit is contained in:
Matthew Mosesohn 2017-09-25 07:14:10 +01:00
parent ef04c7ed53
commit 027b9d5328
7 changed files with 23 additions and 83 deletions

View file

@ -262,18 +262,18 @@ before_script:
tests/testcases/040_check-network-adv.yml $LOG_LEVEL; tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
fi fi
after_script: # after_script:
- > # - >
ansible-playbook -i inventory/inventory.ini tests/cloud_playbooks/delete-gce.yml -c local $LOG_LEVEL # ansible-playbook -i inventory/inventory.ini tests/cloud_playbooks/delete-gce.yml -c local $LOG_LEVEL
-e mode=${CLUSTER_MODE} # -e mode=${CLUSTER_MODE}
-e test_id=${TEST_ID} # -e test_id=${TEST_ID}
-e kube_network_plugin=${KUBE_NETWORK_PLUGIN} # -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
-e gce_project_id=${GCE_PROJECT_ID} # -e gce_project_id=${GCE_PROJECT_ID}
-e gce_service_account_email=${GCE_ACCOUNT} # -e gce_service_account_email=${GCE_ACCOUNT}
-e gce_credentials_file=${HOME}/.ssh/gce.json # -e gce_credentials_file=${HOME}/.ssh/gce.json
-e cloud_image=${CLOUD_IMAGE} # -e cloud_image=${CLOUD_IMAGE}
-e inventory_path=${PWD}/inventory/inventory.ini # -e inventory_path=${PWD}/inventory/inventory.ini
-e cloud_region=${CLOUD_REGION} # -e cloud_region=${CLOUD_REGION}
# Test matrix. Leave the comments for markup scripts. # Test matrix. Leave the comments for markup scripts.
.coreos_calico_aio_variables: &coreos_calico_aio_variables .coreos_calico_aio_variables: &coreos_calico_aio_variables

View file

@ -20,7 +20,7 @@ download_always_pull: False
# Versions # Versions
kube_version: v1.7.5 kube_version: v1.7.5
# Change to kube_version after v1.8.0 release # Change to kube_version after v1.8.0 release
kubeadm_version: "v1.8.0-beta.1" kubeadm_version: "v1.8.0-rc.1"
etcd_version: v3.2.4 etcd_version: v3.2.4
# TODO(mattymo): Move calico versions to roles/network_plugins/calico/defaults # TODO(mattymo): Move calico versions to roles/network_plugins/calico/defaults
# after migration to container download # after migration to container download
@ -37,7 +37,7 @@ pod_infra_version: 3.0
kubeadm_download_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kubeadm_version }}/bin/linux/amd64/kubeadm" kubeadm_download_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kubeadm_version }}/bin/linux/amd64/kubeadm"
# Checksums # Checksums
kubeadm_checksum: "ddd5949699d6bdbc0b90b379e7e534f137b1058db1acc8f26cc54843f017ffbf" kubeadm_checksum: "8f6ceb26b8503bfc36a99574cf6f853be1c55405aa31669561608ad8099bf5bf"
# Containers # Containers
etcd_image_repo: "quay.io/coreos/etcd" etcd_image_repo: "quay.io/coreos/etcd"
@ -123,7 +123,7 @@ downloads:
container: true container: true
repo: "{{ etcd_image_repo }}" repo: "{{ etcd_image_repo }}"
tag: "{{ etcd_image_tag }}" tag: "{{ etcd_image_tag }}"
sha256: "{{etcd_digest_checksum|default(None)}}" sha256: "{{ etcd_digest_checksum|default(None) }}"
kubeadm: kubeadm:
version: "{{ kubeadm_version }}" version: "{{ kubeadm_version }}"
dest: "kubeadm" dest: "kubeadm"

View file

@ -18,17 +18,6 @@
with_items: ['deploy', 'svc'] with_items: ['deploy', 'svc']
tags: upgrade tags: upgrade
- name: Kubernetes Apps | Ensure kubeadm kube-proxy
kube:
name: "kube-proxy"
namespace: "{{ system_namespace }}"
kubectl: "{{bin_dir}}/kubectl"
resource: "daemonset"
state: latest
when:
- kubeadm_enabled|default(false)
- inventory_hostname == groups['kube-master'][0]
- name: Kubernetes Apps | Delete kubeadm kubedns - name: Kubernetes Apps | Delete kubeadm kubedns
kube: kube:
name: "kubedns" name: "kubedns"

View file

@ -1,56 +0,0 @@
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
k8s-app: kube-proxy
name: kube-proxy
namespace: {{ system_namespace }}
spec:
selector:
matchLabels:
k8s-app: kube-proxy
template:
metadata:
labels:
k8s-app: kube-proxy
spec:
containers:
- command:
- /usr/local/bin/kube-proxy
- --kubeconfig=/var/lib/kube-proxy/kubeconfig.conf
- --cluster-cidr=10.233.64.0/18
image: {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }}
imagePullPolicy: {{ k8s_image_pull_policy }}
name: kube-proxy
securityContext:
privileged: true
volumeMounts:
- mountPath: /var/lib/kube-proxy
name: kube-proxy
- mountPath: /run/xtables.lock
name: xtables-lock
dnsPolicy: ClusterFirst
hostNetwork: true
restartPolicy: Always
serviceAccount: kube-proxy
serviceAccountName: kube-proxy
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
- effect: NoSchedule
key: node.cloudprovider.kubernetes.io/uninitialized
value: "true"
volumes:
- configMap:
defaultMode: 420
name: kube-proxy
name: kube-proxy
- hostPath:
path: /run/xtables.lock
name: xtables-lock
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate

View file

@ -6,7 +6,7 @@
{{ bin_dir }}/kubectl get secrets --all-namespaces {{ bin_dir }}/kubectl get secrets --all-namespaces
-o 'jsonpath={range .items[*]}{"\n"}{.metadata.namespace}{" "}{.metadata.name}{" "}{.type}{end}' -o 'jsonpath={range .items[*]}{"\n"}{.metadata.namespace}{" "}{.metadata.name}{" "}{.type}{end}'
| grep kubernetes.io/service-account-token | grep kubernetes.io/service-account-token
| egrep 'default-token|kube-dns|dnsmasq|netchecker|weave|calico|canal|flannel|dashboard|cluster-proportional-autoscaler|efk|tiller' | egrep 'default-token|kube-proxy|kube-dns|dnsmasq|netchecker|weave|calico|canal|flannel|dashboard|cluster-proportional-autoscaler|efk|tiller'
register: tokens_to_delete register: tokens_to_delete
run_once: true run_once: true

View file

@ -78,6 +78,12 @@
failed_when: kubeadm_upgrade.rc != 0 and "field is immutable" not in kubeadm_upgrade.stderr failed_when: kubeadm_upgrade.rc != 0 and "field is immutable" not in kubeadm_upgrade.stderr
notify: Master | restart kubelet notify: Master | restart kubelet
# FIXME(mattymo): remove when https://github.com/kubernetes/kubeadm/issues/433 is fixed
- name: kubeadm | Enable kube-proxy
command: "{{ bin_dir }}/kubeadm alpha phase addon kube-proxy --config={{ kube_config_dir }}/kubeadm-config.yaml"
when: inventory_hostname == groups['kube-master']|first
changed_when: false
- name: slurp kubeadm certs - name: slurp kubeadm certs
slurp: slurp:
src: "{{ item }}" src: "{{ item }}"

View file

@ -75,6 +75,7 @@
with_items: with_items:
- "{{kube_config_dir}}" - "{{kube_config_dir}}"
- /var/lib/kubelet - /var/lib/kubelet
- /root/.kube
- "{{ etcd_data_dir }}" - "{{ etcd_data_dir }}"
- /etc/ssl/etcd - /etc/ssl/etcd
- /var/log/calico - /var/log/calico