Skip to content

Commit 88acf58

Browse files
committed
Merge mysqld status into ceilometer status
1 parent 8f9673e commit 88acf58

File tree

6 files changed

+125
-258
lines changed

6 files changed

+125
-258
lines changed

api/bases/telemetry.openstack.org_ceilometers.yaml

Lines changed: 13 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -293,70 +293,20 @@ spec:
293293
type: string
294294
description: Map of hashes to track e.g. job status
295295
type: object
296-
mysqldExporterStatus:
297-
description: MysqldExporterStatus defines the observed state of mysqld_exporter
298-
properties:
299-
conditions:
300-
description: Conditions
301-
items:
302-
description: Condition defines an observation of a API resource
303-
operational state.
304-
properties:
305-
lastTransitionTime:
306-
description: Last time the condition transitioned from one
307-
status to another. This should be when the underlying
308-
condition changed. If that is not known, then using the
309-
time when the API field changed is acceptable.
310-
format: date-time
311-
type: string
312-
message:
313-
description: A human readable message indicating details
314-
about the transition.
315-
type: string
316-
reason:
317-
description: The reason for the condition's last transition
318-
in CamelCase.
319-
type: string
320-
severity:
321-
description: Severity provides a classification of Reason
322-
code, so the current situation is immediately understandable
323-
and could act accordingly. It is meant for situations
324-
where Status=False and it should be indicated if it is
325-
just informational, warning (next reconciliation might
326-
fix it) or an error (e.g. DB create issue and no actions
327-
to automatically resolve the issue can/should be done).
328-
For conditions where Status=Unknown or Status=True the
329-
Severity should be SeverityNone.
330-
type: string
331-
status:
332-
description: Status of the condition, one of True, False,
333-
Unknown.
334-
type: string
335-
type:
336-
description: Type of condition in CamelCase.
337-
type: string
338-
required:
339-
- lastTransitionTime
340-
- status
341-
- type
342-
type: object
343-
type: array
344-
exportedGaleras:
345-
description: List of galera CRs, which are being exported with
346-
mysqld_exporter
347-
items:
348-
type: string
349-
type: array
350-
hash:
351-
additionalProperties:
352-
type: string
353-
description: Map of hashes to track e.g. job status
354-
type: object
355-
readyCount:
356-
description: ReadyCount of mysqld_exporter instances
357-
format: int32
358-
type: integer
296+
mysqldExporterExportedGaleras:
297+
description: List of galera CRs, which are being exported with mysqld_exporter
298+
items:
299+
type: string
300+
type: array
301+
mysqldExporterHash:
302+
additionalProperties:
303+
type: string
304+
description: Map of hashes to track e.g. job status
359305
type: object
306+
mysqldExporterReadyCount:
307+
description: ReadyCount of mysqld_exporter instances
308+
format: int32
309+
type: integer
360310
networks:
361311
description: Networks in addtion to the cluster network, the service
362312
is attached to

api/v1beta1/ceilometer_types.go

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,14 @@ type CeilometerStatus struct {
168168
// the openstack-operator in the top-level CR (e.g. the ContainerImage)
169169
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
170170

171-
MysqldExporterStatus MysqldExporterStatus `json:"mysqldExporterStatus,omitempty"`
171+
// ReadyCount of mysqld_exporter instances
172+
MysqldExporterReadyCount int32 `json:"mysqldExporterReadyCount,omitempty"`
173+
174+
// Map of hashes to track e.g. job status
175+
MysqldExporterHash map[string]string `json:"mysqldExporterHash,omitempty"`
176+
177+
// List of galera CRs, which are being exported with mysqld_exporter
178+
MysqldExporterExportedGaleras []string `json:"mysqldExporterExportedGaleras,omitempty"`
172179
}
173180

174181
// KSMStatus defines the observed state of kube-state-metrics
@@ -189,21 +196,6 @@ type KSMStatus struct {
189196
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
190197
}
191198

192-
// MysqldExporterStatus defines the observed state of mysqld_exporter
193-
type MysqldExporterStatus struct {
194-
// ReadyCount of mysqld_exporter instances
195-
ReadyCount int32 `json:"readyCount,omitempty"`
196-
197-
// Map of hashes to track e.g. job status
198-
Hash map[string]string `json:"hash,omitempty"`
199-
200-
// Conditions
201-
Conditions condition.Conditions `json:"conditions,omitempty" optional:"true"`
202-
203-
// List of galera CRs, which are being exported with mysqld_exporter
204-
ExportedGaleras []string `json:"exportedGaleras,omitempty"`
205-
}
206-
207199
//+kubebuilder:object:root=true
208200
//+kubebuilder:subresource:status
209201
//+kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[0].status",description="Status"

api/v1beta1/conditions.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ const (
5858

5959
// KSMReadyCondition Status=True condition which indicates if the KSM is configured and operational
6060
KSMReadyCondition condition.Type = "KSMReady"
61+
62+
// MysqldExporter conditions
63+
MysqldExporterDBReadyCondition condition.Type = "MysqldExporterDBReady"
64+
65+
MysqldExporterDeploymentReadyCondition condition.Type = "MysqldExporterDeploymentReady"
66+
67+
MysqldExporterMariaDBAccountReadyCondition condition.Type = "MysqldExporterMariaDBAccountReady"
68+
69+
MysqldExporterServiceConfigReadyCondition condition.Type = "MysqldExporterServiceConfigReady"
70+
71+
MysqldExporterTLSInputReadyCondition condition.Type = "MysqldExporterTLSInputReady"
6172
)
6273

6374
// Telemetry Reasons used by API objects.

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 12 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/telemetry.openstack.org_ceilometers.yaml

Lines changed: 13 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -293,70 +293,20 @@ spec:
293293
type: string
294294
description: Map of hashes to track e.g. job status
295295
type: object
296-
mysqldExporterStatus:
297-
description: MysqldExporterStatus defines the observed state of mysqld_exporter
298-
properties:
299-
conditions:
300-
description: Conditions
301-
items:
302-
description: Condition defines an observation of a API resource
303-
operational state.
304-
properties:
305-
lastTransitionTime:
306-
description: Last time the condition transitioned from one
307-
status to another. This should be when the underlying
308-
condition changed. If that is not known, then using the
309-
time when the API field changed is acceptable.
310-
format: date-time
311-
type: string
312-
message:
313-
description: A human readable message indicating details
314-
about the transition.
315-
type: string
316-
reason:
317-
description: The reason for the condition's last transition
318-
in CamelCase.
319-
type: string
320-
severity:
321-
description: Severity provides a classification of Reason
322-
code, so the current situation is immediately understandable
323-
and could act accordingly. It is meant for situations
324-
where Status=False and it should be indicated if it is
325-
just informational, warning (next reconciliation might
326-
fix it) or an error (e.g. DB create issue and no actions
327-
to automatically resolve the issue can/should be done).
328-
For conditions where Status=Unknown or Status=True the
329-
Severity should be SeverityNone.
330-
type: string
331-
status:
332-
description: Status of the condition, one of True, False,
333-
Unknown.
334-
type: string
335-
type:
336-
description: Type of condition in CamelCase.
337-
type: string
338-
required:
339-
- lastTransitionTime
340-
- status
341-
- type
342-
type: object
343-
type: array
344-
exportedGaleras:
345-
description: List of galera CRs, which are being exported with
346-
mysqld_exporter
347-
items:
348-
type: string
349-
type: array
350-
hash:
351-
additionalProperties:
352-
type: string
353-
description: Map of hashes to track e.g. job status
354-
type: object
355-
readyCount:
356-
description: ReadyCount of mysqld_exporter instances
357-
format: int32
358-
type: integer
296+
mysqldExporterExportedGaleras:
297+
description: List of galera CRs, which are being exported with mysqld_exporter
298+
items:
299+
type: string
300+
type: array
301+
mysqldExporterHash:
302+
additionalProperties:
303+
type: string
304+
description: Map of hashes to track e.g. job status
359305
type: object
306+
mysqldExporterReadyCount:
307+
description: ReadyCount of mysqld_exporter instances
308+
format: int32
309+
type: integer
360310
networks:
361311
description: Networks in addtion to the cluster network, the service
362312
is attached to

0 commit comments

Comments
 (0)