Skip to content

Commit 2fcba59

Browse files
authored
Update Operator SDK to v1.22.2 (#28)
1 parent 2624d0a commit 2fcba59

File tree

14 files changed

+102
-66
lines changed

14 files changed

+102
-66
lines changed

.github/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ template: |
6363
## Compatibility
6464
6565
- NGINX Ingress Controller NIC_VERSION_REPLACE_ME!
66-
- Openshift 4.5 or newer.
66+
- OpenShift 4.5 or newer.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/operator-framework/helm-operator:v1.22.0
1+
FROM quay.io/operator-framework/helm-operator:v1.22.2
22

33
ARG VERSION
44

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ ifeq (,$(shell which helm-operator 2>/dev/null))
130130
@{ \
131131
set -e ;\
132132
mkdir -p $(dir $(HELM_OPERATOR)) ;\
133-
curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.16.0/helm-operator_$(OS)_$(ARCH) ;\
133+
curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.22.2/helm-operator_$(OS)_$(ARCH) ;\
134134
chmod +x $(HELM_OPERATOR) ;\
135135
}
136136
else
@@ -140,9 +140,11 @@ endif
140140

141141
.PHONY: bundle
142142
bundle: kustomize ## Generate bundle manifests and metadata, then validate generated files.
143-
operator-sdk generate kustomize manifests -q
143+
operator-sdk generate kustomize manifests --interactive=false -q
144144
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
145-
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
145+
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
146+
@printf "%s\n" '' 'LABEL com.redhat.openshift.versions="v4.6"' 'LABEL com.redhat.delivery.operator.bundle=true' 'LABEL com.redhat.delivery.backport=true' >> bundle.Dockerfile
147+
@printf "%s\n" '' ' # OpenShift annotations.' ' com.redhat.openshift.versions: v4.6' >> bundle/metadata/annotations.yaml
146148
operator-sdk bundle validate ./bundle
147149

148150
.PHONY: bundle-build
@@ -161,7 +163,7 @@ ifeq (,$(shell which opm 2>/dev/null))
161163
@{ \
162164
set -e ;\
163165
mkdir -p $(dir $(OPM)) ;\
164-
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.19.1/$(OS)-$(ARCH)-opm ;\
166+
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.23.0/$${OS}-$${ARCH}-opm ;\
165167
chmod +x $(OPM) ;\
166168
}
167169
else

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Learn more about operators in the [Kubernetes Documentation](https://kubernetes.
88

99
To install a specific version of the NGINX Ingress Controller with the operator, a specific version of the NGINX Ingress Operator is required.
1010

11-
Up until version 0.5.1, this Operator was Go based. Version 1.0.0 marks an uncompatible upgrade as this release swtiched the Operator to being Helm-based, built from the [NGINX Ingress Controller Helm chart](http://helm.nginx.com/#nginx-ingress-controller). The configuration for the Helm chart can be seen in the [NGINX Ingress Controller documentation](https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-helm/#configuration).
11+
Up until version 0.5.1, this Operator was Go based. Version 1.0.0 marks an incompatible upgrade as this release switched the Operator to being Helm-based, built from the [NGINX Ingress Controller Helm chart](http://helm.nginx.com/#nginx-ingress-controller). The configuration for the Helm chart can be seen in the [NGINX Ingress Controller documentation](https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-helm/#configuration).
1212

1313
The following table shows the relation between the versions of the two projects:
1414

@@ -32,10 +32,10 @@ Note: The NGINX Ingress Operator works only for NGINX Ingress Controller version
3232

3333
1. Install the NGINX Ingress Operator. See [docs](./docs/installation.md).
3434
<br> NOTE: To use TransportServers as part of your NGINX Ingress Controller configuration, a GlobalConfiguration resource must be created *before* starting the Operator - [see the notes](./examples/deployment-oss-min/README.md#TransportServers)
35-
2. Create a default server secret on the cluster - an example yaml for this can be found in the [examples folder](https://github.com/nginxinc/nginx-ingress-helm-operator/blob/v1.0.0/examples/default-server-secret.yaml)
35+
2. Create a default server secret on the cluster - an example yaml for this can be found in the [examples folder](https://github.com/nginxinc/nginx-ingress-helm-operator/blob/v1.1.0/examples/default-server-secret.yaml)
3636
3. (If using OpenShift) Create the scc resource on the cluster by applying the scc.yaml file found in the `resources` folder of this repo:
3737
```shell
38-
kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-ingress-operator-helm/v1.0.0/resources/scc.yaml
38+
kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-ingress-operator-helm/v1.1.0/resources/scc.yaml
3939
```
4040
4. Deploy a new NGINX Ingress Controller using the [NginxIngress](./config/samples/charts_v1alpha1_nginxingress.yaml) Custom Resource:
4141
* Use the name of the default server secret created above for `controller.defaultTLS.secret` field (needs to be in the form `namespace/name`)
@@ -61,15 +61,15 @@ See [upgrade docs](./docs/upgrades)
6161
## NGINX Ingress Operator Releases
6262
We publish NGINX Ingress Operator releases on GitHub. See our [releases page](https://github.com/nginxinc/nginx-ingress-helm-operator/releases).
6363

64-
The latest stable release is [1.0.0](https://github.com/nginxinc/nginx-ingress-helm-operator/releases/tag/v1.0.0). For production use, we recommend that you choose the latest stable release.
64+
The latest stable release is [1.1.0](https://github.com/nginxinc/nginx-ingress-helm-operator/releases/tag/v1.1.0). For production use, we recommend that you choose the latest stable release.
6565

6666
## Development
6767

6868
It is possible to run the operator in your local machine. This is useful for testing or during development.
6969

7070
### Run Operator locally
7171

72-
1. Have access to a Kubernetes/Openshift cluster.
72+
1. Have access to a Kubernetes/OpenShift cluster.
7373
1. Apply the IC CRD:
7474
```
7575
make install

bundle.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
77
LABEL operators.operatorframework.io.bundle.package.v1=nginx-ingress-operator
88
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
99
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
10-
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.16.0-ocp
10+
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.22.2
1111
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
1212
LABEL operators.operatorframework.io.metrics.project_layout=helm.sdk.operatorframework.io/v1
1313

bundle/manifests/nginx-ingress-operator.clusterserviceversion.yaml

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ metadata:
3333
},
3434
"enableCertManager": false,
3535
"enableCustomResources": true,
36-
"enableExternalDNS": false,
3736
"enableLatencyMetrics": false,
3837
"enableOIDC": false,
3938
"enablePreviewPolicies": false,
@@ -147,7 +146,7 @@ metadata:
147146
description: The NGINX Ingress Operator is a Kubernetes/OpenShift component which
148147
deploys and manages one or more NGINX/NGINX Plus Ingress Controllers
149148
operatorframework.io/suggested-namespace: nginx-ingress
150-
operators.operatorframework.io/builder: operator-sdk-v1.16.0-ocp
149+
operators.operatorframework.io/builder: operator-sdk-v1.22.2
151150
operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1
152151
repository: https://github.com/nginxinc/nginx-ingress-helm-operator
153152
support: NGINX Inc.
@@ -292,7 +291,9 @@ spec:
292291
- create
293292
serviceAccountName: nginx-ingress-operator-controller-manager
294293
deployments:
295-
- name: nginx-ingress-operator-controller-manager
294+
- label:
295+
control-plane: controller-manager
296+
name: nginx-ingress-operator-controller-manager
296297
spec:
297298
replicas: 1
298299
selector:
@@ -307,6 +308,29 @@ spec:
307308
control-plane: controller-manager
308309
spec:
309310
containers:
311+
- args:
312+
- --secure-listen-address=0.0.0.0:8443
313+
- --upstream=http://127.0.0.1:8080/
314+
- --logtostderr=true
315+
- --v=0
316+
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0
317+
name: kube-rbac-proxy
318+
ports:
319+
- containerPort: 8443
320+
name: https
321+
protocol: TCP
322+
resources:
323+
limits:
324+
cpu: 500m
325+
memory: 128Mi
326+
requests:
327+
cpu: 5m
328+
memory: 64Mi
329+
securityContext:
330+
allowPrivilegeEscalation: false
331+
capabilities:
332+
drop:
333+
- ALL
310334
- args:
311335
- --health-probe-bind-address=:8081
312336
- --metrics-bind-address=127.0.0.1:8080
@@ -335,20 +359,13 @@ spec:
335359
memory: 128Mi
336360
securityContext:
337361
allowPrivilegeEscalation: false
338-
- args:
339-
- --secure-listen-address=0.0.0.0:8443
340-
- --upstream=http://127.0.0.1:8080/
341-
- --logtostderr=true
342-
- --v=10
343-
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
344-
name: kube-rbac-proxy
345-
ports:
346-
- containerPort: 8443
347-
name: https
348-
protocol: TCP
349-
resources: {}
362+
capabilities:
363+
drop:
364+
- ALL
350365
securityContext:
351366
runAsNonRoot: true
367+
seccompProfile:
368+
type: RuntimeDefault
352369
serviceAccountName: nginx-ingress-operator-controller-manager
353370
terminationGracePeriodSeconds: 10
354371
permissions:

bundle/metadata/annotations.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ annotations:
66
operators.operatorframework.io.bundle.package.v1: nginx-ingress-operator
77
operators.operatorframework.io.bundle.channels.v1: alpha
88
operators.operatorframework.io.bundle.channel.default.v1: alpha
9-
operators.operatorframework.io.metrics.builder: operator-sdk-v1.16.0-ocp
9+
operators.operatorframework.io.metrics.builder: operator-sdk-v1.22.2
1010
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
1111
operators.operatorframework.io.metrics.project_layout: helm.sdk.operatorframework.io/v1
1212

config/default/manager_auth_proxy_patch.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,28 @@ spec:
1010
spec:
1111
containers:
1212
- name: kube-rbac-proxy
13-
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
13+
securityContext:
14+
allowPrivilegeEscalation: false
15+
capabilities:
16+
drop:
17+
- "ALL"
18+
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0
1419
args:
1520
- "--secure-listen-address=0.0.0.0:8443"
1621
- "--upstream=http://127.0.0.1:8080/"
1722
- "--logtostderr=true"
18-
- "--v=10"
23+
- "--v=0"
1924
ports:
2025
- containerPort: 8443
2126
protocol: TCP
2227
name: https
28+
resources:
29+
limits:
30+
cpu: 500m
31+
memory: 128Mi
32+
requests:
33+
cpu: 5m
34+
memory: 64Mi
2335
- name: manager
2436
args:
2537
- "--health-probe-bind-address=:8081"

config/manager/manager.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ spec:
2626
spec:
2727
securityContext:
2828
runAsNonRoot: true
29+
seccompProfile:
30+
type: RuntimeDefault
2931
containers:
3032
- args:
3133
- --leader-elect
@@ -34,6 +36,9 @@ spec:
3436
name: manager
3537
securityContext:
3638
allowPrivilegeEscalation: false
39+
capabilities:
40+
drop:
41+
- "ALL"
3742
livenessProbe:
3843
httpGet:
3944
path: /healthz

docs/installation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Installation
22

33
We currently support 2 methods of installation:
4-
1. [Installation in an Openshift cluster](./openshift-installation.md) using the [OLM](https://github.com/operator-framework/operator-lifecycle-manager).
5-
1. [Manual installation](./manual-installation.md) in a Kubernetes or Openshift cluster by manually deploying the operator manifests.
6-
4+
1. [Installation in an OpenShift cluster](./openshift-installation.md) using the [OLM](https://github.com/operator-framework/operator-lifecycle-manager).
5+
1. [Manual installation](./manual-installation.md) in a Kubernetes or OpenShift cluster by manually deploying the operator manifests.
6+
77
After installation, use the [sample CR definition](../config/samples/charts_v1alpha1_nginxingress.yaml) to deploy the NGINX Ingress Controller using the operator.

0 commit comments

Comments
 (0)