Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save wtam2018/5d043a8167c48492ba5ce6590ebc858b to your computer and use it in GitHub Desktop.

Select an option

Save wtam2018/5d043a8167c48492ba5ce6590ebc858b to your computer and use it in GitHub Desktop.
Installing GitOps Operator Candidate for testing
1. Login as kubeadmin
2. Connect to VPN
3. add brew.registry.redhat.io token to pull-secret openshift global config
$ oc get secrets pull-secret -n openshift-config -o template='{{index .data ".dockerconfigjson"}}' | base64 -d > authfile
$ podman login --authfile authfile --username <username> --password <password> brew.registry.redhat.io
$ oc set data secret/pull-secret -n openshift-config --from-file=.dockerconfigjson=authfile
4a. This step is only needed if your cluster is NOT connected to VPN (i.e. not a PSI cluster)
mirror 4.6 or 4.7 operator index image if your cluster is not a PSI cluster (if cluster is not connected to VPN)
Note: make sure <your index image> is a public repo
$ oc image mirror <iib index image> <your index image>
E.g.
$ oc image mirror registry-proxy.engineering.redhat.com/rh-osbs/iib:57236 quay.io/wtam/iib:57236
4b. This step is needed if your cluster is connected to VPN and you did NOT do the above step
Edit "image.config.openshift.io/cluster" to disable tls verify for registry-proxy.engineering.redhat.com
$ oc edit image.config.openshift.io/cluster
Add the followihg under "spec":
spec:
allowedRegistriesForImport:
- domainName: registry-proxy.engineering.redhat.com
insecure: true
registrySources:
insecureRegistries:
- registry-proxy.engineering.redhat.com
5. Apply the following ICSP to your cluster
apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
name: brew-registry
spec:
repositoryDigestMirrors:
- mirrors:
- brew.registry.redhat.io
source: registry.redhat.io
- mirrors:
- brew.registry.redhat.io
source: registry.stage.redhat.io
- mirrors:
- brew.registry.redhat.io
source: registry-proxy.engineering.redhat.com
6. Apply the Custom CatalogSource
Note: change <iib index image>
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: my-operator-catalog
namespace: openshift-marketplace
spec:
sourceType: grpc
image: <iib index image>
displayName: GitOps Operator Test Catalog
publisher: grpc
Congratualations! Now go to DevConsole OperatorHub to install GitOps Operator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment