-
Notifications
You must be signed in to change notification settings - Fork 9
/
keys.go
75 lines (67 loc) · 2.65 KB
/
keys.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package storage
import (
"fmt"
"strconv"
)
// etcd keys
const (
KeySabakanStateSetterLeader = "leader/sabakan-state-setter/"
KeyUpdaterLeader = "leader/updater/"
KeyWorkerLeader = "leader/worker/"
KeyInfoPrefix = "info/"
KeyBootserversPrefix = "info/bootservers/"
KeyNecoRelease = "info/neco-release"
KeySSHPubkey = "info/ssh-pubkey"
KeyStatusPrefix = "status/"
KeyCurrent = "status/current"
KeyWorkerStatusPrefix = "status/bootservers/"
KeyContentsPrefix = "contents/"
KeySabakanContents = "contents/sabakan"
KeyCKEContents = "contents/cke"
KeyDHCPJSONContents = "contents/dhcp.json"
KeyCKETemplateContents = "contents/cke-template"
KeyUserResourcesContents = "contents/user-resources"
KeyConfigPrefix = "config/"
KeyNotificationSlack = "config/notification/slack"
KeyProxy = "config/proxy"
KeyQuayUsername = "config/quay-username"
KeyQuayPassword = "config/quay-password"
KeyEnv = "config/env"
KeyCheckUpdateInterval = "config/check-update-interval"
KeyWorkerTimeout = "config/worker-timeout"
KeyGitHubToken = "config/github-token"
KeyNodeProxy = "config/node-proxy"
KeyExternalIPAddressBlock = "config/external-ip-address-block"
KeyLBAddressBlockDefault = "config/lb-address-block-default"
KeyLBAddressBlockBastion = "config/lb-address-block-bastion"
KeyLBAddressBlockInternet = "config/lb-address-block-internet"
KeyVaultUnsealKey = "vault-unseal-key"
KeyVaultRootToken = "vault-root-token"
KeyFinishPrefix = "finish/"
KeyContainersFormat = "install/%d/containers/%s"
KeyDebsFormat = "install/%d/debs/%s"
KeyInstallPrefix = "install/"
KeyBMCBMCUser = "bmc/bmc-user"
KeyBMCIPMIUser = "bmc/ipmi-user"
KeyBMCIPMIPassword = "bmc/ipmi-password"
KeyTeleportAuthToken = "teleport/auth-token"
KeyCKEWeight = "cke/weight"
)
func keyBootServer(lrn int) string {
return KeyBootserversPrefix + strconv.Itoa(lrn)
}
func keyInstall(lrn int) string {
return KeyInstallPrefix + strconv.Itoa(lrn)
}
func keyStatus(lrn int) string {
return KeyWorkerStatusPrefix + strconv.Itoa(lrn)
}
func keyFinish(lrn int) string {
return KeyFinishPrefix + strconv.Itoa(lrn)
}
func keyContainer(lrn int, name string) string {
return fmt.Sprintf(KeyContainersFormat, lrn, name)
}
func keyDeb(lrn int, name string) string {
return fmt.Sprintf(KeyDebsFormat, lrn, name)
}