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

Commit

Permalink
Make Operator pass RedHat Certification
Browse files Browse the repository at this point in the history
  • Loading branch information
Raul Marrero authored and Rulox committed Apr 20, 2020
1 parent 9c319ce commit 781f643
Show file tree
Hide file tree
Showing 25 changed files with 1,177 additions and 83 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Temporary Build Files
build/_output
build/_test
bundle.zip
bundle/
# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
### Emacs ###
# -*- mode: gitignore; -*-
Expand Down
20 changes: 17 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
TAG = latest
OLD_TAG = 0.0.2
TAG = 0.0.3
IMAGE = nginx-ingress-operator
BUILD_FLAGS =

RUN_NAMESPACE = default

test:
GO111MODULE=on go test ./...

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

build: binary
docker build -f build/Dockerfile -t $(IMAGE):$(TAG) .
Expand All @@ -22,4 +22,18 @@ generate-crds:
lint:
golangci-lint run

generate-metadata: generate-crds
operator-sdk generate csv --csv-version $(TAG)
echo "Metadata generated, please make sure you add/update fields in nginx-ingress-operator.v$(TAG).clisterserviceversion.yaml"

generate-bundle:
-rm -rf bundle
mkdir bundle
cp deploy/crds/* bundle/
cp deploy/olm-catalog/nginx-ingress-operator/nginx-ingress-operator.package.yaml bundle/
cp deploy/olm-catalog/nginx-ingress-operator/$(TAG)/* bundle/
cp deploy/olm-catalog/nginx-ingress-operator/$(OLD_TAG)/nginx-ingress-operator.v$(OLD_TAG).clusterserviceversion.yaml bundle/
-rm bundle.zip
zip -j bundle.zip bundle/*.yaml

.PHONY: build
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Learn more about operators in the [Kubernetes Documentation](https://kubernetes.
1. Install the NGINX Ingress Operator. See [docs](./docs/installation.md).
1. Deploy a new NGINX Ingress Controller using the [NginxIngressController](docs/nginx-ingress-controller.md) Custom Resource:
* 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).

## Development

Expand Down
8 changes: 8 additions & 0 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ COPY build/_output/bin/nginx-ingress-operator ${OPERATOR}
COPY build/bin /usr/local/bin
RUN /usr/local/bin/user_setup

COPY LICENSE /licenses/

ENTRYPOINT ["/usr/local/bin/entrypoint"]

USER ${USER_UID}
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 <kubernetes@nginx.com>" \
vendor="NGINX Inc <kubernetes@nginx.com>"
9 changes: 9 additions & 0 deletions deploy/crds/k8s.nginx.org_nginxingresscontrollers_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ spec:
Plus API is exposed. Default is 8080. Format is 1023 - 65535
maximum: 65535
minimum: 1023
nullable: true
type: integer
required:
- enable
Expand All @@ -155,6 +156,7 @@ spec:
Default is 9113. Format is 1023 - 65535
maximum: 65535
minimum: 1023
nullable: true
type: integer
required:
- enable
Expand Down Expand Up @@ -221,6 +223,13 @@ spec:
status:
description: NginxIngressControllerStatus defines the observed state of
NginxIngressController
properties:
deployed:
description: Deployed is true if the Operator has finished the deployment
of the NginxIngressController.
type: boolean
required:
- deployed
type: object
type: object
version: v1alpha1
Expand Down
Loading

0 comments on commit 781f643

Please sign in to comment.