Commit Graph

75 Commits

Author SHA1 Message Date
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) 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
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 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 731deccf05 charts: move to helm 3 preferred apis
- `helm.sh/hook: test-success` > `helm.sh/hook: test`

Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: If7dded45533705ee028e5d6da326ea94a634529d
2021-09-30 16:57:16 -05: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 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 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
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
Zuul ec1b75ebea Merge "Haproxy: update haproxy version to 1.8.25" 2020-07-07 17:13:41 +00:00
KHIYANI, RAHUL (rk0850) 1e4b5e0d45 Add pod/container security context to promenade charts
This updates the coredns, haproxy and etcd chart to include the pod
security context on the pod template.

This also adds the container security context to set
readOnlyRootFilesystem flag

Change-Id: I9b5b0ea83acd4c5656577d8cbc684a5031ca0111
2020-06-29 17:06:02 -05:00
KHIYANI, RAHUL (rk0850) 543e5d8f12 Haproxy: update haproxy version to 1.8.25
Change-Id: Ib5f97f321df9ed30ade2314152155dd7ff8a41ae
2020-06-24 17:57:49 -05:00
Chris Wedgwood 14febda1e3 [haproxy] anchor; make sure configuration is flushed before rename
The pattern:

  create, write, close, rename

is *not* robust in many circumstances.  The data blocks from the write
are not always flushed/persisted before the rename (metadata) changes
meaning you can end up where the replacement file is corrupted
(usually has 0 bytes at the end).

Change-Id: Icdd2bb6f20330e5e94b3081f0d0b8a74417f60d4
2020-06-23 13:26:37 -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) 83104b345f Promenade: Add apparmor profile to promenade charts
This change adds apparmor profile to coredns, haproxy, etcd and
promenade charts

Change-Id: Ic0000f0bf515f6ddf0085b5ec0085a5a51e591b2
2020-05-18 16:18:28 +00:00
KHIYANI, RAHUL (rk0850) 535e39262b promenade: Add default apparmor profile to init containers
Adding profile to promenade-util and haproxy-perms init containers

Change-Id: I46f4c6a3fe561f994860a9434d7e5cb10884e190
2020-04-30 09:42:40 -05:00
Parsons, Cliff (cp769u) c7d3dfbdfe Add resource requests/limits to HAProxy container
The resource requests/limits were missing for the HAProxy main
container, although they are there for the init container. This patchset
adds the resource clause to the main container.

Change-Id: I0441dddfbee86da7a4fa6311f6b5e4eb274601bc
2020-02-21 14:22:43 +00:00
Matt McEuen 77bfeb11ea haproxy: remove echo from anchor script
This removes an echo from the haproxy anchor, and renders
the related IDENTIFIER variable value directly inline instead.
The echo approach fails under some condition related to host
reboots, resulting in faulty input data for the script and
bad output haproxy configs, with e.g. "frontend -fe".

Change-Id: Id4e258b04290a8ce96b8b518a9c541ecedeee39e
2020-02-17 17:37:05 -06:00
KHIYANI, RAHUL (rk0850) 83d8616cc3 Add apparmor profile to promenade charts
adding apparmor profile to haproxy-anchor chart

Change-Id: Ifa27ac8335e9990fe9f39aa02e63835019ec6461
2020-02-07 15:58:26 +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
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
Zuul 850260ad60 Merge "Implement Security Context for Haproxy" 2019-11-11 23:34:52 +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
Prateek Dodda 151844e26a Implement Security Context for Haproxy
Implement readOnlyRootFilesystem:true for init container

Change-Id: I736b0ffd349379d6ceb6ca599021fcbe9eb54923
2019-11-06 21:26:14 +00:00
Phil Sphicas 02fc5342b2 (haproxy) Fix anchor.sh template
Fix syntax error in anchor.sh template.

/tmp/bin/anchor.sh: line 34: [: missing `]'
/tmp/bin/anchor.sh: line 54: [: missing `]'

Change-Id: I431fea6e9e805099de605b34b50a7cf5fae73be2
2019-11-04 11:42:01 -08:00
Zuul c71d9360b9 Merge "fix haproxy anchor pre-stop not working" 2019-10-01 16:07:32 +00:00
Zuul 1f502d84ad Merge "(haproxy) String validation for haproxy config" 2019-09-30 22:43:13 +00:00
anthony.bellino a02eaa64f9 fix haproxy anchor pre-stop not working
The pre-stop script tries to touch /tmp/stop,
however because of a rofs, fails with permission denied
resulting in the anchor pod getting stuck in Terminating.

This PS adds the mount path /tmp to the anchor container to
resolve the issue.

Change-Id: I3380e4a62b20ae8fdc5da1a72e6794e7cc357218
2019-09-30 13:35:23 +00:00
Scott Hussey 2ebe527fb1 (haproxy) Fix syntax error in haproxy anchor
- The config check statement in the haproxy static pod
  had a syntax error.

Change-Id: I4c27eed37c83d8b3382143f2c8940bc62d0180ba
2019-09-27 16:02:13 -05:00
Scott Hussey 97f7ed6db7 (haproxy) String validation for haproxy config
- Add validation in the anchor that backend IP addresses
  and ports sourced from Kubernetes are valid looking strings.

Change-Id: I7539b633dc49efd7262a22c6f9ff040880d9724f
2019-09-22 04:12:22 -05:00
Scott Hussey 479d3cc402 (haproxy) Additional config safeguards
- Some reported cases that the haproxy config was corrupted during
  node reboots. Attempt to add additional safeguards of coordination
  between the anchor and the service pod.

- Support nulling out a default entry in the service list

- Add additional log statements in the anchor

Change-Id: Ie673c50e1037d5dff2b9f67b14032e188183a5d9
2019-09-13 08:31:43 -05:00
BARTRA, RICK 19169bb458 Run haproxy pod with the nobody user (65534)
To be able to run with the nobody user, an init container
is used in the haproxy-anchor pod to change the ownership and
permissions of '/host/etc/promenade/haproxy'. Security conext
was included in 'etc/kubernetes/manifests/haproxy.yaml' and
'promenade/schemas/Genesis.yaml' schema was updated to included
run_as_user property for haproxy pod.

Change-Id: Id248face0be43c417284ceb781997634a9c4dd5e
2019-09-11 16:18:30 -05:00
Zuul 3155a3824d Merge "(haproxy) Add rationality check to config" 2019-07-23 21:59:53 +00:00
Hussey, Scott (sh8121) a9faafecf8 (fix) haproxy anchor runs as root
- The anchor pod for haproxy writes to the host
  disk and in order to manage file permissions
  should run as root. Without this fix, the
  haproxy chart is not resilient to node failure.

Change-Id: I9ea9b9a1a2a760be2b3ebb38bd45ead8aaefa034
2019-06-26 13:39:55 -05:00
Zuul 78f76b6ecd Merge "Add release uuid annotation to POD spec" 2019-06-26 13:33:19 +00:00
Kumar, Nishant(nk613n) 75d3a86234 Add release uuid annotation to POD spec
Change-Id: Id4a96de7da9233589b54217e04a346281eaea68c
2019-06-25 14:55:05 +00:00
Dejaeger, Darren (dd118r) d46d4bf85c Add node selector to test pods
This PS looks to add a node selector into the test pod's spec.

Change-Id: I438a9bf08f6ef6c4d8961f9197928b8b17cfbbd2
2019-06-21 10:04:38 -04:00
pd2839 da343eb212 Haproxy: Add pod/container security context
This updates k8s chart to include the podsecurity context
on the pod template

This also adds the container security context to set
readOnlyRootFilesystem to true

Change-Id: Ic823232fbbb3b0967047d88de81f6a2ee83dcd3e
2019-06-12 19:05:10 +00:00
Hussey, Scott (sh8121) 41e21e1a6e (haproxy) Add rationality check to config
- When the anchor provides a new haproxy config file
  to the running haproxy, add a reasonable check that
  the new config is valid:
    - Is it a valid config file per haproxy
    - Does it contain the expected number of frontends

- Update helm version for linting to 2.14.1

Change-Id: I7a49deb372831c44f05c7baa870735c515519cb2
2019-06-10 11:01:13 -05:00
Sean Eagan 184d114062 Move to tiller 2.14.0
This version fixes manifest validation [0], so a couple invalid
manifests are fixed in this patchset as well.

[0]: 32d7f1a3fc

Change-Id: I0cbdf21cf016271bef2d8a541687ce3ab28081ce
2019-05-20 14:17:46 -05:00
Zuul 2741ea1f90 Merge "Use apps/v1 k8s controllers and add labels" 2019-04-24 13:08:37 +00:00