WIP, possibility to create cronjob

This commit is contained in:
2022-05-24 14:44:31 +02:00
parent 8cf3ff9f73
commit 5fd1e16f1a
8 changed files with 251 additions and 1 deletions

18
helm/serviceAccount.go Normal file
View File

@@ -0,0 +1,18 @@
package helm
// ServiceAccount defines a service account
type ServiceAccount struct {
*K8sBase `yaml:",inline"`
}
// NewServiceAccount creates a new service account with a given name.
func NewServiceAccount(name string) *ServiceAccount {
sa := &ServiceAccount{
K8sBase: NewBase(),
}
sa.K8sBase.Kind = "ServiceAccount"
sa.K8sBase.ApiVersion = "v1"
sa.K8sBase.Metadata.Name = ReleaseNameTpl + "-" + name + "-cron-user"
sa.K8sBase.Metadata.Labels[K+"/component"] = name
return sa
}