From 6c2bcfab508780836d4fd2b25bb47a7054229b36 Mon Sep 17 00:00:00 2001 From: Gabriel Saratura Date: Mon, 17 Jun 2024 16:59:28 +0200 Subject: [PATCH 1/2] Configure rbac rules for mariadb backups --- component/class/defaults.yml | 2 +- component/component/appcat_apiserver.jsonnet | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/component/class/defaults.yml b/component/class/defaults.yml index f2618b145..a673ba596 100644 --- a/component/class/defaults.yml +++ b/component/class/defaults.yml @@ -53,7 +53,7 @@ parameters: apiserver: registry: ghcr.io repository: vshn/appcat-apiserver - tag: v0.1.5 + tag: mariadb-backup functionAppcat: registry: ${appcat:images:appcat:registry} repository: ${appcat:images:appcat:repository} diff --git a/component/component/appcat_apiserver.jsonnet b/component/component/appcat_apiserver.jsonnet index 37c45c006..e7a074615 100644 --- a/component/component/appcat_apiserver.jsonnet +++ b/component/component/appcat_apiserver.jsonnet @@ -41,7 +41,7 @@ local clusterRoleView = kube.ClusterRole('appcat:api:view') { rules+: [ { apiGroups: [ 'api.appcat.vshn.io' ], - resources: [ 'vshnpostgresbackups', 'vshnredisbackups' ], + resources: [ 'vshnpostgresbackups', 'vshnredisbackups', 'vshnmariadbbackups' ], verbs: [ 'get', 'list', 'watch' ], }, ], From e546a0774a1154df94f6a1277c1603b95ea8071d Mon Sep 17 00:00:00 2001 From: Gabriel Saratura Date: Wed, 26 Jun 2024 17:34:59 +0200 Subject: [PATCH 2/2] Resolve tests --- component/class/defaults.yml | 2 +- .../appcat/appcat/apiserver/10_cluster_role_api_server.yaml | 1 + .../apiserver/appcat/appcat/apiserver/10_cluster_role_view.yaml | 1 + .../golden/apiserver/appcat/appcat/apiserver/30_deployment.yaml | 2 +- .../appcat/appcat/apiserver/10_cluster_role_api_server.yaml | 1 + .../minio/appcat/appcat/apiserver/10_cluster_role_view.yaml | 1 + .../golden/minio/appcat/appcat/apiserver/30_deployment.yaml | 2 +- .../appcat/appcat/apiserver/10_cluster_role_api_server.yaml | 1 + .../vshn/appcat/appcat/apiserver/10_cluster_role_view.yaml | 1 + .../golden/vshn/appcat/appcat/apiserver/30_deployment.yaml | 2 +- 10 files changed, 10 insertions(+), 4 deletions(-) diff --git a/component/class/defaults.yml b/component/class/defaults.yml index a673ba596..759264a2e 100644 --- a/component/class/defaults.yml +++ b/component/class/defaults.yml @@ -53,7 +53,7 @@ parameters: apiserver: registry: ghcr.io repository: vshn/appcat-apiserver - tag: mariadb-backup + tag: v0.1.6 functionAppcat: registry: ${appcat:images:appcat:registry} repository: ${appcat:images:appcat:repository} diff --git a/component/tests/golden/apiserver/appcat/appcat/apiserver/10_cluster_role_api_server.yaml b/component/tests/golden/apiserver/appcat/appcat/apiserver/10_cluster_role_api_server.yaml index 936ecdead..fa2a2a75c 100644 --- a/component/tests/golden/apiserver/appcat/appcat/apiserver/10_cluster_role_api_server.yaml +++ b/component/tests/golden/apiserver/appcat/appcat/apiserver/10_cluster_role_api_server.yaml @@ -71,6 +71,7 @@ rules: - apiGroups: - vshn.appcat.vshn.io resources: + - vshnmariadbs - vshnredis - xvshnpostgresqls verbs: diff --git a/component/tests/golden/apiserver/appcat/appcat/apiserver/10_cluster_role_view.yaml b/component/tests/golden/apiserver/appcat/appcat/apiserver/10_cluster_role_view.yaml index cbb1dfab6..102e2a04b 100644 --- a/component/tests/golden/apiserver/appcat/appcat/apiserver/10_cluster_role_view.yaml +++ b/component/tests/golden/apiserver/appcat/appcat/apiserver/10_cluster_role_view.yaml @@ -12,6 +12,7 @@ rules: resources: - vshnpostgresbackups - vshnredisbackups + - vshnmariadbbackups verbs: - get - list diff --git a/component/tests/golden/apiserver/appcat/appcat/apiserver/30_deployment.yaml b/component/tests/golden/apiserver/appcat/appcat/apiserver/30_deployment.yaml index 8fb3b3dd8..0d0e9730f 100644 --- a/component/tests/golden/apiserver/appcat/appcat/apiserver/30_deployment.yaml +++ b/component/tests/golden/apiserver/appcat/appcat/apiserver/30_deployment.yaml @@ -32,7 +32,7 @@ spec: envFrom: - configMapRef: name: apiserver-envs - image: ghcr.io/vshn/appcat-apiserver:v0.1.5 + image: ghcr.io/vshn/appcat-apiserver:v0.1.6 livenessProbe: failureThreshold: 3 httpGet: diff --git a/component/tests/golden/minio/appcat/appcat/apiserver/10_cluster_role_api_server.yaml b/component/tests/golden/minio/appcat/appcat/apiserver/10_cluster_role_api_server.yaml index 936ecdead..fa2a2a75c 100644 --- a/component/tests/golden/minio/appcat/appcat/apiserver/10_cluster_role_api_server.yaml +++ b/component/tests/golden/minio/appcat/appcat/apiserver/10_cluster_role_api_server.yaml @@ -71,6 +71,7 @@ rules: - apiGroups: - vshn.appcat.vshn.io resources: + - vshnmariadbs - vshnredis - xvshnpostgresqls verbs: diff --git a/component/tests/golden/minio/appcat/appcat/apiserver/10_cluster_role_view.yaml b/component/tests/golden/minio/appcat/appcat/apiserver/10_cluster_role_view.yaml index cbb1dfab6..102e2a04b 100644 --- a/component/tests/golden/minio/appcat/appcat/apiserver/10_cluster_role_view.yaml +++ b/component/tests/golden/minio/appcat/appcat/apiserver/10_cluster_role_view.yaml @@ -12,6 +12,7 @@ rules: resources: - vshnpostgresbackups - vshnredisbackups + - vshnmariadbbackups verbs: - get - list diff --git a/component/tests/golden/minio/appcat/appcat/apiserver/30_deployment.yaml b/component/tests/golden/minio/appcat/appcat/apiserver/30_deployment.yaml index 8fb3b3dd8..0d0e9730f 100644 --- a/component/tests/golden/minio/appcat/appcat/apiserver/30_deployment.yaml +++ b/component/tests/golden/minio/appcat/appcat/apiserver/30_deployment.yaml @@ -32,7 +32,7 @@ spec: envFrom: - configMapRef: name: apiserver-envs - image: ghcr.io/vshn/appcat-apiserver:v0.1.5 + image: ghcr.io/vshn/appcat-apiserver:v0.1.6 livenessProbe: failureThreshold: 3 httpGet: diff --git a/component/tests/golden/vshn/appcat/appcat/apiserver/10_cluster_role_api_server.yaml b/component/tests/golden/vshn/appcat/appcat/apiserver/10_cluster_role_api_server.yaml index 936ecdead..fa2a2a75c 100644 --- a/component/tests/golden/vshn/appcat/appcat/apiserver/10_cluster_role_api_server.yaml +++ b/component/tests/golden/vshn/appcat/appcat/apiserver/10_cluster_role_api_server.yaml @@ -71,6 +71,7 @@ rules: - apiGroups: - vshn.appcat.vshn.io resources: + - vshnmariadbs - vshnredis - xvshnpostgresqls verbs: diff --git a/component/tests/golden/vshn/appcat/appcat/apiserver/10_cluster_role_view.yaml b/component/tests/golden/vshn/appcat/appcat/apiserver/10_cluster_role_view.yaml index cbb1dfab6..102e2a04b 100644 --- a/component/tests/golden/vshn/appcat/appcat/apiserver/10_cluster_role_view.yaml +++ b/component/tests/golden/vshn/appcat/appcat/apiserver/10_cluster_role_view.yaml @@ -12,6 +12,7 @@ rules: resources: - vshnpostgresbackups - vshnredisbackups + - vshnmariadbbackups verbs: - get - list diff --git a/component/tests/golden/vshn/appcat/appcat/apiserver/30_deployment.yaml b/component/tests/golden/vshn/appcat/appcat/apiserver/30_deployment.yaml index d7c75eb71..077b00a1f 100644 --- a/component/tests/golden/vshn/appcat/appcat/apiserver/30_deployment.yaml +++ b/component/tests/golden/vshn/appcat/appcat/apiserver/30_deployment.yaml @@ -32,7 +32,7 @@ spec: envFrom: - configMapRef: name: apiserver-envs - image: ghcr.io/vshn/appcat-apiserver:v0.1.5 + image: ghcr.io/vshn/appcat-apiserver:v0.1.6 livenessProbe: failureThreshold: 3 httpGet: