forked from kgateway-dev/kgateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefaults.go
88 lines (71 loc) · 1.92 KB
/
defaults.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
76
77
78
79
80
81
82
83
84
85
86
87
88
//go:build ignore
package defaults
import (
"path/filepath"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/kgateway-dev/kgateway/pkg/utils/fsutils"
"github.com/kgateway-dev/kgateway/pkg/utils/kubeutils/kubectl"
)
var (
CurlPodExecOpt = kubectl.PodExecOptions{
Name: "curl",
Namespace: "curl",
Container: "curl",
}
CurlPod = &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "curl",
Namespace: "curl",
},
}
CurlPodManifest = filepath.Join(fsutils.MustGetThisDir(), "testdata", "curl_pod.yaml")
HttpEchoPod = &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "http-echo",
Namespace: "http-echo",
},
}
HttpEchoPodManifest = filepath.Join(fsutils.MustGetThisDir(), "testdata", "http_echo.yaml")
TcpEchoPod = &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "tcp-echo",
Namespace: "tcp-echo",
},
}
TcpEchoPodManifest = filepath.Join(fsutils.MustGetThisDir(), "testdata", "tcp_echo.yaml")
NginxPod = &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "nginx",
Namespace: "nginx",
},
}
NginxSvc = &corev1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: "nginx",
Namespace: "nginx",
},
}
NginxPodManifest = filepath.Join(fsutils.MustGetThisDir(), "testdata", "nginx_pod.yaml")
NginxResponse = `<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>`
)