Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatten telemetry resources #574

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
267 changes: 205 additions & 62 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -457,68 +457,6 @@ spec:
- serviceAccount
type: object
type: object
ceilometer:
properties:
enabled:
default: true
type: boolean
template:
properties:
centralImage:
type: string
computeImage:
type: string
customServiceConfig:
default: '# add your customization here'
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
ipmiImage:
type: string
networkAttachmentDefinitions:
items:
type: string
type: array
nodeExporterImage:
type: string
notificationImage:
type: string
passwordSelector:
default:
service: CeilometerPassword
properties:
aodhService:
default: AodhPassword
type: string
database:
default: AodhDatabasePassword
type: string
service:
default: CeilometerPassword
type: string
type: object
rabbitMqClusterName:
default: rabbitmq
type: string
secret:
type: string
serviceUser:
default: ceilometer
type: string
sgCoreImage:
type: string
required:
- centralImage
- computeImage
- ipmiImage
- nodeExporterImage
- notificationImage
- secret
- sgCoreImage
type: object
type: object
cinder:
properties:
apiOverride:
Expand Down Expand Up @@ -15178,6 +15116,211 @@ spec:
- swiftStorage
type: object
type: object
telemetry:
properties:
enabled:
default: true
type: boolean
template:
properties:
autoscaling:
properties:
aodh:
properties:
apiImage:
type: string
customServiceConfig:
default: '# add your customization here'
type: string
databaseInstance:
type: string
databaseUser:
default: aodh
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
evaluatorImage:
type: string
listenerImage:
type: string
memcachedInstance:
default: memcached
type: string
networkAttachmentDefinitions:
items:
type: string
type: array
notifierImage:
type: string
override:
properties:
service:
properties:
endpointURL:
type: string
metadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
spec:
properties:
externalName:
type: string
externalTrafficPolicy:
type: string
internalTrafficPolicy:
type: string
ipFamilyPolicy:
type: string
loadBalancerClass:
type: string
loadBalancerSourceRanges:
items:
type: string
type: array
sessionAffinity:
type: string
sessionAffinityConfig:
properties:
clientIP:
properties:
timeoutSeconds:
format: int32
type: integer
type: object
type: object
type:
type: string
type: object
type: object
type: object
passwordSelector:
default:
aodhService: AodhPassword
database: AodhDatabasePassword
properties:
aodhService:
default: AodhPassword
type: string
database:
default: AodhDatabasePassword
type: string
service:
default: CeilometerPassword
type: string
type: object
preserveJobs:
default: false
type: boolean
rabbitMqClusterName:
default: rabbitmq
type: string
secret:
type: string
serviceUser:
default: aodh
type: string
required:
- apiImage
- databaseInstance
- evaluatorImage
- listenerImage
- memcachedInstance
- notifierImage
- secret
type: object
enabled:
default: false
type: boolean
heatInstance:
default: heat
type: string
prometheus:
properties:
deployPrometheus:
default: false
type: boolean
host:
type: string
port:
format: int32
maximum: 65535
minimum: 1
type: integer
type: object
required:
- heatInstance
type: object
ceilometer:
properties:
centralImage:
type: string
computeImage:
type: string
customServiceConfig:
default: '# add your customization here'
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
enabled:
default: true
type: boolean
ipmiImage:
type: string
networkAttachmentDefinitions:
items:
type: string
type: array
nodeExporterImage:
type: string
notificationImage:
type: string
passwordSelector:
default:
service: CeilometerPassword
properties:
aodhService:
default: AodhPassword
type: string
database:
default: AodhDatabasePassword
type: string
service:
default: CeilometerPassword
type: string
type: object
rabbitMqClusterName:
default: rabbitmq
type: string
secret:
type: string
serviceUser:
default: ceilometer
type: string
sgCoreImage:
type: string
required:
- centralImage
- computeImage
- ipmiImage
- nodeExporterImage
- notificationImage
- secret
- sgCoreImage
type: object
type: object
type: object
tls:
default:
endpoint:
Expand Down
20 changes: 10 additions & 10 deletions apis/core/v1beta1/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ const (
// OpenStackControlPlaneCAReadyCondition Status=True condition which indicates if the CAs are configured and operational
OpenStackControlPlaneCAReadyCondition condition.Type = "OpenStackControlPlaneCAReadyCondition"

// OpenStackControlPlaneCeilometerReadyCondition Status=True condition which indicates if OpenStack Ceilometer service is configured and operational
OpenStackControlPlaneCeilometerReadyCondition condition.Type = "OpenStackControlPlaneCeilometerReady"
// OpenStackControlPlaneTelemetryReadyCondition Status=True condition which indicates if OpenStack Telemetry service is configured and operational
OpenStackControlPlaneTelemetryReadyCondition condition.Type = "OpenStackControlPlaneTelemetryReady"

// OpenStackControlPlaneServiceOverrideReadyCondition Status=True condition which indicates if OpenStack service override has created ok
OpenStackControlPlaneServiceOverrideReadyCondition condition.Type = "OpenStackControlPlaneServiceOverrideReady"
Expand Down Expand Up @@ -355,17 +355,17 @@ const (
// OpenStackControlPlaneDNSReadyErrorMessage
OpenStackControlPlaneDNSReadyErrorMessage = "OpenStackControlPlane DNS error occured %s"

// OpenStackControlPlaneCeilometerReadyInitMessage
OpenStackControlPlaneCeilometerReadyInitMessage = "OpenStackControlPlane Ceilometer not started"
// OpenStackControlPlaneTelemetryReadyInitMessage
OpenStackControlPlaneTelemetryReadyInitMessage = "OpenStackControlPlane Telemetry not started"

// OpenStackControlPlaneCeilometerReadyMessage
OpenStackControlPlaneCeilometerReadyMessage = "OpenStackControlPlane Ceilometer completed"
// OpenStackControlPlaneTelemetryReadyMessage
OpenStackControlPlaneTelemetryReadyMessage = "OpenStackControlPlane Telemetry completed"

// OpenStackControlPlaneCeilometerReadyRunningMessage
OpenStackControlPlaneCeilometerReadyRunningMessage = "OpenStackControlPlane Ceilometer in progress"
// OpenStackControlPlaneTelemetryReadyRunningMessage
OpenStackControlPlaneTelemetryReadyRunningMessage = "OpenStackControlPlane Telemetry in progress"

// OpenStackControlPlaneCeilometerReadyErrorMessage
OpenStackControlPlaneCeilometerReadyErrorMessage = "OpenStackControlPlane Ceilometer error occured %s"
// OpenStackControlPlaneTelemetryReadyErrorMessage
OpenStackControlPlaneTelemetryReadyErrorMessage = "OpenStackControlPlane Telemetry error occured %s"

// OpenStackControlPlaneOctaviaReadyInitMessage
OpenStackControlPlaneOctaviaReadyInitMessage = "OpenStackControlPlane Octavia not started"
Expand Down
16 changes: 8 additions & 8 deletions apis/core/v1beta1/openstackcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ type OpenStackControlPlaneSpec struct {
Horizon HorizonSection `json:"horizon,omitempty"`

// +kubebuilder:validation:Optional
// Ceilometer - Parameters related to the OpenStack Ceilometer service
Ceilometer CeilometerSection `json:"ceilometer,omitempty"`
// Telemetry - Parameters related to the OpenStack Telemetry services
Telemetry TelemetrySection `json:"telemetry,omitempty"`

// Swift - Parameters related to the Swift service
Swift SwiftSection `json:"swift,omitempty"`
Expand Down Expand Up @@ -554,18 +554,18 @@ type HorizonSection struct {
APIOverride Override `json:"apiOverride,omitempty"`
}

// CeilometerSection defines the desired state of OpenStack Telemetry services
type CeilometerSection struct {
// TelemetrySection defines the desired state of OpenStack Telemetry services
type TelemetrySection struct {
// +kubebuilder:validation:Optional
// +kubebuilder:default=true
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
// Enabled - Whether OpenStack Ceilometer servicesshould be deployed and managed
// Enabled - Whether OpenStack Telemetry services should be deployed and managed
Enabled bool `json:"enabled"`

// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating the OpenStack Ceilometer service
Template telemetryv1.CeilometerSpec `json:"template,omitempty"`
// Template - Overrides to use when creating the OpenStack Telemetry services
Template telemetryv1.TelemetrySpec `json:"template,omitempty"`
}

// SwiftSection defines the desired state of Swift service
Expand Down Expand Up @@ -742,7 +742,7 @@ func (instance *OpenStackControlPlane) InitConditions() {
condition.UnknownCondition(OpenStackControlPlaneManilaReadyCondition, condition.InitReason, OpenStackControlPlaneManilaReadyInitMessage),
condition.UnknownCondition(OpenStackControlPlaneHorizonReadyCondition, condition.InitReason, OpenStackControlPlaneHorizonReadyInitMessage),
condition.UnknownCondition(OpenStackControlPlaneDNSReadyCondition, condition.InitReason, OpenStackControlPlaneDNSReadyInitMessage),
condition.UnknownCondition(OpenStackControlPlaneCeilometerReadyCondition, condition.InitReason, OpenStackControlPlaneCeilometerReadyInitMessage),
condition.UnknownCondition(OpenStackControlPlaneTelemetryReadyCondition, condition.InitReason, OpenStackControlPlaneTelemetryReadyInitMessage),
condition.UnknownCondition(OpenStackControlPlaneHeatReadyCondition, condition.InitReason, OpenStackControlPlaneHeatReadyInitMessage),
condition.UnknownCondition(OpenStackControlPlaneSwiftReadyCondition, condition.InitReason, OpenStackControlPlaneSwiftReadyInitMessage),
condition.UnknownCondition(OpenStackControlPlaneOctaviaReadyCondition, condition.InitReason, OpenStackControlPlaneOctaviaReadyInitMessage),
Expand Down
4 changes: 2 additions & 2 deletions apis/core/v1beta1/openstackcontrolplane_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ func (r *OpenStackControlPlane) DefaultServices() {
// DNS
r.Spec.DNS.Template.Default()

// Ceilometer
r.Spec.Ceilometer.Template.Default()
// Telemetry
r.Spec.Telemetry.Template.Default()

// Heat
r.Spec.Heat.Template.Default()
Expand Down
Loading