Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Specify where {k8s} schedules pods for your {brandname} clusters to ensure avail

.Procedure

. Add the `spec.affinity` block to your `Infinispan` CR.
. Add the `spec.scheduling.affinity` block to your `Infinispan` CR.
. Configure anti-affinity strategies as necessary.
. Apply your `Infinispan` CR.
2 changes: 1 addition & 1 deletion documentation/asciidoc/topics/ref_anti_affinity.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Configure anti-affinity strategies in your `Infinispan` CR to control where {k8s
[discrete]
== Schedule pods on different {k8s} nodes

The following is the anti-affinity strategy that {ispn_operator} uses if you do not configure the `spec.affinity` field in your `Infinispan` CR:
The following is the anti-affinity strategy that {ispn_operator} uses if you do not configure the `spec.scheduling.affinity` field in your `Infinispan` CR:

[source,yaml,options="nowrap",subs=attributes+]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ You should do this only if you do not need declarative Kubernetes representation
|`spec.configListener.logging.level`
|Configures the logging level for the `ConfigListener` deployments. The default level is `info`. You can change it to `debug` or `error`.

|`spec.affinity`
|`spec.scheduling.affinity`
|Configures anti-affinity strategies that guarantee {brandname} availability.

|===
23 changes: 12 additions & 11 deletions documentation/asciidoc/topics/yaml/affinity_nodes_prefer.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: infinispan-pod
clusterName: <cluster_name>
infinispan_cr: <cluster_name>
topologyKey: "kubernetes.io/hostname"
scheduling:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: infinispan-pod
clusterName: <cluster_name>
infinispan_cr: <cluster_name>
topologyKey: "kubernetes.io/hostname"
19 changes: 10 additions & 9 deletions documentation/asciidoc/topics/yaml/affinity_nodes_require.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: infinispan-pod
clusterName: <cluster_name>
infinispan_cr: <cluster_name>
topologyKey: "topology.kubernetes.io/hostname"
scheduling:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: infinispan-pod
clusterName: <cluster_name>
infinispan_cr: <cluster_name>
topologyKey: "topology.kubernetes.io/hostname"
39 changes: 20 additions & 19 deletions documentation/asciidoc/topics/yaml/affinity_zones_prefer.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: infinispan-pod
clusterName: <cluster_name>
infinispan_cr: <cluster_name>
topologyKey: "topology.kubernetes.io/zone"
- weight: 90
podAffinityTerm:
labelSelector:
matchLabels:
app: infinispan-pod
clusterName: <cluster_name>
infinispan_cr: <cluster_name>
topologyKey: "kubernetes.io/hostname"
scheduling:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: infinispan-pod
clusterName: <cluster_name>
infinispan_cr: <cluster_name>
topologyKey: "topology.kubernetes.io/zone"
- weight: 90
podAffinityTerm:
labelSelector:
matchLabels:
app: infinispan-pod
clusterName: <cluster_name>
infinispan_cr: <cluster_name>
topologyKey: "kubernetes.io/hostname"
19 changes: 10 additions & 9 deletions documentation/asciidoc/topics/yaml/affinity_zones_require.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: infinispan-pod
clusterName: <cluster_name>
infinispan_cr: <cluster_name>
topologyKey: "topology.kubernetes.io/zone"
scheduling:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: infinispan-pod
clusterName: <cluster_name>
infinispan_cr: <cluster_name>
topologyKey: "topology.kubernetes.io/zone"
23 changes: 12 additions & 11 deletions documentation/asciidoc/topics/yaml/datagrid_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ spec:
configMapName: "my-cluster-config"
configListener:
enabled: true
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: infinispan-pod
clusterName: {example_crd_name}
infinispan_cr: {example_crd_name}
topologyKey: "kubernetes.io/hostname"
scheduling:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: infinispan-pod
clusterName: {example_crd_name}
infinispan_cr: {example_crd_name}
topologyKey: "kubernetes.io/hostname"
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ kind: Infinispan
metadata:
name: datagrid-service
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: infinispan-pod
clusterName: datagrid-service
infinispan_cr: datagrid-service
topologyKey: "topology.kubernetes.io/zone"
scheduling:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: infinispan-pod
clusterName: datagrid-service
infinispan_cr: datagrid-service
topologyKey: "topology.kubernetes.io/zone"
expose:
type: Route
container:
Expand Down
Loading