File tree 3 files changed +26
-2
lines changed
3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 108
108
{ {- fail " ERROR: All hostPort must match their respective containerPort when `hostNetwork` is enabled" } }
109
109
{ {- end } }
110
110
{ {- end } }
111
- - name: { { $name | quote } }
111
+ - name: { { $name | lower | quote } }
112
112
containerPort: { { default $config .port $config .containerPort } }
113
113
{ {- if $config .hostPort } }
114
114
hostPort: { { $config .hostPort } }
Original file line number Diff line number Diff line change 50
50
{ {- end } }
51
51
52
52
{ {- define " traefik.service-ports" } }
53
- { {- range $name , $config := .ports } }
53
+ { {- range $portName , $config := .ports } }
54
+ { {- $name := $portName | lower -} }
54
55
{ {- if (index (default dict $config .expose) $.serviceName) } }
55
56
{ {- $port := default $config .port $config .exposedPort } }
56
57
{ {- if empty $port } }
Original file line number Diff line number Diff line change @@ -357,3 +357,26 @@ tests:
357
357
asserts :
358
358
- failedTemplate :
359
359
errorMessage : " ERROR: Cannot create ssh port on Service without .port or .exposedPort"
360
+ - it : should support uppercase letters in entrypoint names
361
+ set :
362
+ ports :
363
+ UPPERCASE :
364
+ port : 443
365
+ expose :
366
+ default : true
367
+ asserts :
368
+ - contains :
369
+ path : spec.template.spec.containers[0].ports
370
+ content :
371
+ name : uppercase
372
+ containerPort : 443
373
+ protocol : TCP
374
+ template : deployment.yaml
375
+ - contains :
376
+ path : spec.ports
377
+ content :
378
+ name : uppercase
379
+ port : 443
380
+ protocol : TCP
381
+ targetPort : uppercase
382
+ template : service.yaml
You can’t perform that action at this time.
0 commit comments