feat(rancher): add PassTLSCert label.
This commit is contained in:
parent
571f41dcf0
commit
c042098889
2 changed files with 8 additions and 0 deletions
|
@ -21,6 +21,7 @@ func (p *Provider) buildConfiguration(services []rancherData) *types.Configurati
|
|||
"getDomain": getFuncString(label.TraefikDomain, p.Domain),
|
||||
"getProtocol": getFuncString(label.TraefikProtocol, label.DefaultProtocol),
|
||||
"getPassHostHeader": getFuncString(label.TraefikFrontendPassHostHeader, label.DefaultPassHostHeader),
|
||||
"getPassTLSCert": getFuncBool(label.TraefikFrontendPassTLSCert, label.DefaultPassTLSCert),
|
||||
"getPriority": getFuncString(label.TraefikFrontendPriority, label.DefaultFrontendPriority),
|
||||
"getEntryPoints": getFuncSliceString(label.TraefikFrontendEntryPoints),
|
||||
"getBasicAuth": getFuncSliceString(label.TraefikFrontendAuthBasic),
|
||||
|
@ -160,6 +161,12 @@ func getFuncString(labelName string, defaultValue string) func(service rancherDa
|
|||
}
|
||||
}
|
||||
|
||||
func getFuncBool(labelName string, defaultValue bool) func(service rancherData) bool {
|
||||
return func(service rancherData) bool {
|
||||
return label.GetBoolValue(service.Labels, labelName, defaultValue)
|
||||
}
|
||||
}
|
||||
|
||||
func getFuncInt64(labelName string, defaultValue int64) func(service rancherData) int64 {
|
||||
return func(service rancherData) int64 {
|
||||
return label.GetInt64Value(service.Labels, labelName, defaultValue)
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
backend = "backend-{{getBackend $service}}"
|
||||
priority = {{getPriority $service}}
|
||||
passHostHeader = {{getPassHostHeader $service}}
|
||||
passTLSCert = {{getPassTLSCert $service}}
|
||||
|
||||
entryPoints = [{{range getEntryPoints $service}}
|
||||
"{{.}}",
|
||||
|
|
Loading…
Add table
Reference in a new issue