Skip to content
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

Log information about StatefulSets as they are created, updated and deleted #182

Merged
merged 3 commits into from
Nov 29, 2024

Conversation

charleskorn
Copy link
Contributor

This PR adds extra logging to rollout-operator to aid in reconstructing the series of events that affected a StatefulSet.

This is useful when trying to debug the behaviour of a StatefulSet. For example, we recently had an issue where a StatefulSet was deleted and was recreated with fewer replicas than expected, and this kind of logging would have been helpful to understand what happened.

Sample logs:

level=debug ts=2024-11-29T02:54:15.199822428Z msg="observed StatefulSet added" name=test-app namespace=rollout-operator-development replicas=5 generation=1 creation_timestamp=2024-11-29T02:54:15Z
level=debug ts=2024-11-29T02:54:50.2751915Z msg="observed StatefulSet updated" name=test-app namespace=rollout-operator-development old_replicas=5 new_replicas=7 old_generation=1 new_generation=2
level=debug ts=2024-11-29T02:55:20.447203583Z msg="observed StatefulSet deleted" name=test-app namespace=rollout-operator-development replicas=7 generation=2

@charleskorn charleskorn enabled auto-merge (squash) November 29, 2024 03:12
@charleskorn charleskorn merged commit 499f385 into main Nov 29, 2024
6 checks passed
@charleskorn charleskorn deleted the charleskorn/logging branch November 29, 2024 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants