Skip to content

Conversation

AleksandarSavchev
Copy link
Member

How to categorize this PR?

/area robustness
/kind bug

What this PR does / why we need it:
This PR fixes an issue with gardener-node-agent which was causing it to enter crash-loop when a breaking change on its config was introduced and the pull of the new gardener-node-agent image failed. The old instance of gardener-node-agent was using the new config. With this fix we add a suffix containing its version, which would help gardener-node-agent use the correct config file.

Which issue(s) this PR fixes:
Fixes #11025

Special notes for your reviewer:

Release note:

A bug which was causing the `gardener-node-agent` to enter crash-loop when its config was updated with breaking changes was fixed.
The `gardener-node-agent` now has a `--config-dir` flag that is used to find the config file instead of a `--config` flag.

@gardener-prow gardener-prow bot added area/robustness Robustness, reliability, resilience related kind/bug Bug labels Jul 22, 2025
@gardener-prow gardener-prow bot requested review from ScheererJ and timuthy July 22, 2025 11:18
@gardener-prow gardener-prow bot added cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 22, 2025
@AleksandarSavchev AleksandarSavchev force-pushed the fix-node-agent-crash-loop-on-changes-config branch from 19a11e5 to 7602bd1 Compare July 22, 2025 11:27
@gardener-prow gardener-prow bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 22, 2025
AleksandarSavchev and others added 4 commits July 22, 2025 16:23
Co-authored-by: Oliver Goetz <o.goetz@sap.com>
Co-authored-by: Rada Dimitrova <rada.dimitrova@sap.com>
Co-authored-by: Oliver Goetz <o.goetz@sap.com>
Co-authored-by: Rada Dimitrova <rada.dimitrova@sap.com>
Co-authored-by: Oliver Goetz <o.goetz@sap.com>
Co-authored-by: Rada Dimitrova <rada.dimitrova@sap.com>
@AleksandarSavchev AleksandarSavchev force-pushed the fix-node-agent-crash-loop-on-changes-config branch from 7602bd1 to 273303a Compare July 22, 2025 13:26
@gardener-prow gardener-prow bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 22, 2025
@timuthy
Copy link
Member

timuthy commented Jul 23, 2025

/assign

RadaBDimitrova and others added 2 commits July 24, 2025 14:45
Co-authored-by: Oliver Goetz <o.goetz@sap.com>
Co-authored-by: Aleksandar Savchev  <aleksandar.savchev@sap.com>
@RadaBDimitrova
Copy link
Contributor

/retest

W0724 12:32:25.257499   34979 main.go:442] not found external link source for type github.com/gardener/gardener/pkg/apis/core/v1beta1.CredentialsRotationPhase
I0724 12:32:25.261112   34979 main.go:167] written to ../../../../docs/api-reference/operator.md
make[1]: *** [/home/prow/go/src/github.com/gardener/gardener/Makefile:214: generate] Error 1
make[1]: Leaving directory '/home/prow/go/src/github.com/gardener/gardener'
make: *** [Makefile:156: check-generate] Error 1

Copy link
Member

@timuthy timuthy left a comment

Choose a reason for hiding this comment

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

Thanks for the fix.
/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2025
Copy link
Contributor

gardener-prow bot commented Jul 30, 2025

LGTM label has been added.

Git tree hash: e174f7508aa8538ff97bfdba1a83d6ebdf6fcbdc

Copy link
Member

@oliver-goetz oliver-goetz left a comment

Choose a reason for hiding this comment

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

This was fun, thanks 😄

/approve

Copy link
Contributor

gardener-prow bot commented Jul 31, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: oliver-goetz

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

The pull request process is described here

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

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2025
@AleksandarSavchev
Copy link
Member Author

/retest

@gardener-prow gardener-prow bot merged commit 38b3d64 into gardener:master Jul 31, 2025
19 checks passed
@rfranzke
Copy link
Member

rfranzke commented Aug 4, 2025

Very nice!

Duciwuci pushed a commit to stackitcloud/gardener that referenced this pull request Sep 1, 2025
… to config (gardener#12589)

* Add helper funcs to generate node-agent config path

Co-authored-by: Oliver Goetz <o.goetz@sap.com>
Co-authored-by: Rada Dimitrova <rada.dimitrova@sap.com>

* Replace config path with config dir in gardener-node-agent

Co-authored-by: Oliver Goetz <o.goetz@sap.com>
Co-authored-by: Rada Dimitrova <rada.dimitrova@sap.com>

* Adapt GetAPIServerConfig() func to work with non default directories

Co-authored-by: Oliver Goetz <o.goetz@sap.com>
Co-authored-by: Rada Dimitrova <rada.dimitrova@sap.com>

* Run ./hack/update-skaffold-deps.sh

* Adapt integration tests

Co-authored-by: Oliver Goetz <o.goetz@sap.com>
Co-authored-by: Aleksandar Savchev  <aleksandar.savchev@sap.com>

* Fix linter issue

---------

Co-authored-by: Oliver Goetz <o.goetz@sap.com>
Co-authored-by: Rada Dimitrova <rada.dimitrova@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/robustness Robustness, reliability, resilience related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/bug Bug 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.

gardener-node-agent might end in a crash-loop in case of breaking changes affecting its own configuration
5 participants