You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by zh...@apache.org on 2026/07/11 11:20:41 UTC

(dubbo-kubernetes) branch master updated: Update ci infra v3 and config (#952)

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

mfordjody 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 74501f74 Update ci infra v3 and config (#952)
74501f74 is described below

commit 74501f74f0e3365fbd8fd19f7c1ca05f3dbae58e
Author: mfordjody <11...@qq.com>
AuthorDate: Sat Jul 11 19:20:36 2026 +0800

    Update ci infra v3 and config (#952)
    
    * Update ci infra v2
    
    * Validate unlabeled telemetry resources
---
 .../templates/validatingwebhookconfiguration.yaml  | 19 +++++++++++++++++
 operator/pkg/render/manifest_test.go               | 24 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/manifests/charts/dubbod/templates/validatingwebhookconfiguration.yaml b/manifests/charts/dubbod/templates/validatingwebhookconfiguration.yaml
index 255ef215..115ddd85 100644
--- a/manifests/charts/dubbod/templates/validatingwebhookconfiguration.yaml
+++ b/manifests/charts/dubbod/templates/validatingwebhookconfiguration.yaml
@@ -44,6 +44,25 @@ webhooks:
       apiGroups:
       - security.dubbo.apache.org
       - networking.dubbo.apache.org
+      apiVersions:
+      - "*"
+      resources:
+      - "*"
+    sideEffects: None
+  - name: telemetry.validation.dubbo.apache.org
+    admissionReviewVersions: ["v1"]
+    clientConfig:
+      service:
+        name: dubbod
+        namespace: dubbo-system
+        path: "/validate"
+      caBundle: ""
+    failurePolicy: Ignore
+    rules:
+    - operations:
+      - CREATE
+      - UPDATE
+      apiGroups:
       - telemetry.dubbo.apache.org
       apiVersions:
       - "*"
diff --git a/operator/pkg/render/manifest_test.go b/operator/pkg/render/manifest_test.go
index 55db157b..f87c48a7 100644
--- a/operator/pkg/render/manifest_test.go
+++ b/operator/pkg/render/manifest_test.go
@@ -33,6 +33,30 @@ func TestGenerateManifestUsesEmbeddedInstallerAssets(t *testing.T) {
 	}
 }
 
+func TestTelemetryValidationWebhookDoesNotRequireRevisionLabel(t *testing.T) {
+	manifests, _, err := GenerateManifest(nil, nil, nil, nil)
+	if err != nil {
+		t.Fatalf("GenerateManifest() error = %v", err)
+	}
+	webhook := findManifest(t, manifests, "ValidatingWebhookConfiguration", "dubbo-validator-dubbo-system")
+	webhooks, ok, err := unstructured.NestedSlice(webhook.Object, "webhooks")
+	if err != nil || !ok {
+		t.Fatalf("webhooks missing: ok=%v err=%v", ok, err)
+	}
+	for _, raw := range webhooks {
+		entry := raw.(map[string]interface{})
+		name, _, _ := unstructured.NestedString(entry, "name")
+		if name != "telemetry.validation.dubbo.apache.org" {
+			continue
+		}
+		if _, found := entry["objectSelector"]; found {
+			t.Fatal("Telemetry validation webhook must match resources without revision labels")
+		}
+		return
+	}
+	t.Fatal("Telemetry validation webhook not rendered")
+}
+
 func TestGenerateManifestExposesDubbodPrometheusScrapeEndpoint(t *testing.T) {
 	manifests, _, err := GenerateManifest(nil, nil, nil, nil)
 	if err != nil {