Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,18 @@ func runCertManager() {
func runKubemacpoolManager() {
var logType, metricsAddr string
var waitingTime int
var tlsMinVersion, tlsCiphers string

flag.StringVar(&metricsAddr, "metrics-addr", ":8443", "The address the metric endpoint binds to.")
flag.StringVar(&logType, "v", "production", "Log type (debug/production).")
flag.IntVar(&waitingTime, names.WAIT_TIME_ARG, 600, "waiting time to release the mac if object was not created")
flag.StringVar(&tlsMinVersion, "tls-min-version", "VersionTLS13", "Minimum TLS version. "+
"Supported values are tls package constants names (e.g. VersionTLS13), please see "+
"https://pkg.go.dev/crypto/tls#pkg-constants.")
flag.StringVar(&tlsCiphers, "tls-cipher-suites", "", "Comma-separated list of TLS cipher suite names. "+
"Supported values are tls package constants names (e.g. TLS_AES_128_GCM_SHA256), please see "+
"https://pkg.go.dev/crypto/tls#pkg-constants. "+
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: . (with space)-->. (without)

"When 'min-tls-version' is 'VersionTLS13', cipher suites are selected by the runtime.")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a typo in the flag description which could be confusing: please change min-tls-version --> tls-min-version

flag.Parse()

ctrl.SetLogger(zap.New(zap.UseDevMode(logType != "production")))
Expand Down Expand Up @@ -187,7 +195,7 @@ func runKubemacpoolManager() {
os.Exit(1)
}

tlsConfig, err := kmptls.NewConfig(os.Getenv("TLS_MIN_VERSION"), os.Getenv("TLS_CIPHERS"))
tlsConfig, err := kmptls.NewConfig(tlsMinVersion, tlsCiphers)
if err != nil {
log.Error(err, "Failed to create TLS config")
os.Exit(1)
Expand Down
2 changes: 0 additions & 2 deletions config/default/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ spec:
key: RANGE_END
- name: KUBEVIRT_CLIENT_GO_SCHEME_REGISTRATION_VERSION
value: "v1"
- name: TLS_MIN_VERSION
value: "VersionTLS13"
resources:
requests:
cpu: 100m
Expand Down
2 changes: 0 additions & 2 deletions config/release/kubemacpool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,6 @@ spec:
name: kubemacpool-mac-range-config
- name: KUBEVIRT_CLIENT_GO_SCHEME_REGISTRATION_VERSION
value: v1
- name: TLS_MIN_VERSION
value: VersionTLS13
image: quay.io/kubevirt/kubemacpool:latest
imagePullPolicy: Always
livenessProbe:
Expand Down
2 changes: 0 additions & 2 deletions config/test/kubemacpool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,6 @@ spec:
name: kubemacpool-mac-range-config
- name: KUBEVIRT_CLIENT_GO_SCHEME_REGISTRATION_VERSION
value: v1
- name: TLS_MIN_VERSION
value: VersionTLS13
image: registry:5000/kubevirt/kubemacpool:latest
imagePullPolicy: Always
livenessProbe:
Expand Down
Loading