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

Create a spec for setting and using Istio CNI by default #350

Closed
DnPlas opened this issue Nov 21, 2023 · 3 comments
Closed

Create a spec for setting and using Istio CNI by default #350

DnPlas opened this issue Nov 21, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@DnPlas
Copy link
Contributor

DnPlas commented Nov 21, 2023

What needs to get done

A spec that outlines the implementation details, changes and the context of how Istio CNI works and how is that different from the current installation (up to istio-operators 1.17/stable). Also to include some of the limitations and potential issues, like the Compatibility with application init containers topic.

The following can be referenced for outlining the process:

Scope and considerations

  • This effort is mainly targeted at the istio-operators in main (so latest/edge) and should be included in the CKF release 1.9
  • The upgrade story between istio-operators 1.17 and newer versions of the charms
  • A stretch goal would be to bring this change to the charms released in 1.8/stable, IFF there are no big breaking changes that could break the stable release

Why it needs to get done

To be able to define the design and implementation details of the newer installation mode (with the CNI plugin).

@DnPlas DnPlas added the enhancement New feature or request label Nov 21, 2023
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5036.

This message was autogenerated

@kimwnasptd
Copy link
Contributor

I took a very brief look on the docs around for CNI, and an extra layer ambient-mesh (which we don't have to focus at all on for now).

Just adding those docs here, since they seemed nice
https://github.com/istio/istio/blob/master/cni/README.md
https://istio.io/latest/blog/2022/introducing-ambient-mesh/
https://istio.io/latest/blog/2023/ambient-ebpf-redirection/

@DnPlas
Copy link
Contributor Author

DnPlas commented Jan 2, 2024

The spec file has been created and approved. Though I cannot link the actual document here (as it is not a public doc), the highlights of it are:

  • From the approval of this specification and on, the default installation of the Istio Control Plane using the istio-operators will always come with the Istio CNI plugin with no option to disable it.
    Despite being optional in the upstream project, the CKF team is looking at making their offerings more secure in the longer run by also leveraging Pod Security Admission to prevent the creation of privileged controllers. This requires the Istio CNI plugin to be present.

  • The charm will have the following configuration options:

    • cni-bin-dir, a string to pass the path to CNI binaries
    • cni-conf-dir, a string to pass the path to conflist files describing the CNI configuration
  • To install the Istio CNI plugin with the correct configurations, the following flags and values have to be added to the install command in istio-pilot’s charm code:

diff --git a/charms/istio-pilot/src/charm.py b/charms/istio-pilot/src/charm.py
index 9592374..4eec2d3 100755
--- a/charms/istio-pilot/src/charm.py
+++ b/charms/istio-pilot/src/charm.py
@@ -196,6 +196,12 @@ class Operator(CharmBase):
             	"--set",
             	"profile=minimal",
             	"--set",
+            	f"values.cni.cniBinDir=self.model.config["cni-bin-dir"]",
+            	"--set",
+            	f"values.cni.cniConfDir=self.model.config["cni-conf-dir"]",
+            	"--set",
+            	"components.cni.enabled=<true|false>",
+            	"--set",
             	f"values.global.istioNamespace={self.model.name}",
             	"--set",
             	f"values.pilot.image={pilot_image}",

Closing this issue based on the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants