Skip to content

Commit

Permalink
Merge pull request openstack-k8s-operators#574 from paramite/telemetr…
Browse files Browse the repository at this point in the history
…y-flattening

Flatten telemetry resources
  • Loading branch information
openshift-merge-bot[bot] authored Dec 7, 2023
2 parents 12c57ba + c819e02 commit 1773f49
Show file tree
Hide file tree
Showing 24 changed files with 721 additions and 326 deletions.
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

0 comments on commit 1773f49

Please sign in to comment.