redhat-cop / namespace-configuration-operator

The namespace-configuration-operator helps keeping configurations related to Users, Groups and Namespaces aligned with one of more policies specified as a CRs
Apache License 2.0
204 stars 55 forks source link

Disconnected Support #103

Closed cnuland closed 3 years ago

cnuland commented 3 years ago

Tested with the following steps

  1. Added the push.yaml and update_csv.sh script to the namespace configuration operator, removing the rbac proxy code
  2. pushed to my forked version of the operator at cnuland/namespace-configuration-operator
  3. Added the environment variables for GitHub Actions to point to my own quay instance at quay.io/cnuland
  4. used the opm CLI to generate an index off of the generated bundle and pushed to quay.io/cnuland
  5. Created a SourceCatalog based on the above index
  6. Installed and validated the operator
  7. CSV used digest as expected
cnuland commented 3 years ago

I used the above steps again, but this time used the process outlined here https://github.com/redhat-cop/github-actions/tree/master/disconnected-csv

with these commands to create the image catalog

opm index add --bundles quay.io/cnuland/quay.io/cnuland/namespace-configuration-operator-bundle:v0.0.1 --tag quay.io/cnuland/namespace-configuration-operator-index:0.0.2

By following the instructions outlined here https://developers.redhat.com/blog/2021/02/08/deploying-kubernetes-operators-with-operator-lifecycle-manager-bundles#

The validated by fulling down the catalog and checking the new CSV

[cnuland@okd-bastion operators]$ cat nco-catalog.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: nco-operator
  namespace: openshift-marketplace
spec:
    sourceType: grpc
    image: quay.io/cnuland/namespace-configuration-operator-index:0.0.2

then validated that the image in the CSV contains the digest image: quay.io/cnuland/namespace-configuration-operator@sha256:7f3b63d805dc98b8c9b46590178998d9e27ad0d414a1f153286d623ab7f68994

cnuland commented 3 years ago

@sabre1041 @raffaelespazzoli

raffaelespazzoli commented 3 years ago

LGTM