-
Notifications
You must be signed in to change notification settings - Fork 163
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
Track changes in .spec.postRenderers
#965
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stefanprodan
reviewed
May 6, 2024
stefanprodan
reviewed
May 6, 2024
stefanprodan
reviewed
May 6, 2024
souleb
force-pushed
the
fix-964
branch
2 times, most recently
from
May 6, 2024 15:05
c02e31e
to
c39ae31
Compare
stefanprodan
reviewed
May 6, 2024
I have tested the last code on a kind cluster with an existing Warning: v2beta2 HelmRelease is deprecated, upgrade to v2
Name: podinfo-template
Namespace: default
API Version: helm.toolkit.fluxcd.io/v2beta2
Kind: HelmRelease
Metadata:
Generation: 1
Spec:
Chart Ref:
Kind: HelmChart
Name: podinfo
Interval: 5m
Post Renderers:
Kustomize:
Patches:
Patch: - op: add
path: /metadata/annotations/hello
value: world2
Target:
Kind: Deployment
Name: podinfo-template
Version: v1
Test:
Enable: true
Values:
Replica Count: 2
Status:
Conditions:
Last Transition Time: 2024-05-07T08:23:07Z
Message: Helm test succeeded for release default/podinfo-template.v1 with chart [email protected]: 3 test hooks completed successfully
Observed Generation: 1
Reason: TestSucceeded
Status: True
Type: Ready
Last Transition Time: 2024-05-07T08:22:59Z
Message: Helm install succeeded for release default/podinfo-template.v1 with chart [email protected]
Observed Generation: 1
Reason: InstallSucceeded
Status: True
Type: Released
Last Transition Time: 2024-05-07T08:23:07Z
Message: Helm test succeeded for release default/podinfo-template.v1 with chart [email protected]: 3 test hooks completed successfully
Observed Generation: 1
Reason: TestSucceeded
Status: True
Type: TestSuccess
History:
Chart Name: podinfo
Chart Version: 6.6.2
Config Digest: sha256:e15c415d62760896bd8bec192a44c5716dc224db9e0fc609b9ac14718f8f9e56
Digest: sha256:11006d53cba942b73d124414f755869565730d24a36480b3208948c60275597d
First Deployed: 2024-05-07T08:22:55Z
Last Deployed: 2024-05-07T08:22:55Z
Name: podinfo-template
Namespace: default
Status: deployed
Test Hooks:
podinfo-template-grpc-test-kj0hv:
Last Completed: 2024-05-07T08:23:02Z
Last Started: 2024-05-07T08:23:00Z
Phase: Succeeded
Podinfo - Template - Jwt - Test - Gufwh:
Last Completed: 2024-05-07T08:23:05Z
Last Started: 2024-05-07T08:23:02Z
Phase: Succeeded
podinfo-template-service-test-aumr6:
Last Completed: 2024-05-07T08:23:07Z
Last Started: 2024-05-07T08:23:05Z
Phase: Succeeded
Version: 1
Last Attempted Config Digest: sha256:e15c415d62760896bd8bec192a44c5716dc224db9e0fc609b9ac14718f8f9e56
Last Attempted Generation: 1
Last Attempted Release Action: install
Last Attempted Revision: 6.6.2
Observed Generation: 1
Storage Namespace: default
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal InstallSucceeded 102s helm-controller Helm install succeeded for release default/podinfo-template.v1 with chart [email protected]
Normal TestSucceeded 94s helm-controller Helm test succeeded for release default/podinfo-template.v1 with chart [email protected]: 3 test hooks completed successfully Existing HelmRelease should adopt PostRenderers status without upgradeWarning: v2beta2 HelmRelease is deprecated, upgrade to v2
Name: podinfo-template
Namespace: default
API Version: helm.toolkit.fluxcd.io/v2beta2
Kind: HelmRelease
Metadata:
Generation: 1
Spec:
Chart Ref:
Kind: HelmChart
Name: podinfo
Interval: 5m
Post Renderers:
Kustomize:
Patches:
Patch: - op: add
path: /metadata/annotations/hello
value: world2
Target:
Kind: Deployment
Name: podinfo-template
Version: v1
Test:
Enable: true
Values:
Replica Count: 2
Status:
Conditions:
Last Transition Time: 2024-05-07T08:23:07Z
Message: Helm test succeeded for release default/podinfo-template.v1 with chart [email protected]: 3 test hooks completed successfully
Observed Generation: 1
Reason: TestSucceeded
Status: True
Type: Ready
Last Transition Time: 2024-05-07T08:22:59Z
Message: Helm install succeeded for release default/podinfo-template.v1 with chart [email protected]
1 hr.yaml + X
Observed Generation: 1
Reason: InstallSucceeded
Status: True
Type: Released
Last Transition Time: 2024-05-07T08:23:07Z
Message: Helm test succeeded for release default/podinfo-template.v1 with chart [email protected]: 3 test hooks completed successfully
Observed Generation: 1
Reason: TestSucceeded
Status: True
Type: TestSuccess
History:
Chart Name: podinfo
Chart Version: 6.6.2
Config Digest: sha256:e15c415d62760896bd8bec192a44c5716dc224db9e0fc609b9ac14718f8f9e56
Digest: sha256:11006d53cba942b73d124414f755869565730d24a36480b3208948c60275597d
First Deployed: 2024-05-07T08:22:55Z
Last Deployed: 2024-05-07T08:22:55Z
Name: podinfo-template
Namespace: default
Status: deployed
...
Version: 1
Last Attempted Config Digest: sha256:e15c415d62760896bd8bec192a44c5716dc224db9e0fc609b9ac14718f8f9e56
Last Attempted Generation: 1
Last Attempted Post Renderers Digest: sha256:0801f4f2fec3b08c5c25664bbcba357334dfae9aa6f4d59813079749d3acc154
Last Attempted Release Action: install
Last Attempted Revision: 6.6.2
Last Handled Reconcile At: 2024-05-07T10:24:53.300426+02:00
Observed Generation: 1
Storage Namespace: default Change to PostRenderers should trigger an upgradeWarning: v2beta2 HelmRelease is deprecated, upgrade to v2
Name: podinfo-template
Namespace: default
API Version: helm.toolkit.fluxcd.io/v2beta2
Kind: HelmRelease
Metadata:
Generation: 2
Spec:
Chart Ref:
Kind: HelmChart
Name: podinfo
Interval: 5m
Post Renderers:
Kustomize:
Patches:
Patch: - op: add
path: /metadata/annotations/hello
value: world
Target:
Kind: Deployment
Name: podinfo-template
Version: v1
Test:
Enable: true
Values:
Replica Count: 2
Status:
Conditions:
Last Transition Time: 2024-05-07T08:26:38Z
Message: Helm test succeeded for release default/podinfo-template.v2 with chart [email protected]: 3 test hooks completed successfully
Observed Generation: 2
Reason: TestSucceeded
Status: True
Type: Ready
Last Transition Time: 2024-05-07T08:26:20Z
Message: Helm upgrade succeeded for release default/podinfo-template.v2 with chart [email protected]
Observed Generation: 2
Reason: UpgradeSucceeded
Status: True
Type: Released
Last Transition Time: 2024-05-07T08:26:38Z
Message: Helm test succeeded for release default/podinfo-template.v2 with chart [email protected]: 3 test hooks completed successfully
Observed Generation: 2
Reason: TestSucceeded
Status: True
Type: TestSuccess
...
Last Attempted Config Digest: sha256:e15c415d62760896bd8bec192a44c5716dc224db9e0fc609b9ac14718f8f9e56
Last Attempted Generation: 2
Last Attempted Post Renderers Digest: sha256:fd5c051933da29da53f8f5d34c5b89247b88899153b84807cda11b1b9a58f44f
Last Attempted Release Action: upgrade
Last Attempted Revision: 6.6.2
Last Handled Reconcile At: 2024-05-07T10:26:23.760449+02:00
Observed Generation: 2
Storage Namespace: default
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal InstallSucceeded 3m44s helm-controller Helm install succeeded for release default/podinfo-template.v1 with chart [email protected]
Normal TestSucceeded 3m36s helm-controller Helm test succeeded for release default/podinfo-template.v1 with chart [email protected]: 3 test hooks completed successfully
Normal UpgradeSucceeded 23s helm-controller Helm upgrade succeeded for release default/podinfo-template.v2 with chart [email protected]
Normal TestSucceeded 5s helm-controller Helm test succeeded for release default/podinfo-template.v2 with chart [email protected]: 3 test hooks completed successfully Removing PostRenderers should trigger an update and unset `Last Attempted Post Renderers Digest``Warning: v2beta2 HelmRelease is deprecated, upgrade to v2
Name: podinfo-template
Namespace: default
API Version: helm.toolkit.fluxcd.io/v2beta2
Kind: HelmRelease
Metadata:
Generation: 3
Spec:
Chart Ref:
Kind: HelmChart
Name: podinfo
Interval: 5m
Test:
Enable: true
Values:
Replica Count: 2
Status:
Conditions:
Last Transition Time: 2024-05-07T08:28:04Z
Message: Helm test succeeded for release default/podinfo-template.v3 with chart [email protected]: 3 test hooks completed successfully
Observed Generation: 3
Reason: TestSucceeded
Status: True
Type: Ready
Last Transition Time: 2024-05-07T08:27:47Z
Message: Helm upgrade succeeded for release default/podinfo-template.v3 with chart [email protected]
Observed Generation: 3
Reason: UpgradeSucceeded
Status: True
Type: Released
Last Transition Time: 2024-05-07T08:28:04Z
Message: Helm test succeeded for release default/podinfo-template.v3 with chart [email protected]: 3 test hooks completed successfully
Observed Generation: 3
Reason: TestSucceeded
Status: True
Type: TestSuccess
...
Last Attempted Config Digest: sha256:e15c415d62760896bd8bec192a44c5716dc224db9e0fc609b9ac14718f8f9e56
Last Attempted Generation: 3
Last Attempted Release Action: upgrade
Last Attempted Revision: 6.6.2
Last Handled Reconcile At: 2024-05-07T10:27:52.283029+02:00
Observed Generation: 3
Storage Namespace: default
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal InstallSucceeded 5m13s helm-controller Helm install succeeded for release default/podinfo-template.v1 with chart [email protected]
Normal TestSucceeded 5m5s helm-controller Helm test succeeded for release default/podinfo-template.v1 with chart [email protected]: 3 test hooks completed successfully
Normal UpgradeSucceeded 112s helm-controller Helm upgrade succeeded for release default/podinfo-template.v2 with chart [email protected]
Normal TestSucceeded 94s helm-controller Helm test succeeded for release default/podinfo-template.v2 with chart [email protected]: 3 test hooks completed successfully
Normal UpgradeSucceeded 25s helm-controller Helm upgrade succeeded for release default/podinfo-template.v3 with chart [email protected]
Normal TestSucceeded 8s helm-controller Helm test succeeded for release default/podinfo-template.v3 with chart [email protected]: 3 test hooks completed successfully |
stefanprodan
reviewed
May 7, 2024
Signed-off-by: Soule BA <[email protected]>
Signed-off-by: Soule BA <[email protected]>
stefanprodan
approved these changes
May 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @souleb 🏅
stefanprodan
changed the title
fix: detect changes in spec.postRenderers
Track changes in May 7, 2024
.spec. postRenderers
stefanprodan
changed the title
Track changes in
Track changes in May 7, 2024
.spec. postRenderers
.spec.postRenderers
stefanprodan
added
the
area/kustomize
Kustomize (post-rendering) related issues and pull requests
label
May 7, 2024
darkowlzz
reviewed
May 7, 2024
This implementation update `.status.ObervedPostRenderersDigest` after a successful reconciliation if `spec.postRenderers` is not nil. Changes to `spec.postRenderers` are detected for `deployed` releases. `Failed` and `Uninstalled` releases are detected earlier in the reconciliation process. Signed-off-by: Soule BA <[email protected]>
darkowlzz
reviewed
May 7, 2024
darkowlzz
reviewed
May 7, 2024
darkowlzz
reviewed
May 7, 2024
souleb
force-pushed
the
fix-964
branch
2 times, most recently
from
May 7, 2024 13:35
24c87aa
to
837a592
Compare
darkowlzz
reviewed
May 7, 2024
souleb
force-pushed
the
fix-964
branch
2 times, most recently
from
May 7, 2024 14:31
6ac9479
to
f47ddad
Compare
darkowlzz
approved these changes
May 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Signed-off-by: Soule BA <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #964