diff --git a/chart/open-feature-operator/README.md b/chart/open-feature-operator/README.md index 4903d5c31..55990b5a0 100644 --- a/chart/open-feature-operator/README.md +++ b/chart/open-feature-operator/README.md @@ -93,12 +93,20 @@ The command removes all the Kubernetes components associated with the chart and ### Global -| Name | Description | Value | -| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | -| `defaultNamespace` | To override the namespace use the `--namespace` flag. This default is provided to ensure that the kustomize build charts in `/templates` deploy correctly when no `namespace` is provided via the `-n` flag. | `open-feature-operator-system` | -| `imagePullSecrets` | Array of ImagePullSecret objects containing credentials for images pulled by the operator (flagdProxyConfiguration.image, flagdConfiguration.image, controllerManager.manager.image, controllerManager.kubeRbacProxy.image). Example: imagePullSecrets: [{"name": "my-secret"}] | `[]` | -| `labels` | Labels to apply to all of the pods in the operator. | `{}` | -| `annotations` | Annotations to apply to all of the pods in the operator. | `{}` | +| Name | Description | Value | +| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------ | +| `defaultNamespace` | To override the namespace use the `--namespace` flag. This default is provided to ensure that the kustomize build charts in `/templates` deploy correctly when no `namespace` is provided via the `-n` flag. | `open-feature-operator-system` | + +### namespace + +| Name | Description | Value | +| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | +| `namespace.create` | Whether to create the namespace as part of this chart. | `true` | +| `namespace.labels` | Labels for the namespace if created as part of the chart. | `{}` | +| `namespace.annotations` | Annotations for the namespace if created as part of the chart. | `{}` | +| `imagePullSecrets` | Array of ImagePullSecret objects containing credentials for images pulled by the operator (flagdProxyConfiguration.image, flagdConfiguration.image, controllerManager.manager.image, controllerManager.kubeRbacProxy.image). Example: imagePullSecrets: [{"name": "my-secret"}] | `[]` | +| `labels` | Labels to apply to all of the pods in the operator. | `{}` | +| `annotations` | Annotations to apply to all of the pods in the operator. | `{}` | ### Sidecar configuration @@ -169,7 +177,7 @@ The command removes all the Kubernetes components associated with the chart and | `controllerManager.kubeRbacProxy.resources.requests.cpu` | Sets cpu resource requests for kube-rbac-proxy. | `5m` | | `controllerManager.kubeRbacProxy.resources.requests.memory` | Sets memory resource requests for kube-rbac-proxy. | `64Mi` | | `controllerManager.manager.image.repository` | Sets the image for the operator. | `ghcr.io/open-feature/open-feature-operator` | -| `controllerManager.manager.image.tag` | Sets the version tag for the operator. | `v0.7.0` | +| `controllerManager.manager.image.tag` | Sets the version tag for the operator. | `v0.7.1` | | `controllerManager.manager.resources.limits.cpu` | Sets cpu resource limits for operator. | `500m` | | `controllerManager.manager.resources.limits.memory` | Sets memory resource limits for operator. | `128Mi` | | `controllerManager.manager.resources.requests.cpu` | Sets cpu resource requests for operator. | `10m` | diff --git a/chart/open-feature-operator/templates/namespace.yaml b/chart/open-feature-operator/templates/namespace.yaml index ccf02dbf1..959ebb6d4 100644 --- a/chart/open-feature-operator/templates/namespace.yaml +++ b/chart/open-feature-operator/templates/namespace.yaml @@ -1,10 +1,17 @@ # Only deploy the namespace if the default is being used (helm install should fail if the namespace isnt present) # when one is defined with -n -{{ if eq ( include "chart.namespace" . ) .Values.defaultNamespace }} +{{- if and (eq (include "chart.namespace" .) .Values.defaultNamespace) .Values.namespace.create }} apiVersion: v1 kind: Namespace metadata: + name: '{{ include "chart.namespace" . }}' labels: control-plane: controller-manager - name: '{{ include "chart.namespace" . }}' -{{ end }} \ No newline at end of file + {{- range $key, $value := $.Values.namespace.labels }} + {{ $key }}: {{ $value | quote }} + {{- end }} + annotations: + {{- range $key, $value := $.Values.namespace.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} +{{ end }} diff --git a/chart/open-feature-operator/values.yaml b/chart/open-feature-operator/values.yaml index b37beb7ec..7e03886f1 100644 --- a/chart/open-feature-operator/values.yaml +++ b/chart/open-feature-operator/values.yaml @@ -2,6 +2,15 @@ ## @section Global ## @param defaultNamespace To override the namespace use the `--namespace` flag. This default is provided to ensure that the kustomize build charts in `/templates` deploy correctly when no `namespace` is provided via the `-n` flag. defaultNamespace: open-feature-operator-system +## @section namespace +namespace: + ## @param namespace.create Whether to create the namespace as part of this chart. + create: true + ## @param namespace.labels Labels for the namespace if created as part of the chart. + labels: {} + ## @param namespace.annotations Annotations for the namespace if created as part of the chart. + annotations: {} + ## @param imagePullSecrets Array of ImagePullSecret objects containing credentials for images pulled by the operator (flagdProxyConfiguration.image, flagdConfiguration.image, controllerManager.manager.image, controllerManager.kubeRbacProxy.image). Example: imagePullSecrets: [{"name": "my-secret"}] imagePullSecrets: [] ## @param labels Labels to apply to all of the pods in the operator.