Commit Graph

1925 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 05c2b170c0 Merge "Bugfix: Clean up trusts for all deleted clusters" 2024-02-27 15:03:36 +00:00
Jake Yip 8a30ad3462 Add feature to specify driver explicitly
Allow ClusterTemplate to explicitly specify a driver to use for creating
Clusters.

This is initially sourced from the image property 'magnum_driver', but
may be improved to be specified via client in the future.

Falls back to old driver discovery using (coe, server_type, os) tuple to
keep existing behaviour.

Change-Id: I9e206b589951a02360d3cef0282a9538236ef53b
2024-02-26 14:50:18 +11:00
Dale Smith 1b00074c6a Bugfix: Clean up trusts for all deleted clusters
Cluster conductor creates trusts for all drivers, but does not clean
them up. The Heat driver has previously performed this action.

This change moves the lifecycle of trust and certificate creation
to the Conductor, so drivers do not need to clean up resources they
didn't create.

Change-Id: I2b3e99589d2d3069191d0727406601f0647a9722
2024-02-22 15:38:48 +13: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
Takashi Kajinami 3ec2b2b8a2 Remove six from unit tests (part 4)
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: I820f22d7a905f35122ae11f5bbf5b93a9e13a353
2024-02-19 10:44:09 +00:00
Takashi Kajinami 51e0a2205d Remove six from unit tests (part 3)
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: I683a86eeab858c3f57c587e653ae53aff052fe9c
2024-02-19 10:44:04 +00:00
Takashi Kajinami 26ec32c7be Remove six from unit tests (part 2)
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: I2feca51d17d6c63f7984483cc656e9360450a4d0
2024-02-19 10:43:59 +00:00
Takashi Kajinami 766089b7be Remove six from unit tests (part 1)
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: I1143918d70da51b53fbb8112ecafa412cd7d0770
2024-02-19 10:43:52 +00:00
Takashi Kajinami aea63db390 Remove six from functional tests
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: Ic0b3687c47b6f3ac51858084bcf11a5c5a185759
2024-02-19 10:43:46 +00:00
Takashi Kajinami 627b9a8260 Remove six from common 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: I14ebd809b39079d06a8ecc8f747b6bb80d550acb
2024-02-19 10:43:31 +00:00
Michal Nasiadka 68c8acba39 Remove execution bit on unnecessary files
Change-Id: Ia41b843fdf20154750b129a8ab5dd42f5c3989fb
2024-02-19 00:30:21 +00:00
okozachenko1203 9c31886a80 add cilium in the supported network driver list of k8s
Change-Id: I67d879e4939d92c88641cb97ee2284afbf7359fe
2024-02-09 07:04:17 +01: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
Zuul b7d4495fd6 Merge "Drop dependency on pytz" 2024-01-31 09:23:22 +00:00
Takashi Kajinami 90a82c4b19 Drop dependency on pytz
... because the current usage can be easily re-implemented using
the built-in datetime library.

Change-Id: Ic0c7919f0288fd61dd5bfa402c99d7080ffd9083
2024-01-27 19:50:06 +09: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
Dale Smith ab88ef3a5c Fix flakey validation tests.
These tests were causing side effects to class variables of
K8sValidator, and this was intermittently failing subsequent tests
if they ran in the same stestr executor.

This change uses mock.patch to change the class variables for the
duration of the test only.

Change-Id: I81095221fa45f7070bde22e2a4415345080ed1f1
2024-01-24 12:14:09 +13:00
Zuul 3ef20c2503 Merge "Migrate to importlib.metadata" 2024-01-11 09:09:38 +00:00
Zuul 547f25bca5 Merge "Add validator for fixed_subnet" 2024-01-10 12:35:25 +00:00
Dale Smith 2fd3059f38 Remove support for in-place upgrades with the Heat driver.
Heat stack SoftwareConfig is unable to provide a reliable upgrade
experience, so is being disabled. More details in code comments.

A Cluster API driver provides a way forward for Magnum to support
these again, and implement upgrade_cluster.

Change-Id: Ibea354ebfe36e8d689a95c30820709ec2b633964
2023-12-20 21:54:44 +13:00
Felipe Reyes a8bce0bfee Add validator for fixed_subnet
Validate the existance of the subnet referenced by fixed_subnet. It's
not checked if the subnet is associated to the fixed_network.

Closes-Bug: #2038109
Change-Id: Ia75f0ae525b768ad5b965d22b522cca6f80dcab2
2023-11-28 11:14:44 -03:00
Jake Yip 92bc2caa1c Migrate to importlib.metadata
pkg_resources is deprecated

Change-Id: I79fc6789b7fafd763e5a4a641d71af26fcf6e815
2023-11-27 19:15:45 +11:00
Felipe Reyes 753baadbb8 Add validator for fixed_network.
The validate_fixed_network() validator looks for an available network
matching the id or name, if no networks match a FixedNetworkNotFound
exception is raised, if more than one networks match then the Conflict
exception is raised.

Partial-Bug: #2038109
Change-Id: I7fb0122889feb4f8fa039be5752e8ac3fbc23b94
2023-10-06 08:25:40 -03:00
John Garbutt 2a256139c1 Stop test_delete_loadbalancers_timeout waiting
Overide the config pre_delete_lb_timeout
for a one second timeout, rather than
wait 60 seconds in the unit test.

Change-Id: Ic1bbf02de9025dda5408d864a3e0df7426b774f3
2023-09-18 10:57:51 +00:00
ricolin f87636e076 Add policies unit tests (Part three)
Add plicies unit test base function
and tests for cluster, cluster template, and nodegroup.

Change-Id: I0555e557725b02f3ec9812f0adf84d283f7389b0
2023-08-30 00:35:35 +08:00
ricolin 1d2e7ef032 Add policies unit tests (Part two)
Add plicies unit test base function
and tests for certificate, and magnum service.

Change-Id: Ib4047cb5a84647ff2848f06de71181673cc0627a
2023-08-30 00:35:35 +08:00
ricolin 916784bf1f Add policies unit tests (Part one)
Add plicies unit test base function
and tests for federation, quotas and stats.

Change-Id: I0eb12bf77e0e786652e674c787b2821415bd4506
2023-08-30 00:35:35 +08:00
ricolin 5971243169 Support enables rbac policies new defaults
The Magnum service allow enables policies (RBAC) new defaults and scope by
default. The Default value of config options ``[oslo_policy] enforce_scope``
and ``[oslo_policy] oslo_policy.enforce_new_defaults`` are both to
``False``, but will change to ``True`` in following cycles.

To enable them then modify the below config options value in
``magnum.conf`` file::

  [oslo_policy]
  enforce_new_defaults=True
  enforce_scope=True

reference tc goal for more detail:
https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html

Related blueprint secure-rbac

Change-Id: I249942a355577c4f1ef51b3988f0cc4979959d0b
2023-08-30 00:35:24 +08:00
Zuul 209f07f1e5 Merge "Use new get_rpc_client API from oslo.messaging" 2023-07-24 09:23:41 +00:00
Diogo Guerra 11bcc17568 Drop bay and baymodel from magnum
- Drop bay and baymodel tests
- Drop bay and baymodel from controllers

Depends-On: Ib85e4fda8e4ac467bd49590dc72ba5913bb9a19d

Story: 2009104
Task: 42957
Task: 42959

Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
Change-Id: Ida2e42c86400438951d9804e3ce122c56a46b94f
2023-05-09 13:59:57 +00:00
scrungus 33ab4e9cb4 Update barbicanclient
The changes in version 5.5 barbicanclient cause breaking changes.
Changing which barbicanclient is used fixes this issue.

Story: 2010629
Task: 47581
Change-Id: I1b6b0a4c1960fb5cb6ce04ea755074944fe4bb6f
2023-03-14 02:09:51 +00: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 6e8657912c Drop Mesos code
The coe mesos has not been maintained for quite some
time and hasn't got much attention from the community
in general. As discussed in the mailing list [1] we
are dropping for now.

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

Co-Authored-By: jake.yip@ardc.edu.au

Change-Id: Ie7de9a37bfad6214f52d0605409e74d62a51df47
2023-03-07 14:02:05 +11:00
Jake Yip 6cdb367cfc Remove send_cluster_metrics
This period job has been deprecated since Change
I3ca0f2e96fe63870406cc5323f08fa018ac6e8be in Rocky/Stein.

As it defaults to disabled, it causes logs like the following to be sent
over and over again.

 Running periodic task MagnumPeriodicTasks._send_cluster_metrics
 Skip sending cluster metrics _send_cluster_metrics

Remove the code totally as it has basically been a noop for a few
cycles.

Change-Id: Ib9142ab17d562b1d7ccf1409a9e0d934585a094d
2023-02-27 02:39:13 +00:00
Jake Yip d363622bf9 Fix test for barbican cached client
Test is broken after Change Ibfaea3fe9e394f6b1286d92437629d0400305968 in
barbicanclient. As this test mock keystoneclient, version discovery by
barbicanclient using the MagicMock keystone session now fails.

As this test just wants to make sure we are using a cached
barbicanclient, it should be safe to mock barbicanclient and check that
the client is only initialised once.

Change-Id: I85e70ea637af9c0b467aa32baf107d7fbed914c0
2023-02-23 18:44:05 +11:00
Tobias Urdin c28760c8ac Use new get_rpc_client API from oslo.messaging
Use the new API that is consistent with
the existing API instead of instantiating the client
class directly.

This was introduced in release 14.1.0 here [1] and
added into oslo.messaging here [2]

[1] https://review.opendev.org/c/openstack/requirements/+/869340
[2] https://review.opendev.org/c/openstack/oslo.messaging/+/862419

Change-Id: I4db6bbbbdc2f311f4c159b2d4f9992cfdbdafac4
2023-01-23 19:17:21 +00: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
Takashi Natsume 453c49910b Fix misuse of assertTrue
Replace assertTrue with assertEqual.

Change-Id: Ia7b52d07fd29c51ca09182089acaf02dc0b7c262
Story: 2010283
Task: 46254
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2022-09-21 10:33:37 +00:00
ricolin 1ed78a4438 Allow update cluster status with admin context
Trust token can be deleted outside of magnum,
But when trust token not found, the periodic update status job will
stay in inprogress unless another cluster action triggered.

Propose to use admin context when trust can not be found in periodic
update status job.

Story: 2010232
Task: 46031

Change-Id: I9cc9a0e654fb26ebec517e3413a592ac6613777c
2022-08-18 05:29:32 +08: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