Commit Graph

94 Commits

Author SHA1 Message Date
Jake Yip 37e5864def Remove calico_kube_controllers_tag label
This has not been in-use since Change
I902009c792125c55313b1d512f531f613b424af5

Change-Id: Ie5ca9892baad3c5a00ab16ef00d358f637a257df
2024-03-07 20:13:02 +11:00
Jakub Darmach e3aaa89376 Removing Tiller support
Removed Tiller support from Helm modules install kubernetes fragment.

Change-Id: I81db0055ae82c64218498ae3e2a4fcc802f8d0e4
2024-02-29 14:41:29 +00:00
Takashi Kajinami 91f181e3ad Remove six from drivers module
This is part of the steps to remove usage of six library, which is no
longer needed since python 2 support was removed.

Change-Id: If6fb372f72a469e55e956e127c49863b5a557552
2024-02-19 10:43:24 +00:00
Michal Nasiadka ac5702c406 Adapt Cinder CSI to upstream manifest
- Bump also components to upstream manifest versions.
- Add small tool to sync Cinder CSI manifests automatically

Change-Id: Icd19b41d03b7aa200965a3357a8ddf8b4b40794a
2022-09-26 13:28:37 +00:00
Zuul c07628bca6 Merge "Support hyperkube_prefix label" 2021-04-07 19:09:49 +00:00
Bharat Kunwar fc1f27a569 Support hyperkube_prefix label
Additionally for k8s_fedora_coreos_v1 driver:
* Introduce hyperkube_prefix which defaults to k8s.gcr.io/
* Bump default kube_tag to v1.18.16

Story: 1668998
Task: 41791

Change-Id: I38b8df45a00f1a2a1604059b8329d1dd762e05cd
2021-02-18 13:18:56 +00:00
Diogo Guerra ea64468ab3 3. Configure monitoring apps path based endpoints
* Add monitoring_ingress_enabled magnum label to set up ingress with
path based routing for all the configured services
{alertmanager,grafana,prometheus}. When using this,
cluster_root_domain_name magnum label must be used to setup base path
where this services are available.
* Add cluster_basic_auth_secret magnum label to configure basic auth
on unprotected services {alertmanager and  prometheus}. This is only
in effect when app access is routed by ingress.
* Set services logFormat to json to enable easier machine log parsing.

task: 39477
story: 2006765

Depends-On: Ieb90605182626869528349a7fdeed65061914bcb
Change-Id: Ie0e7000e0d94b2037f2c398fa67a2a2b7e256bc3
Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
2021-02-05 15:52:52 +00:00
Diogo Guerra 37497ccf5b 1. Configurable prometheus monitoring persistent storage
* Add metrics_retention_days magnum label allowing user to specify
prometheus server scraped metrics retention days (default: 14)
* Add metrics_retention_size magnum label allowing user to specify
prometheus server metrics storage maximum size in Gib (default: 14)
* Add metrics_scrape_interval allowing user to specify prometheus
scrape frequency in seconds (default: 30)
* Add metrics_storage_class_name allowing user to specify the
storageClass to use as external retention for pod fail-over data
persistency

task: 39509
story: 2006765

Change-Id: I42117837e8e3cd03f3cb723df4d73692ead0d169
Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
2021-02-05 15:52:33 +00:00
Feilong Wang 946c1d67c7 Add master_lb_enabled to cluster
Adding the master_lb_enabled option when creating a cluster,
which will benefit both the cloud provider side and the end
user side. For cloud prodiver, they don't have to maintain
separate cluster templates with or w/o master_lb_enabled enabled.
For end user, they can easily use one single template to create
different clusters with different configs.

Task: 39680
Story: 2007634

Change-Id: I0b586f05168ece84fd340ef7493a56688191053d
2020-07-21 11:07:33 +12:00
Bharat Kunwar a79f8f52f9 [k8s] Use Helm v3 by default
- Refactor helm installer to use a single meta chart install job
  install job and config which use Helm v3 client.
- Use upstream helm client binary instead of using helm-client container
  maintained by us. To verify checksum, helm_client_sha256 label is
  introduced for helm_client_tag (or alternatively for URL specified
  using new helm_client_url label).
- Default helm_client_tag=v3.2.1.
- Default tiller_tag=v2.16.7, tiller_enabled=false.

Story: 2007514
Task: 39295

Change-Id: I9b9633c81afb08b91576a9a4d3c5a0c445e0cee4
2020-05-26 15:23:14 +00:00
Zuul 5ada350502 Merge "[k8s] Upgrade k8s dashboard version to v2.0.0" 2020-05-01 14:20:42 +00:00
Feilong Wang b4965416b1 [k8s] Upgrade k8s dashboard version to v2.0.0
Heapster has been deprecated for a while and the new k8s dashboard
2.0.0 version supports metrics-server now. So it's time to upgrade
the default k8s dashboard to v2.0.0.

Task: 39101
Story: 2007256

Change-Id: I02f8cb77b472142f42ecc59a339555e60f5f38d0
2020-04-24 16:34:36 +12:00
Diogo Guerra 06659759f1 [k8s] Introduce helm_client_tag label.
Added label helm_client_tag to allow user to specify helm client
container version.

Task: 39294
Story: 2007514

Change-Id: I5d1cf238511951ac4a1849ca66b74dc747865391
Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
2020-04-17 12:52:08 +00:00
Zuul 3b9f06726d Merge "Add selinux_mode label" 2020-04-10 00:09:32 +00:00
Bharat Kunwar fd80e1989f Add selinux_mode label
Fedora Atomic default: permissive
Fedora CoreOS default: enforcing

Story: 2007413
Task: 39033

Change-Id: Ibc1e02098155ac95bb35fcea5f21cc380bdf0d03
Signed-off-by: Bharat Kunwar <brtknr@bath.edu>
2020-03-28 17:57:25 +00:00
Feilong Wang 529b036e78 Fix calico regression issue caused by default ipv4pool change
With I13aa0c58bf168bc069edf1d5c0187f89011fffdb, we missed to update
the default value of pods_network_cidr. As a result, there is a
mismatch between the calico_ipv4pool and the cidr configured in
kubernetes (kube-proxy and kube-controller-mananer). The mismatch
will cause some connection issues between pods/nodes. This patch
fixes it.

Task: 39153
Story: 2007426

Change-Id: Ic560322f5009f28e7e72704508705c1572a9262d
2020-03-27 09:56:19 +13:00
Zuul 305a0095ff Merge "Add cinder_csi_enabled label" 2020-03-16 06:43:47 +00:00
Feilong Wang d61dd1d5b5 [k8s] Support post install manifest URL
A new config option `post_install_manifest_url` is added to support
installing cloud provider/vendor specific manifest after booted
the k8s cluster. It's an URL pointing to the manifest file. For
example, cloud admin can set their specific storageclass into
this file, then it will be automatically setup after created
the cluster.

Task: 35798
Story: 2006209

Change-Id: Ib5a2c5cd7970085db941f189613e175f622aea3f
2020-03-05 20:30:12 +13:00
Bharat Kunwar 9565984fd9 Add cinder_csi_enabled label
Add support for out of tree Cinder CSI. This is installed when the
cinder_csi_enabled=true label is added. This will allow us to eventually
deprecate in-tree Cinder.

story: 2007048
task: 37868

Change-Id: I8305b9f8c9c37518ec39198693adb6f18542bf2e
Signed-off-by: Bharat Kunwar <brtknr@bath.edu>
2020-02-21 10:24:36 +00:00
Spyros Trigazis de21e0431a Add opt-in containerd support
New labels:
container_runtime, containerd or fallback to host-docker
containerd_version, taken from https://github.com/containerd/containerd/releases
containerd_tarball_url, eg https://storage.googleapis.com/cri-containerd-release/cri-containerd-1.2.4.linux-amd64.tar.gz
containerd_tarball_sha256, sha256 of the above tarball

story: 2007317
task: 38823

Change-Id: I6c6599cdee61f508bd2a5e4c454da3125a256753
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
2020-02-20 15:47:40 +00:00
Zuul 7f8ffe7d7b Merge "Support verifying the digest for hyperkube image" 2020-01-16 04:22:21 +00:00
Diogo Guerra 355c71924b Add calico_ipv4pool_ipip label
IPIP Mode to use for the IPv4 POOL created at start up
allowed_values: ["Always", "CrossSubnet", "Never", "Off"]
default: "Off"

Change-Id: Ib834a1f86a6db408047cc8f86fc7744d16d83904
Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
2020-01-09 14:22:23 +01:00
Feilong Wang a943756aea Support verifying the digest for hyperkube image
Given we're using public container registry as the default registry,
so it would be nice to have a verification for the image's digest.
Kubernetes already supports that so user can just use format like
@sha256:xxx for those addons' tags. This patch introduces the support
for hyperkube based on podman and fedora coreos driver.

Task: 37776
Story: 2007001

Change-Id: I970c1b91254d2a375192420a9169f3a629c56ce7
2020-01-08 15:05:52 +13:00
Diogo Guerra df52f9c9ea [k8s] Update metrics-server
Magnum allows to use CONTAINER_INFRA_PREFIX to specify a local
repository from which we can pull container images. This repository
defaults to the upstream one that is specified in the metrics helm
chart.

* This patch allows for the usage of CONTAINER_INFRA_PREFIX to
correctly configure the pull of the metric-server container image
from the specified repo.
* Add label metrics_server_chart_tag to allow user to specify
stable/metrics-server chart tag to use
* Add label metrics_server_enabled to allow enable/disable of
component (defaults: true)

Story: 2004816
Task: 37390

Change-Id: Idc315937a82317b76349bbe8466d900d00194953
Signed-off-by: Diogo Guerra <dy090.guerra@gmail.com>
2019-12-16 13:06:24 +01:00
Zuul 1af2826dd9 Merge "Add prometheus-adapter" 2019-12-11 14:17:30 +00:00
Bharat Kunwar 1ad4a9d0a0 [k8s] Add heapster_enabled label
Story: 2004816
Task: 37654

Change-Id: Icd7f380d87672c00257e34df385d81e1c3e36ddf
Signed-off-by: Diogo Guerra <dy090.guerra@gmail.com>
2019-12-11 11:40:47 +00:00
Diogo Guerra 354575804f Add prometheus-adapter
This will install the prometheus-adapter stable
helm chart. Requires monitoring_enabled=true.

The chart version can be configured using
prometheus_adapter_chart_tag and an option is
available to overwrite the default configuration
rules for a user defined ConfigMap referenced
by using prometheus_adapter_configmap label.

story: 2006765
task: 37278

Change-Id: I5b86f4455f88c8dbeac6e56942e1ca55f1d1726c
Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
2019-12-10 13:54:39 +01:00
Bharat Kunwar 612b227776 bug: cluster creation without docker_volume_size
Allows cluster to be created without docker_volume_size where we were
previously seeing this error:

    TypeError: int() argument must be a string,
    a bytes-like object or a number, not 'NoneType'

Regression introduced in https://review.opendev.org/#/c/695239/.

Change-Id: I6e10a7fd760102040415875164d267a729c24878
Story: 2005386
Task: 37565
2019-12-06 14:59:56 +00:00
Zuul fe97ab9bf4 Merge "Add nginx_ingress_controller_chart_tag" 2019-12-06 11:48:35 +00:00
Zuul d2d11370e9 Merge "bug: Only query Cinder API if volume size > 0" 2019-12-06 11:48:31 +00:00
Bharat Kunwar 7d6e344f1a Add nginx_ingress_controller_chart_tag
Additioanlly, bumping up the Chart version to 1.24.7 without which the
ingress controller fails to deploy on 1.16.x.

Additionally, bump up nginx_ingress_controller_tag version to 0.26.1.
This is to ensure that we are running an up to date nginx ingress
controller with fixes for known CVEs.

Story: 2006853
Task: 37444

Change-Id: Ibf045a06d19b02095e19d9a21d14a91a39a3751c
2019-11-24 11:24:33 +00:00
Bharat Kunwar 26a171f951 bug: Only query Cinder API if volume size > 0
Only query Cinder API for volume type if volume size is greater than 0.
This is to make sure that Magnum does not have a hard dependency on
Cinder and works without the Cinder API enlisted as an endpoint.

This regression was introduced in https://review.opendev.org/#/c/621734/
where boot from volume support was introduced. See
https://storyboard.openstack.org/#!/story/2005386#comment-147555 for
more details of the error.

Story: 2005386
Task: 37565

Change-Id: I1bdec0c11a18bea9143fb4792a0a2e4ba5dc1fcf
2019-11-24 11:15:01 +00:00
Spyros Trigazis 0205534f90 Fix cert_manager_api with x509keypair
When magnum is using x509keypair as backend
the db query fails to apply the tenant filters
due to the missing context.

Pass the context to the the cert_manager.

story: 2006897
task: 37533

Change-Id: Ifdedac420fe4384013704865fa05ea6f1c15feb5
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
2019-11-21 21:29:35 +00:00
Zuul 03ff816549 Merge "Docker volume size from nodegroups" 2019-10-24 10:06:14 +00:00
Theodoros Tsioutsias 37c61fa2f8 Docker volume size from nodegroups
Docker volume size as well as volume env files should be fetched
based on the nodegroup and not the cluster.

story: 2006701
task: 37008

Change-Id: Ia9e7f4612f36f4e57626b2e931b84898523e9ccb
2019-10-23 11:08:27 +00:00
Spyros Trigazis aa6b3bbeba k8s_fedora: Add use_podman label
Choose whether system containers etcd, kubernetes and the heat-agent will be
installed with podman or atomic. This label is relevant for k8s_fedora drivers.

k8s_fedora_atomic_v1 defaults to use_podman=false, meaning atomic will be used
pulling containers from docker.io/openstackmagnum. use_podman=true is accepted
as well, which will pull containers by k8s.gcr.io.

k8s_fedora_coreos_v1 defaults and accepts only use_podman=true.

Fix upgrade for k8s_fedora_coreos_v1 and magnum-cordon systemd unit.

Task: 37242
Story: 2005201

Change-Id: I0d5e4e059cd4f0458746df7c09d2fd47c389c6a0
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
2019-10-23 10:43:52 +00:00
Fei Long Wang 09f85f3746 [fedora-atomic][k8s] Support operating system upgrade
Along with the kubernetes version upgrade support we just released, we're
adding the support to upgrade the operating system of the k8s cluster
(including master and worker nodes). It's an inplace upgrade leveraging the
atomic/ostree upgrade capability.

Story: 2002210
Task: 33607

Change-Id: If6b9c054bbf5395c30e2803314e5695a531c22bc
2019-10-18 14:44:27 +00:00
Theodoros Tsioutsias e52f77b299 ng-9: Driver for nodegroup operations
This adds the support for creating and deleting worker  nodegroups
using different stack per nodegroup. In order to be backwards
compatible, default nodegroups will remain in one stack.

Having this in mind cluster status is now calculated aggregating the
statuses of the underlying stacks.

Change-Id: I97839ab8495ed5d860785dff1f6e3cc59b6a9ff7
2019-09-26 08:45:57 +00:00
Theodoros Tsioutsias d4a52719f1 ng-7: Adapt parameter and output mappings
With this change parameter and output mappings can support multiple
stacks.

Change-Id: I45cf765977c7f5a92f28ae12c469b98435763163
2019-09-26 08:45:51 +00:00
Zuul 9c55bcba91 Merge "Propagate cloud_provider_enabled correctly" 2019-09-24 20:32:48 +00:00
Bharat Kunwar 459e27e688 Propagate cloud_provider_enabled correctly
The derived cloud_provider_enabled is placed inside extra_params so that
openstack-cloud-controller-manager gets applied correctly. This required
change was unfortulately missed in https://review.opendev.org/681922.

Additionally improve  the docs related to cloud_provider_enabled label.

Story: 2006531
Task: 36740

Change-Id: I4a89d25b467edd2c4be608c37055706e4e62d78b
2019-09-20 16:03:44 +00:00
Zuul 60d2485d83 Merge "[fedora atomic k8s] Add boot from volume support" 2019-09-20 11:21:33 +00:00
Zuul 83569e8394 Merge "calico: drop calico_cni_tag" 2019-09-20 11:08:53 +00:00
Mohammed Naser cfe2753fd3 [fedora atomic k8s] Add boot from volume support
Support boot from volume for Kubernetes all nodes (master and worker)
so that user can create a big size root volume, which could be more
flexible than using docker_volume_size. And user can specify the
volume type so that user can leverage high performance storage, e.g.
NVMe etc.

And a new label etcd_volme_type is added as well so that user can
set volume type for etcd volume.

If the boot_volume_type or etcd_volume_type are not passed by labels,
Magnum will try to read them from config option
default_boot_volume_type and default_etcd_volume_type. A random
volume type from Cinder will be used if those options are not set.

Task: 30374
Story: 2005386

Co-Authorized-By: Feilong Wang<flwang@catalyst.net.nz>

Change-Id: I39dd456bfa285bf06dd948d11c86867fc03d5afb
2019-09-20 05:00:29 +00:00
Bharat Kunwar eebcc9b7a1 Fix k8s deployment when cluster_user_trust=False
At the moment, cluster deployment fails when cluster_user_trust=False.
This is because the entire SoftwareDeployment exits rather than a single
script fragment. This patch fixes this by scoping the remainder of the
script conditional on whether TRUST_ID is defined.

Finally, default `cloud_provider_enabled` to false when
`cluster_user_trust` is false. Raise an error when
`cloud_provider_enabled` is overridden to true when `cluster_user_trust`
is false. This ensures that the minion kubelet is correctly configured.

Change-Id: Ibd9270c87bfa5d2f490e2e226e33ca56696d9e81
Story: 2006531
Task: 36587
2019-09-20 03:49:03 +00:00
Theodoros Tsioutsias e655db3338 etcd_volume_size from cluster not CT
The size of the etcd volume should be taken from the cluster and not
the cluster template.

story: 2005143
Change-Id: I4cdbb436558fba90adec717e228e2970be509b87
2019-09-03 15:03:21 +00:00
Zuul f1cf3d0b38 Merge "Support auto_healing_controller" 2019-08-06 08:40:25 +00:00
Feilong Wang 32989b4f7b Allow setting network, subnet and FIP when creating cluster
When using a public cluster template, user still need the capability
to reuse their existing network/subnet, and they also need to be
able to turn of/off the floatingip to overwrite the setting in the
public template. This patch supports that by adding those three
items as parameters when creating cluster.

Story: 2006208
Task: 35797

Change-Id: I11579ff6b83d133c71c2cbf49ee4b20996dfb918
2019-07-31 20:41:20 +12:00
Lingxian Kong 52155f0e76 Support auto_healing_controller
This patch allows the user to choose the auto-healing service by
introducing a new label 'auto_healing_controller', currently, 'draino'
and 'magnum-auto-healer'[1] are supported. 'draino' is the default value
for backward compatibility.

[1]: https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/using-magnum-auto-healer.md

Change-Id: I7ff14837a8d7d360b72c8f40733e84c88c4269d4
2019-07-24 17:52:33 +12:00
Zuul 1963fce81a Merge "Add npd_enabled label" 2019-07-10 00:35:48 +00:00