Skip to content

Commit 8d9e72e

Browse files
authored
Merge pull request #84639 from mburke5678/errors-in-local-prow-build-416
[enterprise-4.16] OADP-4597: Fix build-errors in Prow local validation
2 parents fd78b17 + af921d2 commit 8d9e72e

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

modules/olm-overriding-operator-pod-affinity.adoc

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ To control the placement of an Operator pod, complete the following steps:
187187

188188
. Edit the Operator `Subscription` object to add an affinity:
189189
+
190-
ifndef::pod[]
190+
ifdef::oplm[]
191191
[source,yaml]
192192
----
193193
apiVersion: operators.coreos.com/v1alpha1
@@ -211,13 +211,34 @@ spec:
211211
- ip-10-0-185-229.ec2.internal
212212
#...
213213
----
214-
ifdef::oplm[]
215214
<1> Add a `nodeAffinity`, `podAffinity`, or `podAntiAffinity`. See the Additional resources section that follows for information about creating the affinity.
216215
endif::oplm[]
217216
ifdef::node[]
217+
[source,yaml]
218+
----
219+
apiVersion: operators.coreos.com/v1alpha1
220+
kind: Subscription
221+
metadata:
222+
name: openshift-custom-metrics-autoscaler-operator
223+
namespace: openshift-keda
224+
spec:
225+
name: my-package
226+
source: my-operators
227+
sourceNamespace: operator-registries
228+
config:
229+
affinity: <1>
230+
nodeAffinity:
231+
requiredDuringSchedulingIgnoredDuringExecution:
232+
nodeSelectorTerms:
233+
- matchExpressions:
234+
- key: kubernetes.io/hostname
235+
operator: In
236+
values:
237+
- ip-10-0-185-229.ec2.internal
238+
#...
239+
----
218240
<1> Add a `nodeAffinity`.
219241
endif::node[]
220-
endif::pod[]
221242
ifdef::pod[]
222243
[source,yaml]
223244
----

0 commit comments

Comments
 (0)