-
Notifications
You must be signed in to change notification settings - Fork 969
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
skip creation later to improve visibility of errors #1013
Conversation
pkg/util/k8sutil/k8sutil.go
Outdated
@@ -156,6 +159,34 @@ func NewFromConfig(cfg *rest.Config) (KubernetesClient, error) { | |||
return kubeClient, nil | |||
} | |||
|
|||
// SetStatus of Postgres cluster | |||
// TODO: eventually switch to updateStatus() for kubernetes 1.11 and above |
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.
Whats with this comment?
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.
traveled with the code. I'll remove it. UpdateStatus
requires a Postgresql struct with updated status. Seems easier as of now to just patch the CRD.
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.
I wonder if SetStatus should be called differently now that it lives inside k8sutil. Maybe SetPgStatus
or SetCRDStatus
873ffd8
to
09c7e7a
Compare
👍 |
1 similar comment
👍 |
if the cluster name does not start with the
teamId
we are currently skipping the add event, which makes it hard to track the error from the UI. It is emitted neither to worker logs nor to K8s events. ThePostgresClusterStatus
, although set during marshaling, remains empty.The PR does not skip the addEvent but will process it until the cluster would get created. This allows to show the error in logs accessible from UI and to record a K8s event with a working
ObjectReference
.