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 ccd0fadd [charts] Adding temporary configuration parameters (#668)
ccd0fadd is described below
commit ccd0faddee66fa0f28915a4bf7adb83a7386c6e5
Author: Jian Zhong <[email protected]>
AuthorDate: Sun Mar 30 12:55:00 2025 +0800
[charts] Adding temporary configuration parameters (#668)
---
.asf.yaml | 9 ++----
manifests/charts/admin/README.md | 34 ----------------------
manifests/charts/admin/templates/deployment.yaml | 19 ++++--------
manifests/charts/admin/values.yaml | 25 +++-------------
.../nacos/templates/mysql-service.yaml | 26 +++++++++++++++++
.../nacos/templates/mysql-statefulset.yaml | 3 +-
.../nacos/templates/statefulset.yaml | 9 +++---
.../register-discovery/nacos/values.yaml | 12 +++-----
.../zookeeper/templates/statefulset.yaml | 7 +++--
.../register-discovery/zookeeper/values.yaml | 16 ++++------
manifests/profiles/demo.yaml | 2 +-
11 files changed, 59 insertions(+), 103 deletions(-)
diff --git a/.asf.yaml b/.asf.yaml
index df0e50c1..5852d510 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -30,14 +30,11 @@ github:
# Enable projects for project management boards
projects: true
protected_branches:
- master:
+ master: {}
# only disable force push
- foo: bar
+ # foo: bar
labels:
- - kubernetes
- dubbo
+ - kubernetes
- microservices
- service-mesh
- - devops
- - dubboctl
- - control-plane
diff --git a/manifests/charts/admin/README.md b/manifests/charts/admin/README.md
deleted file mode 100644
index 33733187..00000000
--- a/manifests/charts/admin/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Admin
-
-
-
-
-| Key | Description
| Default
|
-|--------------------------------------------------|--------------------------------------------------------------------------------------------|-------------------------------------------|
-| `auth.enabled` | Auth Status for Admin
Control Plane. | `true`
|
-| `auth.authorization.action` | Define the Authorization
Action for Admin Control Plane. | `DENY`
|
-| `auth.authorization.matchType` | Define the Authorization
MatchType for Admin Control Plane. | `anyMatch`
|
-| `auth.authorization.samples` | Define the rule sampling
rate for Authorization the Admin Control Plane. | `0`
|
-| `auth.authentication.action` | Define the Authentication
Action for Admin Control Plane. | `STRICT`
|
-| `auth.authentication.port` | Define the port number
for applying the Authentication Policy for the Admin Control Plane. | `8080`
|
-| `traffic.enabled` | Traffic Status for Admin
Control Plane. | `true`
|
-| `traffic.conditionRoute.scope` | Supports service and
application scope rules. |
`service` |
-| `traffic.conditionRoute.enabled` | Whether enable this rule
or not, set enabled:false to disable this rule | `true`
|
-| `traffic.conditionRoute.force` | The behaviour when the
instance subset is empty after routing. | `true`
|
-| `traffic.conditionRoute.runtime` | Whether run routing rule
for every rpc invocation or use routing cache if available. | `true`
|
-| `traffic.conditionRoute.priority` | Specify the specific
priority for traffic. | `100`
|
-| `traffic.conditionRoute.configVersion` | The version of the
condition rule definition, currently available version is v3.0. |
`v3.0` |
-| `traffic.conditionRoute.key` | The identifier of the
target service or application that this rule is about to apply to. |
`org.apache.dubbo.samples.CommentService` |
-| `traffic.conditionRoute.conditions` | The condition routing
rule definition of this configuration. Check Condition for details. |
`method=getComment => region=Hangzhou` |
-| `traffic.dynamicConfig.scope` | Supports service and
application scope rules. |
`service` |
-| `traffic.dynamicConfig.configVersion` | The version of the tag
rule definition, currently available version is v3.0. | `v3.0`
|
-| `traffic.dynamicConfig.key` | The identifier of the
target service or application that this rule is about to apply to. |
`org.apache.dubbo.samples.UserService` |
-| `traffic.dynamicConfig.side` | Especially useful when
scope:service is set. |
`consumer` |
-| `traffic.dynamicConfig.exact` | The application matching
condition for this config rule to take effect. |
`shop-frontend` |
-| `traffic.tagRoute.name` | The name of the tag used
to match the dubbo tag value in the request context. | `gray`
|
-| `traffic.tagRoute.enabled` | Whether enable this rule
or not, set enabled:false to disable this rule. | `false`
|
-| `traffic.tagRoute.force` | The behaviour when the
instance subset is empty after routing. | `true`
|
-| `traffic.tagRoute.configVersion` | The version of the tag
rule definition, currently available version is v3.0. | `v3.0`
|
-| `traffic.tagRoute.priority` | Specify the specific
priority for traffic. | `99`
|
-| `traffic.tagRoute.key` | The identifier of the
target application that this rule is about to control. |
`details` |
-
diff --git a/manifests/charts/admin/templates/deployment.yaml
b/manifests/charts/admin/templates/deployment.yaml
index 4b866683..3e4bb9e9 100644
--- a/manifests/charts/admin/templates/deployment.yaml
+++ b/manifests/charts/admin/templates/deployment.yaml
@@ -40,8 +40,8 @@ spec:
serviceAccountName: admin-sa
containers:
- name: admin
- image: {{ $admin.image.registry }}:{{ $admin.image.tag }}
- imagePullPolicy: {{ $admin.image.pullPolicy }}
+ image: {{ $admin.image }}:{{ $admin.tag }}
+ imagePullPolicy: {{ $admin.imagePullPolicy }}
ports:
- name: http
containerPort: 8888
@@ -62,19 +62,10 @@ spec:
value: grafana:3000
volumeMounts:
- name: data
- mountPath: /var/lib/admin-data
- readinessProbe:
- httpGet:
- path: /admin
- port: 8888
- initialDelaySeconds: 60
- successThreshold: 1
- failureThreshold: 5
- periodSeconds: 10
- timeoutSeconds: 30
+ mountPath: /var/lib/admin-dashboard
resources:
{{ toYaml $admin.resources | trim | indent 10 }}
volumes:
- name: data
- emptyDir:
- medium: Memory
+ hostPath:
+ path: /var/lib/admin-dashboard
diff --git a/manifests/charts/admin/values.yaml
b/manifests/charts/admin/values.yaml
index c7b4948a..c07b04f8 100644
--- a/manifests/charts/admin/values.yaml
+++ b/manifests/charts/admin/values.yaml
@@ -17,27 +17,10 @@ _internal_default_values_not_set:
## Number of replicas for the Deployment.
replicas: 1
- ## Configure the application image
- image:
- # Source of the container image.
- registry: mfordjody/gin-web-log
- # Version tag of the container image.
- tag: latest
- # Image pull policy, available options are: Always, IfNotPresent, Never.
- pullPolicy: IfNotPresent
-
- ## Define volume mounts for the application, Each item in the list
represents a separate volume mount.
- volumeMounts: ~
- ## Example:
- # - name: vol
- # mountPath: /data
- # readOnly: true
-
- ## Define volumes for the application, Each item in the list represents a
separate volume.
- volumes: ~
- # - name: vol
- # hostPath:
- # path: /data
+ image: mfordjody/gin-web-log
+ tag: ""
+ # Image pull policy, available options are: Always, IfNotPresent, Never.
+ imagePullPolicy: ~
resources:
requests:
diff --git
a/manifests/charts/dubbo-control/register-discovery/nacos/templates/mysql-service.yaml
b/manifests/charts/dubbo-control/register-discovery/nacos/templates/mysql-service.yaml
index 8a599200..c898776d 100644
---
a/manifests/charts/dubbo-control/register-discovery/nacos/templates/mysql-service.yaml
+++
b/manifests/charts/dubbo-control/register-discovery/nacos/templates/mysql-service.yaml
@@ -22,3 +22,29 @@ spec:
selector:
app: nacos-mysql
{{- end -}}
+---
+{{- $nacos := .Values -}}
+{{- if eq $nacos.storage.type "mysql" }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: nacos-mysql-headless
+ namespace: {{ .Release.Namespace }}
+ labels:
+ app: nacos-mysql
+ dubbo.io/rev: {{ default "default" | quote }}
+ install.operator.dubbo.io/owning-resource: {{ default "unknown" }}
+ operator.dubbo.io/component: "Nacos"
+ dubbo: nacos
+ release: {{ .Release.Name }}
+ app.kubernetes.io/name: "register"
+spec:
+ clusterIP: None
+ ports:
+ - name: http
+ port: 3306
+ targetPort: 3306
+ protocol: TCP
+ selector:
+ app: nacos-mysql
+{{- end -}}
diff --git
a/manifests/charts/dubbo-control/register-discovery/nacos/templates/mysql-statefulset.yaml
b/manifests/charts/dubbo-control/register-discovery/nacos/templates/mysql-statefulset.yaml
index 09c40abf..e7474389 100644
---
a/manifests/charts/dubbo-control/register-discovery/nacos/templates/mysql-statefulset.yaml
+++
b/manifests/charts/dubbo-control/register-discovery/nacos/templates/mysql-statefulset.yaml
@@ -15,7 +15,7 @@ metadata:
app.kubernetes.io/name: "register"
spec:
replicas: 1
- serviceName: nacos-mysql
+ serviceName: nacos-mysql-headless
selector:
matchLabels:
app: nacos-mysql
@@ -59,7 +59,6 @@ spec:
lifecycle:
postStart:
exec:
-{{/* command: [ "/bin/sh", "-c", "sleep 30 && mysql -unacos
-pnacos nacos < /mysql-schema.sql" ]*/}}
command: [ "/bin/sh", "-c", "sleep 30 && mysql -unacos -pnacos
-e 'SELECT 1 FROM nacos.config_info LIMIT 1;' || mysql -unacos -pnacos nacos <
/mysql-schema.sql" ]
volumeMounts:
- name: table-data
diff --git
a/manifests/charts/dubbo-control/register-discovery/nacos/templates/statefulset.yaml
b/manifests/charts/dubbo-control/register-discovery/nacos/templates/statefulset.yaml
index 34841142..b2a9132a 100644
---
a/manifests/charts/dubbo-control/register-discovery/nacos/templates/statefulset.yaml
+++
b/manifests/charts/dubbo-control/register-discovery/nacos/templates/statefulset.yaml
@@ -14,7 +14,7 @@ metadata:
release: {{ .Release.Name }}
app.kubernetes.io/name: "register"
spec:
- replicas: {{ $ncs.replicas }}
+ replicas: {{ $nacos.replicas }}
{{- if eq $nacos.mode "cluster" }}
serviceName: nacos-headless
{{- else }}
@@ -47,8 +47,8 @@ spec:
{{- end }}
containers:
- name: nacos
- image: {{ $nacos.image.registry }}:{{ $nacos.image.tag }}
- imagePullPolicy: {{ $nacos.image.pullPolicy }}
+ image: {{ $nacos.image }}:{{ $nacos.tag }}
+ imagePullPolicy: {{ $nacos.imagePullPolicy }}
ports:
- name: http
containerPort: 8848
@@ -122,4 +122,5 @@ spec:
subPath: logs
volumes:
- name: data
- emptyDir: {}
\ No newline at end of file
+ hostPath:
+ path: /var/lib/nacos
\ No newline at end of file
diff --git
a/manifests/charts/dubbo-control/register-discovery/nacos/values.yaml
b/manifests/charts/dubbo-control/register-discovery/nacos/values.yaml
index 47e15d43..bca7e97e 100644
--- a/manifests/charts/dubbo-control/register-discovery/nacos/values.yaml
+++ b/manifests/charts/dubbo-control/register-discovery/nacos/values.yaml
@@ -26,14 +26,10 @@ _internal_default_values_not_set:
cpu: 250m
memory: 256Mi
- ## Configure the application image
- image:
- # Source of the container image.
- registry: nacos/nacos-server
- # Version tag of the container image.
- tag: latest
- # Image pull policy, available options are: Always, IfNotPresent, Never.
- imagePullPolicy: ~
+ image: nacos/nacos-server
+ tag: ""
+ # Image pull policy, available options are: Always, IfNotPresent, Never.
+ imagePullPolicy: ~
storage:
# Specifies the storage type (embedded, mysql, etc.).
diff --git
a/manifests/charts/dubbo-control/register-discovery/zookeeper/templates/statefulset.yaml
b/manifests/charts/dubbo-control/register-discovery/zookeeper/templates/statefulset.yaml
index a51774e6..0f728187 100644
---
a/manifests/charts/dubbo-control/register-discovery/zookeeper/templates/statefulset.yaml
+++
b/manifests/charts/dubbo-control/register-discovery/zookeeper/templates/statefulset.yaml
@@ -34,8 +34,8 @@ spec:
spec:
containers:
- name: zookeeper
- image: {{ $zookeeper.image.registry }}:{{ $zookeeper.image.tag }}
- imagePullPolicy: {{ $zookeeper.image.imagePullPolicy }}
+ image: {{ $zookeeper.image }}:{{ $zookeeper.tag }}
+ imagePullPolicy: {{ $zookeeper.imagePullPolicy }}
resources:
{{ toYaml $zookeeper.resources | trim | indent 10 }}
ports:
@@ -54,4 +54,5 @@ spec:
name: zookeeper-scripts
defaultMode: 0755
- name: data
- emptyDir: {}
\ No newline at end of file
+ hostPath:
+ path: /var/lib/zookeeper
\ No newline at end of file
diff --git
a/manifests/charts/dubbo-control/register-discovery/zookeeper/values.yaml
b/manifests/charts/dubbo-control/register-discovery/zookeeper/values.yaml
index d2dce6a3..03d93d84 100644
--- a/manifests/charts/dubbo-control/register-discovery/zookeeper/values.yaml
+++ b/manifests/charts/dubbo-control/register-discovery/zookeeper/values.yaml
@@ -18,16 +18,12 @@ _internal_default_values_not_set:
enabled: false
## Number of replicas for the Deployment.
replicas: 1
- ## Configure the application image
- image:
- # Source of the container image.
- registry: zookeeper
- # Version tag of the container image.
- tag: latest
- # Image pull policy, available options are: Always, IfNotPresent, Never.
- imagePullPolicy: IfNotPresent
- # Set to 'true' to enable debug mode for the image.
- debug: false
+
+ # Source of the container image.
+ image: zookeeper
+ tag: ""
+ # Image pull policy, available options are: Always, IfNotPresent, Never.
+ imagePullPolicy: ~
resources:
requests:
diff --git a/manifests/profiles/demo.yaml b/manifests/profiles/demo.yaml
index 0db03c0a..821a30cb 100644
--- a/manifests/profiles/demo.yaml
+++ b/manifests/profiles/demo.yaml
@@ -34,4 +34,4 @@ spec:
nacos:
enabled: false
zookeeper:
- enabled: true
+ enabled: true
\ No newline at end of file