Skip to content

Commit f36d43e

Browse files
author
Arvind Thirumurugan
committed
minor fixes to readme
Signed-off-by: Arvind Thirumurugan <arvindth@microsoft.com>
1 parent 5c0a880 commit f36d43e

File tree

1 file changed

+26
-26
lines changed
  • approval-controller-metric-collector

1 file changed

+26
-26
lines changed

approval-controller-metric-collector/README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,54 +57,54 @@ This deploys:
5757

5858
### 3. Deploy Sample Metric Application
5959

60-
Deploy a sample application that exposes health metrics:
60+
The sample metric application image will be automatically built and loaded to all member clusters when you run the `install-on-member.sh` script in Step 5 below. This ensures the `metric-app:local` image is available on each cluster before propagating the deployment from hub to member clusters.
61+
62+
After the metric collector is installed (Step 5), deploy the sample application that exposes health metrics:
6163

6264
```bash
6365
kubectl apply -f ./approval-request-controller/examples/sample-metric-app/sample-metric-app.yaml
6466
```
6567

66-
This creates a deployment in the `test-ns` namespace with Prometheus annotations for metric scraping.
68+
This creates a deployment in the `test-ns` namespace with Prometheus annotations for metric scraping. When this deployment is propagated to member clusters via ClusterResourcePlacement, the image will already be available locally.
6769

6870
### 4. Install Approval Request Controller (Hub Cluster)
6971

70-
On the hub cluster, install the approval request controller:
72+
On the hub cluster, install the approval request controller using the provided installation script:
7173

7274
```bash
7375
cd approval-request-controller
7476

75-
# Build the controller image
76-
make docker-build IMAGE_NAME=approval-request-controller IMAGE_TAG=latest
77-
78-
# Load into kind (if using kind)
79-
kind load docker-image approval-request-controller:latest --name hub
80-
81-
# Install via Helm
82-
helm install approval-request-controller ./charts/approval-request-controller \
83-
--namespace fleet-system \
84-
--create-namespace
77+
# Run the installation script
78+
./install-on-hub.sh
8579
```
8680

81+
The script performs the following:
82+
1. Builds the `approval-request-controller:latest` image
83+
2. Loads the image into the kind hub cluster
84+
3. Verifies that required kubefleet CRDs are installed
85+
4. Installs the controller via Helm with the custom CRDs (MetricCollector, MetricCollectorReport, WorkloadTracker)
86+
5. Verifies the installation
87+
8788
### 5. Install Metric Collector (Member Clusters)
8889

89-
On each member cluster, install the metric collector:
90+
On each member cluster, install the metric collector. The installation script will automatically build and load both the metric-collector and metric-app images to all specified member clusters:
9091

9192
```bash
9293
cd standalone-metric-collector
9394

94-
# Create hub token secret (replace with actual hub token)
95-
kubectl create secret generic hub-token \
96-
--from-literal=token=<your-hub-token> \
97-
-n fleet-system
98-
99-
# Install via Helm
100-
helm install metric-collector ./charts/metric-collector \
101-
--namespace fleet-system \
102-
--set memberCluster.name=<cluster-name> \
103-
--set hubCluster.url=https://<hub-cluster-address>:6443 \
104-
--set prometheus.url=http://prometheus.test-ns:9090
95+
# Run the installation script for all member clusters
96+
# This builds both metric-collector and metric-app images and loads them into each cluster
97+
./install-on-member.sh 3
10598
```
10699

107-
Repeat for each member cluster with the appropriate cluster name.
100+
The script performs the following for each member cluster:
101+
1. Builds the `metric-collector:latest` image
102+
2. Builds the `metric-app:local` image
103+
3. Loads both images into each kind cluster
104+
4. Creates hub token secret with proper RBAC
105+
5. Installs the metric-collector via Helm
106+
107+
The `metric-app:local` image is pre-loaded so it's available when you propagate the sample-metric-app deployment from hub to member clusters.
108108

109109
## Verification
110110

0 commit comments

Comments
 (0)