jenkins-x-gcpreviews is relying on jenkins ServiceAccountwhich is only created using static master.
When using serverless jenkins configurations, it's failing and not cleaning up preview environments
Steps to reproduce the behavior
Given a jx cluster configured to use serverless jenkins
Create a quickstart (let's say golang-http), open a PR to get a preview env
Close the PR
Run the gcpreviews job manually (or wait to it to happen automatically): kubectl create job --from=cronjob/jenkins-x-gcpreviews jenkins-x-gcpreviews
Expected behavior
Preview env should be removed
Actual behavior
gcpreviews Job is failing with the following error:
Warning FailedCreate 5m59s (x295 over 28h) job-controller Error creating: pods "jenkins-x-gcpreviews-" is forbidden: error looking up service account jx/jenkins: serviceaccount "jenkins" not found
Jx version
The output of jx version is:
NAME VERSION
jx 1.3.953
jenkins x platform 0.0.3499
Kubernetes cluster v1.11.6-gke.2
kubectl v1.13.2
helm client v2.12.1+g02a47c7
helm server v2.12.2+g7d2b0c7
git git version 2.17.2 (Apple Git-113)
Operating System Mac OS X 10.14.3 build 18D109
Summary
jenkins-x-gcpreviews is relying on
jenkins ServiceAccount
which is only created using static master. When using serverless jenkins configurations, it's failing and not cleaning up preview environmentsSteps to reproduce the behavior
kubectl create job --from=cronjob/jenkins-x-gcpreviews jenkins-x-gcpreviews
Expected behavior
Preview env should be removed
Actual behavior
gcpreviews Job is failing with the following error:
Warning FailedCreate 5m59s (x295 over 28h) job-controller Error creating: pods "jenkins-x-gcpreviews-" is forbidden: error looking up service account jx/jenkins: serviceaccount "jenkins" not found
Jx version
The output of
jx version
is:NAME VERSION jx 1.3.953 jenkins x platform 0.0.3499 Kubernetes cluster v1.11.6-gke.2 kubectl v1.13.2 helm client v2.12.1+g02a47c7 helm server v2.12.2+g7d2b0c7 git git version 2.17.2 (Apple Git-113) Operating System Mac OS X 10.14.3 build 18D109
Jenkins type
Kubernetes cluster
GKE
Operating system / Environment
Mac OS X 10.14