Skip to content

feat: add s3 retention config for etcd snapshots - #2402

Merged
jiaqiluo merged 1 commit into
release/v15from
backport-2337-release-v15
Aug 14, 2026
Merged

feat: add s3 retention config for etcd snapshots#2402
jiaqiluo merged 1 commit into
release/v15from
backport-2337-release-v15

Conversation

@github-actions

Copy link
Copy Markdown

This pull request cherry-picks the changes from #2337 into release/v15

Addresses #2339 for #2338

WARNING!: to avoid having to resolve merge conflicts this PR is generated with 'git cherry-pick -X theirs'.

Please make sure to carefully inspect this PR so that you don't accidentally revert anything!

Copied from main PR:

Rancher now supports a separate retention count for S3-stored etcd snapshots, independent of the local snapshot_retention value.

Description

Testing

My current cluster is configured with the following etcd configuration in rancher2_cluster_v2.rke_config.etcd

    etcd {
      snapshot_retention = 2
      ...
      s3_config {
        ...
      }
    }

Updating the provider doesn't make any changes to the existing cluster configuration.

Next updating the provider and setting retention = 3 results in the following changes

  # module.downstream_cluster[0].module.cluster.rancher2_cluster_v2.main will be updated in-place
  ~ resource "rancher2_cluster_v2" "main" {
        id                           = "..."
        name                         = "..."
        # (10 unchanged attributes hidden)

      ~ rke_config {
            # (3 unchanged attributes hidden)

          ~ etcd {
                # (3 unchanged attributes hidden)

              ~ s3_config {
                  ~ retention             = 0 -> 3
                    # (7 unchanged attributes hidden)
                }
            }

            # (10 unchanged blocks hidden)
        }

        # (1 unchanged block hidden)
    }

Not a breaking change.

Co-authored-by: Matt Trachier <matt.trachier@suse.com>
(cherry picked from commit 4845c29)
@github-actions github-actions Bot added internal/pr-backport This PR is back porting code to a release branch. release/v15 Targets release v15.x correlating to Rancher's v2.15.x labels Aug 14, 2026
@jiaqiluo
jiaqiluo merged commit 1730d97 into release/v15 Aug 14, 2026
9 checks passed
@jiaqiluo
jiaqiluo deleted the backport-2337-release-v15 branch August 14, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal/pr-backport This PR is back porting code to a release branch. release/v15 Targets release v15.x correlating to Rancher's v2.15.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants