Skip to content

Commit 7295326

Browse files
lioukci-robot
authored andcommitted
UPSTREAM: <carry>: manifests: set required-scc for openshift workloads
1 parent 9fc2c4e commit 7295326

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

openshift/generate-manifests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ for container_name in "${!IMAGE_MAPPINGS[@]}"; do
5454
placeholder="${IMAGE_MAPPINGS[$container_name]}"
5555
$YQ -i "(select(.kind == \"Deployment\")|.spec.template.spec.containers[]|select(.name==\"$container_name\")|.image) = \"$placeholder\"" "$TMP_KUSTOMIZE_OUTPUT"
5656
$YQ -i 'select(.kind == "Deployment").spec.template.metadata.annotations += {"target.workload.openshift.io/management": "{\"effect\": \"PreferredDuringScheduling\"}"}' "$TMP_KUSTOMIZE_OUTPUT"
57+
$YQ -i 'select(.kind == "Deployment").spec.template.metadata.annotations += {"openshift.io/required-scc": "restricted-v2"}' "$TMP_KUSTOMIZE_OUTPUT"
5758
$YQ -i 'select(.kind == "Deployment").spec.template.spec += {"priorityClassName": "system-cluster-critical"}' "$TMP_KUSTOMIZE_OUTPUT"
5859
$YQ -i 'select(.kind == "Namespace").metadata.annotations += {"workload.openshift.io/allowed": "management"}' "$TMP_KUSTOMIZE_OUTPUT"
5960
done

openshift/manifests/17-deployment-openshift-operator-controller-operator-controller-controller-manager.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ spec:
1818
annotations:
1919
kubectl.kubernetes.io/default-container: manager
2020
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
21+
openshift.io/required-scc: restricted-v2
2122
labels:
2223
control-plane: operator-controller-controller-manager
2324
spec:

0 commit comments

Comments
 (0)