Make teamId in cluster name optional (#2001)

* making teamId in clustername optional
* move teamId check to addCluster function
This commit is contained in:
Felix Kunde
2022-08-24 10:12:50 +02:00
committed by GitHub
parent b91b69c736
commit 3bfd63cbe6
17 changed files with 96 additions and 76 deletions
+6 -1
View File
@@ -244,7 +244,12 @@ func getPostgresContainer(podSpec *v1.PodSpec) (pgContainer v1.Container) {
func (c *Cluster) getTeamMembers(teamID string) ([]string, error) {
if teamID == "" {
return nil, fmt.Errorf("no teamId specified")
msg := "no teamId specified"
if c.OpConfig.EnableTeamIdClusternamePrefix {
return nil, fmt.Errorf(msg)
}
c.logger.Warnf(msg)
return nil, nil
}
members := []string{}