Commit Graph

99 Commits

Author SHA1 Message Date
Ruslan Aliev a58678d5d2 Add configurable ETCD parameters to aux cluster
Bump k8s, calico, etcd, coredns and helm.

Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: I77373c223c6ea723ee31fe51e6fb4a9e84be03f7
2024-04-18 13:22:17 -05:00
SPEARS, DUSTIN (ds443n) 7f15516372 Update k8s to v1.29.2
Change-Id: I8d8d38e62fd13884afb0d0c4d027d81879cbe313
2024-03-07 16:41:50 -05:00
SPEARS, DUSTIN (ds443n) 89d9d907b7 Upgrade kubernetes to v1.29.0
Change-Id: I2d62dac82d6b9d738c3aa71e541e89eddeb5ae87
2024-01-08 13:39:28 -05:00
SPEARS, DUSTIN (ds443n) 903b1363db Update k8s to v1.28.4
Change-Id: I300aa19f78206712b08d246cabbe5043b8abf509
2023-11-30 13:42:20 -05:00
Sergiy Markin 69a74590e7 Airflow stable 2.6.2
This PS updates python modules and code to match Airflow 2.6.2:

- bionic py36 gates  were removed
- python code corrected to match new modules versions
- selection of python modules versions was perfoemed based on
  airflow-2.6.2 constraints

Change-Id: I9c3e139b3437414a61af7e7c0b7d7e533fadefda
2023-08-29 21:12:11 +00:00
SPEARS, DUSTIN (ds443n) f806f8983a Update k8s to 1.27.4
Change-Id: I782762508f5fa8206751d7b9f719bcea448efe09
2023-07-31 13:55:03 -04:00
SPEARS, DUSTIN (ds443n) 3c68fb2281 Update k8s to 1.27.2
Bump k8s from 1.27.1 to 1.27.2

Change-Id: If171853f06d970a8bcfaa83098e407de9b4bc041
2023-06-02 15:28:33 -04:00
SPEARS, DUSTIN (ds443n) 7a4051c6a3 Revert chart version
reverting chart versions to previous value

Change-Id: Id1d06f81d997d704af1a0bdb3fd0d8c9e8746360
2023-05-17 15:39:24 -04:00
SPEARS, DUSTIN (ds443n) 1717ed84e5 k8s upgrade to 1.27.1
upgrades kubernetes client to v1.27.1
upgrade etcd to v3.5.6

Change-Id: Iaf287353425aa6263a81617890a2ca3c2f2e4281
2023-05-17 10:32:04 -04:00
SPEARS, DUSTIN (ds443n) 70dd0c8599 Remove deprecated controller-manager flag
Additionally update all images from k8s.gcr.io to registry.k8s.io

Change-Id: I0240ee0bf5d23d035126a81318f57b240f5af402
2023-04-18 15:02:30 -04:00
SPEARS, DUSTIN (ds443n) 27a8b0d798 k8s upgrade to 1.26.0
upgrades kubernetes client to v1.26.0
remove installation of containerd during genesis.sh to prevent containerd downgrade
update bitnami kubectl image to image with curl installed for readiness check

Change-Id: I3afd5a7e7211bae3f52263167a62a012da0619a0
2023-03-20 13:16:48 -04:00
Ruslan Aliev c10165c144 K8S upgrade 1.24
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: Iaa0c5f57ac621f2b91f525da423db0acd9d8ea99
2022-09-14 19:34:02 -05:00
Ruslan Aliev e207bbe966 k8s upgrade to v1.23.7
Address changes and deprecations in Kubernetes v1.21=>v1.23

controller-manager:
* --authorization-kubeconfig and --authentication-kubeconfig must be set
* liveness/readiness probes must use HTTPS
* the default port has been changed to 10257

kubelet:
* --dynamic-config-dir has been deprecated, will not move to GA
* --cni-bin-dir has been deprecated, will be removed with dockershim
* --cni-conf-dir has been deprecated, will be removed with dockershim
* --network-plugin has been deprecated, will be removed with dockershim

https: //github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.23.md#deprecation
https: //kubernetes.io/docs/tasks/administer-cluster/reconfigure-kubelet/
https: //github.com/kubernetes/enhancements/tree/master/keps/sig-node/281-dynamic-kubelet-configuration
Change-Id: Ia996d7c14d81d1d8b8067f11c02ffb4ce90eb49a
2022-06-29 00:21:45 -05:00
Phil Sphicas 0f9818eccc Use bitnami kubectl
Update the anchor pods to use a regularly patched and updated kubectl
image that contains the necessary components (bash, jq, curl, etc.) in
addition to kubectl: https://hub.docker.com/r/bitnami/kubectl

Change-Id: Ia3e75dc334c3c1a88abfec10fb0367447e79a538
2022-04-25 14:28:59 -07:00
Phil Sphicas 6a17e4fccd Use curl (not socat) in apiserver anchor readiness
Update the kubernetes apiserver anchor pod to use curl instead of socat
for its readiness probe.

Change-Id: Id102d6542fa21b6d692781f81d250a3231e18771
2022-04-25 14:22:01 -07:00
francisy 3cac5cbde0 Promenade Enhancement
Update charts in Promenade to Kubernetes version 1.21

Change-Id: Iab6d10b384a8be3a4b4d2357a51b35ab93a797b0
2022-01-10 14:04:15 -05:00
Phil Sphicas e4d9d99c13 Update charts to use stable Kubernetes APIs
Update applicable charts to use non-deprecated APIs [0], specifically
addressing the following resource types:
* ClusterRole
* ClusterRoleBinding
* Role
* Rolebinding

The APIs being migrated to are available in v1.19 or earlier. As of this
change, v1.19 is the oldest supported Kubernetes version, slated for EOL
on 2021-10-28. [1]

0: https://kubernetes.io/docs/reference/using-api/deprecation-guide/
1: https://kubernetes.io/releases/
Change-Id: I134b201d9ae01a8d74e34ee14f3bfe3b960cb5aa
2021-10-18 18:59:34 +00:00
Phil Sphicas 08906262fd Update tolerations and priority classes
* Give kube-proxy a blanket toleration
* Replace scheduler.alpha.kubernetes.io/critical-pod annotation with
    priorityClassName: system-node-critical

Change-Id: I810333913c09531eefa1ded014fe090d4cca7f7d
2021-10-18 11:33:54 -07:00
Sean Eagan 2f823c69d2 Helm 3: Fix Job labels
See the dependency below for details.

Depends-On: https://review.opendev.org/c/openstack/openstack-helm-infra/+/811826
Change-Id: Ib7730c5cbcaa95dab615baac1efda310e5a52fcc
2021-10-06 13:18:43 +00:00
Sean Eagan 9d696ca0a4 Use helm 3 in chart build
`helm serve` is removed in helm 3 so this moves
to using local `file://` dependencies [0] instead.

[0]: https://helm.sh/docs/chart_best_practices/dependencies/#repository-urls

Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: Ia45c57e0cccac477f6ff59a254d03d6fcec14bef
2021-09-30 16:57:05 -05:00
Phil Sphicas 41b3ad3dbb Adjust kube-apiserver anchor readiness
To avoid cycling the pods in the anchor daemonset too quickly, only
consider a kubernetes-apiserver-anchor pod ready if:
- it created the static manifest kubernetes-apiserver.yaml
- the kubernetes-apiserver pod on the same host is ready

Change-Id: I53dd1c044332946eeb965f07ae828910f00b04c6
2021-08-10 16:48:14 +00:00
Phil Sphicas 3e28b0ee2d Fix kube-apiserver anchor script rendering
This change corrects two rendering issues in the kube-apiserver anchor
script. The details and impact are mentioned below.

1. The kube-apiserver anchor script fails to clean up some files from
the host, because the path is incomplete. For example, the cleanup()
function of the script includes:

    rm -f "/host/acconfig.yaml"

instead of

    rm -f "/host/etc/kubernetes/apiserver/acconfig.yaml"

2. A recent change to allow fileless command options [0] caused some
extraneous lines to end up in the script. For example, the rendered
script includes:

    snapshot_files() {
        cp "/tmp/etc/" "${SNAPSHOT_DIR}/etc/kubernetes/apiserver/"
    }

    compare_copy_files() {
        SRC="${SNAPSHOT_DIR}/etc/kubernetes/apiserver/"
        DEST="/host/etc/kubernetes/apiserver/"
        if [ ! -e "${DEST}" ] || ! cmp -s "${SRC}" "${DEST}"; then
            mkdir -p $(dirname "${DEST}")
            cp "${SRC}" "${DEST}"
            chmod go-rwx "${DEST}"
        fi
    }

    cleanup() {
        rm -f "/host/"
    }

Since the 'cp' and 'rm' commands don't include '-r', this is actually
non-impacting, other than some log messages.

0: https://review.opendev.org/c/airship/promenade/+/788092

Change-Id: Id0a47727d56268d13ebb4718b8578d94272c2181
2021-08-09 16:45:24 +00:00
ubuntu 183b977754 Fix deprecated warning in Promenade apiserver chart
Removed PersistentVolumeLabel from apiserver to fix below warning.
Deprecated warning:
1. PersistentVolumeLabel admission controller is deprecated.
   Please remove this controller from your configuration files and scripts.
2. insecure-port has been deprecated, This flag has no effect now
   and will be removed in v1.24.

Change-Id: Iaccff8467b5ed967fa41e85b38c27f7345cd97bb
2021-06-29 16:14:17 +00:00
Phil Sphicas ae6782b452 Kubernetes: Uplift to v1.20.5
Uplift Kubernetes images and binaries from v1.19.7 to v1.20.5. No config
changes.

Change-Id: If2a8c9169c831a001205e8aa947df7fc00a1e658
2021-05-03 17:21:30 +00:00
Phil Sphicas 9533be32a1 Add required apiserver serviceaccount flags
In v1.20, TokenRequest and TokenRequestProjection become GA features,
and the following flags are required by the API server:
* --service-account-issuer
* --service-account-key-file
* --service-account-signing-key-file

This change ensures that the flags are set, and that the required keys
are in the right places.

Change-Id: I6606c5b1c9ff005d1943b424e3e7ad4d20b68408
2021-04-30 22:45:43 +00:00
Phil Sphicas 300a399aff apiserver(-webhook): Allow fileless kube-apiserver command_options
The kube-apiserver command line is constructed from a command_prefix
array, and in the case of the apiserver chart, an arguments array, both
defined in values.yaml. If an option needs to be added to the command
line, the entire array needs to be redefined in a values.yaml override,
which is sometimes inconvenient.

There is an existing interface in the apiserver and apiserver-webhook
charts to allow kube-apiserver arguments to be appended, but only when
they are associated with a config file that is dynamically included in a
configmap. The typical usage is similar to:

    conf:
      ignored_key_name:
        file: filename.yaml
        content: ...
        command_options:
          - --some-file=/etc/kubernetes/apiserver/filename.yaml

This change removes the requirement to include a file in the configmap,
allowing arbitrary command options to be appended. For example, in the
apiserver chart, this is now possible:

    conf:
      ignored_key_name:
        command_options:
          - --service-account-issuer=apiserver

Change-Id: I86283ecedd701c0f061da7b706d6ed54498f27a3
2021-04-28 05:18:16 +00:00
Phil Sphicas c6b62ff414 apiserver(-webhook): Allow volume overrides
The existing apiserver chart supports volume overrides for the anchor
daemonset, but not for the apiserver static pod itself. The feature to
allow volume overrides in the apiserver-webhook chart was never fully
implemented.

This changes allows volume overrides via values.yaml for both charts,
and provides a more complete audit example that includes mounting the
audit log destination as a host path volume.

Change-Id: I27ccf77671a190e8cb6b66d8a9b13c2cde6c9a45
2021-04-21 21:52:29 +00:00
Phil Sphicas 27f181a9d3 Add configmap-etc-hash to apiserver anchor
The apiserver anchor pods already have an annotation to detect changes
in the apiserver-bin configmap, but not for apiserver-etc.

This change adds the hash annotation, so that the daemonset pods will
cycle if a chart upgrade should result in a config change to the
apiserver static pod.

Change-Id: If3aa1b77ea9a737705b8be5e4938b183e310e265
2021-03-15 17:18:58 +00:00
Phil Sphicas 5bb58863b6 Uplift Kubernetes to v1.19.7
Change-Id: I2ac28e2383cb9c4d84d09c23c02a087db714803e
2021-02-11 17:23:32 +00:00
Phil Sphicas 5323ca2710 Deploy with standalone kubernetes images
Replace all usages of the hyperkube image with standalone container
images for apiserver, controller, scheduler, and proxy.

