Skip to content

Commit

Permalink
UPSTREAM: <carry>: manifests: set required-scc for openshift workloads
Browse files Browse the repository at this point in the history
  • Loading branch information
liouk authored and openshift-merge-bot[bot] committed May 2, 2024
1 parent bd56935 commit a1ca98e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions openshift/generate-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ for container_name in "${!IMAGE_MAPPINGS[@]}"; do
placeholder="${IMAGE_MAPPINGS[$container_name]}"
$YQ -i "(select(.kind == \"Deployment\")|.spec.template.spec.containers[]|select(.name==\"$container_name\")|.image) = \"$placeholder\"" "$TMP_KUSTOMIZE_OUTPUT"
$YQ -i 'select(.kind == "Deployment").spec.template.metadata.annotations += {"target.workload.openshift.io/management": "{\"effect\": \"PreferredDuringScheduling\"}"}' "$TMP_KUSTOMIZE_OUTPUT"
$YQ -i 'select(.kind == "Deployment").spec.template.metadata.annotations += {"openshift.io/required-scc": "restricted-v2"}' "$TMP_KUSTOMIZE_OUTPUT"
$YQ -i 'select(.kind == "Deployment").spec.template.spec += {"priorityClassName": "system-cluster-critical"}' "$TMP_KUSTOMIZE_OUTPUT"
$YQ -i 'select(.kind == "Namespace").metadata.annotations += {"workload.openshift.io/allowed": "management"}' "$TMP_KUSTOMIZE_OUTPUT"
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ spec:
annotations:
kubectl.kubernetes.io/default-container: manager
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
openshift.io/required-scc: restricted-v2
labels:
control-plane: controller-manager
spec:
Expand Down

0 comments on commit a1ca98e

Please sign in to comment.