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 2a4b3ee1 [charts] Value disable yaml override (#603)
2a4b3ee1 is described below

commit 2a4b3ee10331655f990840833ba8e04c0a0e315d
Author: Jian Zhong <[email protected]>
AuthorDate: Sun Feb 16 19:57:37 2025 +0800

    [charts] Value disable yaml override (#603)
---
 manifests/charts/base/templates/zzz_profile.yaml      | 19 +++++++++++++++++++
 manifests/charts/base/values.yaml                     |  8 +++-----
 .../register-discovery/templates/zzz_profile.yaml     | 19 +++++++++++++++++++
 .../dubbo-control/register-discovery/values.yaml      |  3 +++
 4 files changed, 44 insertions(+), 5 deletions(-)

diff --git a/manifests/charts/base/templates/zzz_profile.yaml 
b/manifests/charts/base/templates/zzz_profile.yaml
new file mode 100644
index 00000000..f4d368ef
--- /dev/null
+++ b/manifests/charts/base/templates/zzz_profile.yaml
@@ -0,0 +1,19 @@
+{{- if $.Values.defaults }}
+{{ fail (cat
+  "`--set defaults.foo=bar` with `--set foo=bar`. Defaults set:\n"
+  ($.Values.defaults | toYaml |nindent 4) ) }}
+{{- end }}
+{{- $defaults := $.Values._internal_default_values_are_not_set }}
+{{- $_ := unset $.Values "_internal_default_values_are_not_set " }}
+{{- $profile := dict }}
+{{- with (coalesce ($.Values).profile ($.Values.global).profile) }}
+{{- with $.Files.Get (printf "files/profile-%s.yaml" .)}}
+{{- $profile = (. | fromYaml) }}
+{{- else }}
+{{ fail (cat "unknown profile" .) }}
+{{- end }}
+{{- end }}
+{{- if false }}
+{{- $a := mustMergeOverwrite $defaults ($profile.global) ($.Values.global | 
default dict)  }}
+{{- end }}
+{{- $b := set $ "Values" (mustMergeOverwrite $defaults $.Values) }}
diff --git a/manifests/charts/base/values.yaml 
b/manifests/charts/base/values.yaml
index 5b243433..671a6d9c 100644
--- a/manifests/charts/base/values.yaml
+++ b/manifests/charts/base/values.yaml
@@ -13,8 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-base:
-  ## dubboctl disable dubbo configuration crds in base.
-  enableDubboConfigCRD: true
-
-defaultRevision: "default"
+_internal_default_values_not_set:
+  global:
+    dubboNamespace: dubbo-system
diff --git 
a/manifests/charts/dubbo-control/register-discovery/templates/zzz_profile.yaml 
b/manifests/charts/dubbo-control/register-discovery/templates/zzz_profile.yaml
new file mode 100644
index 00000000..4d4136f5
--- /dev/null
+++ 
b/manifests/charts/dubbo-control/register-discovery/templates/zzz_profile.yaml
@@ -0,0 +1,19 @@
+{{- if $.Values.defaults }}
+{{ fail (cat
+  "`--set defaults.foo=bar` with `--set foo=bar`. Defaults set:\n"
+  ($.Values.defaults | toYaml |nindent 4) ) }}
+{{- end }}
+{{- $defaults := $.Values._internal_default_values_not_set }}
+{{- $_ := unset $.Values "_internal_default_values_not_set " }}
+{{- $profile := dict }}
+{{- with (coalesce ($.Values).profile ($.Values.global).profile) }}
+{{- with $.Files.Get (printf "files/profile-%s.yaml" .)}}
+{{- $profile = (. | fromYaml) }}
+{{- else }}
+{{ fail (cat "unknown profile" .) }}
+{{- end }}
+{{- end }}
+{{- if false }}
+{{- $a := mustMergeOverwrite $defaults ($profile.global) ($.Values.global | 
default dict)  }}
+{{- end }}
+{{- $b := set $ "Values" (mustMergeOverwrite $defaults $.Values) }}
diff --git a/manifests/charts/dubbo-control/register-discovery/values.yaml 
b/manifests/charts/dubbo-control/register-discovery/values.yaml
index 3ffa509c..f124e5e7 100644
--- a/manifests/charts/dubbo-control/register-discovery/values.yaml
+++ b/manifests/charts/dubbo-control/register-discovery/values.yaml
@@ -1,3 +1,6 @@
+_internal_default_values_not_set:
+   global:
+     dubboNamespace: "dubbo-system"
 zookeeper:
   ## Whether to enable the zookeeper.
   enabled: false

Reply via email to