Fix lot of things...
This commit is contained in:
@@ -15,8 +15,15 @@ func NewIngress(name string) *Ingress {
|
||||
return i
|
||||
}
|
||||
|
||||
func (i *Ingress) SetIngressClass(name string) {
|
||||
class := "{{ .Values." + name + ".ingress.class }}"
|
||||
i.Metadata.Annotations["kuberntes.io/ingress.class"] = class
|
||||
i.Spec.IngressClassName = class
|
||||
}
|
||||
|
||||
type IngressSpec struct {
|
||||
Rules []IngressRule
|
||||
IngressClassName string `yaml:"ingressClassName,omitempty"`
|
||||
Rules []IngressRule
|
||||
}
|
||||
|
||||
type IngressRule struct {
|
||||
@@ -30,7 +37,7 @@ type IngressHttp struct {
|
||||
|
||||
type IngressPath struct {
|
||||
Path string
|
||||
PathType string
|
||||
PathType string `yaml:"pathType"`
|
||||
Backend IngressBackend
|
||||
}
|
||||
|
||||
|
24
helm/notes.go
Normal file
24
helm/notes.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package helm
|
||||
|
||||
import "strings"
|
||||
|
||||
var NOTES = `
|
||||
Congratulations,
|
||||
|
||||
Your application is now deployed. This may take a while to be up and responding.
|
||||
|
||||
__list__
|
||||
`
|
||||
|
||||
func GenNotes(ingressess map[string]*Ingress) string {
|
||||
|
||||
list := make([]string, 0)
|
||||
|
||||
for name, ing := range ingressess {
|
||||
for _, r := range ing.Spec.Rules {
|
||||
list = append(list, "{{ if .Values."+name+".ingress.enabled }}- "+name+" is accessible on : http://"+r.Host+"{{- end }}")
|
||||
}
|
||||
}
|
||||
|
||||
return strings.ReplaceAll(NOTES, "__list__", strings.Join(list, "\n"))
|
||||
}
|
Reference in New Issue
Block a user