File tree Expand file tree Collapse file tree 3 files changed +46
-3
lines changed
pkg/library/container/testdata Expand file tree Collapse file tree 3 files changed +46
-3
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,10 @@ output:
66
66
- " test"
67
67
- " args"
68
68
ports :
69
- - name : " 3100-wss "
69
+ - name : " test-endpoint-1 "
70
70
containerPort : 3100
71
71
protocol : TCP
72
- - name : " 8080-http "
72
+ - name : " test-endpoint-2 "
73
73
containerPort : 8080
74
74
protocol : TCP
75
75
volumeMounts :
Original file line number Diff line number Diff line change @@ -35,6 +35,6 @@ output:
35
35
- name : " DEVWORKSPACE_COMPONENT_NAME"
36
36
value : " testing-container-1"
37
37
ports :
38
- - name : " 3100-http "
38
+ - name : " test-endpoint-1 "
39
39
containerPort : 3100
40
40
protocol : TCP
Original file line number Diff line number Diff line change
1
+ name : " Uses endpoint name as port name if it it fits pod spec"
2
+
3
+ input :
4
+ components :
5
+ - name : testing-container-1
6
+ container :
7
+ image : testing-image-1
8
+ memoryRequest : " -1" # isolate test to not include this field
9
+ memoryLimit : " -1" # isolate test to not include this field
10
+ cpuRequest : " -1" # isolate test to not include this field
11
+ cpuLimit : " -1" # isolate test to not include this field
12
+ mountSources : false
13
+ endpoints :
14
+ - name : " short-name" # Should use endpoint name if <=15 chars long (as supported by pod spec)
15
+ targetPort : 8080
16
+ protocol : http
17
+ - name : " longer-endpoint-name" # Should fallback to "<port>-<protocol>" for names too long for pod spec
18
+ targetPort : 8081
19
+ protocol : http
20
+
21
+ output :
22
+ podAdditions :
23
+ containers :
24
+ - name : testing-container-1
25
+ image : testing-image-1
26
+ imagePullPolicy : Always
27
+ resources :
28
+ requests :
29
+ memory : " -1"
30
+ cpu : " -1"
31
+ limits :
32
+ memory : " -1"
33
+ cpu : " -1"
34
+ env :
35
+ - name : " DEVWORKSPACE_COMPONENT_NAME"
36
+ value : " testing-container-1"
37
+ ports :
38
+ - name : " short-name"
39
+ containerPort : 8080
40
+ protocol : TCP
41
+ - name : " 8081-http"
42
+ containerPort : 8081
43
+ protocol : TCP
You can’t perform that action at this time.
0 commit comments