Commit Graph

159 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
Zuul 9d6eae72cc Merge "Drop k8s_fedora_atomic_v1 driver" 2024-03-06 10:14:19 +00: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
Michal Nasiadka ed699b0c9a Drop k8s_fedora_atomic_v1 driver
Change-Id: I3551ae244ecf99f67a9b142c964c020a5fae70a3
2024-02-27 16:35:35 +00:00
Zuul c2567f202a Merge "Drop k8s_fedora_ironic_v1 driver" 2024-02-21 23:52:53 +00:00
Zuul 007c0cd73d Merge "Drop k8s_coreos_v1 driver" 2024-02-21 23:50:02 +00:00
Takashi Kajinami e149b8646b Remove six from unit tests (part 5)
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: I675eff8634ce772839f086b2d07fa0a35cf759b1
2024-02-19 10:44:15 +00:00
Michal Nasiadka fa5aa8f625 Drop k8s_fedora_ironic_v1 driver
Change-Id: Ic7114e5923b74a4202a043388701826b4e47326e
2024-02-05 08:14:56 +00:00
Michal Nasiadka 5c0c27807a Drop k8s_coreos_v1 driver
Change-Id: I64884677cf05c59c64988dfbee9bf22e97a3466b
2024-02-05 07:04:05 +00:00
Michal Nasiadka bc79012f46 Drop Swarm support
Label validator function has been left behind, although it's not
checking for anything right now - might be useful in future.

Change-Id: I74c744dc957d73aef7556aff00837611dadbada7
2024-01-24 13:20:21 +13:00
Jake Yip 92bc2caa1c Migrate to importlib.metadata
pkg_resources is deprecated

Change-Id: I79fc6789b7fafd763e5a4a641d71af26fcf6e815
2023-11-27 19:15:45 +11:00
ricolin 6169eb26ed Fix pep8 gate
This fix propose two parts:
* introduce timeout (60s) to requests calls
* remove `file` scheme support for requests calls.

Change-Id: Ide2c2915ba5d6ff03933160b74f7206492276968
2023-03-14 09:17:54 +08:00
guilhermesteinmuller d3d28594b3 Drop mesos driver
The coe mesos has not been maitenaned for quite some
time and hasn't got much attetion from the community
in general. As discussed in the mailing list [1] we
are dropping for now.

In this patch, we start by removing the mesos driver
and its test cases. This part of the code has no impact
for other drivers. Then we can clean up mesos references
that affect the API.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-December/026230.html

Conflicts:
	lower-constraints.txt
	tox.ini

Change-Id: Ied76095f1f1c57c6af93d1a6094baa6c7cc31c9b
2022-11-11 23:01:43 +11:00
Zuul 1bd6bad1d7 Merge "Remove duplicated keys in dict" 2022-11-09 12:58:31 +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
Jake Yip cb40fb3685 Add back pep8 test
In Change I523a4a85867f82d234ba1f3e6fad8b8cd2291182, the pep8 test was
accidentally dropped.

Fix up code so that pep8 passes.

In addition to that following change has been added here to unbreak CI:

Add WebTest as an indirect test dependency

Pecan has made webtest an optional dependency for testing only [1].
Since it is still used for testing we need to add it to our
test-requirements.txt.

[1]: https://github.com/pecan/pecan/pull/140

Change-Id: I2f85adb4ef29a43389897c201e6152fd4c7be9d6
2022-07-19 12:35:14 +00:00
Michal Nasiadka 5af49aa2fa Add support for choosing Octavia provider
Story: 2008805

Add support for:
* choosing Octavia provider
* setting octavia_lb_algorithm
* disabling Octavia healthcheck

Change-Id: I2d424fc2e2f8967e4b3007faedbc089f37126968
2022-05-03 09:32:24 +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
zhufl 826a31f8bc Remove duplicated keys in dict
This is to remove duplicated keys in dict.

Change-Id: I58b1e3280d2fbcbe354136170c22acf78642a0b1
2021-01-29 14:56:06 +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
Zuul 82d92d08a3 Merge "Lower log level of missing output" 2020-06-20 05:16:52 +00:00
Feilong Wang b2e3f2346b Fix proxy issue for etcd and k8s
When the cloud is behind a proxy, podman needs to access the dockerhub
via proxy to pull the image, so the proxy settings need to be exported
to etcd systemd file as well. We're setting the heat-params as
environment file for k8s components already.

Besides, because CIDR of fixed subnet vary for different clusters,
so the subnet CIDR should be added into NO_PROXY list. Otherwise,
it will affect the communication between etcd members and also the
communication between k8s components.

Task: 39990
Story: 2007768

Change-Id: I4dba79e04abe38b9806e847348d3dd77ef96bee5
2020-06-17 09:54:11 +12:00
Spyros Trigazis 65ab249189 Lower log level of missing output
Lower the log level of a warning for a missing output to debug.
This log line appears repeatedly on successful cluster deletion,
creation failure (for unrelated reasons) and nodegroup creation
failure (again for unrelated reasons, eg timeout). This is
triggered when having multiple magnum conductors all trying to
query the status in heat. Additionally, this warning is not an
indication of a malfunction in a cluster or a failure, so it is
useful only for debugging. Finally, add the cluster id, cluster
status and stack id to have more context.

story: 2007636
task: 40062

Change-Id: Ie44b1d13899d77bd2a5d5b1e6107c384277788b9
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
2020-06-12 12:18:48 +03:00
Zuul 52690900a7 Merge "Fix label fixed_network_cidr" 2020-06-11 11:20:37 +00:00
Feilong Wang 001b9c6101 Fix label fixed_network_cidr
Now the label `fixed_network_cidr` is not handled correctly, no matter
if the label is set, the default value '10.0.0.0/24' is used for
fixed network anyway. This patch fixes it and renamed it as
`fixed_subnet_cidr` to make less confusion. The new behaviour will be:
1. If the label `fixed_subnet_cidr` is set but no fixed subnet passed
   in, then a new subnet will be created with the given CIDR.
2. If a fixed subnet is passed in by user, then label `fixed_subnet_cidr`
   will be override with the CIDR from the given subnet.

Task: 39847
Story: 2007712

Change-Id: Id05e36696bf85297a556fcd959ed897fe47b7354
2020-06-11 13:54:59 +12:00
Spyros Trigazis 9f4c63a0df resize: Send only nodes_to_remove and node_count
When resizing a NG we should strictly send the
desired node_count and the nodes_to_remove.
Otherwise the stack update operation may replace/rebuild
nodes or other resources.

This was the functionality with:
Id84e5d878b21c908021e631514c2c58b3fe8b8b0
But it was reverted with:
I725413e77f5a7bdb48131e8a10e5dc884b5e066a

Story: 2005266
task: 39860

Change-Id: Ib31b6801e0e2d954c31ac91e77ae9d3ef1afebd2
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>
2020-06-05 08:47:53 +00: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 a2f4b28c60 Merge "[k8s] Add label 'master_lb_allowed_cidrs'" 2020-05-15 07:50:59 +00:00
Feilong Wang 3b87c5cc6f [k8s] Add label 'master_lb_allowed_cidrs'
A new label named `master_lb_allowed_cidrs` is added to control
the IP range which can access the k8s api and etcd load balancers.
It's a good security enhancement.

Task: 39188
Story: 2007414

Change-Id: I157a3b01d169e550e79b94316803fde8ddf77b03
2020-05-14 21:31:10 +12:00
Zuul 59572992a2 Merge "Use unittest.mock instead of third party mock" 2020-05-03 22:23:59 +00:00
Zuul 5ada350502 Merge "[k8s] Upgrade k8s dashboard version to v2.0.0" 2020-05-01 14:20:42 +00:00
Sean McGinnis 45fd25c572 Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I6245a207ec65df0ef11a798b4cffe3157abccb73
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Co-Authored-By: Spyros Trigazis <spyridon.trigazis@cern.ch>
2020-04-29 17:10:23 +03:00
Zuul e87b6e632e Merge "[k8s] Fix no IP address in api_address" 2020-04-27 07:44:13 +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
Feilong Wang 5dfb0d94c0 [k8s] Fix no IP address in api_address
This is a corner case that when floating_ip_enabled=False,
master_lb_enabled=True,master_lb_floating_ip_enabled=False in
cluster template, but setting floating_ip_enabled=True when
creating the cluster. The current logic is not correct which
resulted in missing IP address in the api_address of cluster.

Task: 39519
Story: 2007586

Change-Id: I5e2ca270c4f4e2c48d067cd5b8f6609c037cb6e5
2020-04-22 21:58:28 +12:00
Zuul 69225341a8 Merge "Fix ServerAddressOutputMapping for private clusters" 2020-04-21 12:30:20 +00: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
Bharat Kunwar 0e58e267d1 Fix ServerAddressOutputMapping for private clusters
Following changes were introduced in Train release:

- Allow setting network, subnet and FIP when creating cluster
  (I11579ff6b83d133c71c2cbf49ee4b20996dfb918)
- ng-7: Adapt parameter and output mappings
  (I45cf765977c7f5a92f28ae12c469b98435763163)

The first change allowed setting cluster.floating_ip_enabled but the
second change introduced ServerAddressOutputMapping conditional on
cluster_template.floating_ip_enabled which leads to an edge case where
if floating_ip_enabled is overriden to False when a cluster is created
when it is True in the cluster_template scope, we see this error in the
conductor logs: ValueError: Field `node_addresses[0]' cannot be None and
the cluster remains forever stuck in CREATE_IN_PROGRESS status despite
Heat reaching CREATE_COMPLETE. This commit addresses this issue by
correctly referring to the cluster.floating_ip_enabled.

Change-Id: Ic83f625178786d4750a66dd6dd6db35c05bc0272
Story: 2007550
Task: 39401
2020-04-15 08:07:56 +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
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