Skip to content
Snippets Groups Projects

Add Kubernetes pod label sanitization

Merged Theodor van Nahl requested to merge (removed):Adding_kubernetes_label_sanitation into main
1 unresolved thread

What does this MR do?

Adding sanitation for kubernetes labels to avoid issues with non conformative variables. executorkubernetes

Why was this MR needed?

Currently the user needs to be careful when declaring variables in the Kubernetes labels. Such labels may not conform with the restrictions for Labels in Kubernetes which will result in a failing pipeline.

What's the best way to test this MR?

Add the following configuration to a kubernetes executor:

        [runners.kubernetes.pod_labels]
        forbidden_label = "@Hello world this value is not valid--"
        job_name = "${CI_JOB_NAME}"

The job_name can illustrate one of the possible usages.

What are the relevant issue numbers?

Closes #4565 (closed)

Edited by Arran Walker

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Nils Rotskyi added 1 commit

    added 1 commit

    • e35c4a90 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Nils Rotskyi added 1 commit

    added 1 commit

    • c0ca2db5 - Added test case with invalid character

    Compare with previous version

  • Arran Walker
  • Nils Rotskyi added 1 commit

    added 1 commit

    • e04e2df1 - Removing unused regex import

    Compare with previous version

  • Arran Walker
  • Nils Rotskyi added 1 commit

    added 1 commit

    Compare with previous version

  • Arran Walker
  • Nils Rotskyi added 1 commit

    added 1 commit

    • a1337d0a - Excluding from linter sanitizeLabel function

    Compare with previous version

  • Arran Walker approved this merge request

    approved this merge request

  • Arran Walker changed the description

    changed the description

  • added typebug label

  • Arran Walker changed title from Sanitation of labels in Kubernetes to Add Kubernetes pod label sanitization

    changed title from Sanitation of labels in Kubernetes to Add Kubernetes pod label sanitization

  • Arran Walker started a merge train

    started a merge train

  • Arran Walker removed this merge request from the merge train

    removed this merge request from the merge train

  • Arran Walker enabled automatic add to merge train when the pipeline for 689e86ba succeeds

    enabled automatic add to merge train when the pipeline for 689e86ba succeeds

  • Arran Walker started a merge train

    started a merge train

  • Arran Walker removed this merge request from the merge train because pipeline did not succeed

    removed this merge request from the merge train because pipeline did not succeed

  • Theodor van Nahl resolved all threads

    resolved all threads

  • Arran Walker started a merge train

    started a merge train

  • merged

  • Arran Walker mentioned in commit e98dc4b8

    mentioned in commit e98dc4b8

  • Theodor van Nahl mentioned in issue #28767

    mentioned in issue #28767

  • Please register or sign in to reply
    Loading