Repository: Azure/ARO-RP
Pull request #2664 (2023-01-27 11:17:00)

update docs: configure local ARO-RP to create clusters using a Hive d…
### Which issue this PR addresses:

<!--
Please include a link to the ADO work item as well as any GitHub issues.

Usage: `Fixes #<GitHub issue number>`, or `Fixes (paste link of issue)`.
-->
Simple PR to update the docs explaining how to configure the ARO-RP running locally to create clusters using an AKS Hive dev cluster (instead of the standard way of creating clusters that does not use Hive).

### What this PR does / why we need it:

<!--
Include a brief summary of what the PR is intended to accomplish and how the PR
does it. (2-3 sentences)
-->

This process is not documented and it will be nice having a simple explanation in the docs.

### Test plan for issue:

<!--
How did you test that this PR works?

- Are there unit tests?
- Are there integration/e2e tests?
- If it is not possible to write automated tests, explain why and document how
  to manually test and verify the feature.
-->

N/A

### Is there any documentation that needs to be updated for this PR?

<!--
- If yes and the docs are in GitHub, include doc updates in the PR.
- If yes and the docs are not in GitHub (i.e. ADO wiki), include a link to the
  docs.
- If no, explain why (e.g. "tech debt cleanup, N/A").
-->

Yes, updated the *docs/deploy-development-rp.md* file.



Patch:
diff --git a/cmd/aro/mirror.go b/cmd/aro/mirror.go
index ea28a99ed..dcec2833a 100644
--- a/cmd/aro/mirror.go
+++ b/cmd/aro/mirror.go
@@ -152,20 +152,18 @@ func mirror(ctx context.Context, log *logrus.Entry) error {
 	}
 
 	for _, ref := range []string{
+		"registry.redhat.io/rhel7/support-tools:latest",
 		"registry.redhat.io/rhel8/support-tools:latest",
+		"registry.redhat.io/openshift4/ose-tools-rhel7:latest",
 		"registry.redhat.io/openshift4/ose-tools-rhel8:latest",
+		"registry.access.redhat.com/ubi7/ubi-minimal:latest",
 		"registry.access.redhat.com/ubi8/ubi-minimal:latest",
 		"registry.access.redhat.com/ubi8/nodejs-14:latest",
-		// https://catalog.redhat.com/software/containers/ubi8/go-toolset/5ce8713aac3db925c03774d1
-		"registry.access.redhat.com/ubi8/go-toolset:1.17.12",
-		"registry.access.redhat.com/ubi8/go-toolset:1.18.4",
+		"registry.access.redhat.com/ubi7/go-toolset:1.16.12",
+		"registry.access.redhat.com/ubi8/go-toolset:1.17.7",
 		"mcr.microsoft.com/azure-cli:latest",
-		// https://mcr.microsoft.com/en-us/product/cbl-mariner/base/core/tags
-		"mcr.microsoft.com/cbl-mariner/base/core:2.0-nonroot.20230107-amd64",
 
-		// https://quay.io/repository/app-sre/managed-upgrade-operator?tab=tags
-		"quay.io/app-sre/managed-upgrade-operator:v0.1.891-3d94c00",
-		// https://quay.io/repository/app-sre/hive?tab=tags
+		"quay.io/app-sre/managed-upgrade-operator:v0.1.887-b00c935",
 		"quay.io/app-sre/hive:fec14dc",
 	} {
 		log.Printf("mirroring %s -> %s", ref, pkgmirror.Dest(dstAcr+acrDomainSuffix, ref))
diff --git a/docs/deploy-development-rp.md b/docs/deploy-development-rp.md
index 5f6d2ad3a..91b36b204 100644
--- a/docs/deploy-development-rp.md
+++ b/docs/deploy-development-rp.md
@@ -137,6 +137,18 @@
      journalctl _COMM=aro -o json --since "15 min ago" -f | jq -r 'select (.COMPONENT != null and (.COMPONENT | contains("access"))|not) | .MESSAGE'
      ```
 
+## Connect ARO-RP with a Hive development cluster
+The env variables names defined in pkg/util/liveconfig/manager.go control the communication of the ARO-RP with Hive.
+- If you want to use ARO-RP + Hive, set *HIVE_KUBE_CONFIG_PATH* to the path of the kubeconfig of the AKS Dev cluster. [Info](https://github.com/Azure/ARO-RP/blob/master/docs/deploy-development-rp.md#debugging-openshift-cluster) about creating that kubeconfig (Step *Get an admin kubeconfig:*).
+- If you want to create clusters using the local ARO-RP + Hive instead of doing the standard cluster creation process (which doesn't use Hive), set *ARO_INSTALL_VIA_HIVE* to *true*.
+- If you want to enable the Hive adoption feature (which is performed during adminUpdate()), set *ARO_ADOPT_BY_HIVE* to *true*.
+
+After setting the above environment variables (using *export* direclty in the terminal or including them in the *env* file), connect to the [VPN](https://github.com/Azure/ARO-RP/blob/master/docs/deploy-development-rp.md#debugging-aks-cluster) (*Connect to the VPN* section).
+
+Then proceed to [run](https://github.com/Azure/ARO-RP/blob/master/docs/deploy-development-rp.md#run-the-rp-and-create-a-cluster) the ARO-RP as usual. 
+
+After that, when you [create](https://github.com/Azure/ARO-RP/blob/master/docs/deploy-development-rp.md#run-the-rp-and-create-a-cluster) a cluster, you will be using Hive behind the scenes. You can check the created Hive objects following [Debugging OpenShift Cluster](https://github.com/Azure/ARO-RP/blob/master/docs/deploy-development-rp.md#debugging-openshift-cluster) and using the *oc* command.
+
 ## Make Admin-Action API call(s) to a running local-rp
 
   ```bash
diff --git a/pkg/util/namespace/namespace.go b/pkg/util/namespace/namespace.go
index 9449bcbd8..74a6f23b1 100644
--- a/pkg/util/namespace/namespace.go
+++ b/pkg/util/namespace/namespace.go
@@ -24,8 +24,6 @@ func IsOpenShiftNamespace(ns string) bool {
 		"openshift-cloud-controller-manager":               {},
 		"openshift-cloud-controller-manager-operator":      {},
 		"openshift-cloud-credential-operator":              {},
-		"openshift-cloud-network-config-controller":        {},
-		"openshift-cluster-api":                            {},
 		"openshift-cluster-csi-drivers":                    {},
 		"openshift-cluster-machine-approver":               {},
 		"openshift-cluster-node-tuning-operator":           {},
@@ -68,8 +66,8 @@ func IsOpenShiftNamespace(ns string) bool {
 		"openshift-network-operator":                       {},
 		"openshift-oauth-apiserver":                        {},
 		"openshift-openstack-infra":                        {},
-		"openshift-operator-lifecycle-manager":             {},
 		"openshift-operators":                              {},
+		"openshift-operator-lifecycle-manager":             {},
 		"openshift-ovirt-infra":                            {},
 		"openshift-sdn":                                    {},
 		"openshift-service-ca":                             {},


Test patch:
diff --git a/.pipelines/e2e.yml b/.pipelines/e2e.yml
index 6cb58ff26..211f3df31 100644
--- a/.pipelines/e2e.yml
+++ b/.pipelines/e2e.yml
@@ -33,10 +33,6 @@ jobs:
       export CI=true
       . ./hack/e2e/run-rp-and-e2e.sh
 
-      # HACK: we don't currently trap an exit signal to kill the VPN and other things
-      # properly which can result in a stale openvpn process running, causing connection
-      # issues.  This should fix that, but should be rethought.
-      sudo pkill openvpn
       run_vpn
       deploy_e2e_db