Fixup some annotations

This commit is contained in:
2021-12-01 15:17:34 +01:00
parent a536fcd369
commit 1085be2b53
8 changed files with 33 additions and 6 deletions

View File

@@ -5,13 +5,15 @@ type Service struct {
Spec *ServiceSpec `yaml:"spec"`
}
func NewService() *Service {
func NewService(name string) *Service {
s := &Service{
K8sBase: NewBase(),
Spec: NewServiceSpec(),
}
s.K8sBase.Metadata.Name = "{{ .Release.Name }}-" + name
s.K8sBase.Kind = "Service"
s.K8sBase.ApiVersion = "v1"
s.K8sBase.Metadata.Labels[K+"/component"] = name
return s
}