Skip to content

Commit dda210a

Browse files
author
Arvind Thirumurugan
committed
address minor comments
Signed-off-by: Arvind Thirumurugan <arvindth@microsoft.com>
1 parent f3ea6d5 commit dda210a

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

approval-controller-metric-collector/README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This solution introduces three new CRDs that work together with KubeFleet's nati
3232
3. **ClusterStagedWorkloadTracker** (cluster-scoped)
3333
- Defines which workloads to monitor for a ClusterStagedUpdateRun
3434
- The name must match the ClusterStagedUpdateRun name
35-
- Specifies namespace, workload name, and expected health status
35+
- Specifies workload's name, namespace and expected health status
3636
- Used by approval-request-controller to determine if stage is ready for approval
3737

3838
4. **StagedWorkloadTracker** (namespaced)
@@ -49,7 +49,7 @@ This solution introduces three new CRDs that work together with KubeFleet's nati
4949
- The ApprovalRequest enters "Pending" state, waiting for approval
5050

5151
2. **Metric Collector Deployment**
52-
- Approval-request-controller watches the CAR
52+
- Approval-request-controller watches the `ClusterApprovalRequest`, `ApprovalRequest` objects
5353
- Creates a `MetricCollector` resource on the hub (cluster-scoped)
5454
- Creates a `ClusterResourceOverride` with per-cluster customization rules
5555
- Each cluster gets a unique `reportNamespace`: `fleet-member-<cluster-name>`
@@ -295,14 +295,13 @@ Output:
295295
```bash
296296
NAME GEN SCHEDULED SCHEDULED-GEN AVAILABLE AVAILABLE-GEN AGE
297297
ns-only-crp 1 True 1 True 1 5s
298-
proemetheus-crp 1 True 1 True 1 2m34s
298+
prometheus-crp 1 True 1 True 1 2m34s
299299
```
300300

301301
```bash
302302
# Apply StagedUpdateStrategy
303303
kubectl apply -f ./examples/updateRun/example-sus.yaml
304304

305-
```bash
306305
# Apply ResourcePlacement
307306
kubectl apply -f ./examples/updateRun/example-rp.yaml
308307

@@ -389,13 +388,6 @@ fleet-member-kind-cluster-1 mc-example-staged-run-staging 1 27s
389388
```
390389

391390
The approval controller will automatically approve stages when the metric collectors report that workloads are healthy.
392-
1. Builds the `metric-collector:latest` image
393-
2. Builds the `metric-app:local` image
394-
3. Loads both images into each kind cluster
395-
4. Creates hub token secret with proper RBAC
396-
5. Installs the metric-collector via Helm
397-
398-
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.
399391

400392
## Verification
401393

approval-controller-metric-collector/approval-request-controller/apis/metric/v1alpha1/metriccollector_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ type MetricCollectorSpec struct {
6464
ReportNamespace string `json:"reportNamespace"`
6565
}
6666

67-
// MetricsEndpointSpec defines how to access the metrics endpoint.ctor.
67+
// MetricCollectorStatus defines the observed state of MetricCollector.
6868
type MetricCollectorStatus struct {
6969
// Conditions is an array of current observed conditions.
7070
// +optional

approval-controller-metric-collector/approval-request-controller/examples/prometheus/prometheus-crp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: placement.kubernetes-fleet.io/v1beta1
22
kind: ClusterResourcePlacement
33
metadata:
4-
name: proemetheus-crp
4+
name: prometheus-crp
55
spec:
66
resourceSelectors:
77
- group: ""

0 commit comments

Comments
 (0)