Update the Kubernetes Version to 1.16 69/106869/44
authorYao Le <le.yao@intel.com>
Thu, 30 Apr 2020 14:40:20 +0000 (22:40 +0800)
committerYao Le <le.yao@intel.com>
Wed, 27 May 2020 14:10:04 +0000 (22:10 +0800)
Update kubespray to 2.12 to deploy Kubernetes 1.16

Issue-ID: MULTICLOUD-1063
Signed-off-by: Yao Le <le.yao@intel.com>
Change-Id: I537f6395e5d05d8b72411dd1e0789e19972f1947

16 files changed:
deployments/helm/onap4k8s/charts/common/templates/_ingress.tpl
deployments/helm/onap4k8s/charts/etcd/Chart.yaml
deployments/helm/onap4k8s/charts/etcd/templates/statefulset.yaml
deployments/helm/onap4k8s/charts/mongo/templates/nfs-provisoner.yaml
deployments/helm/onap4k8s/charts/mongo/templates/statefulset.yaml
deployments/helm/onap4k8s/charts/multicloud-k8s/templates/deployment.yaml
kud/ci/k8s-cluster.yml [new file with mode: 0644]
kud/ci/kud-installer.sh
kud/deployment_infra/images/multus-daemonset.yml
kud/deployment_infra/images/nfn.yml
kud/deployment_infra/images/sriov-cni.yml
kud/deployment_infra/images/sriov-daemonset.yml
kud/deployment_infra/playbooks/kud-vars.yml
kud/hosting_providers/containerized/inventory/group_vars/k8s-cluster.yml
kud/hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml
kud/tests/vnfs/comp-app/collection/app1/helm/collectd/templates/daemonset.yaml

index 9b274ad..aeae726 100644 (file)
@@ -29,7 +29,7 @@
 {{- define "common.ingress" -}}
 {{- if .Values.ingress -}}
 {{- if .Values.ingress.enabled -}}
-apiVersion: extensions/v1beta1
+apiVersion: networking.k8s.io/v1beta1
 kind: Ingress
 metadata:
   name: {{ include "common.fullname" . }}-ingress
index 7da825a..012a4e1 100644 (file)
@@ -12,6 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+apiVersion: v1
 name: etcd
 home: https://github.com/coreos/etcd
 version: 5.0.0
index 7190c5b..a32f048 100644 (file)
@@ -11,7 +11,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-apiVersion: apps/v1beta1
+apiVersion: apps/v1
 kind: StatefulSet
 metadata:
   name: {{ include "common.fullname" .  }}
@@ -23,6 +23,12 @@ metadata:
 spec:
   serviceName: {{ include "common.servicename" .}}
   replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      heritage: "{{ .Release.Service }}"
+      release: "{{ .Release.Name }}"
+      chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+      app: {{ include "common.name" . }}
   template:
     metadata:
       labels:
index 355ad38..a69382e 100644 (file)
@@ -15,7 +15,7 @@
 */}}
 
 {{ if not .Values.disableNfsProvisioner }}
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
@@ -26,6 +26,10 @@ metadata:
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
 spec:
+  selector:
+    matchLabels:
+      app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+      release: {{ .Release.Name }}
   #replicas: {{ .Values.replicaCount }}
   strategy:
     type: Recreate
index c79739f..c234ce3 100644 (file)
@@ -14,7 +14,7 @@
 # limitations under the License.
 */}}
 
-apiVersion: apps/v1beta1
+apiVersion: apps/v1
 kind: StatefulSet
 metadata:
   name: {{ include "common.fullname" . }}
@@ -27,6 +27,10 @@ metadata:
 spec:
   serviceName: {{ .Values.service.name }}
   replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
+      release: {{ .Release.Name }}
   template:
     metadata:
       labels:
index 846a751..907afd3 100644 (file)
@@ -14,7 +14,7 @@
 # limitations under the License.
 */}}
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.fullname" . }}
@@ -26,6 +26,10 @@ metadata:
     heritage: {{ .Release.Service }}
 spec:
   replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
+      release: {{ .Release.Name }}
   template:
     metadata:
       labels:
diff --git a/kud/ci/k8s-cluster.yml b/kud/ci/k8s-cluster.yml
new file mode 100644 (file)
index 0000000..8191d4b
--- /dev/null
@@ -0,0 +1,83 @@
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2018
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# Kubernetes configuration dirs and system namespace.
+# Those are where all the additional config stuff goes
+# kubernetes normally puts in /srv/kubernetes.
+# This puts them in a sane location and namespace.
+# Editing those values will almost surely break something.
+system_namespace: kube-system
+
+docker_version: 'latest'
+
+# Logging directory (sysvinit systems)
+kube_log_dir: "/var/log/kubernetes"
+
+kube_api_anonymous_auth: true
+
+# Users to create for basic auth in Kubernetes API via HTTP
+# Optionally add groups for user
+kube_api_pwd: "secret"
+kube_users:
+  kube:
+    pass: "{{kube_api_pwd}}"
+    role: admin
+    groups:
+      - system:masters
+
+## It is possible to activate / deactivate selected authentication methods (basic auth, static token auth)
+#kube_oidc_auth: false
+kube_basic_auth: true
+kube_token_auth: true
+
+# Choose network plugin (calico, contiv, weave or flannel)
+# Can also be set to 'cloud', which lets the cloud provider setup appropriate routing
+kube_network_plugin: flannel
+
+# Make a copy of kubeconfig (admin.conf) on the host that runs Ansible to inventory/artifacts
+kubeconfig_localhost: true
+# Copy kubectl binary on the host that runs Ansible to inventory/artifacts
+kubectl_localhost: true
+# Disable nodelocal dns cache
+enable_nodelocaldns: false
+# Enable MountPropagation gate feature
+local_volumes_enabled: true
+local_volume_provisioner_enabled: true
+
+## Change this to use another Kubernetes version, e.g. a current beta release
+kube_version: v1.16.9
+
+# Helm deployment
+helm_enabled: true
+
+# Kube-proxy proxyMode configuration.
+# NOTE: Ipvs is based on netfilter hook function, but uses hash table as the underlying data structure and
+# works in the kernel space
+# https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs
+#kube_proxy_mode: ipvs
+
+# Download container images only once then push to cluster nodes in batches
+download_run_once: False
+
+# Where the binaries will be downloaded.
+# Note: ensure that you've enough disk space (about 1G)
+local_release_dir: "/tmp/releases"
+download_cache_dir: "/tmp/kubespray_cache"
+retry_stagger: 10
+
+#Set download_localhost: True to make localhost the download delegate. This can be useful if 
+#cluster nodes cannot access external addresses. To use this requires that docker is installed 
+#and running on the ansible master and that the current user is either in the docker group or 
+#can do passwordless sudo, to be able to access docker. 
+download_localhost: False
+
+# Subnet for cluster IPs
+kube_service_addresses: 10.244.0.0/18
+# Subnet for Pod IPs
+kube_pods_subnet: 10.244.64.0/18
index 73c1628..956a15a 100755 (executable)
@@ -9,5 +9,6 @@
 set -x -e -o pipefail
 
 curr_dir="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")"
+cp ${curr_dir}/k8s-cluster.yml ${curr_dir}/../hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml
 cd ${curr_dir}/../hosting_providers/baremetal
 ./aio.sh
index 0c41a05..d6d8d53 100644 (file)
@@ -101,7 +101,7 @@ data:
       "kubeconfig": "/etc/cni/net.d/multus.d/multus.kubeconfig"
     }
 ---
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: DaemonSet
 metadata:
   name: kube-multus-ds-amd64
@@ -110,6 +110,10 @@ metadata:
     tier: node
     app: multus
 spec:
+  selector:
+    matchLabels:
+      tier: node
+      app: multus
   updateStrategy:
     type: RollingUpdate
   template:
index 2e033e0..5c5e444 100644 (file)
@@ -448,7 +448,7 @@ data:
           kubeconfig=/etc/kubernetes/admin.conf
 
 ---
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: DaemonSet
 metadata:
   name: ovn4nfv-cni
@@ -456,6 +456,9 @@ metadata:
   labels:
     app: ovn4nfv
 spec:
+  selector:
+    matchLabels:
+      app: ovn4nfv
   updateStrategy:
     type: RollingUpdate
   template:
@@ -505,7 +508,7 @@ spec:
               path: ovn4nfv_k8s.conf
 
 ---
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: DaemonSet
 metadata:
   name: nfn-agent
@@ -513,6 +516,9 @@ metadata:
   labels:
     app: nfn-agent
 spec:
+  selector:
+    matchLabels:
+      app: nfn-agent
   updateStrategy:
     type: RollingUpdate
   template:
index bd943d0..7503b87 100644 (file)
@@ -2,7 +2,7 @@
 # Based on:
 # https://github.com/intel/sriov-cni/blob/master/images/sriov-cni-daemonset.yaml
 ---
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: DaemonSet
 metadata:
   name: kube-sriov-cni-ds-amd64
@@ -11,6 +11,10 @@ metadata:
     tier: node
     app: sriov-cni
 spec:
+  selector:
+    matchLabels:
+      tier: node
+      app: sriov-cni
   template:
     metadata:
       labels:
index 72f3386..e392028 100644 (file)
@@ -27,7 +27,7 @@ metadata:
   namespace: kube-system
 
 ---
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: DaemonSet
 metadata:
   name: kube-sriov-device-plugin-amd64
@@ -36,6 +36,10 @@ metadata:
     tier: node
     app: sriovdp
 spec:
+  selector:
+    matchLabels:
+      tier: node
+      app: sriovdp
   template:
     metadata:
       labels:
index 7a25670..89c8f4e 100644 (file)
@@ -57,10 +57,10 @@ cmk_untaint_required: true
 #cmk_exclusive_mode: packed # choose between: packed, spread, default: packed
 
 go_version: '1.12.5'
-kubespray_version: 2.10.4
+kubespray_version: 2.12.6
 helm_client_version: 2.13.1
 # kud playbooks not compatible with 2.8.0 - see MULTICLOUD-634
-ansible_version: 2.7.10
+ansible_version: 2.9.7
 
 sriov_dest: "{{ base_dest }}/sriov"
 sriov_driver_source_type: "tarball"
index 5ba115b..5560dd9 100644 (file)
@@ -14,6 +14,8 @@
 # Editing those values will almost surely break something.
 system_namespace: kube-system
 
+docker_version: 'latest'
+
 # Logging directory (sysvinit systems)
 kube_log_dir: "/var/log/kubernetes"
 
@@ -48,7 +50,7 @@ local_volumes_enabled: true
 local_volume_provisioner_enabled: true
 
 ## Change this to use another Kubernetes version, e.g. a current beta release
-kube_version: v1.14.3
+kube_version: v1.16.9
 
 # Helm deployment
 helm_enabled: true
index 1833977..30fd5c0 100644 (file)
@@ -51,7 +51,7 @@ local_volumes_enabled: true
 local_volume_provisioner_enabled: true
 
 ## Change this to use another Kubernetes version, e.g. a current beta release
-kube_version: v1.14.3
+kube_version: v1.16.9
 
 # Helm deployment
 helm_enabled: true
@@ -63,17 +63,17 @@ helm_enabled: true
 #kube_proxy_mode: ipvs
 
 # Download container images only once then push to cluster nodes in batches
-download_run_once: true
+download_run_once: True
 
 # Where the binaries will be downloaded.
 # Note: ensure that you've enough disk space (about 1G)
 local_release_dir: "/tmp/releases"
 
-# Makes the installer node a delegate for pushing images while running
-# the deployment with ansible. This maybe the case if cluster nodes
-# cannot access each over via ssh or you want to use local docker
-# images as a cache for multiple clusters.
-download_localhost: true
+#Set download_localhost: True to make localhost the download delegate. This can be useful if 
+#cluster nodes cannot access external addresses. To use this requires that docker is installed 
+#and running on the ansible master and that the current user is either in the docker group or 
+#can do passwordless sudo, to be able to access docker. 
+download_localhost: True
 
 # Subnet for cluster IPs
 kube_service_addresses: 10.244.0.0/18
index bc68638..6935398 100644 (file)
@@ -14,7 +14,7 @@
 # limitations under the License.
 */}}
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: DaemonSet
 metadata:
   name: {{ template "fullname" . }}