From 07d9f5d9bf400b41a7a56592a6e124b953488ab1 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 12 Jan 2022 15:42:12 -0800 Subject: [PATCH] Release 0.5.0 (#192) --- .github/workflows/ci.yml | 13 ++++++++ CHANGELOG.md | 4 +++ Dockerfile | 3 +- Makefile | 7 ++-- README.md | 5 +-- api/v1alpha1/nginxingresscontroller_types.go | 8 ++--- ...k8s.nginx.org_nginxingresscontrollers.yaml | 33 ++++++++++++++++--- ...ngress-operator.clusterserviceversion.yaml | 23 ++++++++++--- ...k8s.nginx.org_nginxingresscontrollers.yaml | 4 --- config/manager/kustomization.yaml | 2 +- ...ngress-operator.clusterserviceversion.yaml | 14 +++++++- .../k8s_v1alpha1_nginxingresscontroller.yaml | 2 +- docs/manual-installation.md | 8 ++--- .../nginx-ingress-controller.yaml | 3 +- .../nginx-ingress-controller.yaml | 2 +- 15 files changed, 96 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69bf1e37..529418c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -158,6 +158,17 @@ jobs: labels: | org.opencontainers.image.documentation=https://docs.nginx.com/nginx-ingress-controller org.opencontainers.image.vendor=NGINX Inc + - name: Output Variables + id: var + run: | + version=${{ steps.meta.outputs.version }} + if ${{ startsWith(github.ref, 'refs/tags/') }}; then + operator_version=v$version + else + tag=$(git describe --tags --abbrev=0) + operator_version=$tag-$version-${{ needs.vars.outputs.sha_short }} + fi + echo "::set-output name=version::$operator_version" - name: Build Image uses: docker/build-push-action@v2 with: @@ -171,6 +182,8 @@ jobs: load: ${{ github.event_name == 'pull_request' }} push: ${{ github.event_name != 'pull_request' }} pull: true + build-args: | + VERSION=${{ steps.var.outputs.version }} - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@0.2.1 continue-on-error: true diff --git a/CHANGELOG.md b/CHANGELOG.md index ae1d76b1..bd582444 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +### 0.5.0 + +An automatically generated list of changes can be found on Github at: [0.5.0 Release](https://github.com/nginxinc/nginx-ingress-operator/releases/tag/v0.5.0) + ### 0.4.0 An automatically generated list of changes can be found on Github at: [0.4.0 Release](https://github.com/nginxinc/nginx-ingress-operator/releases/tag/v0.4.0) diff --git a/Dockerfile b/Dockerfile index 08e2b7d1..2423de87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,8 @@ COPY config/crd/kic ./config/crd/kic COPY LICENSE /licenses/ LABEL name="NGINX Ingress Operator" \ - vendor="NGINX Inc > bundle.Dockerfile operator-sdk bundle validate ./bundle .PHONY: bundle-build bundle-build: ## Build the bundle image. docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) . -openshift-bundle-build: bundle ## Build the bundle image for OpenShift. - @printf "%s\n" '' 'LABEL com.redhat.openshift.versions="v4.5"' 'LABEL com.redhat.delivery.operator.bundle=true' 'LABEL com.redhat.delivery.backport=true' >> bundle.Dockerfile - .PHONY: bundle-push bundle-push: ## Push the bundle image. $(MAKE) docker-push IMG=$(BUNDLE_IMG) diff --git a/README.md b/README.md index 92c6ab89..4f4a2267 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ The following table shows the relation between the versions of the two projects: | NGINX Ingress Controller | NGINX Ingress Operator | | --- | --- | +| 2.1.x | 0.5.0 | | 2.0.x | 0.4.0 | | 1.12.x | 0.3.0 | | 1.11.x | 0.2.0 | @@ -38,7 +39,7 @@ See [upgrade docs](./docs/upgrades) ## NGINX Ingress Operator Releases We publish NGINX Ingress Operator releases on GitHub. See our [releases page](https://github.com/nginxinc/nginx-ingress-operator/releases). -The latest stable release is [0.4.0](https://github.com/nginxinc/nginx-ingress-operator/releases/tag/v0.4.0). For production use, we recommend that you choose the latest stable release. +The latest stable release is [0.5.0](https://github.com/nginxinc/nginx-ingress-operator/releases/tag/v0.5.0). For production use, we recommend that you choose the latest stable release. ## Development @@ -54,7 +55,7 @@ It is possible to run the operator in your local machine. This is useful for tes ``` 2. Run `make run`. -The operator will run in your local machine but will be communicating with the cluster. +The operator will run in your local machine but will be communicating with the cluster. ### Update CRD diff --git a/api/v1alpha1/nginxingresscontroller_types.go b/api/v1alpha1/nginxingresscontroller_types.go index 8f046368..d2bafd23 100644 --- a/api/v1alpha1/nginxingresscontroller_types.go +++ b/api/v1alpha1/nginxingresscontroller_types.go @@ -283,13 +283,13 @@ type AppProtectDos struct { // Enable App Protect Dos. Enable bool `json:"enable"` // Enable debug mode. - Debug bool `json:"debug"` + Debug bool `json:"debug,omitempty"` // Max number of ADMD instances. - MaxDaemons int `json:"maxDaemons"` + MaxDaemons int `json:"maxDaemons,omitempty"` // Max number of nginx processes to support. - MaxWorkers int `json:"maxWorkers"` + MaxWorkers int `json:"maxWorkers,omitempty"` // RAM memory size in MB. - Memory int `json:"memory"` + Memory int `json:"memory,omitempty"` } // Service defines the Service for the Ingress Controller. diff --git a/bundle/manifests/k8s.nginx.org_nginxingresscontrollers.yaml b/bundle/manifests/k8s.nginx.org_nginxingresscontrollers.yaml index 8e3f36ba..220094a2 100644 --- a/bundle/manifests/k8s.nginx.org_nginxingresscontrollers.yaml +++ b/bundle/manifests/k8s.nginx.org_nginxingresscontrollers.yaml @@ -41,11 +41,34 @@ spec: nullable: true properties: enable: - description: Enable App Protect. + description: Enable App Protect WAF. type: boolean required: - enable type: object + appProtectDos: + description: App Protect Dos support configuration. Requires enableCRDs + set to true. + nullable: true + properties: + debug: + description: Enable debug mode. + type: boolean + enable: + description: Enable App Protect Dos. + type: boolean + maxDaemons: + description: Max number of ADMD instances. + type: integer + maxWorkers: + description: Max number of nginx processes to support. + type: integer + memory: + description: RAM memory size in MB. + type: integer + required: + - enable + type: object configMapData: additionalProperties: type: string @@ -241,15 +264,15 @@ spec: description: The service of the Ingress controller. nullable: true properties: - extraLabels: + extraAnnotations: additionalProperties: type: string - description: Specifies extra labels of the service. + description: Specifies extra annotations of the service. type: object - extraAnnotations: + extraLabels: additionalProperties: type: string - description: Specifies extra annotations of the service. + description: Specifies extra labels of the service. type: object type: object serviceType: diff --git a/bundle/manifests/nginx-ingress-operator.clusterserviceversion.yaml b/bundle/manifests/nginx-ingress-operator.clusterserviceversion.yaml index c86b5247..449e5b0f 100644 --- a/bundle/manifests/nginx-ingress-operator.clusterserviceversion.yaml +++ b/bundle/manifests/nginx-ingress-operator.clusterserviceversion.yaml @@ -14,7 +14,7 @@ metadata: "image": { "pullPolicy": "Always", "repository": "docker.io/nginx/nginx-ingress", - "tag": "2.0.0-ubi" + "tag": "2.1.0-ubi" }, "ingressClass": "nginx", "nginxPlus": false, @@ -24,9 +24,16 @@ metadata: } ] capabilities: Basic Install + categories: Monitoring, Networking + certified: "true" + containerImage: nginx/nginx-ingress-operator:0.5.0 + description: The NGINX Ingress Operator is a Kubernetes/OpenShift component which + deploys and manages one or more NGINX/NGINX Plus Ingress Controllers operators.operatorframework.io/builder: operator-sdk-v1.15.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 - name: nginx-ingress-operator.v0.4.0 + repository: https://github.com/nginxinc/nginx-ingress-operator + support: NGINX Inc. + name: nginx-ingress-operator.v0.5.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -52,6 +59,10 @@ spec: true. displayName: App Protect path: appProtect + - description: App Protect Dos support configuration. Requires enableCRDs set + to true. + displayName: App Protect Dos + path: appProtectDos - description: Initial values of the Ingress Controller ConfigMap. Check https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/configmap-resource/ for more information about possible values. displayName: Config Map Data @@ -215,6 +226,7 @@ spec: - update - apiGroups: - appprotect.f5.com + - appprotectdos.f5.com - k8s.nginx.org resources: - '*' @@ -364,7 +376,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - image: nginx/nginx-ingress-operator:0.4.0 + image: nginx/nginx-ingress-operator:0.5.0 livenessProbe: httpGet: path: /healthz @@ -449,7 +461,8 @@ spec: - email: kubernetes@nginx.com name: NGINX Inc maturity: alpha + minKubeVersion: 1.19.0 provider: name: NGINX Inc - replaces: nginx-ingress-operator.v0.2.0 - version: 0.4.0 + replaces: nginx-ingress-operator.v0.4.0 + version: 0.5.0 diff --git a/config/crd/bases/k8s.nginx.org_nginxingresscontrollers.yaml b/config/crd/bases/k8s.nginx.org_nginxingresscontrollers.yaml index 0e548f17..7bc524f0 100644 --- a/config/crd/bases/k8s.nginx.org_nginxingresscontrollers.yaml +++ b/config/crd/bases/k8s.nginx.org_nginxingresscontrollers.yaml @@ -69,11 +69,7 @@ spec: description: RAM memory size in MB. type: integer required: - - debug - enable - - maxDaemons - - maxWorkers - - memory type: object configMapData: additionalProperties: diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 4da2a7b2..7a70bdcf 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -13,4 +13,4 @@ kind: Kustomization images: - name: controller newName: nginx/nginx-ingress-operator - newTag: 0.4.0 + newTag: 0.5.0 diff --git a/config/manifests/bases/nginx-ingress-operator.clusterserviceversion.yaml b/config/manifests/bases/nginx-ingress-operator.clusterserviceversion.yaml index 3f887656..c30640a9 100644 --- a/config/manifests/bases/nginx-ingress-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/nginx-ingress-operator.clusterserviceversion.yaml @@ -4,6 +4,13 @@ metadata: annotations: alm-examples: '[]' capabilities: Basic Install + categories: Monitoring, Networking + certified: "true" + containerImage: nginx/nginx-ingress-operator:0.5.0 + description: The NGINX Ingress Operator is a Kubernetes/OpenShift component which + deploys and manages one or more NGINX/NGINX Plus Ingress Controllers + repository: https://github.com/nginxinc/nginx-ingress-operator + support: NGINX Inc. name: nginx-ingress-operator.v0.0.0 namespace: placeholder spec: @@ -30,6 +37,10 @@ spec: true. displayName: App Protect path: appProtect + - description: App Protect Dos support configuration. Requires enableCRDs set + to true. + displayName: App Protect Dos + path: appProtectDos - description: Initial values of the Ingress Controller ConfigMap. Check https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/configmap-resource/ for more information about possible values. displayName: Config Map Data @@ -184,7 +195,8 @@ spec: - email: kubernetes@nginx.com name: NGINX Inc maturity: alpha + minKubeVersion: 1.19.0 provider: name: NGINX Inc - replaces: nginx-ingress-operator.v0.2.0 + replaces: nginx-ingress-operator.v0.4.0 version: 0.0.0 diff --git a/config/samples/k8s_v1alpha1_nginxingresscontroller.yaml b/config/samples/k8s_v1alpha1_nginxingresscontroller.yaml index 8417ccf2..ad21099c 100644 --- a/config/samples/k8s_v1alpha1_nginxingresscontroller.yaml +++ b/config/samples/k8s_v1alpha1_nginxingresscontroller.yaml @@ -7,7 +7,7 @@ spec: nginxPlus: false image: repository: docker.io/nginx/nginx-ingress - tag: 2.0.0-ubi + tag: 2.1.0-ubi pullPolicy: Always serviceType: NodePort ingressClass: nginx diff --git a/docs/manual-installation.md b/docs/manual-installation.md index 2900ffc1..8eb19a8d 100644 --- a/docs/manual-installation.md +++ b/docs/manual-installation.md @@ -8,22 +8,22 @@ This will deploy the operator in the `nginx-ingress-operator-system` namespace. ``` git clone https://github.com/nginxinc/nginx-ingress-operator/ cd nginx-ingress-operator/ - git checkout v0.4.0 + git checkout v0.5.0 ``` 2. `Openshift` To deploy the Operator and associated resources to an OpenShift environment, run: ``` - make openshift-deploy IMG=registry.connect.redhat.com/nginx/nginx-ingress-operator:0.4.0 + make deploy IMG=registry.connect.redhat.com/nginx/nginx-ingress-operator:0.5.0 ``` 3. Alternatively, to deploy the Operator and associated resources to all other environments: ``` - make deploy IMG=nginx/nginx-ingress-operator:0.4.0 + make deploy IMG=nginx/nginx-ingress-operator:0.5.0 ``` 2. Check that the Operator is running: ``` - kubectl get deployments -n nginx-ingress-operator-system + kubectl get deployments -n nginx-ingress-operator-system NAME READY UP-TO-DATE AVAILABLE AGE nginx-ingress-operator-controller-manager 1/1 1 1 15s diff --git a/examples/deployment-oss-min/nginx-ingress-controller.yaml b/examples/deployment-oss-min/nginx-ingress-controller.yaml index 5f53e0aa..cef2e433 100644 --- a/examples/deployment-oss-min/nginx-ingress-controller.yaml +++ b/examples/deployment-oss-min/nginx-ingress-controller.yaml @@ -8,8 +8,7 @@ spec: nginxPlus: false image: repository: nginx/nginx-ingress - tag: 2.0.0-ubi + tag: 2.1.0-ubi pullPolicy: Always replicas: 1 serviceType: NodePort - diff --git a/examples/deployment-plus-min/nginx-ingress-controller.yaml b/examples/deployment-plus-min/nginx-ingress-controller.yaml index a8ef2f51..e5e78df9 100644 --- a/examples/deployment-plus-min/nginx-ingress-controller.yaml +++ b/examples/deployment-plus-min/nginx-ingress-controller.yaml @@ -8,7 +8,7 @@ spec: nginxPlus: true image: repository: nginx-plus-ingress - tag: 2.0.0-ubi + tag: 2.1.0-ubi pullPolicy: IfNotPresent replicas: 1 serviceType: NodePort