Skip to content

feat: adds support for custom labels#74

Merged
pxp928 merged 2 commits into
guacsec:mainfrom
gaganhr94:feat/add-customLabels
Feb 23, 2026
Merged

feat: adds support for custom labels#74
pxp928 merged 2 commits into
guacsec:mainfrom
gaganhr94:feat/add-customLabels

Conversation

@gaganhr94

@gaganhr94 gaganhr94 commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #75

  • The PR adds support to customLabels. Any label mentioned under this would apply to all the kubernetes resources defined in the helm chart.
  • As per the discussions and recommendations made in PR Feat/add common labels #62, the changes have been made and this is the new PR for it
  • Bumps up the chart version to 0.8.0
  • Upgrades the AppVersion to v1.0.1 (latest GUAC version)
  • Updated README for the these changes as well as a few minor fixes
  • You will see the guac.labels replacing guac.selectorLabels in a few places. guac.labels includes guac.selectorLabels, in other words it is a superset of the selectorLabels. So as a part of this change, since customLabels are also a part of guac.labels now, it had to be placed in all labels section. Having both labels and selector labels would create duplicates, to avoid that, this change of replacing guac.selectorLabels with guac.labels has been done

@gaganhr94

Copy link
Copy Markdown
Contributor Author

Hi @sunnyyip @pxp928 can you please review this PR when you get a chance. Thanks !

@gaganhr94 gaganhr94 force-pushed the feat/add-customLabels branch from 4b341da to ea04bfb Compare February 7, 2026 11:51
Co-Authored-By: Anirudh Edpuganti <aniedpuganti@gmail.com>
Co-Authored-By: Shreyas Pandya <pandyashreyas1@gmail.com>
Signed-off-by: Gagan H R <hrgagan4@gmail.com>
@gaganhr94 gaganhr94 force-pushed the feat/add-customLabels branch from f0edf68 to daf4706 Compare February 9, 2026 16:19
Signed-off-by: Gagan H R <hrgagan4@gmail.com>
@gaganhr94 gaganhr94 force-pushed the feat/add-customLabels branch from ea86aa8 to dd70f83 Compare February 9, 2026 16:24

@lumjjb lumjjb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one of the concerns i have is how others are currently using selectorLabels. This may break some users. is there a way we can add an error message for users that use selectorLabels will get a message about the new change to the new labels?

@gaganhr94

gaganhr94 commented Feb 11, 2026

Copy link
Copy Markdown
Contributor Author

If you see the _helpers.tpl, guac.labels includes guac.selectorLabels. Whenever we refer to guac.labels, it will always include the guac.selectorLabels

{{/*
Common labels
*/}}
{{- define "guac.labels" -}}
helm.sh/chart: {{ include "guac.chart" . }}
{{ include "guac.selectorLabels" . }}            <-- here
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.guac.customLabels }}
{{ toYaml .Values.guac.customLabels }}
{{- end }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "guac.selectorLabels" -}}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: "guac"
{{- end }}

This is the main reason why guac.selectorLabels had to be changed to guac.labels, since having both them under the pod template labels would create unnecessary duplication of the same labels.

So, I don't see it breaking for the existing users of GUAC helm chart. It's just that the pod may have a few more labels than expected.

@pxp928 pxp928 merged commit 72175c8 into guacsec:main Feb 23, 2026
1 check 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.

Add support for custom labels in the GUAC helm chart

3 participants