Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Release 0.3.0 #137

Merged
merged 2 commits into from
Jul 13, 2021
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 0.3.0

An automatically generated list of changes can be found on Github at: [0.3.0 Release](https://github.com/nginxinc/nginx-ingress-operator/releases/tag/v0.3.0)

### 0.2.0

An automatically generated list of changes can be found on Github at: [0.2.0 Release](https://github.com/nginxinc/nginx-ingress-operator/releases/tag/v0.2.0)
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ vet: ## Run go vet against code.
lint: ## Run golangci-lint against code.
docker run --pull always --rm -v $(shell pwd):/nginx-ingress-operator -w /nginx-ingress-operator -v $(shell go env GOCACHE):/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -v $(shell go env GOPATH)/pkg:/go/pkg golangci/golangci-lint:latest golangci-lint --color always run

unit-test:
go test ./... -coverprofile cover.out

ENVTEST_ASSETS_DIR=$(shell pwd)/testbin
test: manifests generate fmt vet ## Run tests.
Expand Down Expand Up @@ -168,7 +170,7 @@ bundle-build: ## Build the bundle image.
docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) .

openshift-bundle-build: bundle ## Build the bundle image for OpenShift.
@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" '' 'LABEL com.redhat.openshift.versions="v4.5"' 'LABEL com.redhat.delivery.operator.bundle=true' 'LABEL com.redhat.delivery.backport=true' >> bundle.Dockerfile

.PHONY: bundle-push
bundle-push: ## Push the bundle image.
Expand Down
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The following table shows the relation between the versions of the two projects:

| NGINX Ingress Controller | NGINX Ingress Operator |
| --- | --- |
| 1.12.x | 0.3.0 |
| 1.11.x | 0.2.0 |
| 1.10.x | 0.1.0 |
| 1.9.x | 0.0.7 |
Expand All @@ -29,10 +30,14 @@ Note: The NGINX Ingress Operator works only for NGINX Ingress Controller version
* For an NGINX installation see the [NGINX example](./examples/deployment-oss-min).
* For an NGINX Plus installation see the [NGINX Plus example](./examples/deployment-plus-min).

## Upgrades

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-operator/releases).

