-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add Configuration to cilium agent via ConfigMap on ControllerDeployment of Gardener Extension #495
Comments
Assume I want to configure the extension such that it uses kubeproxyReplacement, XDP and so on. I would like this to be configurable as follows. apiVersion: v1
kind: ConfigMap
metadata:
name: myconfigmap
data:
key1: "foo"
key2: "bar"
---
apiVersion: core.gardener.cloud/v1beta1
kind: ControllerDeployment
metadata:
name: networking-cilium
type: helm
providerConfig:
chart: H4sIAAAAAAAAA+0ca2/b...
config: myconfigmap How do you like this idea? Should I implement it and open a PR? |
More over, under given circumstances cilium has trouble automatically figuring out MTU sizes and packet fragmentation options.
There is a need for configuration. |
Hi @veith4f, |
Hi @axel7born, right now, the extension is usually installed via ControllerRegistration and ControllerDeployment. The latter offers a few parameters as defined by https://github.com/gardener/gardener-extension-networking-cilium/blob/master/charts/gardener-extension-networking-cilium/values.yaml. Parameters supplied there need to be juggled along until they ultimately are mounted in https://github.com/gardener/gardener-extension-networking-cilium/blob/master/charts/internal/cilium/charts/agent/templates/daemonset.yaml. My thought was that there should be sort of a default ConfigMap (as there is now) but additionally another optional one that is watched by the Controller (if it exists) and which is used to override values of the default ConfigMap such that the result of this operation ultimately gets mounted by the cilium agent DaemonSet. That just seemed like the simplest way to me but any way of exposing as many parameters as possible is fine. |
Configuring a ConfigMap in the ControllerDeployment would set values for all cilium shoots in a landscape. That seems to be a bit odd. Is there really a need for such a change? |
If I understand correctly, using NetworkConfig allows configuration of individual shoot clusters. That is a worthwhile feature and allows even more control. With that being said, I don't think that landscape-wide configuration is odd. When you design a Kubernetes product and offer it as a digital service, you want to offer a specific feature set that includes the way you set up networking. Of course you can make each cluster a "customer project" where you have a completely individual network setup. But I think this approach does not scale well and gets very difficult to manage very quickly. It is cool to have this option for special needs customers but it seems to me that defining a landscape-wide network standard is an exercise that most gardener users would be very well advised to run. |
The current approach for landscape-wide configuration in gardener extensions would be via helm values. |
If I understand correctly, per shoot NetworkConfig is defined in Processing happens in https://github.com/gardener/gardener-extension-networking-cilium/blob/master/pkg/controller/actuator_reconcile.go#L96 . The actuator gathers the different parameter sources and renders the configmap that gets mounted by cilium agent DaemonSet. In my mind, an ideal solution would allow full configuration both on landscape level and shoot cluster level. Let's assume that both are implemented and that shoot cluster level can be configured via fully implemented NetworkConfig. |
I am going to try and answer my own question. All existing parameters are defined in https://github.com/cilium/cilium/blob/main/pkg/option/config.go#L55 FF. Either way we have a flat list of parameters that should be exposed both at shoot-cluster level and landscape level. I propose to make this happen the simplest way possible which is:
|
@axel7born Any thoughts? |
@veith4f I think there are more aspects to discuss. Should we maybe have a call? |
How to categorize this issue?
/area control-plane
/area usability
/area quality
/area robustness
/kind enhancement
/kind bug
What happened:
Cilium extension auto-configures itself using internal configmap. Apparently, the idea is to hide the complexity of cilium from users of this extension. However, in some cases the auto-configuration is somewhat lacking, see: #492.
What you expected to happen:
Even if problem indicated by above PR is fixed, real issue persists. Cilium can be used in variety of ways, (kube-proxy replacement, masquerading, xdp, and so on) // users need proper way to configure desired mode of operation. In terms of auto-configuration, there may be few profiles describing probable modes of operation but ultimately, individual cilium parameters should be configurable by an admin using the extension.
How to reproduce it (as minimally and precisely as possible):
does not apply
Anything else we need to know?:
Environment:
latest gardener, latest extension
The text was updated successfully, but these errors were encountered: