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

albumenj pushed a commit to branch refactor-with-go
in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git


The following commit(s) were added to refs/heads/refactor-with-go by this push:
     new 095eabf5 Fix ca time
095eabf5 is described below

commit 095eabf5a185f864cda3bad81fa81c81a24006d5
Author: Albumen Kevin <[email protected]>
AuthorDate: Tue Mar 7 10:28:59 2023 +0800

    Fix ca time
---
 pkg/authority/k8s/client.go         | 2 +-
 pkg/authority/patch/javasdk.go      | 2 +-
 pkg/authority/patch/javasdk_test.go | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pkg/authority/k8s/client.go b/pkg/authority/k8s/client.go
index 0e731972..a960006a 100644
--- a/pkg/authority/k8s/client.go
+++ b/pkg/authority/k8s/client.go
@@ -309,7 +309,7 @@ func (c *ClientImpl) UpdateWebhookConfig(options 
*config.Options, storage cert.S
                                        //      },
                                        //},
                                        SideEffects:             &sideEffects,
-                                       AdmissionReviewVersions: 
[]string{"v1beta1", "v1"},
+                                       AdmissionReviewVersions: []string{"v1"},
                                },
                        },
                }
diff --git a/pkg/authority/patch/javasdk.go b/pkg/authority/patch/javasdk.go
index b40f0558..3e57f6f3 100644
--- a/pkg/authority/patch/javasdk.go
+++ b/pkg/authority/patch/javasdk.go
@@ -36,7 +36,7 @@ func NewJavaSdk(options *config.Options, kubeClient 
k8s.Client) *JavaSdk {
 }
 
 const (
-       ExpireSeconds = 360
+       ExpireSeconds = 1800
        Labeled       = "true"
 )
 
diff --git a/pkg/authority/patch/javasdk_test.go 
b/pkg/authority/patch/javasdk_test.go
index cf87b953..f9500946 100644
--- a/pkg/authority/patch/javasdk_test.go
+++ b/pkg/authority/patch/javasdk_test.go
@@ -168,8 +168,8 @@ func TestInjectVolumes(t *testing.T) {
                t.Error("should have dubbo-ca audience")
        }
 
-       if 
*newPod.Spec.Volumes[0].Projected.Sources[0].ServiceAccountToken.ExpirationSeconds
 != 360 {
-               t.Error("should have 3600 expiration seconds")
+       if 
*newPod.Spec.Volumes[0].Projected.Sources[0].ServiceAccountToken.ExpirationSeconds
 != 1800 {
+               t.Error("should have 1800 expiration seconds")
        }
 
        if newPod.Spec.Volumes[1].Name != "dubbo-ca-cert" {

Reply via email to