Skip to content

Commit d56c3ae

Browse files
Merge pull request #300 from gibizer/cleanup-golangci-lint
Cleanup golangci-lint
2 parents 18efcbf + 5d7a745 commit d56c3ae

File tree

7 files changed

+48
-57
lines changed

7 files changed

+48
-57
lines changed

.github/workflows/golangci-lint.yaml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.golangci.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
linters:
2+
# Enable specific linter
3+
# https://golangci-lint.run/usage/linters/#enabled-by-default
4+
enable:
5+
- errorlint
6+
- revive
7+
- ginkgolinter
8+
- gofmt
9+
- govet
10+
run:
11+
timeout: 5m

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ repos:
5757
entry: bashate --error . --ignore=E006,E040,E011,E020,E012
5858

5959
- repo: https://github.com/golangci/golangci-lint
60-
rev: v1.52.2
60+
rev: v1.55.2
6161
hooks:
6262
- id: golangci-lint
6363
args: ["-v"]

config/rbac/role.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,24 @@ rules:
150150
- patch
151151
- update
152152
- watch
153+
- apiGroups:
154+
- mariadb.openstack.org
155+
resources:
156+
- mariadbaccounts
157+
verbs:
158+
- create
159+
- delete
160+
- get
161+
- list
162+
- patch
163+
- update
164+
- watch
165+
- apiGroups:
166+
- mariadb.openstack.org
167+
resources:
168+
- mariadbaccounts/finalizers
169+
verbs:
170+
- update
153171
- apiGroups:
154172
- mariadb.openstack.org
155173
resources:
@@ -162,6 +180,12 @@ rules:
162180
- patch
163181
- update
164182
- watch
183+
- apiGroups:
184+
- mariadb.openstack.org
185+
resources:
186+
- mariadbdatabases/finalizers
187+
verbs:
188+
- update
165189
- apiGroups:
166190
- memcached.openstack.org
167191
resources:

controllers/aodh_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (r *AutoscalingReconciler) reconcileDeleteAodh(
5151
Log.Info("Reconciling Service Aodh delete")
5252

5353
// remove db finalizer first
54-
db, err := mariadbv1.GetDatabaseByName(ctx, helper, autoscaling.ServiceName)
54+
db, err := mariadbv1.GetDatabaseByName(ctx, helper, autoscaling.DatabaseName)
5555
if err != nil && !k8s_errors.IsNotFound(err) {
5656
return ctrl.Result{}, err
5757
}

controllers/autoscaling_controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ func (r *AutoscalingReconciler) GetLogger(ctx context.Context) logr.Logger {
8585
// +kubebuilder:rbac:groups=keystone.openstack.org,resources=keystoneendpoints,verbs=get;list;watch;create;update;patch;delete;
8686
// +kubebuilder:rbac:groups=rabbitmq.openstack.org,resources=transporturls,verbs=get;list;watch;create;update;patch;delete
8787
// +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbdatabases,verbs=get;list;watch;create;update;patch;delete
88+
// +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbdatabases/finalizers,verbs=update
89+
// +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbaccounts,verbs=get;list;watch;create;update;patch;delete
90+
// +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbaccounts/finalizers,verbs=update
8891
// +kubebuilder:rbac:groups=memcached.openstack.org,resources=memcacheds,verbs=get;list;watch;
8992
// +kubebuilder:rbac:groups=heat.openstack.org,resources=heats,verbs=get;list;watch;
9093
// service account, role, rolebinding
@@ -726,6 +729,7 @@ func (r *AutoscalingReconciler) SetupWithManager(ctx context.Context, mgr ctrl.M
726729
Owns(&keystonev1.KeystoneService{}).
727730
Owns(&keystonev1.KeystoneEndpoint{}).
728731
Owns(&mariadbv1.MariaDBDatabase{}).
732+
Owns(&mariadbv1.MariaDBAccount{}).
729733
Owns(&rabbitmqv1.TransportURL{}).
730734
Owns(&rbacv1.Role{}).
731735
Owns(&rbacv1.RoleBinding{}).

tests/kuttl/suites/default/tests/01-deploy.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ spec:
66
metricStorage:
77
enabled: true
88
monitoringStack:
9+
alertingEnabled: true
10+
scrapeInterval: 30s
11+
storage:
12+
strategy: persistent
13+
retention: 24h
14+
persistent:
15+
pvcStorageRequest: 20G
916
autoscaling:
1017
enabled: true
1118
aodh:

0 commit comments

Comments
 (0)