-
Notifications
You must be signed in to change notification settings - Fork 318
/
config.go
53 lines (42 loc) · 1.32 KB
/
config.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 client
import (
"time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// Config defines the client config structure
type Config struct {
metav1.TypeMeta `json:",inline"`
// host is the http endpoint of how to access loft
// +optional
Host string `json:"host,omitempty"`
// LastInstallContext is the last install context
// +optional
LastInstallContext string `json:"lastInstallContext,omitempty"`
// insecure specifies if the loft instance is insecure
// +optional
Insecure bool `json:"insecure,omitempty"`
// access key is the access key for the given loft host
// +optional
AccessKey string `json:"accesskey,omitempty"`
// virtual cluster access key is the access key for the given loft host to create virtual clusters
// +optional
VirtualClusterAccessKey string `json:"virtualClusterAccessKey,omitempty"`
// map of cached certificates for "access point" mode virtual clusters
// +optional
VirtualClusterAccessPointCertificates map[string]VirtualClusterCertificatesEntry
}
type VirtualClusterCertificatesEntry struct {
CertificateData string
KeyData string
LastRequested metav1.Time
ExpirationTime time.Time
}
// NewConfig creates a new config
func NewConfig() *Config {
return &Config{
TypeMeta: metav1.TypeMeta{
Kind: "Config",
APIVersion: "storage.loft.sh/v1",
},
}
}