From 1636a6bfb033c8cfa728c73f33ef9a7e7f27ee38 Mon Sep 17 00:00:00 2001 From: Brent Eagles Date: Thu, 22 Feb 2024 13:58:19 +0000 Subject: [PATCH] Update octavia operator CI The octavia operator needed a few updates to set a solid CI baseline. --- config/rbac/role.yaml | 18 ++++++++++++++++++ controllers/octavia_controller.go | 2 ++ .../kuttl/common/assert_sample_deployment.yaml | 6 ++---- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 7a8e4ebb..119ac61e 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -139,6 +139,24 @@ rules: - patch - update - watch +- apiGroups: + - mariadb.openstack.org + resources: + - mariadbaccounts + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - mariadb.openstack.org + resources: + - mariadbaccounts/finalizers + verbs: + - update - apiGroups: - mariadb.openstack.org resources: diff --git a/controllers/octavia_controller.go b/controllers/octavia_controller.go index b3e3a864..073cde9f 100644 --- a/controllers/octavia_controller.go +++ b/controllers/octavia_controller.go @@ -78,6 +78,8 @@ func (r *OctaviaReconciler) GetLogger(ctx context.Context) logr.Logger { // +kubebuilder:rbac:groups=apps,resources=daemonsets,verbs=get;list;watch;create;update;patch;delete; // +kubebuilder:rbac:groups=route.openshift.io,resources=routes,verbs=get;list;watch;create;update;patch;delete; // +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbdatabases,verbs=get;list;watch;create;update;patch;delete; +// +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbaccounts,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbaccounts/finalizers,verbs=update // +kubebuilder:rbac:groups=keystone.openstack.org,resources=keystoneapis,verbs=get;list;watch; // +kubebuilder:rbac:groups=keystone.openstack.org,resources=keystoneservices,verbs=get;list;watch;create;update;patch;delete; // +kubebuilder:rbac:groups=keystone.openstack.org,resources=keystoneendpoints,verbs=get;list;watch;create;update;patch;delete; diff --git a/tests/kuttl/common/assert_sample_deployment.yaml b/tests/kuttl/common/assert_sample_deployment.yaml index ccebc80a..a04e3300 100644 --- a/tests/kuttl/common/assert_sample_deployment.yaml +++ b/tests/kuttl/common/assert_sample_deployment.yaml @@ -10,8 +10,6 @@ apiVersion: octavia.openstack.org/v1beta1 kind: Octavia metadata: - finalizers: - - Octavia name: octavia spec: customServiceConfig: | @@ -72,7 +70,7 @@ spec: secret: osp-secret serviceUser: octavia status: - databaseHostname: openstack + databaseHostname: openstack.octavia-kuttl-tests.svc apireadyCount: 1 --- apiVersion: apps/v1 @@ -174,7 +172,7 @@ spec: key: transport_url name: rabbitmq-transport-url-octavia-octavia-transport - name: DatabaseHost - value: openstack + value: openstack.octavia-kuttl-tests.svc - name: DatabaseName value: octavia - name: DatabaseUser