Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions pkg/comp-functions/functions/vshnnextcloud/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,22 @@ func newValues(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.VS
}
}

cronjobSecurityContext := map[string]any{}
if !isOpenShift {
cronjobSecurityContext = map[string]any{
"runAsUser": 33,
"runAsGroup": 33,
"runAsNonRoot": true,
"allowPrivilegeEscalation": false,
"capabilities": map[string]any{
"drop": []string{"ALL"},
},
"seccompProfile": map[string]any{
"type": "RuntimeDefault",
},
}
}

trustedDomain := []string{
comp.GetName() + "." + comp.GetInstanceNamespace() + ".svc.cluster.local",
}
Expand Down Expand Up @@ -610,6 +626,7 @@ func newValues(ctx context.Context, svc *runtime.ServiceRuntime, comp *vshnv1.VS
"enabled": comp.GetInstances() > 0,
"type": "cronjob",
"cronjob": map[string]any{
"securityContext": cronjobSecurityContext,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that this won't have an impact and replace whatever the helm chart sets as default, if isOpenshift is true and therefore an empty map?

"affinity": map[string]any{
"podAffinity": map[string]any{
"requiredDuringSchedulingIgnoredDuringExecution": []map[string]any{
Expand Down
Loading