This repository has been archived by the owner on Oct 29, 2021. It is now read-only.
/
const.go
54 lines (50 loc) · 2 KB
/
const.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
package main
import v1 "k8s.io/api/core/v1"
const (
emptyBody = "empty body"
mutateMethod = "/mutate"
invalidContentType = "invalid Content-Type=%v, expect \"application/json\""
couldNotEncodeReview = "could not encode response: %v"
couldNotWriteReview = "could not write response: %v"
deployment = "Deployment"
pod = "Pod"
nsmAnnotationKey = "ns.networkservicemesh.io"
repoEnv = "REPO"
initContainerEnv = "INITCONTAINER"
namespaceEnv = "NSM_NAMESPACE"
tagEnv = "TAG"
tracerEnabledEnv = "TRACER_ENABLED"
jaegerHostEnv = "JAEGER_AGENT_HOST"
jaegerPortEnv = "JAEGER_AGENT_PORT"
enforceLimitsEnv = "ENFORCE_LIMITS"
repoDefault = "networkservicemesh"
initContainerDefault = "nsm-init"
dnsInitContainerDefault = "nsm-dns-init"
namespaceDefault = "default"
tagDefault = "latest"
initContainerName = "nsm-init-container"
certFile = "/etc/webhook/certs/" + v1.TLSCertKey
keyFile = "/etc/webhook/certs/" + v1.TLSPrivateKeyKey
initContainersPath = "/spec/initContainers"
unsupportedKind = "kind %v is not supported"
deploymentSubPath = "/spec/template"
volumePath = "/spec/volumes"
containersPath = "/spec/containers"
defaultPort = 443
// Keep in sync with ../../../test/kubetest/pods/common.go.
//
// Limits (especially the CPU limit) should be low enough to be
// available to allocate in a limited environment (including CI test).
// Limits for 'nsm-monitor' container.
nsmMonitorCPULimit = "100m"
nsmMonitorMemoryLimit = "15Mi"
// Limits for 'coredns' container.
corednsCPULimit = "100m"
corednsMemoryLimit = "15Mi"
// Limits for 'nsm-init' container.
nsmInitCPULimit = "200m"
nsmInitMemoryLimit = "20Mi"
// Limits for 'nsm-dns-init' container.
nsmDNSInitCPULimit = "200m"
nsmDNSInitMemoryLimit = "15Mi"
)