-
Bug
-
Resolution: Fixed
-
Major
-
ALL
-
-
kubernetes 3578.vb_9a_92ea_9845a_
After upgrading plugin from kubernetes 3568.vde94f6b_41b_c8 to kubernetes 3578.vb_9a_92ea_9845a_, my job's running container is not running in the defined namespace and is defaulting to default. Because it is running in the wrong namespace, it cannot find the kubernetes secret file it needs in that namespace.
I confirmed this by upgrading only this one plugin on a test jenkins server. The job ran fine before the upgrade, and then failed after.
In my Jenkins Pipeline job configure I have defined:
String Parameter:
Name:
ENVIRONMENT
Default Value:
production
Jenkinsfile.cron:
yaml """
apiVersion: v1
kind: Pod
metadata:
namespace: ${env.ENVIRONMENT}
...
Although namespace should get replaced by "production", the running container is running in the default namespace.
Output after upgrading the plugin:
Created Pod: kubernetes default/vidiemi-cron-6460-1ljv2-3mqcx-dpkj0
[Normal][default/vidiemi-cron-6460-1ljv2-3mqcx-dpkj0][Scheduled] Successfully assigned default/vidiemi-cron-6460-1ljv2-3mqcx-dpkj0 to ip-10-158-4-111.us-west-2.compute.internal
[Normal][default/vidiemi-cron-6460-1ljv2-3mqcx-dpkj0][Pulling] Pulling image "docker-cse.wds.io/dmc-vidiemi:production_latest"
[Normal][default/vidiemi-cron-6460-1ljv2-3mqcx-dpkj0][Pulled] Successfully pulled image "docker-cse.wds.io/dmc-vidiemi:production_latest"
[Warning][default/vidiemi-cron-6460-1ljv2-3mqcx-dpkj0][Failed] Error: secret "vidiemi-config" not found
Before upgrading kubernetes plugin:
Created Pod: production/vidiemi-cron-6451-s8wmg-cj1wp-2j8bq
[Normal][production/vidiemi-cron-6451-s8wmg-cj1wp-2j8bq][Scheduled] Successfully assigned production/vidiemi-cron-6451-s8wmg-cj1wp-2j8bq to ip-10-158-4-152.us-west-2.compute.internal
[Normal][production/vidiemi-cron-6451-s8wmg-cj1wp-2j8bq][Pulled] Container image "containers.disney.com/jenkins/inbound-agent:4.7-1" already present on machine
[Normal][production/vidiemi-cron-6451-s8wmg-cj1wp-2j8bq][Created] Created container jnlp
[Normal][production/vidiemi-cron-6451-s8wmg-cj1wp-2j8bq][Started] Started container jnlp
[Normal][production/vidiemi-cron-6451-s8wmg-cj1wp-2j8bq][Pulling] Pulling image "docker-cse.wds.io/dmc-vidiemi:production_latest"
[Normal][production/vidiemi-cron-6451-s8wmg-cj1wp-2j8bq][Pulled] Successfully pulled image "docker-cse.wds.io/dmc-vidiemi:production_latest"
[Normal][production/vidiemi-cron-6451-s8wmg-cj1wp-2j8bq][Created] Created container vidiemi
[Normal][production/vidiemi-cron-6451-s8wmg-cj1wp-2j8bq][Started] Started container vidiemi