From b7375f730f3870eb3a8fa4f671c0060100dd959a Mon Sep 17 00:00:00 2001 From: klinch0 <68821526+klinch0@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:35:10 +0300 Subject: [PATCH] add services to dashboard (#482) ## Summary by CodeRabbit - **New Features** - Introduced new Kubernetes Roles for managing access control to dashboard resources in the Redis, Kafka, and NATS applications. - **Version Updates** - Updated Redis application version from `0.3.0` to `0.3.1`. - Updated ClickHouse application version from `0.6.0` to `0.6.1`. - Updated Kafka application version from `0.3.0` to `0.3.1`. - Updated NATS application version from `0.3.0` to `0.3.1`. - Revised versioning for multiple packages, indicating specific commit references. --- packages/apps/clickhouse/Chart.yaml | 2 +- .../templates/dashboard-resourcemap.yaml | 2 +- packages/apps/kafka/Chart.yaml | 2 +- .../templates/dashboard-resourcemap.yaml | 19 +++++++++++++++++++ packages/apps/nats/Chart.yaml | 2 +- packages/apps/nats/templates/nats.yaml | 2 +- packages/apps/nats/templates/resourcemap.yaml | 7 +++++++ packages/apps/redis/Chart.yaml | 2 +- .../templates/dashboard-resourcemap.yaml | 15 +++++++++++++++ packages/apps/versions_map | 12 ++++++++---- 10 files changed, 55 insertions(+), 10 deletions(-) create mode 100644 packages/apps/kafka/templates/dashboard-resourcemap.yaml create mode 100644 packages/apps/redis/templates/dashboard-resourcemap.yaml diff --git a/packages/apps/clickhouse/Chart.yaml b/packages/apps/clickhouse/Chart.yaml index 3aa140a7a..f5b6a5284 100644 --- a/packages/apps/clickhouse/Chart.yaml +++ b/packages/apps/clickhouse/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.6.0 +version: 0.6.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/packages/apps/clickhouse/templates/dashboard-resourcemap.yaml b/packages/apps/clickhouse/templates/dashboard-resourcemap.yaml index f60409434..3c4f019bd 100644 --- a/packages/apps/clickhouse/templates/dashboard-resourcemap.yaml +++ b/packages/apps/clickhouse/templates/dashboard-resourcemap.yaml @@ -8,7 +8,7 @@ rules: resources: - services resourceNames: - - chi-clickhouse-test-clickhouse-0-0 + - chendpoint-{{ .Release.Name }} verbs: ["get", "list", "watch"] - apiGroups: - "" diff --git a/packages/apps/kafka/Chart.yaml b/packages/apps/kafka/Chart.yaml index fee99f245..ef5ef5fa6 100644 --- a/packages/apps/kafka/Chart.yaml +++ b/packages/apps/kafka/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.0 +version: 0.3.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/packages/apps/kafka/templates/dashboard-resourcemap.yaml b/packages/apps/kafka/templates/dashboard-resourcemap.yaml new file mode 100644 index 000000000..7222c152e --- /dev/null +++ b/packages/apps/kafka/templates/dashboard-resourcemap.yaml @@ -0,0 +1,19 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ .Release.Name }}-dashboard-resources +rules: +- apiGroups: + - "" + resources: + - services + resourceNames: + - {{ .Release.Name }}-kafka-bootstrap + verbs: ["get", "list", "watch"] +- apiGroups: + - "" + resources: + - secrets + resourceNames: + - {{ .Release.Name }}-clients-ca + verbs: ["get", "list", "watch"] diff --git a/packages/apps/nats/Chart.yaml b/packages/apps/nats/Chart.yaml index b64b6dde1..cbb30f92a 100644 --- a/packages/apps/nats/Chart.yaml +++ b/packages/apps/nats/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.0 +version: 0.3.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/packages/apps/nats/templates/nats.yaml b/packages/apps/nats/templates/nats.yaml index 24731cc00..8a08ba3b4 100644 --- a/packages/apps/nats/templates/nats.yaml +++ b/packages/apps/nats/templates/nats.yaml @@ -40,7 +40,7 @@ spec: nats: fullnameOverride: {{ .Release.Name }} config: - {{- if gt (len .Values.passwords) 0 }} + {{- if gt (len $passwords) 0 }} merge: accounts: A: diff --git a/packages/apps/nats/templates/resourcemap.yaml b/packages/apps/nats/templates/resourcemap.yaml index c7c86d811..a91a54ac4 100644 --- a/packages/apps/nats/templates/resourcemap.yaml +++ b/packages/apps/nats/templates/resourcemap.yaml @@ -3,6 +3,13 @@ kind: Role metadata: name: {{ .Release.Name }}-dashboard-resources rules: +- apiGroups: + - "" + resources: + - services + resourceNames: + - {{ .Release.Name }} + verbs: ["get", "list", "watch"] - apiGroups: - "" resources: diff --git a/packages/apps/redis/Chart.yaml b/packages/apps/redis/Chart.yaml index 1b3242781..e02eb3d06 100644 --- a/packages/apps/redis/Chart.yaml +++ b/packages/apps/redis/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.0 +version: 0.3.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/packages/apps/redis/templates/dashboard-resourcemap.yaml b/packages/apps/redis/templates/dashboard-resourcemap.yaml new file mode 100644 index 000000000..a0c43508d --- /dev/null +++ b/packages/apps/redis/templates/dashboard-resourcemap.yaml @@ -0,0 +1,15 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ .Release.Name }}-dashboard-resources +rules: +- apiGroups: + - "" + resources: + - services + resourceNames: + - rfs-{{ .Release.Name }} + - rfrm-{{ .Release.Name }} + - rfrs-{{ .Release.Name }} + - "{{ .Release.Name }}-external-lb" + verbs: ["get", "list", "watch"] diff --git a/packages/apps/versions_map b/packages/apps/versions_map index e64027d17..0828366e4 100644 --- a/packages/apps/versions_map +++ b/packages/apps/versions_map @@ -5,7 +5,8 @@ clickhouse 0.2.1 5ca8823 clickhouse 0.3.0 b00621e clickhouse 0.4.0 320fc32 clickhouse 0.5.0 2a4768a5 -clickhouse 0.6.0 HEAD +clickhouse 0.6.0 18bbdb67 +clickhouse 0.6.1 HEAD ferretdb 0.1.0 4ffa8615 ferretdb 0.1.1 5ca8823 ferretdb 0.2.0 adaf603 @@ -21,7 +22,8 @@ kafka 0.2.0 a2cc83d kafka 0.2.1 3ac17018 kafka 0.2.2 d0758692 kafka 0.2.3 5ca8823 -kafka 0.3.0 HEAD +kafka 0.3.0 c07c4bbd +kafka 0.3.1 HEAD kubernetes 0.1.0 f642698 kubernetes 0.2.0 7cd7de73 kubernetes 0.3.0 7caccec1 @@ -49,7 +51,8 @@ mysql 0.5.1 fab5940b mysql 0.5.2 HEAD nats 0.1.0 5ca8823 nats 0.2.0 c07c4bbd -nats 0.3.0 HEAD +nats 0.3.0 78366f19 +nats 0.3.1 HEAD postgres 0.1.0 f642698 postgres 0.2.0 7cd7de73 postgres 0.2.1 4a97e297 @@ -70,7 +73,8 @@ rabbitmq 0.4.2 00b2834e rabbitmq 0.4.3 HEAD redis 0.1.1 f642698 redis 0.2.0 5ca8823 -redis 0.3.0 HEAD +redis 0.3.0 c07c4bbd +redis 0.3.1 HEAD tcp-balancer 0.1.0 f642698 tcp-balancer 0.2.0 HEAD tenant 0.1.3 3d1b86c