diff --git a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml index 95a6915ed..d4dfc17a1 100644 --- a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -50,6 +50,8 @@ spec: properties: centralImage: type: string + computeImage: + type: string customServiceConfig: default: '# add your customization here' type: string @@ -57,12 +59,14 @@ spec: additionalProperties: type: string type: object - initImage: + ipmiImage: type: string networkAttachmentDefinitions: items: type: string type: array + nodeExporterImage: + type: string notificationImage: type: string passwordSelector: @@ -85,7 +89,9 @@ spec: type: string required: - centralImage - - initImage + - computeImage + - ipmiImage + - nodeExporterImage - notificationImage - secret - sgCoreImage diff --git a/apis/core/v1beta1/openstackcontrolplane_types.go b/apis/core/v1beta1/openstackcontrolplane_types.go index fafbd3e8e..79d8d935d 100644 --- a/apis/core/v1beta1/openstackcontrolplane_types.go +++ b/apis/core/v1beta1/openstackcontrolplane_types.go @@ -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 diff --git a/apis/go.mod b/apis/go.mod index e96c256db..5b1270f69 100644 --- a/apis/go.mod +++ b/apis/go.mod @@ -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 diff --git a/apis/go.sum b/apis/go.sum index 4c1ce40cd..f60082cc2 100644 --- a/apis/go.sum +++ b/apis/go.sum @@ -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= diff --git a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml index 95a6915ed..d4dfc17a1 100644 --- a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -50,6 +50,8 @@ spec: properties: centralImage: type: string + computeImage: + type: string customServiceConfig: default: '# add your customization here' type: string @@ -57,12 +59,14 @@ spec: additionalProperties: type: string type: object - initImage: + ipmiImage: type: string networkAttachmentDefinitions: items: type: string type: array + nodeExporterImage: + type: string notificationImage: type: string passwordSelector: @@ -85,7 +89,9 @@ spec: type: string required: - centralImage - - initImage + - computeImage + - ipmiImage + - nodeExporterImage - notificationImage - secret - sgCoreImage diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index cc92d9754..5ef234de7 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -366,7 +366,7 @@ rules: - apiGroups: - telemetry.openstack.org resources: - - ceilometercentrals + - ceilometers verbs: - create - delete diff --git a/controllers/core/openstackcontrolplane_controller.go b/controllers/core/openstackcontrolplane_controller.go index 8bf480e18..b9779c5d2 100644 --- a/controllers/core/openstackcontrolplane_controller.go +++ b/controllers/core/openstackcontrolplane_controller.go @@ -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 @@ -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) } diff --git a/go.mod b/go.mod index efc9381ab..b0f619f98 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index b3683a927..f4046aa54 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/main.go b/main.go index 67742cebc..1efc00111 100644 --- a/main.go +++ b/main.go @@ -271,7 +271,7 @@ func setupServiceOperatorDefaults() { networkv1.SetupDefaults() // Ceilometer - telemetryv1.SetupDefaultsCeilometerCentral() + telemetryv1.SetupDefaultsCeilometer() // Swift swiftv1.SetupDefaults() diff --git a/pkg/openstack/ceilometer.go b/pkg/openstack/ceilometer.go index cddecc541..aec858666 100644 --- a/pkg/openstack/ceilometer.go +++ b/pkg/openstack/ceilometer.go @@ -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,