Skip to content

Commit

Permalink
Allow the user to configure container imagePullPolicy.
Browse files Browse the repository at this point in the history
  • Loading branch information
amarkevich authored and ryanemerson committed May 28, 2024
1 parent f216503 commit c45455e
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Configure your Infinispan cluster by specifying values in the `deploy.*` section
| ----- | ----------- | ------- | ---------------------- |
| `deploy.clusterDomain` | Specifies the internal Kubernetes cluster domain. | cluster.local | - |
| `deploy.replicas` | Specifies the number of nodes in your Infinispan cluster, with a pod created for each node. | 1 | - |
| `deploy.container.imagePullPolicy` | The Infinispan image pull policy. | `"Always"` | - |
| `deploy.container.extraJvmOpts` | Passes JVM options to Infinispan Server. | `""` | - |
| `deploy.container.libraries` | Libraries to be downloaded before server startup. | `""` | Specify multiple, space-separated artifacts represented as URLs or as Maven coordinates. Archive artifacts in .tar, .tar.gz or .zip formats will be extracted. |
| `deploy.container.env` | Additional environment variables in K8s format. | `""` | See docs for examples of [strings](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config), [ConfigMaps](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#define-container-environment-variables-with-data-from-multiple-configmaps) and [Secrets](https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/#define-container-environment-variables-with-data-from-multiple-secrets) |
Expand Down
1 change: 1 addition & 0 deletions README.md.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Configure your {brandname} cluster by specifying values in the `deploy.*` sectio
| ----- | ----------- | ------- | ---------------------- |
| `deploy.clusterDomain` | Specifies the internal Kubernetes cluster domain. | cluster.local | - |
| `deploy.replicas` | Specifies the number of nodes in your {brandname} cluster, with a pod created for each node. | 1 | - |
| `deploy.container.imagePullPolicy` | The {brandname} image pull policy. | `"Always"` | - |
| `deploy.container.extraJvmOpts` | Passes JVM options to {brandname} Server. | `""` | - |
| `deploy.container.libraries` | Libraries to be downloaded before server startup. | `""` | Specify multiple, space-separated artifacts represented as URLs or as Maven coordinates. Archive artifacts in .tar, .tar.gz or .zip formats will be extracted. |
| `deploy.container.env` | Additional environment variables in K8s format. | `""` | See docs for examples of [strings](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config), [ConfigMaps](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#define-container-environment-variables-with-data-from-multiple-configmaps) and [Secrets](https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/#define-container-environment-variables-with-data-from-multiple-secrets) |
Expand Down
2 changes: 1 addition & 1 deletion templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
- env:
{{- include "infinispan-helm-charts.containerEnv" .Values.deploy.container | nindent 12 }}
image: {{ .Values.images.server }}
imagePullPolicy: Always
imagePullPolicy: {{ .Values.deploy.container.imagePullPolicy }}
args:
- --cluster-name={{ include "infinispan-helm-charts.name" . }}
- --server-config=/etc/config/infinispan.yml
Expand Down
14 changes: 14 additions & 0 deletions values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@
"container": {
"description": "JVM, CPU, and memory resources for Infinispan pods.",
"properties": {
"imagePullPolicy": {
"description": "The Infinispan image pull policy.",
"enum": [
"",
"IfNotPresent",
"Always",
"Never"
],
"type": [
"string",
"null"
],
"default": "Always"
},
"extraJvmOpts": {
"description": "Passes JVM options to Infinispan Server.",
"type": [
Expand Down
14 changes: 14 additions & 0 deletions values.schema.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@
"container": {
"description": "JVM, CPU, and memory resources for {brandname} pods.",
"properties": {
"imagePullPolicy": {
"description": "The {brandname} image pull policy.",
"enum": [
"",
"IfNotPresent",
"Always",
"Never"
],
"type": [
"string",
"null"
],
"default": "Always"
},
"extraJvmOpts": {
"description": "Passes JVM options to {brandname} Server.",
"type": [
Expand Down
1 change: 1 addition & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ deploy:
clusterDomain: cluster.local

container:
imagePullPolicy: "Always"
extraJvmOpts: ""
libraries: ""
# [USER] Define custom environment variables using standard K8s format
Expand Down

0 comments on commit c45455e

Please sign in to comment.