-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
common.go
53 lines (40 loc) · 1.67 KB
/
common.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package workflow
import (
"time"
"k8s.io/client-go/rest"
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
)
type ClientConfig struct {
// Host must be a host string, a host:port pair, or a URL to the base of the apiserver.
// If a URL is given then the (optional) Path of that URL represents a prefix that must
// be appended to all request URIs used to access the apiserver. This allows a frontend
// proxy to easily relocate all of the apiserver endpoints.
Host string
// APIPath is a sub-path that points to an API root.
APIPath string
// ContentConfig contains settings that affect how objects are transformed when
// sent to the server.
rest.ContentConfig
// KubeService requires Basic authentication
Username string
Password string
// KubeService requires Bearer authentication. This client will not attempt to use
// refresh tokens for an OAuth2 flow.
// TODO: demonstrate an OAuth2 compatible client.
BearerToken string
// Impersonate is the configuration that RESTClient will use for impersonation.
Impersonate rest.ImpersonationConfig
AuthProvider *clientcmdapi.AuthProviderConfig
// TLSClientConfig contains settings to enable transport layer security
rest.TLSClientConfig
// UserAgent is an optional field that specifies the caller of this request.
UserAgent string
// QPS indicates the maximum QPS to the master from this client.
// If it's zero, the created RESTClient will use DefaultQPS: 5
QPS float32
// Maximum burst for throttle.
// If it's zero, the created RESTClient will use DefaultBurst: 10.
Burst int
// The maximum length of time to wait before giving up on a server request. A value of zero means no timeout.
Timeout time.Duration
}