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

Commit 03435cd

Browse files
committed
Make Operator pass RedHat Certification
1 parent 3311087 commit 03435cd

25 files changed

+1177
-83
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Temporary Build Files
22
build/_output
33
build/_test
4+
bundle.zip
5+
bundle/
46
# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
57
### Emacs ###
68
# -*- mode: gitignore; -*-

Makefile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
TAG = latest
1+
OLD_TAG = 0.0.2
2+
TAG = 0.0.3
23
IMAGE = nginx-ingress-operator
3-
BUILD_FLAGS =
44

55
RUN_NAMESPACE = default
66

77
test:
88
GO111MODULE=on go test ./...
99

1010
binary:
11-
CGO_ENABLED=0 GO111MODULE=on $(BUILD_FLAGS) GOOS=linux go build -installsuffix cgo -o build/_output/bin/nginx-ingress-operator github.com/nginxinc/nginx-ingress-operator/cmd/manager
11+
CGO_ENABLED=0 GO111MODULE=on GOOS=linux go build -trimpath -installsuffix cgo -o build/_output/bin/nginx-ingress-operator github.com/nginxinc/nginx-ingress-operator/cmd/manager
1212

1313
build: binary
1414
docker build -f build/Dockerfile -t $(IMAGE):$(TAG) .
@@ -22,4 +22,18 @@ generate-crds:
2222
lint:
2323
golangci-lint run
2424

25+
generate-metadata: generate-crds
26+
operator-sdk generate csv --csv-version $(TAG)
27+
echo "Metadata generated, please make sure you add/update fields in nginx-ingress-operator.v$(TAG).clisterserviceversion.yaml"
28+
29+
generate-bundle:
30+
-rm -rf bundle
31+
mkdir bundle
32+
cp deploy/crds/* bundle/
33+
cp deploy/olm-catalog/nginx-ingress-operator/nginx-ingress-operator.package.yaml bundle/
34+
cp deploy/olm-catalog/nginx-ingress-operator/$(TAG)/* bundle/
35+
cp deploy/olm-catalog/nginx-ingress-operator/$(OLD_TAG)/nginx-ingress-operator.v$(OLD_TAG).clusterserviceversion.yaml bundle/
36+
-rm bundle.zip
37+
zip -j bundle.zip bundle/*.yaml
38+
2539
.PHONY: build

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Learn more about operators in the [Kubernetes Documentation](https://kubernetes.
99
1. Install the NGINX Ingress Operator. See [docs](./docs/installation.md).
1010
1. Deploy a new NGINX Ingress Controller using the [NginxIngressController](docs/nginx-ingress-controller.md) Custom Resource:
1111
* For an NGINX installation see the [NGINX example](./examples/deployment-oss-min).
12+
* For an NGINX Plus installation see the [NGINX Plus example](./examples/deployment-plus-min).
1213

1314
## Development
1415

build/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ COPY build/_output/bin/nginx-ingress-operator ${OPERATOR}
1010
COPY build/bin /usr/local/bin
1111
RUN /usr/local/bin/user_setup
1212

13+
COPY LICENSE /licenses/
14+
1315
ENTRYPOINT ["/usr/local/bin/entrypoint"]
1416

1517
USER ${USER_UID}
18+
LABEL name="NGINX Ingress Operator" \
19+
description="The NGINX Ingress Operator is a Kubernetes/OpenShift component which deploys and manages one or more NGINX/NGINX Plus Ingress Controllers" \
20+
summary="The NGINX Ingress Operator is a Kubernetes/OpenShift component which deploys and manages one or more NGINX/NGINX Plus Ingress Controllers" \
21+
io.openshift.tags="nginx,ingress-controller,ingress,controller,kubernetes,openshift" \
22+
maintainer="NGINX Inc <[email protected]>" \
23+
vendor="NGINX Inc <[email protected]>"

deploy/crds/k8s.nginx.org_nginxingresscontrollers_crd.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ spec:
139139
Plus API is exposed. Default is 8080. Format is 1023 - 65535
140140
maximum: 65535
141141
minimum: 1023
142+
nullable: true
142143
type: integer
143144
required:
144145
- enable
@@ -155,6 +156,7 @@ spec:
155156
Default is 9113. Format is 1023 - 65535
156157
maximum: 65535
157158
minimum: 1023
159+
nullable: true
158160
type: integer
159161
required:
160162
- enable
@@ -221,6 +223,13 @@ spec:
221223
status:
222224
description: NginxIngressControllerStatus defines the observed state of
223225
NginxIngressController
226+
properties:
227+
deployed:
228+
description: Deployed is true if the Operator has finished the deployment
229+
of the NginxIngressController.
230+
type: boolean
231+
required:
232+
- deployed
224233
type: object
225234
type: object
226235
version: v1alpha1

0 commit comments

Comments
 (0)