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

chore: detect PodSpec drift in pod rollout, and clarify rollout code #2243

Merged
merged 20 commits into from
Aug 23, 2023

Conversation

jsilvela
Copy link
Collaborator

@jsilvela jsilvela commented Jun 9, 2023

  • Add pod annotation with original PodSpec to detect drift.
  • Use a standard structure for the functions checking if
    rollout is needed.
  • Fix logic that could allow a rollout with a Postgres image
    from a different major version.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2023

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions github-actions bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.18 release-1.19 release-1.20 labels Jun 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2023

❗ 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

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2023

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@sxd sxd removed the release-1.18 label Jun 13, 2023
@jsilvela
Copy link
Collaborator Author

/test

@github-actions
Copy link
Contributor

@jsilvela, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/5380798021

@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

6 similar comments
@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@jsilvela
Copy link
Collaborator Author

/test

@github-actions
Copy link
Contributor

@jsilvela, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/5390994815

@armru
Copy link
Member

armru commented Jun 28, 2023

/test limit=local

jsilvela and others added 10 commits August 22, 2023 15:04
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
@mnencia
Copy link
Member

mnencia commented Aug 22, 2023

/test tl=4

@github-actions
Copy link
Contributor

@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/5939246215

@mnencia
Copy link
Member

mnencia commented Aug 22, 2023

/test

@github-actions
Copy link
Contributor

@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/5941544994

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
@mnencia mnencia merged commit 26d1f23 into main Aug 23, 2023
22 checks passed
@mnencia mnencia deleted the dev/cnp-3741 branch August 23, 2023 09:58
cnpg-bot pushed a commit that referenced this pull request Aug 23, 2023
This patch implements a robust algorithm to detect when the operator
should roll out a Pod. Since the Kubernetes environment may change
the Pod definition, the requested podSpec built from the Cluster is stored
for comparison to detect drift.

Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 26d1f23)
cnpg-bot pushed a commit that referenced this pull request Aug 23, 2023
This patch implements a robust algorithm to detect when the operator
should roll out a Pod. Since the Kubernetes environment may change
the Pod definition, the requested podSpec built from the Cluster is stored
for comparison to detect drift.

Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 26d1f23)
mnencia added a commit that referenced this pull request Aug 24, 2023
The PR #2243 mistakenly used the Protocol Buffers encoding
for the podSpec annotation content. 
This commit changes the encoding to JSON as intended.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
litaocdl pushed a commit that referenced this pull request Aug 29, 2023
This patch implements a robust algorithm to detect when the operator
should roll out a Pod. Since the Kubernetes environment may change
the Pod definition, the requested podSpec built from the Cluster is stored
for comparison to detect drift.

Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
litaocdl pushed a commit that referenced this pull request Aug 29, 2023
This patch implements a robust algorithm to detect when the operator
should roll out a Pod. Since the Kubernetes environment may change
the Pod definition, the requested podSpec built from the Cluster is stored
for comparison to detect drift.

Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
litaocdl pushed a commit that referenced this pull request Nov 2, 2023
The PR #2243 mistakenly used the Protocol Buffers encoding
for the podSpec annotation content. 
This commit changes the encoding to JSON as intended.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
litaocdl pushed a commit that referenced this pull request Nov 2, 2023
The PR #2243 mistakenly used the Protocol Buffers encoding
for the podSpec annotation content. 
This commit changes the encoding to JSON as intended.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
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 no-issue ok to merge 👌 This PR can be merged release-1.19 release-1.20
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants