Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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.22.0
FROM quay.io/operator-framework/helm-operator:v1.22.2

ARG VERSION

Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,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.16.0/helm-operator_$(OS)_$(ARCH) ;\
curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.22.2/helm-operator_$(OS)_$(ARCH) ;\
chmod +x $(HELM_OPERATOR) ;\
}
else
Expand All @@ -140,9 +140,11 @@ endif

.PHONY: bundle
bundle: kustomize ## Generate bundle manifests and metadata, then validate generated files.
operator-sdk generate kustomize manifests -q
operator-sdk generate kustomize manifests --interactive=false -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
@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
@printf "%s\n" '' ' # OpenShift annotations.' ' com.redhat.openshift.versions: v4.6' >> bundle/metadata/annotations.yaml
operator-sdk bundle validate ./bundle

.PHONY: bundle-build
Expand All @@ -161,7 +163,7 @@ ifeq (,$(shell which opm 2>/dev/null))
@{ \
set -e ;\
mkdir -p $(dir $(OPM)) ;\
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.19.1/$(OS)-$(ARCH)-opm ;\
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.23.0/$${OS}-$${ARCH}-opm ;\
chmod +x $(OPM) ;\
}
else
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Learn more about operators in the [Kubernetes Documentation](https://kubernetes.

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

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).
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).

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

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

1. Install the NGINX Ingress Operator. See [docs](./docs/installation.md).
<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)
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)
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)
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:
```shell
kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-ingress-operator-helm/v1.0.0/resources/scc.yaml
kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-ingress-operator-helm/v1.1.0/resources/scc.yaml
```
4. Deploy a new NGINX Ingress Controller using the [NginxIngress](./config/samples/charts_v1alpha1_nginxingress.yaml) Custom Resource:
* Use the name of the default server secret created above for `controller.defaultTLS.secret` field (needs to be in the form `namespace/name`)
Expand All @@ -61,7 +61,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-helm-operator/releases).

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.
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.

## Development

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.16.0-ocp
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.22.2
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 @@ -33,7 +33,6 @@ metadata:
},
"enableCertManager": false,
"enableCustomResources": true,
"enableExternalDNS": false,
"enableLatencyMetrics": false,
"enableOIDC": false,
"enablePreviewPolicies": false,
Expand Down Expand Up @@ -147,7 +146,7 @@ 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/builder: operator-sdk-v1.22.2
operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1
repository: https://github.com/nginxinc/nginx-ingress-helm-operator
support: NGINX Inc.
Expand Down Expand Up @@ -292,7 +291,9 @@ spec:
- create
serviceAccountName: nginx-ingress-operator-controller-manager
deployments:
- name: nginx-ingress-operator-controller-manager
- label:
control-plane: controller-manager
name: nginx-ingress-operator-controller-manager
spec:
replicas: 1
selector:
Expand All @@ -307,6 +308,29 @@ spec:
control-plane: controller-manager
spec:
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
- args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
Expand Down Expand Up @@ -335,20 +359,13 @@ spec:
memory: 128Mi
securityContext:
allowPrivilegeEscalation: false
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
protocol: TCP
resources: {}
capabilities:
drop:
- 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.16.0-ocp
operators.operatorframework.io.metrics.builder: operator-sdk-v1.22.2
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: helm.sdk.operatorframework.io/v1

Expand Down
16 changes: 14 additions & 2 deletions config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,28 @@ spec:
spec:
containers:
- name: kube-rbac-proxy
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0
args:
- "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8080/"
- "--logtostderr=true"
- "--v=10"
- "--v=0"
ports:
- containerPort: 8443
protocol: TCP
name: https
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
- name: manager
args:
- "--health-probe-bind-address=:8081"
Expand Down
5 changes: 5 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ spec:
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
containers:
- args:
- --leader-elect
Expand All @@ -34,6 +36,9 @@ spec:
name: manager
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
livenessProbe:
httpGet:
path: /healthz
Expand Down
8 changes: 4 additions & 4 deletions docs/manual-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ This will deploy the operator in the `nginx-ingress-operator-system` namespace.
```
git clone https://github.com/nginxinc/nginx-ingress-helm-operator/
cd nginx-ingress-helm-operator/
git checkout v1.0.0
git checkout v1.1.0
```

2. `Openshift` To deploy the Operator and associated resources to an OpenShift environment, run:
```
make deploy IMG=nginx/nginx-ingress-operator:1.0.0
make deploy IMG=nginx/nginx-ingress-operator:1.1.0
```

3. Alternatively, to deploy the Operator and associated resources to all other environments:
```
make deploy IMG=nginx/nginx-ingress-operator:1.0.0
make deploy IMG=nginx/nginx-ingress-operator:1.1.0
```

2. Check that the Operator is running:
Expand All @@ -33,4 +33,4 @@ This will deploy the operator in the `nginx-ingress-operator-system` namespace.

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):

`kubectl -f https://github.com/nginxinc/nginx-ingress-helm-operator/v1.0.0/resources/scc.yaml`
`kubectl -f https://github.com/nginxinc/nginx-ingress-helm-operator/v1.1.0/resources/scc.yaml`
2 changes: 1 addition & 1 deletion docs/openshift-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ Additional steps:

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):

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

You can now deploy the NGINX Ingress Controller instances.