Update charm base to ubuntu@24.04 for all k8s based charms. Deploying
k8s charm is abstracted from the underlying host base, therefore we can
already deploy next generation based charms.
Change-Id: If8e8960a58a39f9978aaeec26ed4df4a2b690396
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
Charmcraft 3 moves towards a single charmcraft.yaml, this is needed for
24.04 migration.
Change-Id: I743712752aaf37bf68730b64bd6c147dfad370e2
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
ops.main.main has been deprecated and superseded by `ops.main`.
Add # pragma no cover to the charm entrypoints to not count them in the
test coverage.
Change-Id: I5bc05d408db77ad806edbd66e806629cd5bc85b2
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
Implement mypy in the most non-breaking way possible. There's still some
changes of behavior that crept in, merely due to incorrect edge case
handling.
Charm libraries are generally well typed, include py.typed marker for
all of the libraries, to allow mypy analyzing their usage.
Change-Id: I7bda1913fa08dd4954a606526272ac80b45197cc
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
Implement tracing relation for all the charms.
Instrument most of ops.Object objects, including relation handlers,
pebble handlers, and relation objects.
Change-Id: I967ff858a63aa7d30094cf5a46491fce11195060
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
Introduce a per-charm configuration file `.sunbeam-build.yaml`,
containing information about needed external libraries, internal
libraries, and configuration templates.
Introduce new management script `repository.py`, responsible for
preparing, cleaning and updating libs.
Move all internal libraries back to their original charms. Each charm is
responsible of its own libraries.
Change-Id: I9edabed1c252cae60fcd945b931952aeaef12481
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
Implement LogForwardHandler for every k8s charm to forward service
stdout to logging provider.
Tempest-k8s is excluded because it implements its own logging handler.
Change-Id: Iccc9f1f911acfaaecf733fe78cc4bc3191a231d5
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
This change refactors tls-certificates relation handler.
List of changes:
- Allow management of multiple tls certificates on the same relation
- Allow easier override of certificate signing request (csr)
- Enable certificate renewal on expiration / revokation
- Upgrade tls-certificates relation from v1 to v3
Change-Id: I4f6ac6a5570635388cc10131b34fbc6b422e1bca
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
These options creates more issues than they are solving. Removing
`admin-user`, `admin-role`, and `service-tenant` to ensure a standard
sunbeam deployment.
Rename the `Admin` to the default [1]` admin` role.
1: https://docs.openstack.org/keystone/2024.1/admin/service-api-protection.html
Change-Id: I93f3b754e4aca2cc71b0e408555c6d937a9d4e04
Refresh 2023.2 -> 2024.1 which will impact all charms, so we
should not need to pre-seed the edge channel before this works.
Refresh 23.09 -> 24.03 for OVN charms.
Option sql_connection is removed form 2024.1 release [1]
Use below snippet for magnum-k8s conf template
[database]
connection = <>
Update horizon local_settings.py.j2 template
[1] https://docs.openstack.org/releasenotes/oslo.db/en_GB/2024.1.html
Mark tempest test as non-voting as its currently unstable.
Change-Id: I4e277a4c5e438e2f2112a167b0f3050c1526cd0a
'mock' is built in to python as unittest.mock since python 3.3.
The mock package on pypi is a backport, and not required here.
The test code throughout this repo used a mix of unittest.mock and
the mock package. This makes it consistently unittest.mock now,
and makes the import styles consistent too.
Change-Id: I643247ac4061c095b327a73cba75a1fa67f1c32e
* Add sunbeam project template to run pep8, py3 tests
* Add zuul.d/zuul.yaml to run pep8, py3, cover tests
* Update charmcraft and requirements for each charm
* Add global tox.ini to invoke fmt, pep8, py3, cover,
build
* Add gitreview file
* Fix py3 test failures in ciner-ceph-k8s, glance-k8s,
openstack-exporter
* Add jobs for charm builds using files option so that
job is invoked if files within the component are
modified. Add charm builds to both check and gate
pipeline.
* Make function tests as part of global. Split the function
tests into core, ceph, caas, misc mainly to accomodate
function tests to run on 8GB. Add function tests as
part of check pipeline.
* Add zuul job to publish charms in promote pipeline
Add charmhub token as secret that can be used to
publish charms.
Note: Charmhub token is generated with ttl of 90 days.
* Run tox formatting
* Make .gitignore, .jujuignore, .stestr.conf global and
remove the files from all charms.
* Make libs and templates global. Split libs to internal
and external so that internal libs can adhere to
sunbeam formatting styles.
* Add script to copy common files necessary libs, config
templates, stestr conf, jujuignore during py3 tests
and charm builds.
* Tests for keystone-ldap-k8s are commented due to
intermittent bug LP#2045206
Change-Id: I804ca64182c109d16bd820ac00f129aa6dcf4496
python-subunit 1.4.3+ requires 'extras' otherwise an error
occures:
"'run --slowest' is not a stestr command."
Switch to using self-signed-certificates-operator as the
self signed functionality has been removed from
tls-certificates-operator charm *1
*1 2cb418cd2e
Change-Id: I630a26ad4463f2bccc8cfd11a8c8863421e642dc
Forward all logs to the console, ensuring they are consumed by
pebble and propagated up to Kubernetes.
Change-Id: I8f3c7c0abd49c9f71f2b6e4bb85ee486ed64e478
The payload containers sb, nb and northd have a shared db dir. The join
wrapper skips the join command if it detects an existing ovn db. But the regex
used by the join command is not specific enough. So the sb would skip the join
if the nb db was present. This patch tightens the regex so that the join
wrappers look for their own db.
Change-Id: I20b139244664a5218c236ec28756fefd617cc668
The build time is very long because of PIP having to fetch and build
native components of the libraries. This change show a possible way to
bypass this issue. This has implication regarding the platform it's
running on. In this case, we know the charm is going to be run on a
22.04 container.
Change-Id: Ib0d57b872364b8eba6320bb36269c2fcaf7fedb7
v1 of the kubernetes_service_patch lib will patches the service
definition on `status_update` event. This helps when Juju refreshes the
patched services to their initial state.
Depends-On: https://review.opendev.org/c/openstack/charm-ops-sunbeam/+/880270
Change-Id: I1369a3ca6cabc7c34c958671e1638ca89bb256df
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
Update the snaps to use in functional tests:
juju snap to 3.1 and microk8s snap to 1.26-strict.
Update zaza requirement to use libjuju-3.1 branch.
Change-Id: I6e251140c6426b9d58c6ca7302f395c275bbf99d
* Switch to using new `configure_charm` structure
* Stop using key self._state.bootstrapped and use property self.bootstrapped()
instead.
* Stop using deprecated use_juju_for_storage=True
Depends-On: I6b46bae1dc700f5e8b597374c660c0af9c069172
Change-Id: I7d759a7f1474a6f37c4cd597bfe733f5c0ec32ae
All we care about is whether the unit is active or not; the
message is somewhat irrelevant and has been changed in this
operator recently.
Re-enable gating for functional testing.
Change-Id: I9c3abf83421a2933f01fa99f4cc0fe29b2c57164
publish-charm failed to execute rename.sh
as it is not allowed.
Add abosulte path for rename.sh, fetch-libs.sh
in allowlist_externals.
Change-Id: I177adb1d6a5900c5433e795e98ec14f7a94d33d1
Ensure that the expected cluster size has been reached prior to
executing the join process for NB and SB ovsdb-server instances.
Ensure that OVN databases are stored on a persistent volume
to support charm upgrades.
Change-Id: I70ded229ff4c1c2f1d70bd052699bdd641489290
When the bootstrap is completed, it is
required to update bootstrap status as
well from maintenance to Active. This
patch updates the bootstrap status to active
when bootstrap is marked as True.
Change-Id: I9c547778ed211ab17732c0a9c224a3b306ffb63d