diff --git a/README.md b/README.md index 076a1dc..9945aa6 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,8 @@ Configure your Infinispan cluster by specifying values in the `deploy.*` section | `deploy.tolerations` | Node taints to tolerate | `[]` | - | | `deploy.nodeSelector` | Defines the nodeSelector policy used by the cluster's StatefulSet | `{}` | - | | `deploy.nodeAffinity` | Defines the nodeAffinity policy used by the cluster's StatefulSet | `{}` | - | +| `deploy.podAffinity` | Defines the podAffinity policy used by the cluster's StatefulSet | `{}` | - | +| `deploy.podAntiAffinity` | Defines the podAntiAffinity policy used by the cluster's StatefulSet |
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
clusterName: "{{ tpl include \"infinispan-helm-charts.name\" . }}"
app: infinispan-pod
topologyKey: kubernetes.io/hostname
weight: 100
| - |
| `deploy.makeDataDirWritable` | Allows write access to the `data` directory for each Infinispan Server node. | false | Setting the value to `true` creates an initContainer that runs `chmod -R` on the `/opt/infinispan/server/data` directory and changes its permissions. |
| `deploy.monitoring.enabled` | Enable or disable `ServiceMonitor` functionality. | false | Users must have `monitoring-edit` role assigned by the admin to deploy the Helm chart with `ServiceMonitor` enabled. |
| `deploy.nameOverride` | Specifies a name for all Infinispan cluster resources. | Helm Chart release name | Configure a name for the created resources only if you need it to be different to the Helm Chart release name. |
diff --git a/README.md.tpl b/README.md.tpl
index 6371aa6..352d7ec 100644
--- a/README.md.tpl
+++ b/README.md.tpl
@@ -44,6 +44,8 @@ Configure your {brandname} cluster by specifying values in the `deploy.*` sectio
| `deploy.tolerations` | Node taints to tolerate | `[]` | - |
| `deploy.nodeSelector` | Defines the nodeSelector policy used by the cluster's StatefulSet | `{}` | - |
| `deploy.nodeAffinity` | Defines the nodeAffinity policy used by the cluster's StatefulSet | `{}` | - |
+| `deploy.podAffinity` | Defines the podAffinity policy used by the cluster's StatefulSet | `{}` | - |
+| `deploy.podAntiAffinity` | Defines the podAntiAffinity policy used by the cluster's StatefulSet | podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
clusterName: "{{ tpl include \"infinispan-helm-charts.name\" . }}"
app: infinispan-pod
topologyKey: kubernetes.io/hostname
weight: 100
| - |
| `deploy.makeDataDirWritable` | Allows write access to the `data` directory for each {brandname} Server node. | false | Setting the value to `true` creates an initContainer that runs `chmod -R` on the `/opt/infinispan/server/data` directory and changes its permissions. |
| `deploy.monitoring.enabled` | Enable or disable `ServiceMonitor` functionality. | false | Users must have `monitoring-edit` role assigned by the admin to deploy the Helm chart with `ServiceMonitor` enabled. |
| `deploy.nameOverride` | Specifies a name for all {brandname} cluster resources. | Helm Chart release name | Configure a name for the created resources only if you need it to be different to the Helm Chart release name. |
diff --git a/documentation/asciidoc/topics/ref_deployment_configuration_values.adoc b/documentation/asciidoc/topics/ref_deployment_configuration_values.adoc
index d344544..0acf985 100644
--- a/documentation/asciidoc/topics/ref_deployment_configuration_values.adoc
+++ b/documentation/asciidoc/topics/ref_deployment_configuration_values.adoc
@@ -118,9 +118,30 @@ This can be used to change the group of mounted file systems. Set `securityConte
|Specifies a name for all {brandname} cluster resources.
|Helm Chart release name.
+| `deploy.nodeAffinity`
+| Defines the nodeAffinity policy used by the cluster's StatefulSet
+| `{}`
+
+| `deploy.podAffinity`
+| Defines the podAffinity policy used by the cluster's StatefulSet
+| `{}`
+
+| `deploy.podAntiAffinity`
+| Defines the podAntiAffinity policy used by the cluster's StatefulSet
+a|[source, yaml]
+....
+ preferredDuringSchedulingIgnoredDuringExecution:
+ - podAffinityTerm:
+ labelSelector:
+ matchLabels:
+ clusterName: "{{ tpl include \"infinispan-helm-charts.name\" . }}"
+ app: infinispan-pod
+ topologyKey: kubernetes.io/hostname
+ weight: 100
+....
+
|`deploy.infinispan`
|{brandname} Server configuration.
|{brandname} provides default server configuration.
For more information about configuring server instances, see xref:#server-configuration-values_configuring-servers[_{brandname} Server configuration values_].
-
|===
diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml
index de2c159..fb19b9b 100644
--- a/templates/statefulset.yaml
+++ b/templates/statefulset.yaml
@@ -41,15 +41,18 @@ spec:
{{- end }}
{{- end }}
affinity:
+ {{- if .Values.deploy.podAffinity }}
+ podAffinity:
+ {{- with .Values.deploy.podAffinity }}
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.deploy.podAntiAffinity }}
podAntiAffinity:
- preferredDuringSchedulingIgnoredDuringExecution:
- - podAffinityTerm:
- labelSelector:
- matchLabels:
- clusterName: {{ include "infinispan-helm-charts.name" . }}
- app: infinispan-pod
- topologyKey: kubernetes.io/hostname
- weight: 100
+ {{- with .Values.deploy.podAntiAffinity }}
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
+ {{- end }}
{{- if .Values.deploy.nodeAffinity }}
nodeAffinity:
{{- with .Values.deploy.nodeAffinity }}
diff --git a/values.schema.json b/values.schema.json
index 6ab2c98..22791c0 100644
--- a/values.schema.json
+++ b/values.schema.json
@@ -482,7 +482,7 @@
"minLength": 1
}
},
- "required": ["path"]
+ "required": ["alias","path","password"]
}
}
diff --git a/values.yaml b/values.yaml
index ed9aebb..4b079ea 100644
--- a/values.yaml
+++ b/values.yaml
@@ -86,6 +86,18 @@ deploy:
nodeAffinity: {}
+ podAffinity: {}
+
+ podAntiAffinity:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ - podAffinityTerm:
+ labelSelector:
+ matchLabels:
+ clusterName: "{{ tpl include \"infinispan-helm-charts.name\" . }}"
+ app: infinispan-pod
+ topologyKey: kubernetes.io/hostname
+ weight: 100
+
nodeSelector: {}
securityContext: {}