This repository was archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodels.go
More file actions
46 lines (33 loc) · 1.32 KB
/
models.go
File metadata and controls
46 lines (33 loc) · 1.32 KB
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
package eirinictrl
import "errors"
const (
// Environment Variable Names
EnvEiriniCertsDir = "EIRINI_CERTS_DIR"
EnvPodName = "POD_NAME"
EnvCFInstanceIP = "CF_INSTANCE_IP"
EnvCFInstanceIndex = "CF_INSTANCE_INDEX"
EnvCFInstanceGUID = "CF_INSTANCE_GUID"
EnvCFInstanceInternalIP = "CF_INSTANCE_INTERNAL_IP"
EnvCFInstanceAddr = "CF_INSTANCE_ADDR"
EnvCFInstancePort = "CF_INSTANCE_PORT"
EnvCFInstancePorts = "CF_INSTANCE_PORTS"
EiriniCertsDir = "/etc/eirini/certs"
)
var ErrNotFound = errors.New("not found")
var ErrInvalidInstanceIndex = errors.New("invalid instance index")
type ControllerConfig struct {
KubeConfig `yaml:",inline"`
ApplicationServiceAccount string `yaml:"application_service_account"`
RegistrySecretName string `yaml:"registry_secret_name"`
UnsafeAllowAutomountServiceAccountToken bool `yaml:"unsafe_allow_automount_service_account_token"`
DefaultMinAvailableInstances string `yaml:"default_min_available_instances"`
WorkloadsNamespace string
PrometheusPort int `yaml:"prometheus_port"`
TaskTTLSeconds int `yaml:"task_ttl_seconds"`
LeaderElectionID string
LeaderElectionNamespace string
WebhookPort int32 `yaml:"webhook_port"`
}
type KubeConfig struct {
ConfigPath string `yaml:"kube_config_path"`
}