Skip to content

Commit

Permalink
fix: allow passing FSGroup to PodSecurityContext
Browse files Browse the repository at this point in the history
  • Loading branch information
rangoo94 committed Oct 8, 2024
1 parent da1f500 commit af42674
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/v1/testkube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9654,6 +9654,8 @@ components:
$ref: "#/components/schemas/BoxedInteger"
runAsNonRoot:
$ref: "#/components/schemas/BoxedBoolean"
fsGroup:
$ref: "#/components/schemas/BoxedInteger"

Toleration:
type: object
Expand Down
1 change: 1 addition & 0 deletions pkg/api/v1/testkube/model_pod_security_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ type PodSecurityContext struct {
RunAsUser *BoxedInteger `json:"runAsUser,omitempty"`
RunAsGroup *BoxedInteger `json:"runAsGroup,omitempty"`
RunAsNonRoot *BoxedBoolean `json:"runAsNonRoot,omitempty"`
FsGroup *BoxedInteger `json:"fsGroup,omitempty"`
}
1 change: 1 addition & 0 deletions pkg/mapper/testworkflows/kube_openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ func MapPodSecurityContextKubeToAPI(v corev1.PodSecurityContext) testkube.PodSec
RunAsUser: MapInt64ToBoxedInteger(v.RunAsUser),
RunAsGroup: MapInt64ToBoxedInteger(v.RunAsGroup),
RunAsNonRoot: MapBoolToBoxedBoolean(v.RunAsNonRoot),
FsGroup: MapInt64ToBoxedInteger(v.FSGroup),
}
}

Expand Down
1 change: 1 addition & 0 deletions pkg/mapper/testworkflows/openapi_kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ func MapPodSecurityContextAPIToKube(v testkube.PodSecurityContext) corev1.PodSec
RunAsUser: MapBoxedIntegerToInt64(v.RunAsUser),
RunAsGroup: MapBoxedIntegerToInt64(v.RunAsGroup),
RunAsNonRoot: MapBoxedBooleanToBool(v.RunAsNonRoot),
FSGroup: MapBoxedIntegerToInt64(v.FsGroup),
}
}

Expand Down

0 comments on commit af42674

Please sign in to comment.