Skip to content

Commit 9c56949

Browse files
authored
Update Operator SDK to v1.25.0 (#44)
1 parent bd6b846 commit 9c56949

26 files changed

+184
-56
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.24.1
1+
FROM quay.io/operator-framework/helm-operator:v1.25.0
22

33
ARG VERSION
44

Makefile

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,23 @@ docker-build: ## Build docker image with the manager.
8484
docker-push: ## Push docker image with the manager.
8585
docker push ${IMG}
8686

87+
# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
88+
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
89+
# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/
90+
# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/
91+
# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> than the export will fail)
92+
# To properly provided solutions that supports more than one platform you should use this option.
93+
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
94+
.PHONY: docker-buildx
95+
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
96+
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
97+
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
98+
- docker buildx create --name project-v3-builder
99+
docker buildx use project-v3-builder
100+
- docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross .
101+
- docker buildx rm project-v3-builder
102+
rm Dockerfile.cross
103+
87104
##@ Deployment
88105

89106
.PHONY: install
@@ -114,7 +131,7 @@ ifeq (,$(shell which kustomize 2>/dev/null))
114131
@{ \
115132
set -e ;\
116133
mkdir -p $(dir $(KUSTOMIZE)) ;\
117-
curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.5.5/kustomize_v4.5.5_$(OS)_$(ARCH).tar.gz | \
134+
curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.5.7/kustomize_v4.5.7_$(OS)_$(ARCH).tar.gz | \
118135
tar xzf - -C bin/ ;\
119136
}
120137
else
@@ -130,7 +147,7 @@ ifeq (,$(shell which helm-operator 2>/dev/null))
130147
@{ \
131148
set -e ;\
132149
mkdir -p $(dir $(HELM_OPERATOR)) ;\
133-
curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.24.0/helm-operator_$(OS)_$(ARCH) ;\
150+
curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.25.0/helm-operator_$(OS)_$(ARCH) ;\
134151
chmod +x $(HELM_OPERATOR) ;\
135152
}
136153
else

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.24.0
10+
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.25.0
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-controller-manager-metrics-service_v1_service.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ kind: Service
33
metadata:
44
creationTimestamp: null
55
labels:
6+
app.kubernetes.io/component: kube-rbac-proxy
7+
app.kubernetes.io/created-by: nginx-ingress-operator
8+
app.kubernetes.io/instance: controller-manager-metrics-service
9+
app.kubernetes.io/managed-by: kustomize
10+
app.kubernetes.io/name: service
11+
app.kubernetes.io/part-of: nginx-ingress-operator
612
control-plane: controller-manager
713
name: nginx-ingress-operator-controller-manager-metrics-service
814
spec:

bundle/manifests/nginx-ingress-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ apiVersion: rbac.authorization.k8s.io/v1
22
kind: ClusterRole
33
metadata:
44
creationTimestamp: null
5+
labels:
6+
app.kubernetes.io/component: kube-rbac-proxy
7+
app.kubernetes.io/created-by: nginx-ingress-operator
8+
app.kubernetes.io/instance: metrics-reader
9+
app.kubernetes.io/managed-by: kustomize
10+
app.kubernetes.io/name: clusterrole
11+
app.kubernetes.io/part-of: nginx-ingress-operator
512
name: nginx-ingress-operator-metrics-reader
613
rules:
714
- nonResourceURLs:

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

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,13 @@ metadata:
150150
description: The NGINX Ingress Operator is a Kubernetes/OpenShift component which
151151
deploys and manages one or more NGINX/NGINX Plus Ingress Controllers
152152
operatorframework.io/suggested-namespace: nginx-ingress
153-
operators.operatorframework.io/builder: operator-sdk-v1.24.0
153+
operators.operatorframework.io/builder: operator-sdk-v1.25.0
154154
operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1
155155
repository: https://github.com/nginxinc/nginx-ingress-helm-operator
156156
support: NGINX Inc.
157157
labels:
158158
operatorframework.io/arch.amd64: supported
159+
operatorframework.io/arch.arm64: supported
159160
operatorframework.io/arch.ppc64le: supported
160161
operatorframework.io/arch.s390x: supported
161162
name: nginx-ingress-operator.v1.2.0
@@ -296,6 +297,12 @@ spec:
296297
serviceAccountName: nginx-ingress-operator-controller-manager
297298
deployments:
298299
- label:
300+
app.kubernetes.io/component: manager
301+
app.kubernetes.io/created-by: nginx-ingress-operator
302+
app.kubernetes.io/instance: controller-manager
303+
app.kubernetes.io/managed-by: kustomize
304+
app.kubernetes.io/name: deployment
305+
app.kubernetes.io/part-of: nginx-ingress-operator
299306
control-plane: controller-manager
300307
name: nginx-ingress-operator-controller-manager
301308
spec:
@@ -311,6 +318,22 @@ spec:
311318
labels:
312319
control-plane: controller-manager
313320
spec:
321+
affinity:
322+
nodeAffinity:
323+
requiredDuringSchedulingIgnoredDuringExecution:
324+
nodeSelectorTerms:
325+
- matchExpressions:
326+
- key: kubernetes.io/arch
327+
operator: In
328+
values:
329+
- amd64
330+
- arm64
331+
- ppc64le
332+
- s390x
333+
- key: kubernetes.io/os
334+
operator: In
335+
values:
336+
- linux
314337
containers:
315338
- args:
316339
- --secure-listen-address=0.0.0.0:8443
@@ -368,8 +391,6 @@ spec:
368391
- ALL
369392
securityContext:
370393
runAsNonRoot: true
371-
seccompProfile:
372-
type: RuntimeDefault
373394
serviceAccountName: nginx-ingress-operator-controller-manager
374395
terminationGracePeriodSeconds: 10
375396
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.24.0
9+
operators.operatorframework.io.metrics.builder: operator-sdk-v1.25.0
1010
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
1111
operators.operatorframework.io.metrics.project_layout: helm.sdk.operatorframework.io/v1
1212

bundle/tests/scorecard/config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ stages:
88
- entrypoint:
99
- scorecard-test
1010
- basic-check-spec
11-
image: quay.io/operator-framework/scorecard-test:v1.24.0
11+
image: quay.io/operator-framework/scorecard-test:v1.25.0
1212
labels:
1313
suite: basic
1414
test: basic-check-spec-test
@@ -18,7 +18,7 @@ stages:
1818
- entrypoint:
1919
- scorecard-test
2020
- olm-bundle-validation
21-
image: quay.io/operator-framework/scorecard-test:v1.24.0
21+
image: quay.io/operator-framework/scorecard-test:v1.25.0
2222
labels:
2323
suite: olm
2424
test: olm-bundle-validation-test
@@ -28,7 +28,7 @@ stages:
2828
- entrypoint:
2929
- scorecard-test
3030
- olm-crds-have-validation
31-
image: quay.io/operator-framework/scorecard-test:v1.24.0
31+
image: quay.io/operator-framework/scorecard-test:v1.25.0
3232
labels:
3333
suite: olm
3434
test: olm-crds-have-validation-test
@@ -38,7 +38,7 @@ stages:
3838
- entrypoint:
3939
- scorecard-test
4040
- olm-crds-have-resources
41-
image: quay.io/operator-framework/scorecard-test:v1.24.0
41+
image: quay.io/operator-framework/scorecard-test:v1.25.0
4242
labels:
4343
suite: olm
4444
test: olm-crds-have-resources-test
@@ -48,7 +48,7 @@ stages:
4848
- entrypoint:
4949
- scorecard-test
5050
- olm-spec-descriptors
51-
image: quay.io/operator-framework/scorecard-test:v1.24.0
51+
image: quay.io/operator-framework/scorecard-test:v1.25.0
5252
labels:
5353
suite: olm
5454
test: olm-spec-descriptors-test
@@ -58,7 +58,7 @@ stages:
5858
- entrypoint:
5959
- scorecard-test
6060
- olm-status-descriptors
61-
image: quay.io/operator-framework/scorecard-test:v1.24.0
61+
image: quay.io/operator-framework/scorecard-test:v1.25.0
6262
labels:
6363
suite: olm
6464
test: olm-status-descriptors-test

config/default/kustomization.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,3 @@ patchesStrategicMerge:
2626
# If you want your controller-manager to expose the /metrics
2727
# endpoint w/o any authn/z, please comment the following line.
2828
- manager_auth_proxy_patch.yaml
29-
30-
# Mount the controller config file for loading manager configurations
31-
# through a ComponentConfig type
32-
#- manager_config_patch.yaml

config/default/manager_auth_proxy_patch.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ metadata:
88
spec:
99
template:
1010
spec:
11+
affinity:
12+
nodeAffinity:
13+
requiredDuringSchedulingIgnoredDuringExecution:
14+
nodeSelectorTerms:
15+
- matchExpressions:
16+
- key: kubernetes.io/arch
17+
operator: In
18+
values:
19+
- amd64
20+
- arm64
21+
- ppc64le
22+
- s390x
23+
- key: kubernetes.io/os
24+
operator: In
25+
values:
26+
- linux
1127
containers:
1228
- name: kube-rbac-proxy
1329
securityContext:

0 commit comments

Comments
 (0)