Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/operator-framework/helm-operator:v1.24.1
FROM quay.io/operator-framework/helm-operator:v1.25.0

ARG VERSION

Expand Down
21 changes: 19 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,23 @@ docker-build: ## Build docker image with the manager.
docker-push: ## Push docker image with the manager.
docker push ${IMG}

# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/
# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/
# - 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)
# To properly provided solutions that supports more than one platform you should use this option.
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
.PHONY: docker-buildx
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
- docker buildx create --name project-v3-builder
docker buildx use project-v3-builder
- docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross .
- docker buildx rm project-v3-builder
rm Dockerfile.cross

##@ Deployment

.PHONY: install
Expand Down Expand Up @@ -114,7 +131,7 @@ ifeq (,$(shell which kustomize 2>/dev/null))
@{ \
set -e ;\
mkdir -p $(dir $(KUSTOMIZE)) ;\
curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.5.5/kustomize_v4.5.5_$(OS)_$(ARCH).tar.gz | \
curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.5.7/kustomize_v4.5.7_$(OS)_$(ARCH).tar.gz | \
tar xzf - -C bin/ ;\
}
else
Expand All @@ -130,7 +147,7 @@ ifeq (,$(shell which helm-operator 2>/dev/null))
@{ \
set -e ;\
mkdir -p $(dir $(HELM_OPERATOR)) ;\
curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.24.0/helm-operator_$(OS)_$(ARCH) ;\
curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.25.0/helm-operator_$(OS)_$(ARCH) ;\
chmod +x $(HELM_OPERATOR) ;\
}
else
Expand Down
2 changes: 1 addition & 1 deletion bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=nginx-ingress-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.24.0
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.25.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=helm.sdk.operatorframework.io/v1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ kind: Service
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: nginx-ingress-operator
app.kubernetes.io/instance: controller-manager-metrics-service
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: service
app.kubernetes.io/part-of: nginx-ingress-operator
control-plane: controller-manager
name: nginx-ingress-operator-controller-manager-metrics-service
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: nginx-ingress-operator
app.kubernetes.io/instance: metrics-reader
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrole
app.kubernetes.io/part-of: nginx-ingress-operator
name: nginx-ingress-operator-metrics-reader
rules:
- nonResourceURLs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,13 @@ metadata:
description: The NGINX Ingress Operator is a Kubernetes/OpenShift component which
deploys and manages one or more NGINX/NGINX Plus Ingress Controllers
operatorframework.io/suggested-namespace: nginx-ingress
operators.operatorframework.io/builder: operator-sdk-v1.24.0
operators.operatorframework.io/builder: operator-sdk-v1.25.0
operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1
repository: https://github.com/nginxinc/nginx-ingress-helm-operator
support: NGINX Inc.
labels:
operatorframework.io/arch.amd64: supported
operatorframework.io/arch.arm64: supported
operatorframework.io/arch.ppc64le: supported
operatorframework.io/arch.s390x: supported
name: nginx-ingress-operator.v1.2.0
Expand Down Expand Up @@ -296,6 +297,12 @@ spec:
serviceAccountName: nginx-ingress-operator-controller-manager
deployments:
- label:
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: nginx-ingress-operator
app.kubernetes.io/instance: controller-manager
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: deployment
app.kubernetes.io/part-of: nginx-ingress-operator
control-plane: controller-manager
name: nginx-ingress-operator-controller-manager
spec:
Expand All @@ -311,6 +318,22 @@ spec:
labels:
control-plane: controller-manager
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- arm64
- ppc64le
- s390x
- key: kubernetes.io/os
operator: In
values:
- linux
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
Expand Down Expand Up @@ -368,8 +391,6 @@ spec:
- ALL
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: nginx-ingress-operator-controller-manager
terminationGracePeriodSeconds: 10
permissions:
Expand Down
2 changes: 1 addition & 1 deletion bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ annotations:
operators.operatorframework.io.bundle.package.v1: nginx-ingress-operator
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.bundle.channel.default.v1: alpha
operators.operatorframework.io.metrics.builder: operator-sdk-v1.24.0
operators.operatorframework.io.metrics.builder: operator-sdk-v1.25.0
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: helm.sdk.operatorframework.io/v1

Expand Down
12 changes: 6 additions & 6 deletions bundle/tests/scorecard/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ stages:
- entrypoint:
- scorecard-test
- basic-check-spec
image: quay.io/operator-framework/scorecard-test:v1.24.0
image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: basic
test: basic-check-spec-test
Expand All @@ -18,7 +18,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-bundle-validation
image: quay.io/operator-framework/scorecard-test:v1.24.0
image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-bundle-validation-test
Expand All @@ -28,7 +28,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-crds-have-validation
image: quay.io/operator-framework/scorecard-test:v1.24.0
image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-crds-have-validation-test
Expand All @@ -38,7 +38,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-crds-have-resources
image: quay.io/operator-framework/scorecard-test:v1.24.0
image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-crds-have-resources-test
Expand All @@ -48,7 +48,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-spec-descriptors
image: quay.io/operator-framework/scorecard-test:v1.24.0
image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-spec-descriptors-test
Expand All @@ -58,7 +58,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-status-descriptors
image: quay.io/operator-framework/scorecard-test:v1.24.0
image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-status-descriptors-test
Expand Down
4 changes: 0 additions & 4 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,3 @@ patchesStrategicMerge:
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
- manager_auth_proxy_patch.yaml

# Mount the controller config file for loading manager configurations
# through a ComponentConfig type
#- manager_config_patch.yaml
16 changes: 16 additions & 0 deletions config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ metadata:
spec:
template:
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- arm64
- ppc64le
- s390x
- key: kubernetes.io/os
operator: In
values:
- linux
containers:
- name: kube-rbac-proxy
securityContext:
Expand Down
10 changes: 0 additions & 10 deletions config/default/manager_config_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,3 @@ spec:
spec:
containers:
- name: manager
args:
- "--config=controller_manager_config.yaml"
volumeMounts:
- name: manager-config
mountPath: /controller_manager_config.yaml
subPath: controller_manager_config.yaml
volumes:
- name: manager-config
configMap:
name: manager-config
10 changes: 0 additions & 10 deletions config/manager/controller_manager_config.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
resources:
- manager.yaml

generatorOptions:
disableNameSuffixHash: true

configMapGenerator:
- files:
- controller_manager_config.yaml
name: manager-config
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
Expand Down
37 changes: 35 additions & 2 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ kind: Namespace
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/name: namespace
app.kubernetes.io/instance: system
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: nginx-ingress-operator
app.kubernetes.io/part-of: nginx-ingress-operator
app.kubernetes.io/managed-by: kustomize
name: system
---
apiVersion: apps/v1
Expand All @@ -12,6 +18,12 @@ metadata:
namespace: system
labels:
control-plane: controller-manager
app.kubernetes.io/name: deployment
app.kubernetes.io/instance: controller-manager
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: nginx-ingress-operator
app.kubernetes.io/part-of: nginx-ingress-operator
app.kubernetes.io/managed-by: kustomize
spec:
selector:
matchLabels:
Expand All @@ -24,10 +36,31 @@ spec:
labels:
control-plane: controller-manager
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- arm64
- ppc64le
- s390x
- key: kubernetes.io/os
operator: In
values:
- linux
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
# TODO(user): For common cases that do not require escalating privileges
# it is recommended to ensure that all your Pods/Containers are restrictive.
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
# Please uncomment the following code if your project does NOT have to work on old Kubernetes
# versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
# seccompProfile:
# type: RuntimeDefault
containers:
- args:
- --leader-elect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,11 @@ metadata:
description: The NGINX Ingress Operator is a Kubernetes/OpenShift component which
deploys and manages one or more NGINX/NGINX Plus Ingress Controllers
operatorframework.io/suggested-namespace: nginx-ingress
operators.operatorframework.io/builder: operator-sdk-v1.16.0-ocp
operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1
repository: https://github.com/nginxinc/nginx-ingress-helm-operator
support: NGINX Inc.
labels:
operatorframework.io/arch.amd64: supported
operatorframework.io/arch.arm64: supported
operatorframework.io/arch.ppc64le: supported
operatorframework.io/arch.s390x: supported
name: nginx-ingress-operator.v0.0.0
Expand Down
6 changes: 6 additions & 0 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ kind: ServiceMonitor
metadata:
labels:
control-plane: controller-manager
app.kubernets.io/name: servicemonitor
app.kubernetes.io/instance: controller-manager-metrics-monitor
app.kubernetes.io/component: metrics
app.kubernetes.io/created-by: nginx-ingress-operator
app.kubernetes.io/part-of: nginx-ingress-operator
app.kubernetes.io/managed-by: kustomize
name: controller-manager-metrics-monitor
namespace: system
spec:
Expand Down
7 changes: 7 additions & 0 deletions config/rbac/auth_proxy_client_clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: metrics-reader
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: nginx-ingress-operator
app.kubernetes.io/part-of: nginx-ingress-operator
app.kubernetes.io/managed-by: kustomize
name: metrics-reader
rules:
- nonResourceURLs:
Expand Down
7 changes: 7 additions & 0 deletions config/rbac/auth_proxy_role.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: proxy-role
app.kubernetes.io/component: kube-rbac-proxy
app.kubernetes.io/created-by: nginx-ingress-operator
app.kubernetes.io/part-of: nginx-ingress-operator
app.kubernetes.io/managed-by: kustomize
name: proxy-role
rules:
- apiGroups:
Expand Down
Loading