Skip to content

Commit 49c06c7

Browse files
authored
removing tls environment var (#1151)
* removing var * fixing unused variable - CI failure
1 parent 1eb8e54 commit 49c06c7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pkg/resources/management.cattle.io/v3/project/validator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (a *admitter) admitUpdate(oldProject, newProject *v3.Project) (*admissionv1
148148

149149
}
150150

151-
func (a *admitter) admitCommonCreateUpdate(oldProject, newProject *v3.Project) (*admissionv1.AdmissionResponse, error) {
151+
func (a *admitter) admitCommonCreateUpdate(_, newProject *v3.Project) (*admissionv1.AdmissionResponse, error) {
152152
projectQuota := newProject.Spec.ResourceQuota
153153
nsQuota := newProject.Spec.NamespaceDefaultResourceQuota
154154
containerLimit := newProject.Spec.ContainerDefaultResourceLimit

pkg/server/server.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const (
4242
webhookPortEnvKey = "CATTLE_PORT"
4343
webhookURLEnvKey = "CATTLE_WEBHOOK_URL"
4444
allowedCNsEnv = "ALLOWED_CNS"
45-
ignoreTLSHandshakeError = "IGNORE_TLS_HANDSHAKE_ERROR"
4645
)
4746

4847
var caFile = filepath.Join(os.TempDir(), "k8s-webhook-server", "client-ca", "ca.crt")
@@ -151,7 +150,6 @@ func listenAndServe(ctx context.Context, clients *clients.Clients, validators []
151150
return fmt.Errorf("failed to decode webhook port value '%s': %w", portStr, err)
152151
}
153152
}
154-
ignoreTLSHandErrorVal, _ := strconv.ParseBool(os.Getenv(ignoreTLSHandshakeError))
155153
return server.ListenAndServe(ctx, webhookHTTPSPort, webhookHTTPPort, router, &server.ListenOpts{
156154
Secrets: clients.Core.Secret(),
157155
CertNamespace: namespace,
@@ -165,7 +163,7 @@ func listenAndServe(ctx context.Context, clients *clients.Clients, validators []
165163
TLSConfig: tlsConfig,
166164
},
167165
DisplayServerLogs: true,
168-
IgnoreTLSHandshakeError: ignoreTLSHandErrorVal,
166+
IgnoreTLSHandshakeError: true,
169167
})
170168
}
171169

0 commit comments

Comments
 (0)