Initial version

This commit is contained in:
2021-11-30 12:04:28 +01:00
commit f095f39eaf
9 changed files with 567 additions and 0 deletions

44
helm/ingress.go Normal file
View File

@@ -0,0 +1,44 @@
package helm
type Ingress struct {
*K8sBase
Spec IngressSpec
}
func NewIngress(name string) *Ingress {
i := &Ingress{}
i.K8sBase = NewBase()
i.K8sBase.Metadata.Name = "{{ .Release.Name }}-" + name
i.K8sBase.Kind = "Ingress"
i.ApiVersion = "networking.k8s.io/v1"
return i
}
type IngressSpec struct {
Rules []IngressRule
}
type IngressRule struct {
Host string
Http IngressHttp
}
type IngressHttp struct {
Paths []IngressPath
}
type IngressPath struct {
Path string
PathType string
Backend IngressBackend
}
type IngressBackend struct {
Service IngressService
}
type IngressService struct {
Name string
Port map[string]interface{}
}