Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

Fix for [JENKINS-50664] container cap limit hit due to default label #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hrishin
Copy link
Member

@hrishin hrishin commented May 23, 2018

Issue : Setting container cap limit configuration doesn't work correctly without Jenkins restart. The root cause of the issue is label management for slave pods. Once user set the container cap limit configuration for given namespace. Plugin fails to account slave pods/containers based using pods labels. It accounts all pods/containers from the namespace which are not started by the Kubernetes plugin.
This patch fixes this issue using default slave labels "jenkins"->"slave"

  1. By adding defualt slave lables to pods/containers
  2. By quering pods/containers with default slave labels
  • added default lables to PodTemplate
  • fixed getLables for querying container cap in KubernetesCloud
  • updated test cases for PodtemplateBuilder

fixes: openshiftio/openshift.io#2729

… missing

Issue : Setting container cap limit configuration doesn't work correctly without Jenkins restart. The root cause of the issue is label management for slave pods. Once user set the container cap limit configuration for given namespace. Plugin fails to account slave pods/containers based using pods labels. It accounts all pods/containers from the namespace which are not started by the Kubernetes plugin.
This patch fixes this issue using default slave labels "jenkins"->"slave"
1) By adding defualt slave lables to pods/containers
2) By quering pods/containers with default slave labels

- added default lables to PodTemplate
- fixed getLables for querying container cap in KubernetesCloud
- updated test cases for PodtemplateBuilder
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants