kor icon indicating copy to clipboard operation
kor copied to clipboard

feat(helm): Add Extra Labels to Helm Chart for Enhanced Metadata Management

Open matazr opened this issue 9 months ago • 1 comments

What this PR does / why we need it

This pull request enhances the Helm chart within the Kor project by adding extra labels to the metadata. This update improves the flexibility and organization of Kubernetes resource management.

Changes Made

  • Modified the helper template: Updated the _helpers.tpl file to include additional labels.
  • Updated spec.template.metadata.labels: Ensured that the labels are correctly placed within the Helm chart's metadata.
    • Updated helper function _helpers.tpl:
      apiVersion: v1
      kind: Pod
      metadata:
        labels:
          app.kubernetes.io/name: {{ include "kor.name" . }}
          helm.sh/chart: {{ include "kor.chart" . }}
          app.kubernetes.io/instance: {{ .Release.Name }}
          app.kubernetes.io/managed-by: {{ .Release.Service }}
          extraLabel1: value1
          extraLabel2: value2
      

Benefits

  • Improved Metadata Management: Additional labels provide better control and organization of Helm chart deployments.
  • Enhanced Flexibility: Allows for more granular and customized resource management within Kubernetes environments.

PR Checklist

  • [ ] This PR adds K8s exceptions (false positives)

  • [ ] This PR adds new code

  • [ ] This PR includes tests for any new code

  • Files Affected: templates/_helpers.tpl templates/deployment.yaml templates/cronjob.yaml values.yaml

Please review the changes and provide feedback. If there are any questions or further modifications needed, feel free to let me know. Thank you for your time and consideration in reviewing this pull request.

matazr avatar May 15 '24 14:05 matazr

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 40.83%. Comparing base (6a391d3) to head (d0d5d04). Report is 1 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #265   +/-   ##
=======================================
  Coverage   40.83%   40.83%           
=======================================
  Files          58       58           
  Lines        2902     2902           
=======================================
  Hits         1185     1185           
  Misses       1531     1531           
  Partials      186      186           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 15 '24 17:05 codecov-commenter

Hi @matazr, although the PR was merged, there're several disparities with README.

The AppVersion still points to v0.3.4, and many keys refer to prometheusExporter.service rather than prometheusExporter.serviceMonitor.

doronkg avatar May 17 '24 10:05 doronkg

@doronkg thanks for your feedback. I put this PR can you review as well?

matazr avatar May 22 '24 12:05 matazr