You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Uses existing `getAksShardKubeconfig()` function
109
-
- Connects to `aro-aks-cluster-{shard:03d}` (same clusters where Hive runs)
109
+
-**Connects to the same AKS clusters where Hive currently runs** (`aro-aks-cluster-{shard:03d}`)
110
110
- Retrieves admin credentials via `ListClusterAdminCredentials()`
111
111
- Caches credentials in liveconfig with RWMutex
112
+
-**No new infrastructure required** - reuses existing AKS clusters and client setup from Hive
112
113
113
114
### 4. Monitoring and Error Handling
114
115
@@ -137,6 +138,9 @@ Adapt `pkg/hive/failure/handler.go` patterns to parse installer logs and map to
137
138
138
139
Return structured CloudError for user-facing error messages.
139
140
141
+
**Log Parsing Migration:**
142
+
The RP already parses install logs from Hive's output via regex matching. This logic needs to be reimplemented directly in `pkg/aksinstall` to parse logs from the provision pod instead of from Hive's nested output. Since we'll be reading installer logs directly (not through Hive's wrapper), this change will **simplify the parsing logic** - no need to extract installer output from Hive's formatting, just read the pod logs directly.
143
+
140
144
**Cleanup Strategy:**
141
145
-**On success:** Delete pod, delete all secrets, delete namespace
This ensures we have equal or better observability compared to Hive monitoring, but during installation rather than as periodic monitoring.
317
328
329
+
### 9. Alerting and Incident Automation
330
+
331
+
**Alerting Updates:**
332
+
Our existing Hive alerting monitors pods in the AKS clusters where Hive runs. Since the new installer pods will run in the **same AKS clusters**, the alerting infrastructure requires minimal changes:
333
+
-**Alert queries need updated namespace filters**: Change from monitoring Hive-managed namespaces to monitoring `aro-*` namespaces
334
+
-**Alert names may need updates**: Rename from "Hive installer failure" to "ARO installer failure" for clarity
335
+
- No infrastructure changes required - already monitoring non-Hive namespaced pods in these AKS clusters
336
+
337
+
**Incident Automation Updates:**
338
+
The automation between alert firing and incident creation currently assumes:
339
+
- Installer logs are nested within Hive's output format
340
+
- Specific Hive metadata is available in logs
341
+
- ClusterDeployment status fields exist
342
+
343
+
**Changes Required:**
344
+
1.**Log query simplification**: Queries become simpler since installer output is direct (not nested in Hive formatting)
345
+
2.**Remove Hive-specific fields**: Stop querying ClusterDeployment status, Hive conditions, etc.
346
+
3.**Update log parsing**: Read pod logs directly from `aro-{docID}` namespaces instead of from Hive controller logs
347
+
4.**Preserve correlation data**: Ensure pod labels/annotations include request IDs, client principal, subscription ID for incident routing
Today, ARO-RP uses Hive (an external OpenShift controller) as an intermediary to manage cluster installations:
6
+
- ARO-RP creates a `ClusterDeployment` custom resource in AKS
7
+
- Hive watches this resource and creates/manages the installer pod
8
+
- ARO-RP polls Hive for installation status
9
+
10
+
## Proposed Solution
11
+
12
+
Rather than Hive, ARO-RP itself will create and manage OpenShift installer pods directly in AKS. We already have a working implementation for local development (`pkg/containerinstall`) that runs the installer in podman. This proposal adapts that same pattern to use Kubernetes clients for production AKS clusters.
13
+
14
+
## Implementation Overview
15
+
16
+
### 1. New ARO-RP Package: `pkg/aksinstall`
17
+
18
+
We will create installer pods directly in AKS using the Kubernetes API using the same `ContainerInstaller` interface as the existing podman-based installer. There will be shared logic between this new package and the existing `pkg/containerinstall`, but with different clients. Re-use of the existing `pkg/containerinstall` package with environment-specific configuration is also possible, if preferred.
19
+
20
+
**Installation flow** (same steps used today in Hive):
5. Cleanup (delete pod/secrets, keep namespace on failure for debugging)
27
+
```
28
+
29
+
### 2. Infrastructure Reuse
30
+
31
+
- We will re-use the same AKS clusters where Hive currently runs (`aro-aks-cluster-{shard}`) as well as AKS client code from `pkg/util/liveconfig/hive.go`
32
+
- We will continue the same namespace pattern, same credential retrieval, and same admin access
33
+
34
+
At first, the installer pods will be neighbors to the current Hive pods, then Hive will be removed.
35
+
36
+
### 3. Pod Specification
37
+
38
+
There are no changes required here. The installer pod runs the standard OpenShift installer with mounted configuration. It uses an OpenShift installer image from version catalog and runs `openshift-install create manifests && openshift-install create cluster`.
39
+
40
+
**Installer Pod Contents**:
41
+
- Azure credentials and cluster config from Kubernetes secrets
- Update correlation data source: pod labels instead of ClusterDeployment annotations
74
+
75
+
### 5. Rollout Strategy
76
+
77
+
**Environment-based rollout using RP_FEATURES / RP-Config**:
78
+
79
+
The changes can be fully rolled out before we go live using RP-Config / RP features. We will keep Hive intact during the rollout in case there are issues. We can easily disable the RP feature flag to revert to Hive path if issues arise.
80
+
81
+
```go
82
+
if m.env.DeploymentMode() == development || m.env.FeatureIsSet(FeatureUseAKSInstaller) {
83
+
// New path: direct AKS installer
84
+
s = append(s,
85
+
steps.Action(m.runAKSInstaller),
86
+
steps.Action(m.generateKubeconfigs),
87
+
)
88
+
} elseif m.installViaHive {
89
+
// Legacy path (to be removed after validation)
90
+
s = append(s, hive installation steps...)
91
+
}
92
+
```
93
+
94
+
**Phase 1: Development and Testing**
95
+
- Implement `pkg/aksinstall` package
96
+
- Enable feature flag in local development
97
+
- Validate successful installations in dev environment
0 commit comments