Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport changes to implement CNI configuration #404

Merged
merged 5 commits into from
Apr 3, 2024

Conversation

DnPlas
Copy link
Contributor

@DnPlas DnPlas commented Apr 3, 2024

  • docs: add instructions to enable istio cni plugin

  • fix: call self._cni_config_changed and handle exception

The _cni_config_changed() method was not called correctly because of a typo,
which led to the condition evaluating it to always be True, and running upgrades
when they are not required. Calling correctly the method ensures the charm executes
correct pieces of code.
By doing this, the GenericCharmRuntimeError exception that gets raised on an error
with CNI configuration must be re-raised when handling the reconcile.

Fixes #395

  • feat: enable Istio CNI plugin by default

This commit enables the Istio CNI plugin by default in all new
deployments of istio-pilot provided the required charm configuration is
present; otherwise the control plane remains intact.
It is also ensured that the required configurations are present when
upgrading to future versions so the plugin is correctly installed on
existing control planes (versions <1.17).

Fixes #356
Part of #351

  • refactor: use the istioctl wrapper for installing the control plane

This refactor uses the install method form the istioctl wrapper to
install the control plane without calling subprocess directly in the
charm code.

This commit also changes the unit tests and lints the code and tests
to adapt to the recent refactor.

Part of #351

@DnPlas DnPlas marked this pull request as ready for review April 3, 2024 10:05
@DnPlas DnPlas requested a review from a team as a code owner April 3, 2024 10:05
DnPlas added 4 commits April 3, 2024 12:11
…357)

* refactor: use the istioctl wrapper for installing the control plane

This refactor uses the install method form the istioctl wrapper to
install the control plane without calling subprocess directly in the
charm code.

This commit also changes the unit tests and lints the code and tests
to adapt to the recent refactor.

Part of #351
* feat: enable Istio CNI plugin by default

This commit enables the Istio CNI plugin by default in all new
deployments of istio-pilot provided the required charm configuration is
present; otherwise the control plane remains intact.
It is also ensured that the required configurations are present when
upgrading to future versions so the plugin is correctly installed on
existing control planes (versions <1.17).

Fixes #356
Part of #351
* fix: call self._cni_config_changed and handle exception

The _cni_config_changed() method was not called correctly because of a typo,
which led to the condition evaluating it to always be True, and running upgrades
when they are not required. Calling correctly the method ensures the charm executes
correct pieces of code.
By doing this, the GenericCharmRuntimeError exception that gets raised on an error
with CNI configuration must be re-raised when handling the reconcile.

Fixes #395
* docs: add instructions to enable istio cni plugin
@DnPlas DnPlas force-pushed the dnplas-cherry-pick-cni-config branch from 967d989 to d9a12bd Compare April 3, 2024 10:13
@DnPlas DnPlas merged commit f275ebf into track/1.17 Apr 3, 2024
19 checks passed
@DnPlas DnPlas deleted the dnplas-cherry-pick-cni-config branch April 3, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants