Skip to content

Commit

Permalink
CeilometerCentral api has been renamed to Ceilometer api
Browse files Browse the repository at this point in the history
  • Loading branch information
jlarriba committed Sep 14, 2023
1 parent 2dd4317 commit 6cd3030
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 19 deletions.
10 changes: 8 additions & 2 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,23 @@ spec:
properties:
centralImage:
type: string
computeImage:
type: string
customServiceConfig:
default: '# add your customization here'
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
initImage:
ipmiImage:
type: string
networkAttachmentDefinitions:
items:
type: string
type: array
nodeExporterImage:
type: string
notificationImage:
type: string
passwordSelector:
Expand All @@ -85,7 +89,9 @@ spec:
type: string
required:
- centralImage
- initImage
- computeImage
- ipmiImage
- nodeExporterImage
- notificationImage
- secret
- sgCoreImage
Expand Down
2 changes: 1 addition & 1 deletion apis/core/v1beta1/openstackcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ type CeilometerSection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating the OpenStack Ceilometer service
Template telemetryv1.CeilometerCentralSpec `json:"template,omitempty"`
Template telemetryv1.CeilometerSpec `json:"template,omitempty"`
}

// SwiftSection defines the desired state of Swift service
Expand Down
2 changes: 1 addition & 1 deletion apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/openstack-k8s-operators/ovn-operator/api v0.1.1-0.20230901153030-8877485cf437
github.com/openstack-k8s-operators/placement-operator/api v0.1.1-0.20230911081408-0f9d8374b397
github.com/openstack-k8s-operators/swift-operator/api v0.1.1-0.20230906065118-40fc718651fe
github.com/openstack-k8s-operators/telemetry-operator/api v0.1.1-0.20230911082723-1c3d089bf52e
github.com/openstack-k8s-operators/telemetry-operator/api v0.1.1-0.20230914155337-2540bab64b80
github.com/rabbitmq/cluster-operator v1.14.0
k8s.io/apimachinery v0.26.8
sigs.k8s.io/controller-runtime v0.14.6
Expand Down
4 changes: 2 additions & 2 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ github.com/openstack-k8s-operators/placement-operator/api v0.1.1-0.2023091108140
github.com/openstack-k8s-operators/placement-operator/api v0.1.1-0.20230911081408-0f9d8374b397/go.mod h1:gsI+bvX70Y7NXZtAL36V18qufVO0xYW6Z2rbEKL5Nqo=
github.com/openstack-k8s-operators/swift-operator/api v0.1.1-0.20230906065118-40fc718651fe h1:O/uTEQXJdBepFjg6GDWytc3Henlrifi8WaNs1bad8gs=
github.com/openstack-k8s-operators/swift-operator/api v0.1.1-0.20230906065118-40fc718651fe/go.mod h1:HrDnaSOYvnqZITCiUI5r+6W2q+m4zify9X8d+P0Q9RE=
github.com/openstack-k8s-operators/telemetry-operator/api v0.1.1-0.20230911082723-1c3d089bf52e h1:l7xSWhrkwQu8nlAFhbydJEZBxEt5U2BPTUzZMJSXmYc=
github.com/openstack-k8s-operators/telemetry-operator/api v0.1.1-0.20230911082723-1c3d089bf52e/go.mod h1:nYAEI/2u2DzXtZoMBIRkogHPpjskwrfJAJ/+XeIcosc=
github.com/openstack-k8s-operators/telemetry-operator/api v0.1.1-0.20230914155337-2540bab64b80 h1:XaOUvjDKOfRO0h99Du/sSbzYT6W5g0cc+2JOiopTAEs=
github.com/openstack-k8s-operators/telemetry-operator/api v0.1.1-0.20230914155337-2540bab64b80/go.mod h1:nYAEI/2u2DzXtZoMBIRkogHPpjskwrfJAJ/+XeIcosc=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
10 changes: 8 additions & 2 deletions config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,23 @@ spec:
properties:
centralImage:
type: string
computeImage:
type: string
customServiceConfig:
default: '# add your customization here'
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
initImage:
ipmiImage:
type: string
networkAttachmentDefinitions:
items:
type: string
type: array
nodeExporterImage:
type: string
notificationImage:
type: string
passwordSelector:
Expand All @@ -85,7 +89,9 @@ spec:
type: string
required:
- centralImage
- initImage
- computeImage
- ipmiImage
- nodeExporterImage
- notificationImage
- secret
- sgCoreImage
Expand Down
2 changes: 1 addition & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ rules:
- apiGroups:
- telemetry.openstack.org
resources:
- ceilometercentrals
- ceilometers
verbs:
- create
- delete
Expand Down
4 changes: 2 additions & 2 deletions controllers/core/openstackcontrolplane_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type OpenStackControlPlaneReconciler struct {
//+kubebuilder:rbac:groups=ovn.openstack.org,resources=ovncontrollers,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=rabbitmq.com,resources=rabbitmqclusters,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=network.openstack.org,resources=dnsmasqs,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=telemetry.openstack.org,resources=ceilometercentrals,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=telemetry.openstack.org,resources=ceilometers,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=swift.openstack.org,resources=swifts,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=octavia.openstack.org,resources=octavias,verbs=get;list;watch;create;update;patch;delete

Expand Down Expand Up @@ -323,7 +323,7 @@ func (r *OpenStackControlPlaneReconciler) SetupWithManager(mgr ctrl.Manager) err
Owns(&heatv1.Heat{}).
Owns(&ironicv1.Ironic{}).
Owns(&horizonv1.Horizon{}).
Owns(&telemetryv1.CeilometerCentral{}).
Owns(&telemetryv1.Ceilometer{}).
Owns(&octaviav1.Octavia{}).
Complete(r)
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ require (
github.com/openstack-k8s-operators/ovn-operator/api v0.1.1-0.20230901153030-8877485cf437
github.com/openstack-k8s-operators/placement-operator/api v0.1.1-0.20230911081408-0f9d8374b397
github.com/openstack-k8s-operators/swift-operator/api v0.1.1-0.20230906065118-40fc718651fe
github.com/openstack-k8s-operators/telemetry-operator/api v0.1.1-0.20230911082723-1c3d089bf52e
github.com/openstack-k8s-operators/telemetry-operator/api v0.1.1-0.20230914155337-2540bab64b80
github.com/operator-framework/api v0.17.3
github.com/rabbitmq/cluster-operator v1.14.0
go.uber.org/zap v1.25.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ github.com/openstack-k8s-operators/placement-operator/api v0.1.1-0.2023091108140
github.com/openstack-k8s-operators/placement-operator/api v0.1.1-0.20230911081408-0f9d8374b397/go.mod h1:gsI+bvX70Y7NXZtAL36V18qufVO0xYW6Z2rbEKL5Nqo=
github.com/openstack-k8s-operators/swift-operator/api v0.1.1-0.20230906065118-40fc718651fe h1:O/uTEQXJdBepFjg6GDWytc3Henlrifi8WaNs1bad8gs=
github.com/openstack-k8s-operators/swift-operator/api v0.1.1-0.20230906065118-40fc718651fe/go.mod h1:HrDnaSOYvnqZITCiUI5r+6W2q+m4zify9X8d+P0Q9RE=
github.com/openstack-k8s-operators/telemetry-operator/api v0.1.1-0.20230911082723-1c3d089bf52e h1:l7xSWhrkwQu8nlAFhbydJEZBxEt5U2BPTUzZMJSXmYc=
github.com/openstack-k8s-operators/telemetry-operator/api v0.1.1-0.20230911082723-1c3d089bf52e/go.mod h1:nYAEI/2u2DzXtZoMBIRkogHPpjskwrfJAJ/+XeIcosc=
github.com/openstack-k8s-operators/telemetry-operator/api v0.1.1-0.20230914155337-2540bab64b80 h1:XaOUvjDKOfRO0h99Du/sSbzYT6W5g0cc+2JOiopTAEs=
github.com/openstack-k8s-operators/telemetry-operator/api v0.1.1-0.20230914155337-2540bab64b80/go.mod h1:nYAEI/2u2DzXtZoMBIRkogHPpjskwrfJAJ/+XeIcosc=
github.com/operator-framework/api v0.17.3 h1:wddE1SLKTNiIzwt28DbBIO+vPG2GOV6dkB9xBkDfT3o=
github.com/operator-framework/api v0.17.3/go.mod h1:34tb98EwTN5SZLkgoxwvRkhMJKLHUWHOrrcv1ZwvEeA=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func setupServiceOperatorDefaults() {
networkv1.SetupDefaults()

// Ceilometer
telemetryv1.SetupDefaultsCeilometerCentral()
telemetryv1.SetupDefaultsCeilometer()

// Swift
swiftv1.SetupDefaults()
Expand Down
8 changes: 4 additions & 4 deletions pkg/openstack/ceilometer.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import (
)

const (
ceilometerNamespaceLabel = "CeilometerCentral.Namespace"
ceilometerNameLabel = "CeilometerCentral.Name"
ceilometerName = "ceilometercentral"
ceilometerNamespaceLabel = "Ceilometer.Namespace"
ceilometerNameLabel = "Ceilometer.Name"
ceilometerName = "ceilometer"
)

// ReconcileCeilometer ...
func ReconcileCeilometer(ctx context.Context, instance *corev1beta1.OpenStackControlPlane, helper *helper.Helper) (ctrl.Result, error) {
ceilometer := &telemetryv1.CeilometerCentral{
ceilometer := &telemetryv1.Ceilometer{
ObjectMeta: metav1.ObjectMeta{
Name: ceilometerName,
Namespace: instance.Namespace,
Expand Down

0 comments on commit 6cd3030

Please sign in to comment.