Skip to content

feat: spread Pod rollout - #5391

Merged
gbartolini merged 10 commits into
cloudnative-pg:mainfrom
leonardoce:dev/rollout-manager
Sep 27, 2024
Merged

gbartolini merged 10 commits into
cloudnative-pg:mainfrom
leonardoce:dev/rollout-manager

Conversation

@leonardoce

@leonardoce leonardoce commented Aug 28, 2024 •

Copy link
Copy Markdown
Contributor

This patch adds two new parameters to the operator configuration:

  • CLUSTERS_ROLLOUT_DELAY: Defines the number of seconds to wait between roll-outs of Pods of different PostgreSQL clusters (default: 0).
  • INSTANCES_ROLLOUT_DELAY: Defines the number of seconds to wait between roll-outs of Pods of individual instances within the same PostgreSQL cluster (default: 0).

Using these two parameters, the operator can be confgured to spread the rollout of new versions of PostgreSQL and of the instance manager, easing the impact of upgrading the operator or the PostgreSQL version.

Closes: #5384

@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.22 labels Aug 28, 2024
@github-actions

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@leonardoce
leonardoce force-pushed the dev/rollout-manager branch from 5cbcec7 to f84af95 Compare August 28, 2024 11:54
@leonardoce
leonardoce marked this pull request as ready for review August 28, 2024 12:00
@leonardoce
leonardoce requested a review from a team August 28, 2024 12:00
@armru
armru force-pushed the dev/rollout-manager branch from f84af95 to 39da5a8 Compare September 12, 2024 09:41
@armru
armru force-pushed the dev/rollout-manager branch from 39da5a8 to 618a429 Compare September 12, 2024 09:43
@armru

armru commented Sep 12, 2024

Copy link
Copy Markdown
Member

/test limit=local

@github-actions

Copy link
Copy Markdown
Contributor

@gbartolini gbartolini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added documentation

@gbartolini

Copy link
Copy Markdown
Contributor

/test limit=local

@github-actions

Copy link
Copy Markdown
Contributor

@gbartolini

Copy link
Copy Markdown
Contributor

/test limit=local

@github-actions

Copy link
Copy Markdown
Contributor

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Sep 21, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It("returns zero delay for clusters rollout when not set", func() {
It("returns default of zero delay for clusters rollout when not set", func() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Expect(config.GetClustersRolloutDelay()).To(Equal(0 * time.Second))
Expect(config.GetClustersRolloutDelay()).To(BeZero())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It("returns zero delay for instances rollout when not set", func() {
It("returns default of zero delay for instances rollout when not set", func() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Expect(config.GetInstancesRolloutDelay()).To(Equal(0 * time.Second))
Expect(config.GetInstancesRolloutDelay()).To(BeZero())

leonardoce and others added 10 commits September 27, 2024 11:12
This patch adds two new parameters to the operator configuration:

* `CLUSTERS_ROLLOUT_DELAY`: the amount of time in seconds the
  operator should wait between rollouts of Pods of different
  clusters

* `INSTANCES_ROLLOUT_DELAY`: the amount of time in seconds the operator
  should wait between rollouts of Pods of the same cluster

Using these two parameters, the operator can be confgured to spread the
rollout of new versions of PostgreSQL and of the instance manager,
easing the impact of upgrading the operator or the PostgreSQL version.

Closes: cloudnative-pg#5384

Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Quaresima <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases ok to merge 👌 This PR can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Introduce Delay Between Cluster Rollouts

5 participants