Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding log volume and posibility to provide pod annotations #125

Merged
merged 8 commits into from
Jul 12, 2024
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Configure your Infinispan cluster by specifying values in the `deploy.*` section
| `deploy.expose.host` | Specifies the hostname where the Ingress is exposed, if required. | `""` | |
| `deploy.expose.annotations` | Adds annotations to the service that exposes Infinispan on the network. | `{}` | - |
| `deploy.logging.categories` | Configures Infinispan cluster log categories and levels. | `{}` | - |
| `deploy.podAnnotations` | Adds annotations to each Infinispan pod that you create. | `{}` | - |
| `deploy.podLabels` | Adds labels to each Infinispan pod that you create. | `{}` | - |
| `deploy.svcLabels` | Adds labels to each service that you create.| `{}` | - |
| `deploy.resourceLabels` | Adds labels to all Infinispan resources including pods and services. | `{}` | - |
Expand Down
1 change: 1 addition & 0 deletions README.md.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Configure your {brandname} cluster by specifying values in the `deploy.*` sectio
| `deploy.expose.host` | Specifies the hostname where the {ingress} is exposed, if required. | `""` | |
| `deploy.expose.annotations` | Adds annotations to the service that exposes {brandname} on the network. | `{}` | - |
| `deploy.logging.categories` | Configures {brandname} cluster log categories and levels. | `{}` | - |
| `deploy.podAnnotations` | Adds annotations to each Infinispan pod that you create. | `{}` | - |
| `deploy.podLabels` | Adds labels to each Infinispan pod that you create. | `{}` | - |
| `deploy.svcLabels` | Adds labels to each service that you create.| `{}` | - |
| `deploy.resourceLabels` | Adds labels to all {brandname} resources including pods and services. | `{}` | - |
Expand Down
10 changes: 10 additions & 0 deletions templates/helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{- end }}

{{/*
Pod custom Annotations
*/}}

{{- define "infinispan-helm-charts.podAnnotations" -}}
{{- range .Values.deploy.podAnnotations }}
{{ .key }}: {{ .value }}
{{- end }}
{{- end }}

{{/*
Pod custom labels
*/}}
Expand Down
7 changes: 6 additions & 1 deletion templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ spec:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- if not (.Values.deploy.security.secretName) }}
checksum/identities: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end }}
{{- end }}
{{- include "infinispan-helm-charts.podAnnotations" . | nindent 8 }}
labels:
app: infinispan-pod
clusterName: {{ include "infinispan-helm-charts.name" . }}
Expand Down Expand Up @@ -135,6 +136,8 @@ spec:
name: config-volume
- mountPath: /opt/infinispan/server/data
name: data-volume
- mountPath: /opt/infinispan/server/log
name: log-volume
- mountPath: /etc/security
name: identities-volume
{{- if and .Values.deploy.ssl (ne .Values.deploy.ssl.transportSecretName "")}}
Expand Down Expand Up @@ -166,6 +169,8 @@ spec:
- name: data-volume
emptyDir: { }
{{- end }}
- name: log-volume
emptyDir: { }
{{- with .Values.deploy.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
21 changes: 21 additions & 0 deletions values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,27 @@
}
}
},
"podAnnotations": {
"description": "Adds annotations to every pod created",
"items": {
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"key",
"value"
]
},
"type": [
"array",
"null"
]
},
"podLabels": {
"description": "Adds labels to every pod created",
"items": {
Expand Down
21 changes: 21 additions & 0 deletions values.schema.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,27 @@
}
}
},
"podAnnotations": {
"description": "Adds annotations to every pod created",
"items": {
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"key",
"value"
]
},
"type": [
"array",
"null"
]
},
"podLabels": {
"description": "Adds labels to every pod created",
"items": {
Expand Down
2 changes: 2 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ deploy:

resourceLabels: []

podAnnotations: []

podLabels: []

svcLabels: []
Expand Down