From 14da0e9de5c2495848927ce97c75f99c571fbdff Mon Sep 17 00:00:00 2001 From: fengxusong Date: Thu, 27 Jun 2024 19:32:43 +0800 Subject: [PATCH 1/2] feat: support extraDeploy field in helm chart Signed-off-by: fengxusong --- .../templates/extra-list.yaml | 8 ++++++++ .../sriov-network-operator-chart/templates/operator.yaml | 2 -- deployment/sriov-network-operator-chart/values.yaml | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 deployment/sriov-network-operator-chart/templates/extra-list.yaml diff --git a/deployment/sriov-network-operator-chart/templates/extra-list.yaml b/deployment/sriov-network-operator-chart/templates/extra-list.yaml new file mode 100644 index 000000000..6968e7dbd --- /dev/null +++ b/deployment/sriov-network-operator-chart/templates/extra-list.yaml @@ -0,0 +1,8 @@ +{{- range .Values.extraDeploy }} +--- +{{- if typeIs "string" . }} + {{- tpl . $ }} +{{- else }} + {{- tpl (. | toYaml) $ }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/deployment/sriov-network-operator-chart/templates/operator.yaml b/deployment/sriov-network-operator-chart/templates/operator.yaml index 52da05721..181ab2b07 100644 --- a/deployment/sriov-network-operator-chart/templates/operator.yaml +++ b/deployment/sriov-network-operator-chart/templates/operator.yaml @@ -70,8 +70,6 @@ spec: value: {{ .Values.images.webhook }} - name: METRICS_EXPORTER_IMAGE value: {{ .Values.images.metricsExporter }} - - name: METRICS_EXPORTER_SECRET_NAME - value: {{ .Values.operator.admissionControllers.certificates.secretNames.metricsExporter }} - name: METRICS_EXPORTER_PORT value: {{ .Values.operator.metricsExporter.port }} - name: METRICS_EXPORTER_SECRET_NAME diff --git a/deployment/sriov-network-operator-chart/values.yaml b/deployment/sriov-network-operator-chart/values.yaml index ccff03c10..8637f0bfb 100644 --- a/deployment/sriov-network-operator-chart/values.yaml +++ b/deployment/sriov-network-operator-chart/values.yaml @@ -21,7 +21,7 @@ operator: matchExpressions: - key: "node-role.kubernetes.io/control-plane" operator: In - values: [ "" ] + values: [""] nameOverride: "" fullnameOverride: "" resourcePrefix: "openshift.io" @@ -110,3 +110,4 @@ images: metricsExporterKubeRbacProxy: gcr.io/kubebuilder/kube-rbac-proxy:v0.15.0 imagePullSecrets: [] +extraDeploy: [] From bf051df996c622939cffeb271f4897f8d4a40e41 Mon Sep 17 00:00:00 2001 From: fengxusong Date: Wed, 3 Jul 2024 09:08:08 +0800 Subject: [PATCH 2/2] docs: add disclaimer for extraDeploy field Signed-off-by: fengxusong --- deployment/sriov-network-operator-chart/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/deployment/sriov-network-operator-chart/README.md b/deployment/sriov-network-operator-chart/README.md index ddf962305..75f681ee9 100644 --- a/deployment/sriov-network-operator-chart/README.md +++ b/deployment/sriov-network-operator-chart/README.md @@ -144,3 +144,13 @@ This section contains general parameters that apply to both the operator and dae | `images.webhook` | Operator Webhook image | | `images.metricsExporter` | Network Metrics Exporter image | | `images.metricsExporterKubeRbacProxy` | Kube RBAC Proxy image used for metrics exporter | + +### Extra objects parameters + +**Disclaimer**: + +Please note that any resources deployed using the `extraDeploy` in this Helm chart are the sole responsibility of the user. It is important to review and understand the implications of these deployed resources. The maintainers of this Helm chart take no responsibility for any issues or damages caused by the deployment or operation of these resources. + +| Name | description | +| ---- | ------------| +|`extraDeploy`| Array of extra objects to deploy with the release |