This repository was archived by the owner on May 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 594
This repository was archived by the owner on May 14, 2025. It is now read-only.
As user I want to set runAsGroup
property in podSecurityContext #5184
Copy link
Copy link
Closed
Milestone
Description
Hello, everyone
Problem description:
I work on K8S cluster with a gatekeeper. It expects pod has runAsGroup
property. The gatekeeper doesn't allow Spring Cloud DataFlow to create a pod, because runAsGroup
property is absence.
Spring Cloud DataFlow server generate and send to k8s this:
"apiVersion": "v1",
"kind": "Pod",
"metadata":{},
"spec":
{
"containers": [],
"restartPolicy": "Never",
"securityContext":
{
"fsGroup": 7,
"runAsUser": 7,
"supplementalGroups": [7]
}
}
}
The gatekeeper expects smth like this:
apiVersion: v1
kind: Pod
........
spec:
containers:
- env: []
name: name
securityContext:
allowPrivilegeEscalation: false
runAsGroup: 7
runAsNonRoot: true
runAsUser: 7
securityContext:
fsGroup: 7
my config map is:
apiVersion: v1
data:
application.yaml: |
logging:
level:
root: TRACE
org.springframework.cloud.deployer.spi.kubernetes: TRACE
io.fabric8.kubernetes.client: TRACE
io.fabric8.kubernetes.api.model: TRACE
spring:
cloud:
dataflow:
task:
platform:
kubernetes:
accounts:
default:
maximum-concurrent-tasks: 35
limits:
cpu: 500m
memory: 1024Mi
readinessProbeDelay: 120
livenessProbeDelay: 90
podSecurityContext:
allowPrivilegeEscalation: false
fsGroup: 7
runAsGroup: 7
runAsNonRoot: true
runAsUser: 7
supplementalGroups: [7]
container:
registry-configurations:
default:.........
task:
closecontextEnabled: true
datasource: ...........
flyway:
enabled: true
kind: ConfigMap
It looks like that runAsGroup
property is needed to add to pod configuration, but I didn't find any workaround how to do it.
Can you help me?
Additional context:
Spring Cloud DataFlow version: 2.9.1