Skip to content

helm/peerpods: fixing constant names on default values templates#2811

Merged
beraldoleal merged 4 commits intoconfidential-containers:mainfrom
beraldoleal:helm-fix-parser
Jan 30, 2026
Merged

helm/peerpods: fixing constant names on default values templates#2811
beraldoleal merged 4 commits intoconfidential-containers:mainfrom
beraldoleal:helm-fix-parser

Conversation

@beraldoleal
Copy link
Copy Markdown
Member

The config-extractor parser was extracting constant names instead of their values when generating values.yaml files.

For example, it would output LIBVIRT_NET: "defaultNetworkName" instead of LIBVIRT_NET: "default".

This bug went unnoticed because the values were commented out by default, so the Go code used the correct hardcoded defaults at runtime.

Thanks @wainersm for catching this.

@beraldoleal beraldoleal requested a review from a team as a code owner January 28, 2026 22:45
@wainersm wainersm mentioned this pull request Jan 29, 2026
# (default: "defaultURI")
# LIBVIRT_URI: "defaultURI"
# (default: "qemu:///system")
# LIBVIRT_URI: "qemu:///system"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess something we have to reconcile now is that in kustomisation.yaml we had configuration default e.g. qemu+ssh://root@192.168.122.1/system?no_verify=1 for LIBVIRT_URI and LIBVIRT_EFI_FIRMWARE="/usr/share/OVMF/OVMF_CODE_4M.fd" which I think would be used over the code defaults, so the charts values might not work out of the box for users?

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.

vide my comment on your pr.

Copy link
Copy Markdown
Member

@wainersm wainersm left a comment

Choose a reason for hiding this comment

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

Hi @beraldoleal ,

I didn't review the AST parsing because I don't know that code. The outcome yamls look fine though.

@beraldoleal
Copy link
Copy Markdown
Member Author

I didn't review the AST parsing because I don't know that code. The outcome yamls look fine though.

Lets assume Claude owns it :) We should probably start adding comments like "Wrote by Claude - be careful".

@beraldoleal
Copy link
Copy Markdown
Member Author

beraldoleal commented Jan 29, 2026

@wainersm sorry, but I pushed two new commits here. Do I still have your bless?

@wainersm
Copy link
Copy Markdown
Member

@wainersm sorry, but I pushed two new commits here. Do I still have your bless?

My ack stands. But while we are here, what if we align the libvirt URI too?

@beraldoleal
Copy link
Copy Markdown
Member Author

@wainersm sorry, but I pushed two new commits here. Do I still have your bless?

My ack stands. But while we are here, what if we align the libvirt URI too?

I'm ok with, lets see what @stevenhorsman thinks...

Copy link
Copy Markdown
Member

@stevenhorsman stevenhorsman left a comment

Choose a reason for hiding this comment

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

Looking good. Thanks for the improvements!

@beraldoleal
Copy link
Copy Markdown
Member Author

beraldoleal commented Jan 30, 2026

I can't merge this, because is the is mandatory... but its related to #2812.

@stevenhorsman
Copy link
Copy Markdown
Member

I can't merge this, because is the is mandatory... but its related to #2812.

Let's see if Wainer, or anyone else can approve that, otherwise we might need to stop it being required due to lack of maintainers

@wainersm
Copy link
Copy Markdown
Member

I can't merge this, because is the is mandatory... but its related to #2812.

Let's see if Wainer, or anyone else can approve that, otherwise we might need to stop it being required due to lack of maintainers

I just approved it.

The config-extractor parser was extracting constant names instead of
their values when  generating values.yaml files.

For example, it would output `LIBVIRT_NET: "defaultNetworkName"` instead
of `LIBVIRT_NET: "default"`.

This bug went unnoticed because the values were commented out by
default, so the Go code used the correct hardcoded defaults at runtime.

Thanks @wainersm for catching this.

Signed-off-by: Beraldo Leal <bleal@redhat.com>
Align Helm with Kustomize by defaulting LIBVIRT_EFI_FIRMWARE to
/usr/share/OVMF/OVMF_CODE_4M.fd instead of empty string.

Signed-off-by: Beraldo Leal <bleal@redhat.com>
Align Helm with Kustomize by defaulting LIBVIRT_URI to align with
kustomize.

Signed-off-by: Beraldo Leal <bleal@redhat.com>
Align Helm with Kustomize defaults.

Signed-off-by: Beraldo Leal <bleal@redhat.com>
@beraldoleal
Copy link
Copy Markdown
Member Author

I'm trying to understand the order of those vuln checks.. so I just rebased on main and pushed.. to see if the error is gone...

@beraldoleal beraldoleal merged commit a95e624 into confidential-containers:main Jan 30, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants