You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Strip Runtime Security Context from Exported Pods/Deployments #22
When migrating applications from one OpenShift cluster to another using crane, the export phase captures runtime security context values that are cluster-specific and cause SCC (Security Context Constraints) validation failures on the target cluster.
These issues occur regardless of whether export/apply is done as cluster-admin or non-admin, because the problem is with the exported content itself—crane exports runtime state instead of declarative intent.
Description
When crane exports a running pod from OpenShift, it captures the actual running security context that was injected by the SCC admission controller:
When applying this pod to a target cluster with a different UID range, SCC validation fails:
Error from server (Forbidden): error when creating "pod.yaml":
pods "app-pod" is forbidden: unable to validate against any security context constraint: [
provider restricted-v2: .spec.securityContext.fsGroup: Invalid value: []int64{1000840000}:
1000840000 is not an allowed group,
provider restricted-v2: .spec.securityContext.seLinuxOptions.level: Invalid value: "s0:c29,c14":
must be s0:c29,c9,
provider restricted-v2: .containers[0].runAsUser: Invalid value: 1000840000:
must be in the ranges: [1000830000, 1000839999]
]
This issue is currently awaiting triage.
If contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
The triage/accepted label can be added by org members by writing /triage accepted in a comment.
changed the title [-]Strip Runtime Security Context from Exported Pods/Deployments[/-][+][BUG] Strip Runtime Security Context from Exported Pods/Deployments[/+]on Jun 21, 2026
Activity
github-actions commentedon Apr 15, 2026
This issue is currently awaiting triage.
If contributors determine this is a relevant issue, they will accept it by applying the
triage/acceptedlabel and provide further guidance.The
triage/acceptedlabel can be added by org members by writing/triage acceptedin a comment.[-]Strip Runtime Security Context from Exported Pods/Deployments[/-][+][BUG] Strip Runtime Security Context from Exported Pods/Deployments[/+]