Skip to content

SSCSI-245: Rename rotationPollIntervalSeconds to minimumRefreshAge#2906

Open
chiragkyal wants to merge 2 commits into
openshift:masterfrom
chiragkyal:secret-rotation-rename
Open

SSCSI-245: Rename rotationPollIntervalSeconds to minimumRefreshAge#2906
chiragkyal wants to merge 2 commits into
openshift:masterfrom
chiragkyal:secret-rotation-rename

Conversation

@chiragkyal

@chiragkyal chiragkyal commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Renames CustomSecretRotation.rotationPollIntervalSeconds to
CustomSecretRotation.minimumRefreshAge.

The driver only contacts the secret provider when the cached value is older than this threshold. The new
name makes that intent clear at the API level.

No behaviour change; only the API field name and JSON key are updated.

Signed-off-by: chiragkyal <ckyal@redhat.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Hello @chiragkyal! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: e8ff0559-a20e-47f1-bd4c-7329815b5e3c

📥 Commits

Reviewing files that changed from the base of the PR and between 590bc63 and 9d23c8b.

📒 Files selected for processing (1)
  • operator/v1/types_csi_cluster_driver.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • operator/v1/types_csi_cluster_driver.go

📝 Walkthrough

Walkthrough

The PR renames secretsStore.secretRotation.custom.rotationPollIntervalSeconds to minimumRefreshAge in the CustomSecretRotation API type, generated ClusterCSIDriver CRD manifests, and operator test YAML. It updates the field documentation, keeps the old JSON key as a tombstone in the Go type, and adjusts the related validation test names, values, and expected error paths.

Possibly related PRs: #2846

Suggested reviewers: mytreya-rh, everettraven

Changes

The API type now exposes minimumRefreshAge instead of rotationPollIntervalSeconds. All generated ClusterCSIDriver CRD variants reflect the new field name and updated timing description. Operator test fixtures and validation cases were updated to use the new field and matching error paths.

Sequence Diagram(s)

sequenceDiagram
  participant CustomSecretRotation
  participant CRDManifests
  participant OperatorTests
  CustomSecretRotation->>CRDManifests: minimumRefreshAge field name and description
  CRDManifests->>OperatorTests: updated schema and validation paths
Loading
🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: renaming the rotation field to minimumRefreshAge.
Description check ✅ Passed The description is directly related to the changeset and accurately describes the API field rename and its intent.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Changed Ginkgo titles are static and deterministic; no timestamps, UUIDs, node/pod/namespace names, or other run-specific values were added.
Test Structure And Quality ✅ Passed Only declarative YAML/schema manifests changed; no Ginkgo spec code, waits, setup/cleanup, or assertion patterns were modified.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the diff is schema/type YAML only and doesn’t introduce unsupported MicroShift APIs or features.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No Ginkgo e2e tests were added; changes are API schema/CRD and YAML validation updates only, so SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only an API field rename and CRD/test schema updates were changed; no deployment/controller/scheduling logic or topology assumptions were introduced.
Ote Binary Stdout Contract ✅ Passed Touched files are API/CRD/test YAML only; no main/init/TestMain/BeforeSuite stdout writes were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only an API type rename/tombstone changed; no new Ginkgo e2e tests, IPv4 assumptions, or external connectivity were added.
No-Weak-Crypto ✅ Passed Changes only rename the secret-rotation field; scans found no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or secret-comparison crypto usage.
Container-Privileges ✅ Passed PR only renames the secret-rotation field in API/CRD/test YAML; no container/K8s manifest changes or privileged settings were introduced.
No-Sensitive-Data-In-Logs ✅ Passed Touched files only rename schema fields and update tests/CRDs; no logging calls or sensitive-data output were added.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented


Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 26, 2026
@chiragkyal chiragkyal changed the title Rename rotationPollIntervalSeconds to minimumRefreshAge SSCSI-245: Rename rotationPollIntervalSeconds to minimumRefreshAge Jun 26, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 26, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 26, 2026

Copy link
Copy Markdown

@chiragkyal: This pull request references SSCSI-245 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

Renames CustomSecretRotation.rotationPollIntervalSeconds to
CustomSecretRotation.minimumRefreshAge.

The driver only contacts the secret provider when the cached value is older than this threshold. The new
name makes that intent clear at the API level.

No behaviour change; only the API field name and JSON key are updated.

See openshift/enhancements#2012 (comment) for the decision.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from JoelSpeed and everettraven June 26, 2026 13:16
@chiragkyal

Copy link
Copy Markdown
Member Author

/cc @mytreya-rh

@openshift-ci openshift-ci Bot requested a review from mytreya-rh June 26, 2026 13:16
Comment on lines -509 to +522
// rotationPollIntervalSeconds is the minimum time in seconds between secret
// rotation attempts. The driver skips provider calls if less than this interval
// has elapsed since the last successful rotation.
// minimumRefreshAge is the minimum time in seconds between secret
// rotation attempts. Each time kubelet calls NodePublishVolume, the driver
// checks whether this interval has elapsed since the last successful provider
// call. If it has, the driver contacts the secret provider to fetch the latest
// secret values and updates the mounted volume.
// Setting this value below the kubelet syncFrequency (default: 1 minute)
// has no additional effect on the actual rotation cadence.
// Must be at least 1 second and no more than 31560000 seconds (~1 year).
// When omitted, this means no opinion and the platform is left to choose a
// reasonable default, which is subject to change over time.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=31560000
// +optional
RotationPollIntervalSeconds int32 `json:"rotationPollIntervalSeconds,omitempty"`
MinimumRefreshAge int32 `json:"minimumRefreshAge,omitempty"`

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.

The old field needs to tombstoned.

An example of tombstoning:

// --- TOMBSTONE ---
// aws was a field that allowed configuring AWS KMS.
// It was never implemented and has been removed.
// The field name is reserved to prevent reuse.
//
// +optional
// AWS *AWSKMSConfig `json:"aws,omitempty"`

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for the example. I've added the TOMBSTONE in the latest changes.

Signed-off-by: chiragkyal <ckyal@redhat.com>
@chiragkyal chiragkyal force-pushed the secret-rotation-rename branch from 590bc63 to 9d23c8b Compare July 2, 2026 06:18
@mytreya-rh

Copy link
Copy Markdown

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-hypershift
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-techpreview
/test e2e-aws-serial-1of2
/test e2e-aws-serial-2of2
/test e2e-aws-serial-techpreview-1of2
/test e2e-aws-serial-techpreview-2of2
/test e2e-azure
/test e2e-gcp
/test e2e-upgrade
/test e2e-upgrade-out-of-change
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-techpreview
/test minor-e2e-upgrade-minor

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mytreya-rh
Once this PR has been reviewed and has the lgtm label, please assign deads2k for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@chiragkyal: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-upgrade 9d23c8b link true /test e2e-upgrade
ci/prow/verify-crd-schema 9d23c8b link true /test verify-crd-schema
ci/prow/e2e-vsphere-ovn 9d23c8b link true /test e2e-vsphere-ovn
ci/prow/e2e-gcp 9d23c8b link true /test e2e-gcp
ci/prow/e2e-azure 9d23c8b link true /test e2e-azure
ci/prow/e2e-vsphere-ovn-techpreview 9d23c8b link true /test e2e-vsphere-ovn-techpreview
ci/prow/e2e-aws-ovn-hypershift 9d23c8b link true /test e2e-aws-ovn-hypershift
ci/prow/verify-crdify 9d23c8b link true /test verify-crdify

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants