@@ -45,14 +45,32 @@ type PasswordsSelector struct {
4545
4646// TelemetrySpec defines the desired state of Telemetry
4747type TelemetrySpec struct {
48+ TelemetrySpecBase `json:",inline"`
49+
4850 // +kubebuilder:validation:Optional
4951 // Autoscaling - Parameters related to the autoscaling service
5052 Autoscaling AutoscalingSection `json:"autoscaling,omitempty"`
5153
5254 // +kubebuilder:validation:Optional
5355 // Ceilometer - Parameters related to the ceilometer service
5456 Ceilometer CeilometerSection `json:"ceilometer,omitempty"`
57+ }
58+
59+ // TelemetrySpecCore defines the desired state of Telemetry. This version has no image parameters and is used by OpenStackControlplane
60+ type TelemetrySpecCore struct {
61+ TelemetrySpecBase `json:",inline"`
5562
63+ // +kubebuilder:validation:Optional
64+ // Autoscaling - Parameters related to the autoscaling service
65+ Autoscaling AutoscalingSectionCore `json:"autoscaling,omitempty"`
66+
67+ // +kubebuilder:validation:Optional
68+ // Ceilometer - Parameters related to the ceilometer service
69+ Ceilometer CeilometerSectionCore `json:"ceilometer,omitempty"`
70+ }
71+
72+ // TelemetrySpecBase -
73+ type TelemetrySpecBase struct {
5674 // +kubebuilder:validation:Optional
5775 // MetricStorage - Parameters related to the metricStorage
5876 MetricStorage MetricStorageSection `json:"metricStorage,omitempty"`
@@ -76,6 +94,20 @@ type CeilometerSection struct {
7694 CeilometerSpec `json:",inline"`
7795}
7896
97+ // CeilometerSectionCore defines the desired state of the ceilometer service
98+ type CeilometerSectionCore struct {
99+ // +kubebuilder:validation:Optional
100+ // +kubebuilder:default=true
101+ // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
102+ // Enabled - Whether OpenStack Ceilometer service should be deployed and managed
103+ Enabled bool `json:"enabled"`
104+
105+ // +kubebuilder:validation:Optional
106+ //+operator-sdk:csv:customresourcedefinitions:type=spec
107+ // Template - Overrides to use when creating the OpenStack Ceilometer service
108+ CeilometerSpecCore `json:",inline"`
109+ }
110+
79111// AutoscalingSection defines the desired state of the autoscaling service
80112type AutoscalingSection struct {
81113 // +kubebuilder:validation:Optional
@@ -90,6 +122,20 @@ type AutoscalingSection struct {
90122 AutoscalingSpec `json:",inline"`
91123}
92124
125+ // AutoscalingSectionCore defines the desired state of the autoscaling service
126+ type AutoscalingSectionCore struct {
127+ // +kubebuilder:validation:Optional
128+ // +kubebuilder:default=false
129+ // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
130+ // Enabled - Whether OpenStack autoscaling service should be deployed and managed
131+ Enabled bool `json:"enabled"`
132+
133+ // +kubebuilder:validation:Optional
134+ //+operator-sdk:csv:customresourcedefinitions:type=spec
135+ // Template - Overrides to use when creating the OpenStack autoscaling service
136+ AutoscalingSpecCore `json:",inline"`
137+ }
138+
93139// MetricStorageSection defines the desired state of the MetricStorage
94140type MetricStorageSection struct {
95141 // +kubebuilder:validation:Optional
@@ -161,19 +207,17 @@ func init() {
161207func SetupDefaultsTelemetry () {
162208 // Acquire environmental defaults and initialize Telemetry defaults with them
163209 telemetryDefaults := TelemetryDefaults {
164- CentralContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_CEILOMETER_CENTRAL_IMAGE_URL_DEFAULT" , CeilometerCentralContainerImage ),
165- ComputeContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_CEILOMETER_COMPUTE_IMAGE_URL_DEFAULT" , CeilometerComputeContainerImage ),
166- IpmiContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_CEILOMETER_IPMI_IMAGE_URL_DEFAULT" , CeilometerIpmiContainerImage ),
167- NotificationContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_CEILOMETER_NOTIFICATION_IMAGE_URL_DEFAULT" , CeilometerNotificationContainerImage ),
168- SgCoreContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_CEILOMETER_SGCORE_IMAGE_URL_DEFAULT" , CeilometerSgCoreContainerImage ),
210+ CentralContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_CEILOMETER_CENTRAL_IMAGE_URL_DEFAULT" , CeilometerCentralContainerImage ),
211+ ComputeContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_CEILOMETER_COMPUTE_IMAGE_URL_DEFAULT" , CeilometerComputeContainerImage ),
212+ IpmiContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_CEILOMETER_IPMI_IMAGE_URL_DEFAULT" , CeilometerIpmiContainerImage ),
213+ NotificationContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_CEILOMETER_NOTIFICATION_IMAGE_URL_DEFAULT" , CeilometerNotificationContainerImage ),
214+ SgCoreContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_CEILOMETER_SGCORE_IMAGE_URL_DEFAULT" , CeilometerSgCoreContainerImage ),
169215
170216 // Autoscaling
171217 AodhAPIContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_AODH_API_IMAGE_URL_DEFAULT" , AodhAPIContainerImage ),
172218 AodhEvaluatorContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_AODH_EVALUATOR_IMAGE_URL_DEFAULT" , AodhEvaluatorContainerImage ),
173219 AodhNotifierContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_AODH_NOTIFIER_IMAGE_URL_DEFAULT" , AodhNotifierContainerImage ),
174220 AodhListenerContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_AODH_LISTENER_IMAGE_URL_DEFAULT" , AodhListenerContainerImage ),
175- AodhInitContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_AODH_API_IMAGE_URL_DEFAULT" , AodhAPIContainerImage ),
176-
177221 }
178222
179223 SetupTelemetryDefaults (telemetryDefaults )
0 commit comments