-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for different OpenShift versions in Redis scc
Signed-off-by: mjiao <mjiao@redhat.com>
- Loading branch information
Showing
3 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
edge-integration-cell/external-redis/security_context_constraint_v2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# SPDX-FileCopyrightText: 2024 SAP edge team | ||
# SPDX-FileContributor: Manjun Jiao (@mjiao) | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
apiVersion: security.openshift.io/v1 | ||
kind: SecurityContextConstraints | ||
metadata: | ||
name: redis-enterprise-scc-v2 | ||
annotations: | ||
kubernetes.io/description: redis-enterprise-scc is the minimal SCC needed to run Redis Enterprise nodes on Kubernetes. | ||
It provides the same features as restricted-v2 SCC, but allows pods to enable the SYS_RESOURCE capability, | ||
which is required by Redis Enterprise nodes to manage file descriptor limits and OOM scores for database shards. | ||
Additionally, it requires pods to run as UID/GID 1001, which are the UID/GID used within the Redis Enterprise node containers. | ||
allowedCapabilities: | ||
- SYS_RESOURCE | ||
allowHostDirVolumePlugin: false | ||
allowHostIPC: false | ||
allowHostNetwork: false | ||
allowHostPID: false | ||
allowHostPorts: false | ||
allowPrivilegeEscalation: false | ||
allowPrivilegedContainer: false | ||
readOnlyRootFilesystem: false | ||
runAsUser: | ||
type: MustRunAs | ||
uid: 1001 | ||
fsGroup: | ||
type: MustRunAs | ||
ranges: | ||
- min: 1001 | ||
max: 1001 | ||
seLinuxContext: | ||
type: MustRunAs | ||
seccompProfiles: | ||
- runtime/default | ||
supplementalGroups: | ||
type: RunAsAny |