Closed salvabot0001 closed 2 months ago
can you post the podtemplate and any other manifests that we can use to replicate the issue? so we may also add a tests for this to avoid future regressions
- containers:
- args: "1200"
command: "sleep"
envVars:
- envVar:
key: "GRADLE_OPTS"
value: "-Dorg.gradle.caching=true -Dorg.gradle.daemon=true -Dorg.gradle.parallel=true -Dorg.gradle.welcome=never"
image: "gradle:jdk21-jammy"
livenessProbe:
failureThreshold: 0
initialDelaySeconds: 0
periodSeconds: 0
successThreshold: 0
timeoutSeconds: 0
name: "builder"
resourceLimitMemory: "4096Mi"
instanceCap: 1
instanceCapStr: "1"
name: "jdk21-agent"
runAsGroup: "0"
runAsUser: "0"
workspaceVolume:
dynamicPVC:
accessModes: "ReadWriteOnce"
requestsSize: "10Gi"
storageClassName: "some-storage-class"
yamlMergeStrategy: "override"
I changed already my PodTemplate to use emptyDir as workspaceVolume (default basically) but I took the podTemplate from my local history. If I didn't do any mistakes on indent, this should be pretty much a good example that the default service account (system:serviceaccount:jenkins:jenkins-operator-jenkins) has no rights to create a PVC
If a PodTemplate is configured with the default serviceAccount (leaving the serviceAccount empty) and with Dynamic Persistent Volume Claim as workspace volume, the pipeline pod will not come up with the exception below
To Reproduce
Additional information
Kubernetes version: 1.26.9 Jenkins Operator version: v0.8.0
Workaround
Add error logs about the problem here (operator logs and Kubernetes events).