This is an automated email from the ASF dual-hosted git repository.

zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git


The following commit(s) were added to refs/heads/master by this push:
     new 764ad372 [charts] Improve the automatic creation of rook scripts to 
create new rookfs csi
764ad372 is described below

commit 764ad3729ff37783007f549bcdd27b7ab9fda665
Author: mfordjody <[email protected]>
AuthorDate: Fri Apr 11 08:43:48 2025 +0800

    [charts] Improve the automatic creation of rook scripts to create new 
rookfs csi
---
 .../kube-prometheus/charts/grafana/Chart.yaml      | 15 ++++++++
 manifests/charts/admin/values.yaml                 |  2 +-
 manifests/charts/base/templates/jobs.yaml          | 40 +++++++++++++++++++++-
 .../register-discovery/zookeeper/values.yaml       |  2 +-
 4 files changed, 56 insertions(+), 3 deletions(-)

diff --git 
a/manifests/charts/admin/charts/kube-prometheus/charts/grafana/Chart.yaml 
b/manifests/charts/admin/charts/kube-prometheus/charts/grafana/Chart.yaml
index f19407b0..df194e12 100644
--- a/manifests/charts/admin/charts/kube-prometheus/charts/grafana/Chart.yaml
+++ b/manifests/charts/admin/charts/kube-prometheus/charts/grafana/Chart.yaml
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 annotations:
   artifacthub.io/license: Apache-2.0
   artifacthub.io/links: |
diff --git a/manifests/charts/admin/values.yaml 
b/manifests/charts/admin/values.yaml
index addfbb44..07778386 100644
--- a/manifests/charts/admin/values.yaml
+++ b/manifests/charts/admin/values.yaml
@@ -58,7 +58,7 @@ _internal_default_values_not_set:
       service:
         baseURL: 
http://grafana:3000/d/b2e178fb-ada3-4d5e-9f54-de99e7f07662/service
     prometheus: http://kube-prometheus-prometheus.svc.cluster.local:9090
-    grafana: http://47.251.1.59:3000/
+    grafana: http://grafana:3000/
 
   kube-prometheus:
     enabled: false
\ No newline at end of file
diff --git a/manifests/charts/base/templates/jobs.yaml 
b/manifests/charts/base/templates/jobs.yaml
index d56db1df..cbe61379 100644
--- a/manifests/charts/base/templates/jobs.yaml
+++ b/manifests/charts/base/templates/jobs.yaml
@@ -118,6 +118,41 @@ data:
     
     kubectl apply -f crds.yaml -f common.yaml -f operator.yaml
     kubectl apply -f cluster.yaml -f toolbox.yaml -f 
dashboard-external-https.yaml
+
+    # 至少需要 1 个 osd
+    sed -i '/resources:/,/^[^ ]/ {
+      /resources:/c\
+        resources:\
+          limits:\
+            cpu: "256m"\
+            memory: "512Mi"\
+          requests:\
+            cpu: "256m"\
+            memory: "512Mi"
+    }' filesystem-test.yaml
+    sed -i '/podAntiAffinity:/,/- rook-ceph-mds/ s/^/      # /' 
filesystem-test.yaml
+    sed -i '/preferredDuringSchedulingIgnoredDuringExecution:/,/- 
rook-ceph-mds/ s/^/      # /' filesystem-test.yaml
+    sed -i '/topologyKey: kubernetes.io\/hostname/ s/^/            #/' 
filesystem-test.yaml
+    sed -i '/topologyKey: topology.kubernetes.io\/zone/ s/^/            #/' 
filesystem-test.yaml
+    sed -i '/podAntiAffinity:/,/- rook-ceph-mds/ s/^/      # /' 
filesystem-test.yaml
+    sed -i '/preferredDuringSchedulingIgnoredDuringExecution:/,/- 
rook-ceph-mds/ s/^/      # /' filesystem-test.yaml
+    sed -i '/topologyKey: kubernetes.io\/hostname/ s/^/            #/' 
filesystem-test.yaml
+    sed -i '/topologyKey: topology.kubernetes.io\/zone/ s/^/            #/' 
filesystem-test.yaml
+    sed -i '/placement:/,/^[^ ]/ {
+      /placement:/c\
+        placement:\
+          nodeAffinity:\
+            requiredDuringSchedulingIgnoredDuringExecution:\
+              nodeSelectorTerms:\
+              - matchExpressions:\
+                - key: ceph-mds\
+                  operator: In\
+                  values:\
+                  - enabled
+    }' filesystem-test.yaml
+
+    # 至少需要 1 个 osd
+    kubectl apply -f filesystem-test.yaml ; kubectl apply -f 
csi/cephfs/storageclass.yaml
 ---
 apiVersion: batch/v1
 kind: Job
@@ -186,7 +221,10 @@ rules:
   resources: ["serviceaccounts"]
   verbs: ["*"]
 - apiGroups: ["ceph.rook.io"]
-  resources: ["cephclusters"]
+  resources: ["cephclusters","cephfilesystemsubvolumegroups","cephfilesystems"]
+  verbs: ["*"]
+- apiGroups: ["storage.k8s.io"]
+  resources: ["storageclasses"]
   verbs: ["*"]
 ---
 apiVersion: rbac.authorization.k8s.io/v1
diff --git 
a/manifests/charts/dubbo-control/register-discovery/zookeeper/values.yaml 
b/manifests/charts/dubbo-control/register-discovery/zookeeper/values.yaml
index 06db34f1..26a3aba6 100644
--- a/manifests/charts/dubbo-control/register-discovery/zookeeper/values.yaml
+++ b/manifests/charts/dubbo-control/register-discovery/zookeeper/values.yaml
@@ -26,4 +26,4 @@ _internal_default_values_not_set:
 
   ## Whether to enable the csiDriver.
   csiDriver:
-    enabled: false
\ No newline at end of file
+    enabled: false

Reply via email to