Skip to content

Enable adding of additional Labels to speaker+controller - #1797

Merged
fedepaol merged 1 commit into
metallb:mainfrom
DerFels:add-labels-helm-chart
Mar 16, 2023
Merged

fedepaol merged 1 commit into
metallb:mainfrom
DerFels:add-labels-helm-chart

Conversation

@DerFels

@DerFels DerFels commented Jan 24, 2023

Copy link
Copy Markdown
Contributor

Hi Metallb Team,
we have several labels that we like to add to our k8s resources. Some are purely for humans, while others are technically relevant (f.e. tracing, NetworkPolicies).
I noticed that your helm chart does not offer this functionality, so I wanted to help by adding a little code that enables users to specify additionaLabels in the values.yaml which will be picked up by the speaker+controller Daemonsets.

If there is anything missing or you disagree with the solution, I'm always open to feedback :)

Also: Thanks for providing a helm chart in the first place!

@github-actions

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has been open 30 days
with no activity. This issue will be closed in 10 days unless you do one of the following:

  • respond or perform some activity on this PR
  • have one of these labels applied: hold

@DerFels

DerFels commented Feb 24, 2023

Copy link
Copy Markdown
Contributor Author

@fedepaol could you please take a look?
Thank you!

labels:
{{- include "metallb.labels" . | nindent 4 }}
app.kubernetes.io/component: controller
{{- if .Values.controller.additionalLabels }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't think you need this check. If I remember well, "with" and "range" do not generate output if the array is empty.

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.

right!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @mlguerrero12 , I wasn't aware of this!

Comment thread charts/metallb/values.yaml Resolved
Comment thread charts/metallb/values.yaml Resolved
@mlguerrero12

Copy link
Copy Markdown

/lgtm

@fedepaol

Copy link
Copy Markdown
Member

@DerFels please run inv helmdocs to regenerate the helm docs (ci is annoying but prevents errors :-) )

@DerFels

DerFels commented Mar 15, 2023

Copy link
Copy Markdown
Contributor Author

@DerFels please run inv helmdocs to regenerate the helm docs (ci is annoying but prevents errors :-) )

Done :)

@fedepaol
fedepaol force-pushed the add-labels-helm-chart branch from 6311acf to 303b731 Compare March 15, 2023 13:30
@fedepaol
fedepaol merged commit 73b8eb9 into metallb:main Mar 16, 2023
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