diff --git a/chart/open-feature-operator/README.md b/chart/open-feature-operator/README.md index b975df0b6..bc3f198d3 100644 --- a/chart/open-feature-operator/README.md +++ b/chart/open-feature-operator/README.md @@ -99,22 +99,25 @@ The command removes all the Kubernetes components associated with the chart and ### Sidecar configuration -| Name | Description | Value | -| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | -| `sidecarConfiguration.port` | Sets the value of the `XXX_PORT` environment variable for the injected sidecar. | `8013` | -| `sidecarConfiguration.managementPort` | Sets the value of the `XXX_MANAGEMENT_PORT` environment variable for the injected sidecar. | `8014` | -| `sidecarConfiguration.socketPath` | Sets the value of the `XXX_SOCKET_PATH` environment variable for the injected sidecar. | `""` | -| `sidecarConfiguration.image.repository` | Sets the image for the injected sidecar. | `ghcr.io/open-feature/flagd` | -| `sidecarConfiguration.image.tag` | Sets the version tag for the injected sidecar. | `v0.9.0` | -| `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`. | `""` | -| `sidecarConfiguration.envVarPrefix` | Sets the prefix for all environment variables set in the injected sidecar. | `FLAGD` | -| `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` | -| `sidecarConfiguration.evaluator` | Sets the value of the `XXX_EVALUATOR` environment variable for the injected sidecar container. | `json` | -| `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` | -| `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` | -| `sidecarConfiguration.debugLogging` | Controls the addition of the `--debug` flag to the container startup arguments. | `false` | -| `sidecarConfiguration.otelCollectorUri` | Otel exporter uri. | `""` | -| `sidecarConfiguration.resources` | Override resources of the flagd sidecar. | `{}` | +| Name | Description | Value | +| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | +| `sidecarConfiguration.port` | Sets the value of the `XXX_PORT` environment variable for the injected sidecar. | `8013` | +| `sidecarConfiguration.managementPort` | Sets the value of the `XXX_MANAGEMENT_PORT` environment variable for the injected sidecar. | `8014` | +| `sidecarConfiguration.socketPath` | Sets the value of the `XXX_SOCKET_PATH` environment variable for the injected sidecar. | `""` | +| `sidecarConfiguration.image.repository` | Sets the image for the injected sidecar. | `ghcr.io/open-feature/flagd` | +| `sidecarConfiguration.image.tag` | Sets the version tag for the injected sidecar. | `v0.9.0` | +| `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`. | `""` | +| `sidecarConfiguration.envVarPrefix` | Sets the prefix for all environment variables set in the injected sidecar. | `FLAGD` | +| `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` | +| `sidecarConfiguration.evaluator` | Sets the value of the `XXX_EVALUATOR` environment variable for the injected sidecar container. | `json` | +| `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` | +| `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` | +| `sidecarConfiguration.debugLogging` | Controls the addition of the `--debug` flag to the container startup arguments. | `false` | +| `sidecarConfiguration.otelCollectorUri` | Otel exporter uri. | `""` | +| `sidecarConfiguration.resources.limits.cpu` | Sets cpu resource limits for kube-rbac-proxy. | `500m` | +| `sidecarConfiguration.resources.limits.memory` | Sets memory resource limits for kube-rbac-proxy. | `64Mi` | +| `sidecarConfiguration.resources.requests.cpu` | Sets cpu resource requests for kube-rbac-proxy. | `200m` | +| `sidecarConfiguration.resources.requests.memory` | Sets memory resource requests for kube-rbac-proxy. | `32Mi` | ### Flagd-proxy configuration diff --git a/chart/open-feature-operator/values.yaml b/chart/open-feature-operator/values.yaml index 2d1d8be9b..f34173110 100644 --- a/chart/open-feature-operator/values.yaml +++ b/chart/open-feature-operator/values.yaml @@ -33,8 +33,17 @@ sidecarConfiguration: debugLogging: false ## @param sidecarConfiguration.otelCollectorUri Otel exporter uri. otelCollectorUri: "" - ## @param sidecarConfiguration.resources Override resources of the flagd sidecar. - resources: { } + resources: + limits: + ## @param sidecarConfiguration.resources.limits.cpu Sets cpu resource limits for kube-rbac-proxy. + cpu: 500m + ## @param sidecarConfiguration.resources.limits.memory Sets memory resource limits for kube-rbac-proxy. + memory: 64Mi + requests: + ## @param sidecarConfiguration.resources.requests.cpu Sets cpu resource requests for kube-rbac-proxy. + cpu: 200m + ## @param sidecarConfiguration.resources.requests.memory Sets memory resource requests for kube-rbac-proxy. + memory: 32Mi ## @section Flagd-proxy configuration flagdProxyConfiguration: diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 44dbc7fb2..b73b3aab6 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -36,8 +36,10 @@ spec: fieldPath: metadata.namespace args: - --leader-elect - - --flagd-cpu-limit=0.5 - - --flagd-ram-limit=64M + - --sidecar-cpu-limit=500m + - --sidecar-ram-limit=64Mi + - --sidecar-cpu-request=200m + - --sidecar-ram-request=32Mi imagePullPolicy: IfNotPresent image: controller:main name: manager diff --git a/config/overlays/helm/manager.yaml b/config/overlays/helm/manager.yaml index 18eec907a..fd1dae43e 100644 --- a/config/overlays/helm/manager.yaml +++ b/config/overlays/helm/manager.yaml @@ -68,6 +68,12 @@ spec: value: "{{ .Values.managerConfig.flagsValidatonEnabled }}" - name: FLAGD_RESOURCE_ENABLED value: "{{ .Values.managerConfig.flagdResourceEnabled }}" + args: + - --leader-elect + - --sidecar-cpu-limit={{ .Values.sidecarConfiguration.resources.limits.cpu }} + - --sidecar-ram-limit={{ .Values.sidecarConfiguration.resources.limits.memory }} + - --sidecar-cpu-request={{ .Values.sidecarConfiguration.resources.requests.cpu }} + - --sidecar-ram-request={{ .Values.sidecarConfiguration.resources.requests.memory }} - name: kube-rbac-proxy image: "{{ .Values.controllerManager.kubeRbacProxy.image.repository }}:{{ .Values.controllerManager.kubeRbacProxy.image.tag }}" resources: