Skip to content

Commit

Permalink
Flatten telemetry resources
Browse files Browse the repository at this point in the history
This patch replaces Ceilometer resource with Telemetry resouse to avoid adding
Autoscaling resource. The Telemetry resource is deploying both Ceilometer
and Autoscaling resources and will deploy also Logging resource in future.
  • Loading branch information
paramite committed Nov 29, 2023
1 parent b296006 commit 0e48086
Show file tree
Hide file tree
Showing 22 changed files with 665 additions and 168 deletions.
2 changes: 1 addition & 1 deletion apis/bases/client.openstack.org_openstackclients.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: openstackclients.client.openstack.org
spec:
Expand Down
207 changes: 206 additions & 1 deletion apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: openstackcontrolplanes.core.openstack.org
spec:
Expand Down Expand Up @@ -15200,6 +15200,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
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
required:
- autoscaling
- ceilometer
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
34 changes: 17 additions & 17 deletions apis/core/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: openstackclients.client.openstack.org
spec:
Expand Down
Loading

0 comments on commit 0e48086

Please sign in to comment.