Skip to content

Commit d549144

Browse files
authored
fix: helm sidecar resources not applied (#639)
Signed-off-by: Todd Baert <[email protected]>
1 parent b0b99a7 commit d549144

File tree

4 files changed

+40
-20
lines changed

4 files changed

+40
-20
lines changed

chart/open-feature-operator/README.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,25 @@ The command removes all the Kubernetes components associated with the chart and
9999

100100
### Sidecar configuration
101101

102-
| Name | Description | Value |
103-
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
104-
| `sidecarConfiguration.port` | Sets the value of the `XXX_PORT` environment variable for the injected sidecar. | `8013` |
105-
| `sidecarConfiguration.managementPort` | Sets the value of the `XXX_MANAGEMENT_PORT` environment variable for the injected sidecar. | `8014` |
106-
| `sidecarConfiguration.socketPath` | Sets the value of the `XXX_SOCKET_PATH` environment variable for the injected sidecar. | `""` |
107-
| `sidecarConfiguration.image.repository` | Sets the image for the injected sidecar. | `ghcr.io/open-feature/flagd` |
108-
| `sidecarConfiguration.image.tag` | Sets the version tag for the injected sidecar. | `v0.9.0` |
109-
| `sidecarConfiguration.providerArgs` | Used to append arguments to the sidecar startup command. This value is a comma separated string of key values separated by '=', e.g. `key=value,key2=value2` results in the appending of `--sync-provider-args key=value --sync-provider-args key2=value2`. | `""` |
110-
| `sidecarConfiguration.envVarPrefix` | Sets the prefix for all environment variables set in the injected sidecar. | `FLAGD` |
111-
| `sidecarConfiguration.defaultSyncProvider` | Sets the value of the `XXX_SYNC_PROVIDER` environment variable for the injected sidecar container. There are 4 valid sync providers: `kubernetes`, `grpc`, `file` and `http`. | `kubernetes` |
112-
| `sidecarConfiguration.evaluator` | Sets the value of the `XXX_EVALUATOR` environment variable for the injected sidecar container. | `json` |
113-
| `sidecarConfiguration.logFormat` | Sets the value of the `XXX_LOG_FORMAT` environment variable for the injected sidecar container. There are 2 valid log formats: `json` and `console`. | `json` |
114-
| `sidecarConfiguration.probesEnabled` | Enable or Disable Liveness and Readiness probes of the flagd sidecar. When enabled, HTTP probes( paths - `/readyz`, `/healthz`) are set with an initial delay of 5 seconds. | `true` |
115-
| `sidecarConfiguration.debugLogging` | Controls the addition of the `--debug` flag to the container startup arguments. | `false` |
116-
| `sidecarConfiguration.otelCollectorUri` | Otel exporter uri. | `""` |
117-
| `sidecarConfiguration.resources` | Override resources of the flagd sidecar. | `{}` |
102+
| Name | Description | Value |
103+
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
104+
| `sidecarConfiguration.port` | Sets the value of the `XXX_PORT` environment variable for the injected sidecar. | `8013` |
105+
| `sidecarConfiguration.managementPort` | Sets the value of the `XXX_MANAGEMENT_PORT` environment variable for the injected sidecar. | `8014` |
106+
| `sidecarConfiguration.socketPath` | Sets the value of the `XXX_SOCKET_PATH` environment variable for the injected sidecar. | `""` |
107+
| `sidecarConfiguration.image.repository` | Sets the image for the injected sidecar. | `ghcr.io/open-feature/flagd` |
108+
| `sidecarConfiguration.image.tag` | Sets the version tag for the injected sidecar. | `v0.9.0` |
109+
| `sidecarConfiguration.providerArgs` | Used to append arguments to the sidecar startup command. This value is a comma separated string of key values separated by '=', e.g. `key=value,key2=value2` results in the appending of `--sync-provider-args key=value --sync-provider-args key2=value2`. | `""` |
110+
| `sidecarConfiguration.envVarPrefix` | Sets the prefix for all environment variables set in the injected sidecar. | `FLAGD` |
111+
| `sidecarConfiguration.defaultSyncProvider` | Sets the value of the `XXX_SYNC_PROVIDER` environment variable for the injected sidecar container. There are 4 valid sync providers: `kubernetes`, `grpc`, `file` and `http`. | `kubernetes` |
112+
| `sidecarConfiguration.evaluator` | Sets the value of the `XXX_EVALUATOR` environment variable for the injected sidecar container. | `json` |
113+
| `sidecarConfiguration.logFormat` | Sets the value of the `XXX_LOG_FORMAT` environment variable for the injected sidecar container. There are 2 valid log formats: `json` and `console`. | `json` |
114+
| `sidecarConfiguration.probesEnabled` | Enable or Disable Liveness and Readiness probes of the flagd sidecar. When enabled, HTTP probes( paths - `/readyz`, `/healthz`) are set with an initial delay of 5 seconds. | `true` |
115+
| `sidecarConfiguration.debugLogging` | Controls the addition of the `--debug` flag to the container startup arguments. | `false` |
116+
| `sidecarConfiguration.otelCollectorUri` | Otel exporter uri. | `""` |
117+
| `sidecarConfiguration.resources.limits.cpu` | Sets cpu resource limits for kube-rbac-proxy. | `500m` |
118+
| `sidecarConfiguration.resources.limits.memory` | Sets memory resource limits for kube-rbac-proxy. | `64Mi` |
119+
| `sidecarConfiguration.resources.requests.cpu` | Sets cpu resource requests for kube-rbac-proxy. | `200m` |
120+
| `sidecarConfiguration.resources.requests.memory` | Sets memory resource requests for kube-rbac-proxy. | `32Mi` |
118121

119122
### Flagd-proxy configuration
120123

chart/open-feature-operator/values.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,17 @@ sidecarConfiguration:
3333
debugLogging: false
3434
## @param sidecarConfiguration.otelCollectorUri Otel exporter uri.
3535
otelCollectorUri: ""
36-
## @param sidecarConfiguration.resources Override resources of the flagd sidecar.
37-
resources: { }
36+
resources:
37+
limits:
38+
## @param sidecarConfiguration.resources.limits.cpu Sets cpu resource limits for kube-rbac-proxy.
39+
cpu: 500m
40+
## @param sidecarConfiguration.resources.limits.memory Sets memory resource limits for kube-rbac-proxy.
41+
memory: 64Mi
42+
requests:
43+
## @param sidecarConfiguration.resources.requests.cpu Sets cpu resource requests for kube-rbac-proxy.
44+
cpu: 200m
45+
## @param sidecarConfiguration.resources.requests.memory Sets memory resource requests for kube-rbac-proxy.
46+
memory: 32Mi
3847

3948
## @section Flagd-proxy configuration
4049
flagdProxyConfiguration:

config/manager/manager.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ spec:
3636
fieldPath: metadata.namespace
3737
args:
3838
- --leader-elect
39-
- --flagd-cpu-limit=0.5
40-
- --flagd-ram-limit=64M
39+
- --sidecar-cpu-limit=500m
40+
- --sidecar-ram-limit=64Mi
41+
- --sidecar-cpu-request=200m
42+
- --sidecar-ram-request=32Mi
4143
imagePullPolicy: IfNotPresent
4244
image: controller:main
4345
name: manager

config/overlays/helm/manager.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ spec:
6868
value: "{{ .Values.managerConfig.flagsValidatonEnabled }}"
6969
- name: FLAGD_RESOURCE_ENABLED
7070
value: "{{ .Values.managerConfig.flagdResourceEnabled }}"
71+
args:
72+
- --leader-elect
73+
- --sidecar-cpu-limit={{ .Values.sidecarConfiguration.resources.limits.cpu }}
74+
- --sidecar-ram-limit={{ .Values.sidecarConfiguration.resources.limits.memory }}
75+
- --sidecar-cpu-request={{ .Values.sidecarConfiguration.resources.requests.cpu }}
76+
- --sidecar-ram-request={{ .Values.sidecarConfiguration.resources.requests.memory }}
7177
- name: kube-rbac-proxy
7278
image: "{{ .Values.controllerManager.kubeRbacProxy.image.repository }}:{{ .Values.controllerManager.kubeRbacProxy.image.tag }}"
7379
resources:

0 commit comments

Comments
 (0)