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

lastTransitionTime/lastUpdateTime under status->conditions not updated when updating a SealedSecret #1470

Closed
famliu opened this issue Feb 23, 2024 · 0 comments · Fixed by #1475
Assignees
Labels

Comments

@famliu
Copy link

famliu commented Feb 23, 2024

Which component:
Not sure, controller, apiVersion: bitnami.com/v1alpha1, 2.14.2 version of helmchart

Describe the bug
lastTransitionTime/lastUpdateTime under status->conditions not updated when updating a SealedSecret

To Reproduce
Steps to reproduce the behavior:

  1. Apply a sealed secret by running "oc apply -f my-sealed-secret.yaml", output "sealedsecret.bitnami.com/my-secret created"
  2. Modify the encryptedData part of my-sealed-secret.yaml.
  3. Apply the modified sealed secret by running "oc apply -f my-sealed-secret.yaml", output "sealedsecret.bitnami.com/my-secret configured"
  4. Check the SealedSecret object's "status" property:
    status:
    conditions:
    • lastTransitionTime: "the time when the sealed secret is created first time"
      lastUpdateTime: "the time when the sealed secret is created first time"
      status: 'True'
      type: Synced
      observedGeneration: 2

Expected behavior
The lastTransitionTime/lastUpdateTime should be the time the sealed secret is updated? The observedGeneration property seems to be correctly updated.

Version of Kubernetes:
v1.26.12+9ed7eae
OpenShift 4.13

  • Output of kubectl version:
(paste your output here)

Client Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.1", GitCommit:"8f94681cd294aa8cfd3407b8191f6c70214973a4", GitTreeState:"clean", BuildDate:"2023-01-18T15:58:16Z", GoVersion:"go1.19.5", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.12+9ed7eae", GitCommit:"8172db91f90e631b8219bb990a1fc5d992b7c4ea", GitTreeState:"clean", BuildDate:"2024-01-04T15:45:03Z", GoVersion:"go1.19.13 X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

Additional context

@famliu famliu added the triage Issues/PRs that need to be reviewed label Feb 23, 2024
alvneiayu added a commit that referenced this issue Feb 29, 2024
**Description of the change**

This PR modify the way that we are setting up the LastUpdateTime. We are
going to modify the LastUpdateTime always that we are updating the
Sealed Secrets and the LastTransitionTime only when the status has
changed.

Integration tests included.

**Benefits**

LastUpdateTime is working properly

**Applicable issues**

<!-- Enter any applicable Issues here (You can reference an issue using
#) -->
- fixes #1470

Signed-off-by: Alvaro Neira Ayuso <alvaro.neira@broadcom.com>
@alvneiayu alvneiayu added bug and removed triage Issues/PRs that need to be reviewed labels Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants