Skip to content

Commit 139d492

Browse files
authored
chore(addons): change clusterrolebinding to rolebinding and clustrrole to role ,delete no use files
1 parent 91f8c99 commit 139d492

12 files changed

Lines changed: 75 additions & 31 deletions

File tree

addons/index.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ entries:
5454
pmm:
5555
- version: 2.41
5656
description: "Percona Monitoring and Management: an open source database monitoring, observability and management tool ."
57+
mongodb:
58+
- version: 7.0
59+
description: "MongoDB is a document database designed for ease of application development and scaling."

addons/mysql-cluster/8.0/plans/standard-1c2g10/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ primary:
1616
resources:
1717
limits:
1818
cpu: 1000m
19-
memory: 4Gi
19+
memory: 2Gi
2020
requests:
2121
cpu: 1000m
22-
memory: 4Gi
22+
memory: 2Gi
2323

2424

2525
## @section Persistence parameters
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"type": "object",
4+
"properties": {
5+
"imagePullPolicy": {
6+
"type": "string",
7+
"enum": ["Always", "IfNotPresent", "Never"],
8+
"default": "IfNotPresent",
9+
"title": "Image pull policy"
10+
}
11+
}
12+
}
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
{{- if .Values.serviceAccount.create -}}
22
apiVersion: rbac.authorization.k8s.io/v1
3-
kind: ClusterRole
3+
kind: Role
44
metadata:
5+
namespace: {{ include "common.names.namespace" . | quote }}
56
name: {{ include "pmm.fullname" . }}
67
labels:
78
{{- include "pmm.labels" . | nindent 4 }}
89
rules:
910
# standard RBAC
1011
- apiGroups: [""] # "" indicates the core API group
1112
resources:
12-
- namespaces
13+
# - namespaces
1314
- endpoints
1415
- services
15-
- nodes
16+
# - nodes
1617
- pods
1718
- secrets
1819
- serviceaccounts
1920
verbs:
2021
- get
2122
- watch
2223
- list
23-
- nonResourceURLs:
24-
- /metrics
25-
- /metrics/resources
26-
verbs:
27-
- get
24+
# - nonResourceURLs:
25+
# - /metrics
26+
# - /metrics/resources
27+
# verbs:
28+
# - get
2829
{{- end }}

addons/pmm/2.41/chart/pmm/templates/clusterrolebinding.yaml renamed to addons/pmm/2.41/chart/pmm/templates/rolebinding.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
{{- if .Values.serviceAccount.create -}}
22
{{- if .Values.pmmEnv.ENABLE_CLUSTER_ROLE_ADMIN -}}
33
apiVersion: rbac.authorization.k8s.io/v1
4-
kind: ClusterRoleBinding
4+
kind: RoleBinding
55
metadata:
6+
namespace: {{ include "common.names.namespace" . | quote }}
67
name: {{ include "pmm.fullname" . }}
78
roleRef:
89
apiGroup: rbac.authorization.k8s.io
9-
kind: ClusterRole
10+
kind: Role
1011
name: cluster-admin
1112
subjects:
1213
- kind: ServiceAccount
1314
name: {{ include "pmm.serviceAccountName" . }}
1415
namespace: {{ .Release.Namespace }}
1516
{{- else }}
1617
apiVersion: rbac.authorization.k8s.io/v1
17-
kind: ClusterRoleBinding
18+
kind: RoleBinding
1819
metadata:
1920
name: {{ include "pmm.fullname" . }}
2021
roleRef:
2122
apiGroup: rbac.authorization.k8s.io
22-
kind: ClusterRole
23+
kind: Role
2324
name: {{ include "pmm.fullname" . }}
2425
subjects:
2526
- kind: ServiceAccount
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"type": "object",
4+
"properties": {
5+
"imagePullPolicy": {
6+
"type": "string",
7+
"enum": ["Always", "IfNotPresent", "Never"],
8+
"default": "IfNotPresent",
9+
"title": "Image pull policy"
10+
}
11+
}
12+
}

addons/postgresql-cluster/15/chart/postgresql-cluster/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,6 @@ You can modify multiple content at once, there is no need to modify part of it e
161161
- Destroy service
162162
```
163163
# drycc resources:destroy `my_pg_001`
164-
```
164+
```
165+
# 修改pg在容器中分配的动态共享内存不足的问题
166+
https://www.cnblogs.com/daniel-hutao/p/17903993.html

addons/prometheus/2/chart/prometheus/templates/_scrape_config.tpl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ kubernetes_sd_configs:
9494
own_namespace: true
9595
names:
9696
- {{ include "common.names.namespace" .context }}
97-
{{- range .value }}
98-
- {{ include "common.tplvalues.render" (dict "value" . "context" $) }}
99-
{{- end }}
10097

10198
relabel_configs:
10299
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]

addons/prometheus/2/chart/prometheus/templates/server/clusterrole.yaml renamed to addons/prometheus/2/chart/prometheus/templates/server/role.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ SPDX-License-Identifier: APACHE-2.0
44
*/}}
55

66
{{- if .Values.server.rbac.create }}
7-
kind: ClusterRole
7+
kind: Role
88
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
99
metadata:
10+
namespace: {{ include "common.names.namespace" . | quote }}
1011
name: {{ include "prometheus.server.fullname.namespace" . }}
1112
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
1213
app.kubernetes.io/part-of: prometheus
@@ -19,14 +20,9 @@ rules:
1920
- apiGroups:
2021
- ""
2122
resources:
22-
- nodes
23-
- nodes/proxy
24-
- nodes/metrics
2523
- services
2624
- endpoints
2725
- pods
28-
- ingresses
29-
- configmaps
3026
verbs:
3127
- get
3228
- list
@@ -41,8 +37,7 @@ rules:
4137
- get
4238
- list
4339
- watch
44-
- nonResourceURLs:
45-
- "/metrics"
40+
4641
verbs:
4742
- get
4843
{{- if .Values.server.rbac.rules }}

addons/prometheus/2/chart/prometheus/templates/server/clusterrolebinding.yaml renamed to addons/prometheus/2/chart/prometheus/templates/server/rolebinding.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ Copyright Drycc Community.
33
SPDX-License-Identifier: APACHE-2.0
44
*/}}
55

6-
kind: ClusterRoleBinding
6+
kind: RoleBinding
77
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
88
metadata:
9+
namespace: {{ include "common.names.namespace" . | quote }}
910
name: {{ template "prometheus.server.fullname.namespace" . }}
1011
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
1112
app.kubernetes.io/part-of: prometheus
@@ -15,7 +16,7 @@ metadata:
1516
{{- end }}
1617
roleRef:
1718
apiGroup: rbac.authorization.k8s.io
18-
kind: ClusterRole
19+
kind: Role
1920
name: {{ template "prometheus.server.fullname.namespace" . }}
2021
subjects:
2122
- kind: ServiceAccount

0 commit comments

Comments
 (0)