Skip to content

Commit

Permalink
change label in comment
Browse files Browse the repository at this point in the history
Signed-off-by: raul <raul.cabello@suse.com>
  • Loading branch information
raulcabello authored and weyfonk committed Feb 1, 2024
1 parent 5f86699 commit e400dd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cmd/agent/deployer/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ func (d *Deployer) fetchNamespace(ctx context.Context, releaseID string) (*corev
return &list.Items[0], nil
}

// addLabelsFromOptions updates nsLabels so that it only contains all labels specified in optLabels, plus the `kubernetes.io/metadata.name` labels added by Helm when creating the namespace.
// addLabelsFromOptions updates nsLabels so that it only contains all labels specified in optLabels, plus the `kubernetes.io/metadata.name` labels added by kubernetes when creating the namespace.
func addLabelsFromOptions(nsLabels map[string]string, optLabels map[string]string) {
for k, v := range optLabels {
nsLabels[k] = v
}

// Delete labels not defined in the options.
// Keep the`kubernetes.io/metadata.name` label as it is added by kubernetes when creating the namespace.
// Keep the `kubernetes.io/metadata.name` label as it is added by kubernetes when creating the namespace.
for k := range nsLabels {
if _, ok := optLabels[k]; k != corev1.LabelMetadataName && !ok {
delete(nsLabels, k)
Expand Down

0 comments on commit e400dd1

Please sign in to comment.