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
Compare and Show latest version
3 files
+ 20
11
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -1139,7 +1139,7 @@ func (s *executor) setupBuildPod(initContainers []api.Container) error {
@@ -1139,7 +1139,7 @@ func (s *executor) setupBuildPod(initContainers []api.Container) error {
// by the services, to link each service to the pod
// by the services, to link each service to the pod
labels := map[string]string{"pod": s.Build.ProjectUniqueName()}
labels := map[string]string{"pod": s.Build.ProjectUniqueName()}
for k, v := range s.Build.Runner.Kubernetes.PodLabels {
for k, v := range s.Build.Runner.Kubernetes.PodLabels {
labels[k] = s.Build.Variables.ExpandValue(v)
labels[k] = sanitizeLabel(s.Build.Variables.ExpandValue(v))
}
}
annotations := make(map[string]string)
annotations := make(map[string]string)
Loading