chore(ingress): Allow tls activation

This commit is contained in:
2024-11-08 15:51:36 +01:00
parent 8ab1763902
commit 9358076a36
3 changed files with 38 additions and 0 deletions

View File

@@ -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