Skip to content

Commit 5874f87

Browse files
Merge pull request #22 from grokspawn/annotations-add
UPSTREAM: <carry>: add namespace management annotation
2 parents f4ddfd1 + 816ed77 commit 5874f87

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

openshift/generate-manifests.sh

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

6263
# Use yq to split the single yaml file into 1 per document.

openshift/manifests/00-namespace-openshift-operator-controller.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ metadata:
1212
pod-security.kubernetes.io/enforce: restricted
1313
pod-security.kubernetes.io/enforce-version: latest
1414
name: openshift-operator-controller
15+
annotations:
16+
workload.openshift.io/allowed: management

0 commit comments

Comments
 (0)