Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/apps/clickhouse/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rules:
resources:
- services
resourceNames:
- chi-clickhouse-test-clickhouse-0-0
- chendpoint-{{ .Release.Name }}
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/kafka/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions packages/apps/kafka/templates/dashboard-resourcemap.yaml
Original file line number Diff line number Diff line change
@@ -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"]
2 changes: 1 addition & 1 deletion packages/apps/nats/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/nats/templates/nats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
nats:
fullnameOverride: {{ .Release.Name }}
config:
{{- if gt (len .Values.passwords) 0 }}
{{- if gt (len $passwords) 0 }}
merge:
accounts:
A:
Expand Down
7 changes: 7 additions & 0 deletions packages/apps/nats/templates/resourcemap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/redis/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions packages/apps/redis/templates/dashboard-resourcemap.yaml
Original file line number Diff line number Diff line change
@@ -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"
Comment on lines +10 to +14

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Services referenced in Role may be missing from the cluster configuration

Based on the verification results:

  • Only the {{ .Release.Name }}-external-lb service is defined in the templates
  • The services with prefixes rfs-, rfrm-, and rfrs- are not found in any service definitions within the Redis app templates
  • These missing services are only referenced in the dashboard resource map

This suggests that the Role is trying to grant access to services that don't exist in the current configuration, which could lead to RBAC issues.

🔗 Analysis chain

Verify the existence of referenced services.

Let's ensure that all the services referenced in the Role actually exist in the cluster configuration.


Let me gather more information to check for potential StatefulSet or other resources that might be creating these services.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for service definitions in the repository
# Expected: Find template definitions for all services referenced in the Role

echo "Searching for service definitions..."
rg -t yaml --glob 'packages/apps/redis/**/*.yaml' -A 5 'kind:\s+Service'

echo "Searching for specific service names..."
for prefix in "rfs-" "rfrm-" "rfrs-" "-external-lb"; do
  echo "Looking for services with prefix: $prefix"
  rg -t yaml --glob 'packages/apps/redis/**/*.yaml' "name:\s+.*${prefix}"
done

Length of output: 2096


Script:

#!/bin/bash
# Search for StatefulSet and other potential resources that might be creating these services
echo "Searching for StatefulSet definitions..."
rg -t yaml --glob 'packages/apps/redis/**/*.yaml' -A 10 'kind:\s+StatefulSet'

echo "Searching for any references to the service prefixes in other resources..."
rg -t yaml --glob 'packages/apps/redis/**/*.yaml' 'rfs-|rfrm-|rfrs-'

Length of output: 657

verbs: ["get", "list", "watch"]
12 changes: 8 additions & 4 deletions packages/apps/versions_map
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down