Skip to content

Conversation

@enrichman
Copy link
Collaborator

@enrichman enrichman commented Oct 8, 2025

This PR fixes #498 and refactor/change some helm values.

  • resources is now defined as a plain object`
  • replicaCount renamed to replicas as in the spec
  • the environment variables used to setup the controller were moved as flags. This is more idiomatic, and it's easier to read from the spec of the deployment

Also renamed 4 flags for the K3k controller to match the hierarchy used in the Helm values:

--shared-agent-image               ->   --agent-shared-image
--shared-agent-image-pull-policy   ->   --agent-shared-image-pull-policy
--virtual-agent-image              ->   --agent-virtual-image
--virtual-agent-image-pull-policy  ->   --agent-virtual-image-pull-policy

@enrichman enrichman self-assigned this Oct 8, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.09%. Comparing base (a0fd472) to head (cde9f0f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #500      +/-   ##
==========================================
+ Coverage   50.63%   57.09%   +6.46%     
==========================================
  Files          56       56              
  Lines        6559     6559              
==========================================
+ Hits         3321     3745     +424     
+ Misses       2970     2547     -423     
+ Partials      268      267       -1     
Flag Coverage Δ
cli 51.40% <100.00%> (-0.58%) ⬇️
controller 58.15% <100.00%> (?)
e2e 58.15% <100.00%> (?)
unit 40.79% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines 32 to 35
- --shared-agent-image={{- include "agent.shared.registry" .}}{{ .Values.agent.shared.image.repository }}:{{ default .Chart.AppVersion .Values.agent.shared.image.tag }}
- --shared-agent-image-pull-policy={{ .Values.agent.shared.image.pullPolicy }}
- --virtual-agent-image={{- include "agent.virtual.registry" .}}{{ .Values.agent.virtual.image.repository }}
- --virtual-agent-image-pull-policy={{ .Values.agent.virtual.image.pullPolicy }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Having a look at this I see the Helm values and the flags/envs are "swapped":

  • virtual-agent-image
  • agent.virtual.image

Seeing them all together is probably more natural to have the "convention" we used with Helm:

agent > virtual > image

What do you think about changing them?

Suggested change
- --shared-agent-image={{- include "agent.shared.registry" .}}{{ .Values.agent.shared.image.repository }}:{{ default .Chart.AppVersion .Values.agent.shared.image.tag }}
- --shared-agent-image-pull-policy={{ .Values.agent.shared.image.pullPolicy }}
- --virtual-agent-image={{- include "agent.virtual.registry" .}}{{ .Values.agent.virtual.image.repository }}
- --virtual-agent-image-pull-policy={{ .Values.agent.virtual.image.pullPolicy }}
- --agent-shared-image={{- include "agent.shared.registry" .}}{{ .Values.agent.shared.image.repository }}:{{ default .Chart.AppVersion .Values.agent.shared.image.tag }}
- --agent-shared-image-pull-policy={{ .Values.agent.shared.image.pullPolicy }}
- --agent-virtual-image={{- include "agent.virtual.registry" .}}{{ .Values.agent.virtual.image.repository }}
- --agent-virtual-image-pull-policy={{ .Values.agent.virtual.image.pullPolicy }}

@enrichman enrichman merged commit 99f7505 into rancher:main Oct 13, 2025
6 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.

The helm controller.extraEnv values are not working

3 participants