@@ -45,14 +45,32 @@ type PasswordsSelector struct {
45
45
46
46
// TelemetrySpec defines the desired state of Telemetry
47
47
type TelemetrySpec struct {
48
+ TelemetrySpecBase `json:",inline"`
49
+
48
50
// +kubebuilder:validation:Optional
49
51
// Autoscaling - Parameters related to the autoscaling service
50
52
Autoscaling AutoscalingSection `json:"autoscaling,omitempty"`
51
53
52
54
// +kubebuilder:validation:Optional
53
55
// Ceilometer - Parameters related to the ceilometer service
54
56
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"`
55
62
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 {
56
74
// +kubebuilder:validation:Optional
57
75
// MetricStorage - Parameters related to the metricStorage
58
76
MetricStorage MetricStorageSection `json:"metricStorage,omitempty"`
@@ -76,6 +94,20 @@ type CeilometerSection struct {
76
94
CeilometerSpec `json:",inline"`
77
95
}
78
96
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
+
79
111
// AutoscalingSection defines the desired state of the autoscaling service
80
112
type AutoscalingSection struct {
81
113
// +kubebuilder:validation:Optional
@@ -90,6 +122,20 @@ type AutoscalingSection struct {
90
122
AutoscalingSpec `json:",inline"`
91
123
}
92
124
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
+
93
139
// MetricStorageSection defines the desired state of the MetricStorage
94
140
type MetricStorageSection struct {
95
141
// +kubebuilder:validation:Optional
@@ -161,19 +207,17 @@ func init() {
161
207
func SetupDefaultsTelemetry () {
162
208
// Acquire environmental defaults and initialize Telemetry defaults with them
163
209
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 ),
169
215
170
216
// Autoscaling
171
217
AodhAPIContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_AODH_API_IMAGE_URL_DEFAULT" , AodhAPIContainerImage ),
172
218
AodhEvaluatorContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_AODH_EVALUATOR_IMAGE_URL_DEFAULT" , AodhEvaluatorContainerImage ),
173
219
AodhNotifierContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_AODH_NOTIFIER_IMAGE_URL_DEFAULT" , AodhNotifierContainerImage ),
174
220
AodhListenerContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_AODH_LISTENER_IMAGE_URL_DEFAULT" , AodhListenerContainerImage ),
175
- AodhInitContainerImageURL : util .GetEnvVar ("RELATED_IMAGE_AODH_API_IMAGE_URL_DEFAULT" , AodhAPIContainerImage ),
176
-
177
221
}
178
222
179
223
SetupTelemetryDefaults (telemetryDefaults )
0 commit comments