diff --git a/README.md b/README.md index 6901e99..9b8eb7e 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,28 @@ Red Hat OpenShift application deployment examples. - view # A demo service that displays the random number ``` +## Prerequisites + +- OpenShift >= 4.17 cluster +- Enabled GitOps subscription in the OpenShift cluster (ArgoCD) +- `oc` CLI installed and configured to access the OpenShift cluster + ## How to deploy +Before we can deploy any of the services, we need to modify our central ArgoCD management application to allow sourcing `Application` resources from other than the `openshift-gitops` namespace. This is necessary because the services are deployed in a separate project, namespace and ArgoCD application. + +To do this, execute the following patch command: + +```bash +oc -n openshift-gitops patch argocds.argoproj.io openshift-gitops \ + --type merge \ + --patch '{"spec":{"sourceNamespaces":["openshift-gitops","example-application-basic","example-application-progressive"]}}' +``` + +The `openshift-gitops` namespace is the `default` namespace and might not be necessary to add to the `sourceNamespaces` list. However, it is added here for completeness. + +### Deploy the services + 1. Clone the repository ```bash