chore(ingress): Allow tls activation
This commit is contained in:
@@ -2,6 +2,10 @@ package labelStructs
|
||||
|
||||
import "gopkg.in/yaml.v3"
|
||||
|
||||
type TLS struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
}
|
||||
|
||||
type Ingress struct {
|
||||
Port *int32 `yaml:"port,omitempty"`
|
||||
Annotations map[string]string `yaml:"annotations,omitempty"`
|
||||
@@ -9,6 +13,7 @@ type Ingress struct {
|
||||
Path string `yaml:"path"`
|
||||
Class string `yaml:"class"`
|
||||
Enabled bool `yaml:"enabled"`
|
||||
TLS TLS `yaml:"tls"`
|
||||
}
|
||||
|
||||
// IngressFrom creates a new Ingress from a compose service.
|
||||
@@ -19,6 +24,7 @@ func IngressFrom(data string) (*Ingress, error) {
|
||||
Enabled: false,
|
||||
Class: "-",
|
||||
Port: nil,
|
||||
TLS: TLS{Enabled: true},
|
||||
}
|
||||
if err := yaml.Unmarshal([]byte(data), &mapping); err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user