From b5ad5943cc0edf4298efa571a50482f8991314e9 Mon Sep 17 00:00:00 2001 From: cpitstick-latai Date: Tue, 30 Jul 2024 11:59:14 -0400 Subject: [PATCH 1/5] fix: Fix Kustomize installation (#700) Signed-off-by: Christopher Pitstick --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 64ff675f1..4d4e4b7e6 100644 --- a/Makefile +++ b/Makefile @@ -214,12 +214,11 @@ KUSTOMIZE_VERSION ?= v5.4.1 CONTROLLER_TOOLS_VERSION ?= v0.15.0 CRDOC_VERSION ?= v0.6.2 -KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. $(KUSTOMIZE): $(LOCALBIN) [ -e "$(KUSTOMIZE)" ] && rm -rf "$(KUSTOMIZE)" || true - curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN) + test -s ${LOCALBIN}/kustomize || GOBIN=${LOCALBIN} GO111MODULE=on go install sigs.k8s.io/kustomize/kustomize/v5@$(KUSTOMIZE_VERSION) .PHONY: controller-gen controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. From 4a43871bfacbd9b38a0225b50520daa37bef97c9 Mon Sep 17 00:00:00 2001 From: cpitstick-latai Date: Tue, 30 Jul 2024 14:08:36 -0400 Subject: [PATCH 2/5] fix: Case-align FROM and AS in Dockerfile (#699) Co-authored-by: Michael Beemer --- Dockerfile | 2 +- chart/open-feature-operator/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cfece87df..5357f417e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o manager m # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details -FROM gcr.io/distroless/static:nonroot as production +FROM gcr.io/distroless/static:nonroot AS production WORKDIR / COPY --from=builder /workspace/manager . USER 65532:65532 diff --git a/chart/open-feature-operator/README.md b/chart/open-feature-operator/README.md index 4903d5c31..6deafb905 100644 --- a/chart/open-feature-operator/README.md +++ b/chart/open-feature-operator/README.md @@ -169,7 +169,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` | From 1588ef85202c14fb2bcf47925f99bb2ab5dd1ac3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:33:52 -0400 Subject: [PATCH 3/5] chore(deps): update codecov/codecov-action action to v4 (#693) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pr-checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 8d5071031..2616f47af 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -49,7 +49,7 @@ jobs: run: make unit-test - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: flags: unit-tests From a21f278c2ee994223eb715796c963d109237dff5 Mon Sep 17 00:00:00 2001 From: cpitstick-latai Date: Fri, 2 Aug 2024 14:06:08 -0400 Subject: [PATCH 4/5] feat: Custom labels and annotations for namespace. (#702) Signed-off-by: Christopher Pitstick --- chart/open-feature-operator/README.md | 20 +++++++++++++------ .../templates/namespace.yaml | 13 +++++++++--- chart/open-feature-operator/values.yaml | 9 +++++++++ 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/chart/open-feature-operator/README.md b/chart/open-feature-operator/README.md index 6deafb905..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 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. From 7ace54d6a491ab78475d468ec8f817a944fbbce3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:49:09 -0400 Subject: [PATCH 5/5] chore: release 0.7.2 (#701) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 18 ++++++++++++++++++ Makefile | 2 +- chart/open-feature-operator/Chart.yaml | 4 ++-- chart/open-feature-operator/values.yaml | 2 +- docs/installation.md | 4 ++-- docs/quick_start.md | 2 +- 7 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f50949e84..fce8461fe 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,4 +1,4 @@ { - ".": "0.7.1", + ".": "0.7.2", "apis": "0.2.44" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d978e479..b3e97f6d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [0.7.2](https://github.com/open-feature/open-feature-operator/compare/v0.7.1...v0.7.2) (2024-08-02) + + +### โœจ New Features + +* Custom labels and annotations for namespace. ([#702](https://github.com/open-feature/open-feature-operator/issues/702)) ([a21f278](https://github.com/open-feature/open-feature-operator/commit/a21f278c2ee994223eb715796c963d109237dff5)) + + +### ๐Ÿ› Bug Fixes + +* Case-align FROM and AS in Dockerfile ([#699](https://github.com/open-feature/open-feature-operator/issues/699)) ([4a43871](https://github.com/open-feature/open-feature-operator/commit/4a43871bfacbd9b38a0225b50520daa37bef97c9)) +* Fix Kustomize installation ([#700](https://github.com/open-feature/open-feature-operator/issues/700)) ([b5ad594](https://github.com/open-feature/open-feature-operator/commit/b5ad5943cc0edf4298efa571a50482f8991314e9)) + + +### ๐Ÿงน Chore + +* **deps:** update codecov/codecov-action action to v4 ([#693](https://github.com/open-feature/open-feature-operator/issues/693)) ([1588ef8](https://github.com/open-feature/open-feature-operator/commit/1588ef85202c14fb2bcf47925f99bb2ab5dd1ac3)) + ## [0.7.1](https://github.com/open-feature/open-feature-operator/compare/v0.7.0...v0.7.1) (2024-07-23) diff --git a/Makefile b/Makefile index 4d4e4b7e6..ea338e781 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ ARCH?=amd64 IMG?=$(RELEASE_REGISTRY)/$(RELEASE_IMAGE) # customize overlay to be used in the build, DEFAULT or HELM KUSTOMIZE_OVERLAY ?= DEFAULT -CHART_VERSION=v0.7.1# x-release-please-version +CHART_VERSION=v0.7.2# x-release-please-version # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. ENVTEST_K8S_VERSION = 1.26.1 WAIT_TIMEOUT_SECONDS?=60 diff --git a/chart/open-feature-operator/Chart.yaml b/chart/open-feature-operator/Chart.yaml index 31910e48d..3da12351e 100755 --- a/chart/open-feature-operator/Chart.yaml +++ b/chart/open-feature-operator/Chart.yaml @@ -13,12 +13,12 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: "v0.7.1" # x-release-please-version +version: "v0.7.2" # x-release-please-version # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v0.7.1" # x-release-please-version +appVersion: "v0.7.2" # x-release-please-version home: https://openfeature.dev icon: https://open-feature.github.io/open-feature-operator/chart/open-feature-operator/openfeature-logo.png diff --git a/chart/open-feature-operator/values.yaml b/chart/open-feature-operator/values.yaml index 7e03886f1..4d925b1ea 100644 --- a/chart/open-feature-operator/values.yaml +++ b/chart/open-feature-operator/values.yaml @@ -138,7 +138,7 @@ controllerManager: ## @param controllerManager.manager.image.repository Sets the image for the operator. repository: ghcr.io/open-feature/open-feature-operator ## @param controllerManager.manager.image.tag Sets the version tag for the operator. - tag: v0.7.1 # x-release-please-version + tag: v0.7.2 # x-release-please-version resources: limits: ## @param controllerManager.manager.resources.limits.cpu Sets cpu resource limits for operator. diff --git a/docs/installation.md b/docs/installation.md index 59aa60068..1745c56f8 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -62,13 +62,13 @@ Apply the release yaml directly via kubectl ```sh kubectl create namespace open-feature-operator-system && -kubectl apply -f https://github.com/open-feature/open-feature-operator/releases/download/v0.7.1/release.yaml +kubectl apply -f https://github.com/open-feature/open-feature-operator/releases/download/v0.7.2/release.yaml ``` ### Uninstall ```sh -kubectl delete -f https://github.com/open-feature/open-feature-operator/releases/download/v0.7.1/release.yaml && +kubectl delete -f https://github.com/open-feature/open-feature-operator/releases/download/v0.7.2/release.yaml && kubectl delete namespace open-feature-operator-system ``` diff --git a/docs/quick_start.md b/docs/quick_start.md index c53f80ab3..60b3c66b6 100644 --- a/docs/quick_start.md +++ b/docs/quick_start.md @@ -40,7 +40,7 @@ helm upgrade --install openfeature openfeature/open-feature-operator ```sh kubectl create namespace open-feature-operator-system && -kubectl apply -f https://github.com/open-feature/open-feature-operator/releases/download/v0.7.1/release.yaml +kubectl apply -f https://github.com/open-feature/open-feature-operator/releases/download/v0.7.2/release.yaml ```