From 325975f1b90a63d86688c965f41ba96f791c686b Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Tue, 9 Jul 2019 12:24:57 -0500 Subject: [PATCH] Update kubernetes config for 1.15 features. Upgrading from kubernetes 1.13.5 to 1.15.0 meant the config needed to be updated to handle whatever was deprecated or dropped in 1.14 and 1.15. 1) Removed "ConfigMapAndSecretChangeDetectionStrategy = Watch" reported by https://github.com/kubernetes/kubernetes/issues/74412 because this was a golang deficiency, and is fixed by the newer version of golang. 2) Enforced the kubernetes 1.15.3 version 3) Updated v1alpha3 to v1beta2, since alpha3 was dropped in 1.14 changed fields for beta1 and beta2 are mentioned in these docs: https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta1 https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2 4) cgroup validation checking now includes the pids subfolder. 5) Update ceph-config-helper to v1.15 kubernetes compatable This means that the stx-openstack version check needed to be increased Change-Id: Ibe3d5960c5dee1d217d01fbb56c785581dd1b42c Story: 2005860 Task: 35841 Depends-On: https://review.opendev.org/#/c/671150 Signed-off-by: Al Bailey --- api-ref/source/api-ref-sysinv-v1-config.rst | 6 +++--- .../stx-openstack-helm/centos/build_srpm.data | 3 +-- .../stx-openstack-helm/manifests/manifest.yaml | 8 ++++++++ kubernetes/helm-charts/ceph-pools-audit/values.yaml | 2 +- kubernetes/helm-charts/rbd-provisioner/values.yaml | 2 +- .../src/modules/platform/manifests/kubernetes.pp | 4 ++-- .../src/modules/platform/templates/kubeadm.yaml.erb | 11 ++++------- .../sysinv/sysinv/helm/openstack_version_check.py | 6 +++--- 8 files changed, 23 insertions(+), 19 deletions(-) diff --git a/api-ref/source/api-ref-sysinv-v1-config.rst b/api-ref/source/api-ref-sysinv-v1-config.rst index 593b14985a..093fdaf24e 100644 --- a/api-ref/source/api-ref-sysinv-v1-config.rst +++ b/api-ref/source/api-ref-sysinv-v1-config.rst @@ -10896,7 +10896,7 @@ itemNotFound (404) "registry_images": [ { "tag": null, - "name": "docker.io/port/ceph-config-helper" + "name": "docker.io/starlingx/ceph-config-helper" }, { "tag": null, @@ -10946,8 +10946,8 @@ itemNotFound (404) { "registry_images": [ { - "tag": "v1.10.3", - "name": "docker.io/port/ceph-config-helper" + "tag": "v1.15.0", + "name": "docker.io/starlingx/ceph-config-helper" } ] } diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/centos/build_srpm.data b/kubernetes/applications/stx-openstack/stx-openstack-helm/centos/build_srpm.data index b03f264d66..75870a37d1 100644 --- a/kubernetes/applications/stx-openstack/stx-openstack-helm/centos/build_srpm.data +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/centos/build_srpm.data @@ -1,9 +1,8 @@ SRC_DIR="stx-openstack-helm" COPY_LIST_TO_TAR="$PKG_BASE/../../../helm-charts/garbd \ $PKG_BASE/../../../helm-charts/nginx-ports-control" - # This version is used as a component of the stx-openstack application # version. Any change to this version must also be reflected in the # SUPPORTED_VERSIONS list in sysinv/helm/openstack_version_check.py # -TIS_PATCH_VER=17 +TIS_PATCH_VER=18 diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml index 3b37e84d8d..e8c2f0afe5 100644 --- a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml @@ -556,6 +556,8 @@ data: ks_endpoints: docker.io/starlingx/stx-heat:master-centos-stable-latest ks_service: docker.io/starlingx/stx-heat:master-centos-stable-latest ks_user: docker.io/starlingx/stx-heat:master-centos-stable-latest + rgw_s3_admin: docker.io/starlingx/ceph-config-helper:v1.15.0 + ceph_config_helper: docker.io/starlingx/ceph-config-helper:v1.15.0 labels: api: node_selector_key: openstack-control-plane @@ -628,6 +630,7 @@ data: glance_api: docker.io/starlingx/stx-glance:master-centos-stable-latest glance_db_sync: docker.io/starlingx/stx-glance:master-centos-stable-latest glance_registry: docker.io/starlingx/stx-glance:master-centos-stable-latest + glance_storage_init: docker.io/starlingx/ceph-config-helper:v1.15.0 ks_endpoints: docker.io/starlingx/stx-heat:master-centos-stable-latest ks_service: docker.io/starlingx/stx-heat:master-centos-stable-latest ks_user: docker.io/starlingx/stx-heat:master-centos-stable-latest @@ -696,8 +699,10 @@ data: bootstrap: docker.io/starlingx/stx-heat:master-centos-stable-latest cinder_api: docker.io/starlingx/stx-cinder:master-centos-stable-latest cinder_backup: docker.io/starlingx/stx-cinder:master-centos-stable-latest + cinder_backup_storage_init: docker.io/starlingx/ceph-config-helper:v1.15.0 cinder_db_sync: docker.io/starlingx/stx-cinder:master-centos-stable-latest cinder_scheduler: docker.io/starlingx/stx-cinder:master-centos-stable-latest + cinder_storage_init: docker.io/starlingx/ceph-config-helper:v1.15.0 cinder_volume: docker.io/starlingx/stx-cinder:master-centos-stable-latest cinder_volume_usage_audit: docker.io/starlingx/stx-cinder:master-centos-stable-latest db_drop: docker.io/starlingx/stx-heat:master-centos-stable-latest @@ -901,8 +906,10 @@ data: nova_novncproxy: docker.io/starlingx/stx-nova:master-centos-stable-latest nova_placement: docker.io/starlingx/stx-nova:master-centos-stable-latest nova_scheduler: docker.io/starlingx/stx-nova:master-centos-stable-latest + nova_service_cleaner: docker.io/starlingx/ceph-config-helper:v1.15.0 nova_spiceproxy: docker.io/starlingx/stx-nova:master-centos-stable-latest nova_spiceproxy_assets: docker.io/starlingx/stx-nova:master-centos-stable-latest + nova_storage_init: docker.io/starlingx/ceph-config-helper:v1.15.0 pod: # TODO(rchurch): # Change-Id: I5a60efd133c156ce2ecac31d22e94b25e4e837bf broke armada apply @@ -1622,6 +1629,7 @@ data: gnocchi_metricd: docker.io/starlingx/stx-gnocchi:master-centos-stable-latest gnocchi_resources_cleaner: docker.io/starlingx/stx-gnocchi:master-centos-stable-latest gnocchi_statsd: docker.io/starlingx/stx-gnocchi:master-centos-stable-latest + gnocchi_storage_init: docker.io/starlingx/ceph-config-helper:v1.15.0 ks_endpoints: docker.io/starlingx/stx-heat:master-centos-stable-latest ks_service: docker.io/starlingx/stx-heat:master-centos-stable-latest ks_user: docker.io/starlingx/stx-heat:master-centos-stable-latest diff --git a/kubernetes/helm-charts/ceph-pools-audit/values.yaml b/kubernetes/helm-charts/ceph-pools-audit/values.yaml index 4899eecc3b..f255d008f0 100644 --- a/kubernetes/helm-charts/ceph-pools-audit/values.yaml +++ b/kubernetes/helm-charts/ceph-pools-audit/values.yaml @@ -26,7 +26,7 @@ conf: images: tags: - ceph_config_helper: docker.io/port/ceph-config-helper:v1.10.3 + ceph_config_helper: docker.io/starlingx/ceph-config-helper:v1.15.0 pullPolicy: "IfNotPresent" local_registry: active: false diff --git a/kubernetes/helm-charts/rbd-provisioner/values.yaml b/kubernetes/helm-charts/rbd-provisioner/values.yaml index cc9658ec98..04b72686e3 100644 --- a/kubernetes/helm-charts/rbd-provisioner/values.yaml +++ b/kubernetes/helm-charts/rbd-provisioner/values.yaml @@ -165,7 +165,7 @@ ephemeral_pools: images: tags: rbd_provisioner: quay.io/external_storage/rbd-provisioner:v2.1.1-k8s1.11 - rbd_provisioner_storage_init: docker.io/port/ceph-config-helper:v1.10.3 + rbd_provisioner_storage_init: docker.io/starlingx/ceph-config-helper:v1.15.0 pull_policy: "IfNotPresent" local_registry: active: false diff --git a/puppet-manifests/src/modules/platform/manifests/kubernetes.pp b/puppet-manifests/src/modules/platform/manifests/kubernetes.pp index e57c38980d..909d46a9df 100644 --- a/puppet-manifests/src/modules/platform/manifests/kubernetes.pp +++ b/puppet-manifests/src/modules/platform/manifests/kubernetes.pp @@ -24,7 +24,7 @@ class platform::kubernetes::params ( class platform::kubernetes::cgroup::params ( $cgroup_root = '/sys/fs/cgroup', $cgroup_name = 'k8s-infra', - $controllers = ['cpuset', 'cpu', 'cpuacct', 'memory', 'systemd'], + $controllers = ['cpuset', 'cpu', 'cpuacct', 'memory', 'systemd', 'pids'], ) {} class platform::kubernetes::cgroup @@ -48,7 +48,7 @@ class platform::kubernetes::cgroup # NOTE: The kubernetes cgroup_manager_linux func Exists() checks that # specific subsystem cgroup paths actually exist on the system. The # particular cgroup cgroupRoot must exist for the following controllers: - # "cpu", "cpuacct", "cpuset", "memory", "systemd". + # "cpu", "cpuacct", "cpuset", "memory", "systemd", "pids". # Reference: # https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/cm/cgroup_manager_linux.go # systemd automatically mounts cgroups and controllers, so don't need diff --git a/puppet-manifests/src/modules/platform/templates/kubeadm.yaml.erb b/puppet-manifests/src/modules/platform/templates/kubeadm.yaml.erb index 42c7ddc585..73c82111e3 100644 --- a/puppet-manifests/src/modules/platform/templates/kubeadm.yaml.erb +++ b/puppet-manifests/src/modules/platform/templates/kubeadm.yaml.erb @@ -1,11 +1,10 @@ -apiVersion: kubeadm.k8s.io/v1alpha3 +apiVersion: kubeadm.k8s.io/v1beta2 kind: InitConfiguration -apiEndpoint: +localAPIEndpoint: advertiseAddress: <%= @apiserver_advertise_address %> --- -apiVersion: kubeadm.k8s.io/v1beta1 +apiVersion: kubeadm.k8s.io/v1beta2 kind: ClusterConfiguration -kubernetesVersion: 1.13.5 apiServer: certSANs: @@ -29,6 +28,7 @@ etcd: endpoints: - <%= @etcd_endpoint %> imageRepository: "<%= @k8s_registry %>" +kubernetesVersion: v1.15.3 networking: dnsDomain: <%= @service_domain %> podSubnet: <%= @pod_network_cidr %> @@ -36,9 +36,6 @@ networking: --- kind: KubeletConfiguration apiVersion: kubelet.config.k8s.io/v1beta1 -# Workaround for the following issue: -# https://github.com/kubernetes/kubernetes/issues/74412 -configMapAndSecretChangeDetectionStrategy: Cache nodeStatusUpdateFrequency: "4s" failSwapOn: false cgroupRoot: "/k8s-infra" diff --git a/sysinv/sysinv/sysinv/sysinv/helm/openstack_version_check.py b/sysinv/sysinv/sysinv/sysinv/helm/openstack_version_check.py index 7f24539a74..85665b0072 100644 --- a/sysinv/sysinv/sysinv/sysinv/helm/openstack_version_check.py +++ b/sysinv/sysinv/sysinv/sysinv/helm/openstack_version_check.py @@ -7,9 +7,9 @@ from sysinv.helm import base SUPPORTED_VERSIONS = { - '1.0-17-centos-stable-versioned', - '1.0-17-centos-stable-latest', - '1.0-17', + '1.0-18-centos-stable-versioned', + '1.0-18-centos-stable-latest', + '1.0-18', }