|
| 1 | +--- |
| 2 | +apiVersion: apiextensions.k8s.io/v1 |
| 3 | +kind: CustomResourceDefinition |
| 4 | +metadata: |
| 5 | + annotations: |
| 6 | + controller-gen.kubebuilder.io/version: v0.16.0 |
| 7 | + name: metriccollectorreports.placement.kubernetes-fleet.io |
| 8 | +spec: |
| 9 | + group: placement.kubernetes-fleet.io |
| 10 | + names: |
| 11 | + categories: |
| 12 | + - fleet |
| 13 | + - fleet-metrics |
| 14 | + kind: MetricCollectorReport |
| 15 | + listKind: MetricCollectorReportList |
| 16 | + plural: metriccollectorreports |
| 17 | + shortNames: |
| 18 | + - mcr |
| 19 | + singular: metriccollectorreport |
| 20 | + scope: Namespaced |
| 21 | + versions: |
| 22 | + - additionalPrinterColumns: |
| 23 | + - jsonPath: .workloadsMonitored |
| 24 | + name: Workloads |
| 25 | + type: integer |
| 26 | + - jsonPath: .lastCollectionTime |
| 27 | + name: Last-Collection |
| 28 | + type: date |
| 29 | + - jsonPath: .metadata.creationTimestamp |
| 30 | + name: Age |
| 31 | + type: date |
| 32 | + name: v1beta1 |
| 33 | + schema: |
| 34 | + openAPIV3Schema: |
| 35 | + description: |- |
| 36 | + MetricCollectorReport is created by the MetricCollector controller on the hub cluster |
| 37 | + in the fleet-member-{clusterName} namespace to report collected metrics from a member cluster. |
| 38 | + The controller watches MetricCollector objects on the member cluster, collects metrics, |
| 39 | + and syncs the status to the hub as MetricCollectorReport objects. |
| 40 | +
|
| 41 | + Controller workflow: |
| 42 | + 1. MetricCollector reconciles and collects metrics on member cluster |
| 43 | + 2. Metrics include clusterName from workload_health labels |
| 44 | + 3. Controller creates/updates MetricCollectorReport in fleet-member-{clusterName} namespace on hub |
| 45 | + 4. Report name matches MetricCollector name for easy lookup |
| 46 | +
|
| 47 | + Namespace: fleet-member-{clusterName} (extracted from CollectedMetrics[0].ClusterName) |
| 48 | + Name: Same as MetricCollector name |
| 49 | + All metrics in CollectedMetrics are guaranteed to have the same ClusterName. |
| 50 | + properties: |
| 51 | + apiVersion: |
| 52 | + description: |- |
| 53 | + APIVersion defines the versioned schema of this representation of an object. |
| 54 | + Servers should convert recognized schemas to the latest internal value, and |
| 55 | + may reject unrecognized values. |
| 56 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| 57 | + type: string |
| 58 | + collectedMetrics: |
| 59 | + description: |- |
| 60 | + CollectedMetrics contains the most recent metrics from each workload. |
| 61 | + All metrics are guaranteed to have the same ClusterName since they're collected from one member cluster. |
| 62 | + items: |
| 63 | + description: WorkloadMetrics represents metrics collected from a single |
| 64 | + workload pod. |
| 65 | + properties: |
| 66 | + clusterName: |
| 67 | + description: ClusterName from the workload_health metric label. |
| 68 | + type: string |
| 69 | + health: |
| 70 | + description: Health indicates if the workload is healthy (true=healthy, |
| 71 | + false=unhealthy). |
| 72 | + type: boolean |
| 73 | + namespace: |
| 74 | + description: Namespace is the namespace of the pod. |
| 75 | + type: string |
| 76 | + workloadName: |
| 77 | + description: WorkloadName from the workload_health metric label |
| 78 | + (typically the deployment name). |
| 79 | + type: string |
| 80 | + required: |
| 81 | + - clusterName |
| 82 | + - health |
| 83 | + - namespace |
| 84 | + - workloadName |
| 85 | + type: object |
| 86 | + type: array |
| 87 | + conditions: |
| 88 | + description: Conditions copied from the MetricCollector status. |
| 89 | + items: |
| 90 | + description: Condition contains details for one aspect of the current |
| 91 | + state of this API Resource. |
| 92 | + properties: |
| 93 | + lastTransitionTime: |
| 94 | + description: |- |
| 95 | + lastTransitionTime is the last time the condition transitioned from one status to another. |
| 96 | + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. |
| 97 | + format: date-time |
| 98 | + type: string |
| 99 | + message: |
| 100 | + description: |- |
| 101 | + message is a human readable message indicating details about the transition. |
| 102 | + This may be an empty string. |
| 103 | + maxLength: 32768 |
| 104 | + type: string |
| 105 | + observedGeneration: |
| 106 | + description: |- |
| 107 | + observedGeneration represents the .metadata.generation that the condition was set based upon. |
| 108 | + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date |
| 109 | + with respect to the current state of the instance. |
| 110 | + format: int64 |
| 111 | + minimum: 0 |
| 112 | + type: integer |
| 113 | + reason: |
| 114 | + description: |- |
| 115 | + reason contains a programmatic identifier indicating the reason for the condition's last transition. |
| 116 | + Producers of specific condition types may define expected values and meanings for this field, |
| 117 | + and whether the values are considered a guaranteed API. |
| 118 | + The value should be a CamelCase string. |
| 119 | + This field may not be empty. |
| 120 | + maxLength: 1024 |
| 121 | + minLength: 1 |
| 122 | + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ |
| 123 | + type: string |
| 124 | + status: |
| 125 | + description: status of the condition, one of True, False, Unknown. |
| 126 | + enum: |
| 127 | + - "True" |
| 128 | + - "False" |
| 129 | + - Unknown |
| 130 | + type: string |
| 131 | + type: |
| 132 | + description: type of condition in CamelCase or in foo.example.com/CamelCase. |
| 133 | + maxLength: 316 |
| 134 | + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ |
| 135 | + type: string |
| 136 | + required: |
| 137 | + - lastTransitionTime |
| 138 | + - message |
| 139 | + - reason |
| 140 | + - status |
| 141 | + - type |
| 142 | + type: object |
| 143 | + type: array |
| 144 | + kind: |
| 145 | + description: |- |
| 146 | + Kind is a string value representing the REST resource this object represents. |
| 147 | + Servers may infer this from the endpoint the client submits requests to. |
| 148 | + Cannot be updated. |
| 149 | + In CamelCase. |
| 150 | + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| 151 | + type: string |
| 152 | + lastCollectionTime: |
| 153 | + description: LastCollectionTime is when metrics were last collected on |
| 154 | + the member cluster. |
| 155 | + format: date-time |
| 156 | + type: string |
| 157 | + lastReportTime: |
| 158 | + description: LastReportTime is when this report was last synced to the |
| 159 | + hub. |
| 160 | + format: date-time |
| 161 | + type: string |
| 162 | + metadata: |
| 163 | + type: object |
| 164 | + observedGeneration: |
| 165 | + description: ObservedGeneration is the generation most recently observed |
| 166 | + from the MetricCollector. |
| 167 | + format: int64 |
| 168 | + type: integer |
| 169 | + workloadsMonitored: |
| 170 | + description: WorkloadsMonitored is the count of workloads being monitored. |
| 171 | + format: int32 |
| 172 | + type: integer |
| 173 | + type: object |
| 174 | + served: true |
| 175 | + storage: true |
| 176 | + subresources: {} |
0 commit comments