This repository was archived by the owner on Oct 28, 2024. It is now read-only.
File tree 1 file changed +0
-8
lines changed
virtualcluster/pkg/webhook/virtualcluster
1 file changed +0
-8
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ import (
25
25
"crypto/x509/pkix"
26
26
"encoding/pem"
27
27
"fmt"
28
- "io/ioutil"
29
28
"net"
30
29
"os"
31
30
"path/filepath"
@@ -65,7 +64,6 @@ const (
65
64
VCWebhookServiceName = "virtualcluster-webhook-service"
66
65
DefaultVCWebhookServiceNs = "vc-manager"
67
66
VCWebhookCfgName = "virtualcluster-validating-webhook-configuration"
68
- VCWebhookCAFile = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
69
67
VCWebhookCSRName = "virtualcluster-webhook-csr"
70
68
)
71
69
@@ -145,11 +143,6 @@ func createValidatingWebhookConfiguration(client client.Client) error {
145
143
svcPort := int32 (constants .VirtualClusterWebhookPort )
146
144
// reject request if the webhook doesn't work
147
145
failPolicy := admv1beta1 .Fail
148
- // use the serviceaccount ca file as the authority
149
- CAPemByts , err := ioutil .ReadFile (VCWebhookCAFile )
150
- if err != nil {
151
- return fmt .Errorf ("fail to read ca file(%s): %s" , VCWebhookCAFile , err )
152
- }
153
146
vwhCfg := admv1beta1.ValidatingWebhookConfiguration {
154
147
ObjectMeta : metav1.ObjectMeta {
155
148
Name : VCWebhookCfgName ,
@@ -167,7 +160,6 @@ func createValidatingWebhookConfiguration(client client.Client) error {
167
160
Path : & validatePath ,
168
161
Port : & svcPort ,
169
162
},
170
- CABundle : CAPemByts ,
171
163
},
172
164
FailurePolicy : & failPolicy ,
173
165
Rules : []admv1beta1.RuleWithOperations {
You can’t perform that action at this time.
0 commit comments