The latest stable release is [0.2.0](https://github.com/nginxinc/nginx-ingress-operator/releases/tag/v0.2.0). For production use, we recommend that you choose the latest stable release.
The latest stable release is [0.3.0](https://github.com/nginxinc/nginx-ingress-operator/releases/tag/v0.3.0). For production use, we recommend that you choose the latest stable release.

## Development

Expand All @@ -41,28 +46,25 @@ It is possible to run the operator in your local machine. This is useful for tes
### Run Operator locally

1. Have access to a Kubernetes/Openshift cluster.
1. Apply the latest CRD:
```
kubectl apply -f deploy/crds/k8s.nginx.org_nginxingresscontrollers_crd.yaml
```
1. Apply the NGINX Ingress Controller CRDs:
```
kubectl apply -f build/kic_crds
1. Apply the latest CRDs:
```
make install
kubectl apply -f config/crd/kic/
```
1. Run `make run-local`.
2. Run `make run`.

The operator will run in your local machine but will be communicating with the cluster. The operator will only watch the `default` namespace when deployed locally.
The operator will run in your local machine but will be communicating with the cluster.

### Update CRD

If any change is made in the CRD in the go code, run the following commands to update the changes in the CRD yaml:

1. `make generate-crds`
1. Apply the new CRD definition again in your cluster `kubectl apply -f deploy/crds/k8s.nginx.org_nginxingresscontrollers_crd.yaml`.
1. `make manifests`
2. Apply the new CRD definition again in your cluster `make install`.

### Run tests

Run `make test` to run unit tests locally.
Run `make test` to run the full test suite including envtest, or `make unit-test` to run just the unit tests locally.

## Contributing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:
"image": {
"pullPolicy": "Always",
"repository": "docker.io/nginx/nginx-ingress",
"tag": "1.11.3-ubi"
"tag": "1.12.0-ubi"
},
"ingressClass": "nginx",
"nginxPlus": false,
Expand Down Expand Up @@ -353,7 +353,7 @@ spec:
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
image: registry.redhat.io/openshift4/ose-kube-rbac-proxy:v4.7
name: kube-rbac-proxy
ports:
- containerPort: 8443
Expand All @@ -365,7 +365,7 @@ spec:
- --leader-elect
command:
- /manager
image: nginx/nginx-ingress-operator:0.3.0
image: registry.connect.redhat.com/nginx/nginx-ingress-operator:0.3.0
livenessProbe:
httpGet:
path: /healthz
Expand Down
2 changes: 1 addition & 1 deletion config/samples/k8s_v1alpha1_nginxingresscontroller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
nginxPlus: false
image:
repository: docker.io/nginx/nginx-ingress
tag: 1.11.3-ubi
tag: 1.12.0-ubi
pullPolicy: Always
serviceType: NodePort
ingressClass: nginx
33 changes: 10 additions & 23 deletions docs/manual-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,24 @@

### 1. Deploy the operator

This will deploy the operator in the `default` namespace.
This will deploy the operator in the `nginx-ingress-operator-system` namespace.

1. Deploy the NginxIngressController Custom Resource Definition:
```
kubectl apply -f deploy/crds/k8s.nginx.org_nginxingresscontrollers_crd.yaml
```

1. Deploy the ServiceAccount:
1. Deploy the Operator and associated resources:
1. <Openshift> To deploy the Operator and associated resources to an OpenShift environment, run:
```
kubectl apply -f deploy/service_account.yaml
make openshift-deploy IMG=registry.connect.redhat.com/nginx/nginx-ingress-operator:0.3.0
```

1. Deploy the Role:
2. To deploy the Operator and associated resources to all other environments:
```
kubectl apply -f deploy/role.yaml
make deploy IMG=nginx/nginx-ingress-operator:0.3.0
```

1. Deploy the RoleBinding:
```
kubectl apply -f deploy/role_binding.yaml
2. Check that the Operator is running:
```
kubectl get deployments -n nginx-ingress-operator-system

1. Deploy the Operator:
```
kubectl apply -f deploy/operator.yaml
NAME READY UP-TO-DATE AVAILABLE AGE
nginx-ingress-operator-controller-manager 1/1 1 1 15s
```

1. Check that the Operator is running:
```
kubectl get deployment nginx-ingress-operator

NAME READY UP-TO-DATE AVAILABLE AGE
nginx-ingress-operator 1/1 1 1 15s
```
27 changes: 27 additions & 0 deletions docs/upgrades.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Upgrade - 0.2.0 to 0.3.0

Release 0.3.0 includes a major upgrade of the Operator-SDK which has resulted in a number of changes in the layout of the project
(see [the operator-sdk docs](https://sdk.operatorframework.io/docs/building-operators/golang/migration/) for more information).

## Manual upgrade - 0.2.0 to 0.3.0

### 1. Deploy the new operator

Deploy the operator following the steps outlined in [manual installation doc](./manual-installation.md).

### 2. Cleanup the existing operator

Uninstall the existing operator deployment:

1. Checkout the previous version of the nginx-ingress-operator [0.3.0](https://github.com/nginxinc/nginx-ingress-operator/releases/tag/v0.3.0).
1. Uninstall the resources by running the following commands (be sure to edit files to suit your environment, if required):
```
kubectl delete -f deploy/operator.yaml
kubectl delete -f deploy/role_binding.yaml
kubectl delete -f deploy/role.yaml
kubectl delete -f deploy/service_account.yaml
```

### 3. Upgrade the existing ingress controller deployments

Upgrade to the latest 1.12.0 Ingress Controller image - see the release notes [here](https://docs.nginx.com/nginx-ingress-controller/releases/#nginx-ingress-controller-1-12-0)
6 changes: 3 additions & 3 deletions examples/deployment-oss-min/nginx-ingress-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ spec:
type: deployment
nginxPlus: false
image:
repository: registry.hub.docker.com/nginx/nginx-ingress
tag: edge-ubi
repository: nginx/nginx-ingress
tag: 1.12.0-ubi
pullPolicy: Always
replicas: 1
serviceType: NodePort


2 changes: 1 addition & 1 deletion examples/deployment-plus-min/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ In this example we deploy the NGINX Ingress Controller (edge) as a [Deployment](
1. Have the NGINX Ingress Operator deployed in your cluster. Follow [installation](../../README.md#installation) steps.
2. Build the NGINX Ingress Controller for Plus image and push it to a private repository following
[these instructions](https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/#building-the-image-and-pushing-it-to-the-private-registry)
(**Note**: For the build process, if using Openshift, use the `DOCKERFILE=openshift/DockerfileForPlus` variable).
(**Note**: For the build process, if using Openshift, use the `openshift-image-plus` or `openshift-image-nap-plus` targets).

If you would like to use TransportServers, refer to [this section](README.md#TransportServers) for additional pre-requisites.

Expand Down
2 changes: 1 addition & 1 deletion examples/deployment-plus-min/nginx-ingress-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
nginxPlus: true
image:
repository: nginx-plus-ingress
tag: edge
tag: 1.12.0-ubi
pullPolicy: IfNotPresent
replicas: 1
serviceType: NodePort
Expand Down
8 changes: 8 additions & 0 deletions openshift.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,13 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
WORKDIR /
COPY --from=builder /workspace/manager .
COPY config/crd/kic ./config/crd/kic
COPY LICENSE /licenses/

LABEL name="NGINX Ingress Operator" \
description="The NGINX Ingress Operator is a Kubernetes/OpenShift component which deploys and manages one or more NGINX/NGINX Plus Ingress Controllers" \
summary="The NGINX Ingress Operator is a Kubernetes/OpenShift component which deploys and manages one or more NGINX/NGINX Plus Ingress Controllers" \
io.openshift.tags="nginx,ingress-controller,ingress,controller,kubernetes,openshift" \
maintainer="NGINX Inc <[email protected]>" \
vendor="NGINX Inc <[email protected]>"

ENTRYPOINT ["/manager"]