-
Notifications
You must be signed in to change notification settings - Fork 1k
Make teamId in cluster name optional #2001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,15 +110,9 @@ func (p *Postgresql) UnmarshalJSON(data []byte) error { | |
} | ||
tmp2 := Postgresql(tmp) | ||
|
||
if clusterName, err := extractClusterName(tmp2.ObjectMeta.Name, tmp2.Spec.TeamID); err != nil { | ||
tmp2.Error = err.Error() | ||
tmp2.Status = PostgresStatus{PostgresClusterStatus: ClusterStatusInvalid} | ||
} else if err := validateCloneClusterDescription(tmp2.Spec.Clone); err != nil { | ||
|
||
if err := validateCloneClusterDescription(tmp2.Spec.Clone); err != nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how is this related to clone? maybe better function name? or is this indeed about cloning? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, this is a validation of the clone section. Existed also before. |
||
tmp2.Error = err.Error() | ||
tmp2.Status.PostgresClusterStatus = ClusterStatusInvalid | ||
} else { | ||
tmp2.Spec.ClusterName = clusterName | ||
} | ||
|
||
*p = tmp2 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should inform about settings and implications. it may still be impossible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's now possible to change it later. When
enable_team_id_clustername_prefix
is enabled you will only get an error on sync that cluster name does not match the { TEAM-ID }-{... format with status being set to inavlid.