Change-Id: I44392c7900a72edd35bc5afa1c50bec8e04f927f
2021-02-11 17:23:32 +00:00
Chris Wedgwood 630e504e3e Update to container image repo k8s.gcr.io
gcr.io/google_containers/ no longer contains some of the image
versions we require, use the new location.

Change-Id: I8f9a976a35ca632d785dd4d05f2a55713bde8c3e
2021-01-11 17:42:31 +00:00
Phil Sphicas 946a28dc76 Use HostToContainer mountPropagation
For any host mounts that include /var/lib/kubelet, use HostToContainer
mountPropagation, which avoids creating extra references to mounts in
other containers.

Affects the following resources:
* haproxy-anchor daemonset
* kubernetes-apiserver-anchor daemonset
* kubernetes-controller-manager-anchor daemonset
* kubernetes-scheduler-anchor daemonset

Change-Id: Ib7fb018c4c1916d00311a73f64f77a99b682d4c8
2021-01-08 01:05:04 +00:00
Phil Sphicas de9f8415d7 kube-apiserver: disable http2
There are several kubernetes bugs [0,1,2] involving connection problems
that seem related to the Go net/http2 library, where the stream state
and connection state can get out of sync. This can manifest as a kubelet
issue, where the node status gets stuck in a NotReady state, but can
also happen elsewhere.

In newer versions of the Go libraries some issues are fixed [3,4], but
the fixes are not present in k8s 1.18.

This change disables http2 in kube-apiserver and webhook-apiserver. This
should be sufficient to avoid the majority of the issues, as disabling
on one side of the connection is enough, and apiserver is generally
either the client or the server.

0: https://github.com/kubernetes/kubernetes/issues/87615
1: https://github.com/kubernetes/kubernetes/issues/80313
2: https://github.com/kubernetes/client-go/issues/374
3: https://github.com/golang/go/issues/40423
4: https://github.com/golang/go/issues/40201

Change-Id: Id693a7201acffccbc4b3db8f4e4b96290fd50288
2020-10-23 21:28:51 +00:00
Phil Sphicas fb36579e16 kube-apiserver: use HTTP probes instead of exec
The existing exec probes for apiserver rely on things that do not exist
in the official kubernetes release images (bash, socat).

This change modifies the apiserver to use HTTP probes of the recommended
liveness and readiness endpoints.[0]

Also sets `--anonymous-auth=true` (the default setting), as kubelet is
unable to provide a client certificate when performing the health check.
RBAC rules apply, but unauthenticated users will be able to access the
following endpoints:

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      name: system:public-info-viewer
    rules:
    - nonResourceURLs:
      - /healthz
      - /livez
      - /readyz
      - /version
      - /version/
      verbs:
      - get

0: https://v1-18.docs.kubernetes.io/docs/reference/using-api/health-checks/

Change-Id: I06d739c844fe85ec6cbf47d3bb69a39cd008ddd8
2020-09-28 03:27:58 +00:00
Phil Sphicas be7b82e1a1 kube-apiserver: Allow probe customization
Uses the standard helm-toolkit macros for liveness and readiness probes,
allowing them to be enabled or disabled, and params to be overridden.

Change-Id: Ie9aef97f56f2205ada24f17e7cafabc5943ae097
2020-09-28 03:25:50 +00:00
Chris Wedgwood 8c52be3dde Remove /hyperkube prefix
The /hyperkube prefix isn't required and causes problems when using
non-hyperkube images elsewhere.

Change-Id: Ie9281b07e3be0eedbe86be726f907f68461e23b2
2020-09-26 07:53:46 +00:00
Andrii Ostapenko 940253563a
Change helm-toolkit dependency version to ">= 0.1.0"
Since we introduced chart version check in gates, requirements are not
satisfied with strict check of 0.1.0

Change-Id: Ifd2d7af1f2dabe9bbccd65551e0223dddff529dc
2020-09-24 19:43:10 -05:00
Mahmoudi, Ahmad (am495p) c302a083a6 Upgrade k8s from v1.17.3 to v1.18.6
This ps makes following changes to upgrade kubernetes from v1.17.3
to v1.18.6.
  - Updated all references to k8s images to 1.18.6
  - Updated command options and api object and versions based on
    k8s 1.18 release notes:
      https://kubernetes.io/docs/setup/release/notes/
  - Uplifted uwsgi to 2.0.19.1 to align with other airship
    components, and to bring in fixes and improvements.
  - Added build-essentials and python3-dev packages to pass the zull
    gate, which was looking for a c compiler.

