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

Changes for RH Certification #5

Merged
merged 3 commits into from
Apr 20, 2020
Merged

Changes for RH Certification #5

merged 3 commits into from
Apr 20, 2020

Conversation

Rulox
Copy link
Contributor

@Rulox Rulox commented Apr 14, 2020

Proposed changes

This PR includes everything that is required to get the RH Certification of the operator, including helpers to make new releases faster. Please keep in mind these changes were done only for certification, not because they make 100% sense.

  1. Make changes in Dockerfile (eg License needs to be inside the image, add labels, etc) all required for certification.
  2. Make sure the CR has a Status (all CR need to have a Status field that the operator changes after creating the CR) . In this case, I added a Deployment field which will be set to true if there were no errors deploying the KIC. For now it's just set to true after deploying everything, but in the future this could be more intelligent maybe.
  3. Make pointers to objects nullable. Openshift dashboard does a different validation and we need this.
  4. Add sdk comments to autogenerate most of the CSV manifests information possible.
  5. Changed example manifests for OSS to have the full path to dockerhub (by default openshift will try to use local registry and will fail)
  6. Added Makefile targets to generate CSV and folders for certification
  7. Generated a few versions (current 0.0.3) as examples. Next release should be done in GitHub as well as the first release. It is important we keep all versions (check community operators) (maybe bundle/ folder is too much? bundle is the actual version but all the fields are in the other folders, let me know and I'll remove this and add it to gitignore)

Additional BugFixes and docs changes:

  1. Make sure imagePullPolicy triggers the operator to change the Deployment/Daemonset
  2. Transform prometheus and status ports to pointers to be sure they are fully optional (otherwise they're set to 0 and validation fails)
  3. Refactored docs
  4. Add example for installation in Openshift dashboard
  5. Use the -trimpath build parameter instead of go builds. This was the only way to prevent $GOPATH to be in the final binary. Trimpath as build argument is working since Go 1.13. (cc @dboenig this change might affect pipelines, please have a look at the Makefile thanks)

I will squash commits before merge.

@Rulox Rulox self-assigned this Apr 14, 2020
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rulox please see my comments.

Additionally,

Generated a few versions (current 0.0.3) as examples. Next release should be done in GitHub as well as the first release. It is important we keep all versions (check community operators) (maybe bundle/ folder is too much? bundle is the actual version but all the fields are in the other folders, let me know and I'll remove this and add it to gitignore)

I feel it is too much, since we can generate the bundle. I wonder if it is a release artifact and should be a part of a GH release 🤔

Also, if we don't have the bundle directory there, we will not need to make sure that bundle directory is updated. For example, If I run make generate-bundle, the files in bundle are changed. Is it expected?

        modified:   bundle/k8s.nginx.org_nginxingresscontrollers_crd.yaml
        modified:   bundle/nginx-ingress-operator.v0.0.2.clusterserviceversion.yaml
        modified:   bundle/nginx-ingress-operator.v0.0.3.clusterserviceversion.yaml
...
--- a/bundle/nginx-ingress-operator.v0.0.2.clusterserviceversion.yaml
+++ b/bundle/nginx-ingress-operator.v0.0.2.clusterserviceversion.yaml
@@ -323,7 +323,7 @@ spec:
       type: SingleNamespace
     - supported: false
       type: MultiNamespace
-    - supported: true
+    - supported: false
       type: AllNamespaces

Makefile Outdated Show resolved Hide resolved
build/Dockerfile Outdated Show resolved Hide resolved
docs/installation.md Outdated Show resolved Hide resolved
docs/openshift-installation.md Outdated Show resolved Hide resolved
docs/openshift-installation.md Outdated Show resolved Hide resolved
docs/openshift-installation.md Outdated Show resolved Hide resolved
docs/openshift-installation.md Outdated Show resolved Hide resolved
docs/openshift-installation.md Outdated Show resolved Hide resolved
pkg/controller/nginxingresscontroller/utils.go Outdated Show resolved Hide resolved
@Rulox
Copy link
Contributor Author

Rulox commented Apr 15, 2020

Agreed, I'll remove bundle from repository. The bundle folder is just an intermediate step to build the required zip file to upload to RH Customer Portal I don't think is useful to have it as a release artifact in GH because it's not useful for anything (only for RH operatorhub). In the future, if we decide to push this to https://operatorhub.io/ we would need a different process too (we need to create a PR there with the manifests generated).

PS: Yeah the manfiests are not updated because I was waiting on a bug resolution by RH in order to update here. Will update everything with feedback provided, thanks.

@Rulox Rulox requested a review from pleshakov April 15, 2020 12:24
Copy link
Contributor

@Dean-Coakley Dean-Coakley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one typo

docs/openshift-installation.md Outdated Show resolved Hide resolved
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants