Skip to content

Commit

Permalink
Merge pull request #571 from vyzigold/improve_myslqd_image_defaulting
Browse files Browse the repository at this point in the history
Improve mysqld image defaulting
  • Loading branch information
openshift-merge-bot[bot] authored Jan 6, 2025
2 parents 3a0436c + 05071c5 commit 8284599
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
13 changes: 7 additions & 6 deletions api/v1beta1/telemetry_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,13 @@ func init() {
func SetupDefaultsTelemetry() {
// Acquire environmental defaults and initialize Telemetry defaults with them
telemetryDefaults := TelemetryDefaults{
CentralContainerImageURL: util.GetEnvVar("RELATED_IMAGE_CEILOMETER_CENTRAL_IMAGE_URL_DEFAULT", CeilometerCentralContainerImage),
ComputeContainerImageURL: util.GetEnvVar("RELATED_IMAGE_CEILOMETER_COMPUTE_IMAGE_URL_DEFAULT", CeilometerComputeContainerImage),
IpmiContainerImageURL: util.GetEnvVar("RELATED_IMAGE_CEILOMETER_IPMI_IMAGE_URL_DEFAULT", CeilometerIpmiContainerImage),
NotificationContainerImageURL: util.GetEnvVar("RELATED_IMAGE_CEILOMETER_NOTIFICATION_IMAGE_URL_DEFAULT", CeilometerNotificationContainerImage),
SgCoreContainerImageURL: util.GetEnvVar("RELATED_IMAGE_CEILOMETER_SGCORE_IMAGE_URL_DEFAULT", CeilometerSgCoreContainerImage),
ProxyContainerImageURL: util.GetEnvVar("RELATED_IMAGE_APACHE_IMAGE_URL_DEFAULT", CeilometerProxyContainerImage),
CentralContainerImageURL: util.GetEnvVar("RELATED_IMAGE_CEILOMETER_CENTRAL_IMAGE_URL_DEFAULT", CeilometerCentralContainerImage),
ComputeContainerImageURL: util.GetEnvVar("RELATED_IMAGE_CEILOMETER_COMPUTE_IMAGE_URL_DEFAULT", CeilometerComputeContainerImage),
IpmiContainerImageURL: util.GetEnvVar("RELATED_IMAGE_CEILOMETER_IPMI_IMAGE_URL_DEFAULT", CeilometerIpmiContainerImage),
NotificationContainerImageURL: util.GetEnvVar("RELATED_IMAGE_CEILOMETER_NOTIFICATION_IMAGE_URL_DEFAULT", CeilometerNotificationContainerImage),
SgCoreContainerImageURL: util.GetEnvVar("RELATED_IMAGE_CEILOMETER_SGCORE_IMAGE_URL_DEFAULT", CeilometerSgCoreContainerImage),
ProxyContainerImageURL: util.GetEnvVar("RELATED_IMAGE_APACHE_IMAGE_URL_DEFAULT", CeilometerProxyContainerImage),
MysqldExporterContainerImageURL: util.GetEnvVar("RELATED_IMAGE_CEILOMETER_MYSQLD_EXPORTER_IMAGE_URL_DEFAULT", MysqldExporterContainerImage),

// Autoscaling
AodhAPIContainerImageURL: util.GetEnvVar("RELATED_IMAGE_AODH_API_IMAGE_URL_DEFAULT", AodhAPIContainerImage),
Expand Down
26 changes: 15 additions & 11 deletions api/v1beta1/telemetry_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ import (

// TelemetryDefaults -
type TelemetryDefaults struct {
CentralContainerImageURL string
ComputeContainerImageURL string
NotificationContainerImageURL string
SgCoreContainerImageURL string
ProxyContainerImageURL string
IpmiContainerImageURL string
KsmContainerImageURL string
AodhAPIContainerImageURL string
AodhEvaluatorContainerImageURL string
AodhNotifierContainerImageURL string
AodhListenerContainerImageURL string
CentralContainerImageURL string
ComputeContainerImageURL string
NotificationContainerImageURL string
SgCoreContainerImageURL string
ProxyContainerImageURL string
IpmiContainerImageURL string
KsmContainerImageURL string
MysqldExporterContainerImageURL string
AodhAPIContainerImageURL string
AodhEvaluatorContainerImageURL string
AodhNotifierContainerImageURL string
AodhListenerContainerImageURL string
}

var telemetryDefaults TelemetryDefaults
Expand Down Expand Up @@ -94,6 +95,9 @@ func (spec *TelemetrySpec) Default() {
if spec.Ceilometer.CeilometerSpec.KSMImage == "" {
spec.Ceilometer.CeilometerSpec.KSMImage = telemetryDefaults.KsmContainerImageURL
}
if spec.Ceilometer.CeilometerSpec.MysqldExporterImage == "" {
spec.Ceilometer.CeilometerSpec.MysqldExporterImage = telemetryDefaults.MysqldExporterContainerImageURL
}
if spec.Autoscaling.AutoscalingSpec.Aodh.APIImage == "" {
spec.Autoscaling.AutoscalingSpec.Aodh.APIImage = telemetryDefaults.AodhAPIContainerImageURL
}
Expand Down

0 comments on commit 8284599

Please sign in to comment.