Change-Id: I1160d1e6e2f02a0524043641b9296ea39edb301e
2020-08-19 15:56:45 +00:00
KHIYANI, RAHUL (rk0850) 880c6503c8 Add security context template for promenade charts
This changes adds security context template at pod level to
set run as user value

This also adds security context template at container level to
set readOnly-fs flag

Change-Id: Iba720e687218987cfefe7a9f08630fb11e8eac12
2020-07-22 05:24:50 +00:00
KHIYANI, RAHUL (rk0850) dfebe8f55f Add apparmor profile to promenade tpl files
Change-Id: I00d5c74e079f72f9837f8502dfa6ca805e2e0e04
2020-07-20 15:23:08 -05:00
KHIYANI, RAHUL (rk0850) fbaa07a66c Implement helm-toolkit snippet to apiserver and webhook pods/containers
This updates the promenade chart to include the pod
security context on the pod template.

This also adds the container security context to set
readOnlyRootFilesystem

Change-Id: I0be613a2617fcc83a8750ece7aae121fae0be839
2020-07-02 14:52:19 +00:00
KHIYANI, RAHUL (rk0850) b51eb9802d Add apparmor profile to apiserver and etcd jobs
Change-Id: I8bed3213868b45a438e5ae5929bca8bef699a503
2020-05-28 13:04:12 -05:00
Smruti Soumitra Khuntia da7c79f6b9 Upgrade Hyperkube version from 1.16.2 to 1.17.3
Changes to use to Hyperkube v1.17.3 instead  of
v1.16.2

Change-Id: I442694afad7f718dcd4db7fa7bb2c60beec8bdaa
2020-05-22 15:23:37 +00:00
KHIYANI, RAHUL (rk0850) 89e2f84357 Add Docker default AppArmor profile to apiserver
Change-Id: I2d00b08ad23df693134c61b02d01df26ec751437
2020-02-05 15:17:16 +00:00
Matt McEuen 1d0a4619b4 Add -u to anchor scripts
This adds "set -u" (in addition to the existing -x) to the anchor
scripts. This should fix an issue seen occasionally in the haproxy
chart which is only explainable by the IDENTIFIER variable failing
to get set correctly.

All variables used in the anchor scripts ought to be defined, and
there's no need to rely on blank strings as defaults.

"set -e" was considered for this, but may have unintended side-effects:
-u should be safe and avoid the issue we've seen.

Change-Id: Idbc2f9f77d4754874999d5d83d322a17076c7392
2020-02-03 14:00:12 -06:00
Zuul fe29812aca Merge "Upgrade Hyperkube version for k8s 1.16" 2019-12-23 22:33:00 +00:00
Pete Birley 64807416b7 Probes: Ensure newline between key and cert in probe concat
This PS ensures there is a newline present between the cert and its
key when concatenating them together.

Change-Id: I72319c1a415d683f19ff8f96060eb39bbec34b75
Signed-off-by: Pete Birley <pete@port.direct>
2019-12-06 14:21:56 -06:00
Samuel Pilla b77c6fe637 Upgrade Hyperkube version for k8s 1.16
Upgrade Hyperkube to v1.16.2

Change-Id: I3f17ac007e3704c1f4ae2f79e0c41704074c2010
2019-12-06 18:20:13 +00:00
Matt McEuen fcaacf94a3 Add -e to pre_stop hooks
This adds -e to the pre_stop scripts, so that they fail out if
any of their commands fail.  This is required, since it's the only
way to communicate whether there is an issue during pre_hook
execution.

"The logs for a Hook handler are not exposed in Pod events.
If a handler fails for some reason, it broadcasts an event."
https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks

As an example, this issue was discovered when "touch /tmp/stop"
was failing silently due to a readOnlyRootFilesystem setting,
resulting in pods that would not successfully Terminate until
the grace period was exhausted.

Change-Id: Ic9a228230d944530e31ed61f4239fd434cbb6187
2019-11-07 17:31:50 -06:00
Zuul 18e80654ff Merge "Apiserver: Add pod/container security context" 2019-11-07 20:15:22 +00:00