Skip to content

Commit 15d0655

Browse files
committed
Update Operator SDK to v1.22.2
1 parent a83a719 commit 15d0655

File tree

10 files changed

+69
-33
lines changed

10 files changed

+69
-33
lines changed

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: 4 additions & 4 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,7 +61,7 @@ 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

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/manual-installation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ This will deploy the operator in the `nginx-ingress-operator-system` namespace.
88
```
99
git clone https://github.com/nginxinc/nginx-ingress-helm-operator/
1010
cd nginx-ingress-helm-operator/
11-
git checkout v1.0.0
11+
git checkout v1.1.0
1212
```
1313
1414
2. `Openshift` To deploy the Operator and associated resources to an OpenShift environment, run:
1515
```
16-
make deploy IMG=nginx/nginx-ingress-operator:1.0.0
16+
make deploy IMG=nginx/nginx-ingress-operator:1.1.0
1717
```
1818
1919
3. Alternatively, to deploy the Operator and associated resources to all other environments:
2020
```
21-
make deploy IMG=nginx/nginx-ingress-operator:1.0.0
21+
make deploy IMG=nginx/nginx-ingress-operator:1.1.0
2222
```
2323
2424
2. Check that the Operator is running:
@@ -33,4 +33,4 @@ This will deploy the operator in the `nginx-ingress-operator-system` namespace.
3333
3434
In order to deploy NGINX Ingress Controller instances into OpenShift environments, a new SCC is required to be created on the cluster which will be used to bind the specific required capabilities to the NGINX Ingress service account(s). To do so, please run the following command (assuming you are logged in with administrator access to the cluster):
3535
36-
`kubectl -f https://github.com/nginxinc/nginx-ingress-helm-operator/v1.0.0/resources/scc.yaml`
36+
`kubectl -f https://github.com/nginxinc/nginx-ingress-helm-operator/v1.1.0/resources/scc.yaml`

docs/openshift-installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ Additional steps:
2121

2222
In order to deploy NGINX Ingress Controller instances into OpenShift environments, a new SCC is required to be created on the cluster which will be used to bind the specific required capabilities to the NGINX Ingress service account(s). To do so, please run the following command (assuming you are logged in with administrator access to the cluster):
2323

24-
`kubectl -f https://github.com/nginxinc/nginx-ingress-helm-operator/v1.0.0/resources/scc.yaml`
24+
`kubectl -f https://github.com/nginxinc/nginx-ingress-helm-operator/v1.1.0/resources/scc.yaml`
2525

2626
You can now deploy the NGINX Ingress Controller instances.

0 commit comments

Comments
 (0)