From 4507c14ec9d85d0135256949619ce0d15463260a Mon Sep 17 00:00:00 2001 From: Ian Bishop <151477169+ianb-mp@users.noreply.github.com> Date: Wed, 28 Aug 2024 09:20:13 +1000 Subject: [PATCH] Allow feature gates to be set from Helm chart --- deployment/sriov-network-operator-chart/README.md | 3 ++- .../templates/sriovoperatorconfig.yaml | 4 ++++ deployment/sriov-network-operator-chart/values.yaml | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/deployment/sriov-network-operator-chart/README.md b/deployment/sriov-network-operator-chart/README.md index 40b4e92a9..8875b36eb 100644 --- a/deployment/sriov-network-operator-chart/README.md +++ b/deployment/sriov-network-operator-chart/README.md @@ -128,10 +128,11 @@ This section contains general parameters that apply to both the operator and dae | Name | Type | Default | description | | ---- | ---- | ------- | ----------- | | `sriovOperatorConfig.deploy` | bool | `false` | deploy SriovOperatorConfig custom resource | -| `sriovOperatorConfig.configDaemonNodeSelector` | map[string]string | `{}` | node slectors for sriov-network-config-daemon | +| `sriovOperatorConfig.configDaemonNodeSelector` | map[string]string | `{}` | node selectors for sriov-network-config-daemon | | `sriovOperatorConfig.logLevel` | int | `2` | log level for both operator and sriov-network-config-daemon | | `sriovOperatorConfig.disableDrain` | bool | `false` | disable node draining when configuring SR-IOV, set to true in case of a single node cluster or any other justifiable reason | | `sriovOperatorConfig.configurationMode` | string | `daemon` | sriov-network-config-daemon configuration mode. either `daemon` or `systemd` | +| `sriovOperatorConfig.featureGates` | map[string]bool | `{}` | feature gates to enable/disable | ### Images parameters diff --git a/deployment/sriov-network-operator-chart/templates/sriovoperatorconfig.yaml b/deployment/sriov-network-operator-chart/templates/sriovoperatorconfig.yaml index f18e1ff4a..3bec8d351 100644 --- a/deployment/sriov-network-operator-chart/templates/sriovoperatorconfig.yaml +++ b/deployment/sriov-network-operator-chart/templates/sriovoperatorconfig.yaml @@ -14,4 +14,8 @@ spec: logLevel: {{ .Values.sriovOperatorConfig.logLevel }} disableDrain: {{ .Values.sriovOperatorConfig.disableDrain }} configurationMode: {{ .Values.sriovOperatorConfig.configurationMode }} + {{- with .Values.sriovOperatorConfig.featureGates }} + featureGates: + {{- range $k, $v := .}}{{printf "%s: %t" $k $v | nindent 4 }}{{ end }} + {{- end }} {{ end }} \ No newline at end of file diff --git a/deployment/sriov-network-operator-chart/values.yaml b/deployment/sriov-network-operator-chart/values.yaml index e1c31b82d..3e73006b7 100644 --- a/deployment/sriov-network-operator-chart/values.yaml +++ b/deployment/sriov-network-operator-chart/values.yaml @@ -87,7 +87,7 @@ operator: sriovOperatorConfig: # deploy sriovOperatorConfig CR with the below values deploy: false - # node slectors for sriov-network-config-daemon + # node selectors for sriov-network-config-daemon configDaemonNodeSelector: {} # log level for both operator and sriov-network-config-daemon logLevel: 2 @@ -96,6 +96,8 @@ sriovOperatorConfig: disableDrain: false # sriov-network-config-daemon configuration mode. either "daemon" or "systemd" configurationMode: daemon + # feature gates to enable/disable + featureGates: {} # Example for supportedExtraNICs values ['MyNIC: "8086 1521 1520"'] supportedExtraNICs: []