Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit ef768b5

Browse files
togashidmmadalazar
authored andcommitted
Deactivate unsafe mode Server call
To ensure a more security call, the flag is removed. But you can switch to argument to true and recompile for http server.
1 parent de0e4f1 commit ef768b5

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

telemetry-aware-scheduling/README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,9 @@ After these steps the scheduler extender should be registered with the Kubernete
8585
Telemetry Aware Scheduling uses go modules. It requires Go 1.16+ with modules enabled in order to build. TAS has been tested with Kubernetes 1.20+. TAS was tested on Intel® Server Board S2600WF-Based Systems (Wolf Pass).
8686
A yaml file for TAS is contained in the deploy folder along with its service and RBAC roles and permissions.
8787

88-
**Note:** If run without the unsafe flag ([described in the table below](#tas-scheduler-extender)) a secret called extender-secret will need to be created with the cert and key for the TLS endpoint.
89-
TAS will not deploy if there is no secret available with the given deployment file.
88+
A secret called extender-secret will need to be created with the cert and key for the TLS endpoint. TAS will not deploy if there is no secret available with the given deployment file.
9089

91-
A secret can be created with:
90+
The secret can be created with:
9291

9392
``
9493
kubectl create secret tls extender-secret --cert /etc/kubernetes/<PATH_TO_CERT> --key /etc/kubernetes/<PATH_TO_KEY>
@@ -194,13 +193,11 @@ The below flags can be passed to the binary at run time.
194193
name |type | description| usage | default|
195194
-----|------|-----|-------|-----|
196195
|kubeConfig| string |location of kubernetes configuration file | -kubeConfig /root/filename|~/.kube/config
197-
|cachePort | string | port number at which the cache server will listen for requests | --cachePort 9999 | 8111
198196
|syncPeriod|duration string| interval between refresh of telemetry data|-syncPeriod 1m| 1s
199197
|port| int | port number on which the scheduler extender will listen| -port 32000 | 9001
200198
|cert| string | location of the cert file for the TLS endpoint | --cert=/root/cert.txt| /etc/kubernetes/pki/ca.crt
201199
|key| string | location of the key file for the TLS endpoint| --key=/root/key.txt | /etc/kubernetes/pki/ca.key
202200
|cacert| string | location of the ca certificate for the TLS endpoint| --key=/root/cacert.txt | /etc/kubernetes/pki/ca.crt
203-
|unsafe| bool | whether or not to listen on a TLS endpoint with the scheduler extender | --unsafe=true| false
204201

205202
## Linking a workload to a policy
206203
Pods can be linked with policies by adding a label of the form ``telemetry-policy=<POLICY-NAME>``

telemetry-aware-scheduling/cmd/main.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,18 @@ import (
3131

3232
func main() {
3333
var kubeConfig, port, certFile, keyFile, caFile, syncPeriod string
34-
var unsafe bool
3534
klog.InitFlags(nil)
3635
flag.StringVar(&kubeConfig, "kubeConfig", "/root/.kube/config", "location of kubernetes config file")
3736
flag.StringVar(&port, "port", "9001", "port on which the scheduler extender will listen")
3837
flag.StringVar(&certFile, "cert", "/etc/kubernetes/pki/ca.crt", "cert file extender will use for authentication")
3938
flag.StringVar(&keyFile, "key", "/etc/kubernetes/pki/ca.key", "key file extender will use for authentication")
4039
flag.StringVar(&caFile, "cacert", "/etc/kubernetes/pki/ca.crt", "ca file extender will use for authentication")
41-
flag.BoolVar(&unsafe, "unsafe", false, "unsafe instances of telemetry aware extender will be served over simple http.")
4240
flag.StringVar(&syncPeriod, "syncPeriod", "5s", "length of time in seconds between metrics updates")
4341
flag.Parse()
4442
cache := tascache.NewAutoUpdatingCache()
4543
tscheduler := telemetryscheduler.NewMetricsExtender(cache)
4644
sch := extender.Server{Scheduler: tscheduler}
47-
go sch.StartServer(port, certFile, keyFile, caFile, unsafe)
45+
go sch.StartServer(port, certFile, keyFile, caFile, false)
4846
tasController(kubeConfig, syncPeriod, cache)
4947
klog.Flush()
5048
}

0 commit comments

Comments
 (0)