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

Fix Unmarshaling of Target Config #1257

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

robertgraeff
Copy link
Member

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

- Bugfix concerning Targets that reference a Secret by name and key

Copy link

gardener-prow bot commented Nov 4, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@gardener-robot gardener-robot added the needs/review Needs review label Nov 4, 2024
@gardener-robot gardener-robot added the size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) label Nov 4, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 4, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 4, 2024
@@ -56,7 +56,7 @@ func NewShootClientFromTarget(ctx context.Context, gardenTarget *v1alpha1.Target
}

targetConfig := &targettypes.KubernetesClusterTargetConfig{}
err = json.Unmarshal([]byte(resolvedTarget.Content), targetConfig)
err = yaml.Unmarshal([]byte(resolvedTarget.Content), targetConfig)
Copy link
Member

Choose a reason for hiding this comment

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

I guess this is fine, since the yaml parser should also be able to parse json (?).
However, I believe we need to also fix the secret resolving in controller-utils/pkg/landscaper/references.go. The function ResolveSecretReference should return the same format for when a key is specivied vs. there is no key specified. What do you think?

@gardener-robot gardener-robot added the needs/changes Needs (more) changes label Nov 4, 2024
@robertgraeff robertgraeff marked this pull request as ready for review November 4, 2024 14:01
@robertgraeff robertgraeff requested a review from a team as a code owner November 4, 2024 14:01
@robertgraeff robertgraeff merged commit ecab442 into gardener:master Nov 4, 2024
5 checks passed
@robertgraeff robertgraeff deleted the fix-unmarshal-target branch November 4, 2024 14:01
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Nov 4, 2024
@In-Ko In-Ko added the area/ipcei IPCEI (Important Project of Common European Interest) label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipcei IPCEI (Important Project of Common European Interest) needs/changes Needs (more) changes needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/review Needs review size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants