Skip to content

Commit 376edfe

Browse files
UPSTREAM: <carry>: Add openshift node selector annotation
Cherry-pick of: openshift#307
1 parent 34ea34c commit 376edfe

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

openshift/generate-manifests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ for container_name in "${!IMAGE_MAPPINGS[@]}"; do
7171
$YQ -i 'select(.kind == "Deployment").spec.template.metadata.annotations += {"target.workload.openshift.io/management": "{\"effect\": \"PreferredDuringScheduling\"}"}' "$TMP_KUSTOMIZE_OUTPUT"
7272
$YQ -i 'select(.kind == "Deployment").spec.template.metadata.annotations += {"openshift.io/required-scc": "privileged"}' "$TMP_KUSTOMIZE_OUTPUT"
7373
$YQ -i 'select(.kind == "Deployment").spec.template.spec += {"priorityClassName": "system-cluster-critical"}' "$TMP_KUSTOMIZE_OUTPUT"
74-
$YQ -i 'select(.kind == "Namespace").metadata.annotations += {"workload.openshift.io/allowed": "management"}' "$TMP_KUSTOMIZE_OUTPUT"
7574
done
7675

7776
# Loop through any flag updates that need to be made to the manager container

openshift/kustomize/overlays/openshift/olmv1-ns/kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ patches:
2929
name: controller-manager
3030
path: patches/manager_deployment_node_selection.yaml
3131
- path: patches/manager_namespace_privileged.yaml
32+
- path: patches/manager_namespace_annotations.yaml
33+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
$patch: merge
2+
apiVersion: v1
3+
kind: Namespace
4+
metadata:
5+
name: system
6+
annotations:
7+
workload.openshift.io/allowed: "management"
8+
openshift.io/node-selector: ""

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
apiVersion: v1
22
kind: Namespace
33
metadata:
4+
annotations:
5+
openshift.io/node-selector: ""
6+
workload.openshift.io/allowed: management
47
labels:
58
pod-security.kubernetes.io/audit: privileged
69
pod-security.kubernetes.io/audit-version: latest
@@ -9,5 +12,3 @@ metadata:
912
pod-security.kubernetes.io/warn: privileged
1013
pod-security.kubernetes.io/warn-version: latest
1114
name: openshift-operator-controller
12-
annotations:
13-
workload.openshift.io/allowed: management

0 commit comments

Comments
 (0)