Skip to content

Commit

Permalink
priorityClassName support added
Browse files Browse the repository at this point in the history
  • Loading branch information
thr authored and thr committed Sep 13, 2024
1 parent ac30344 commit 041c49e
Show file tree
Hide file tree
Showing 26 changed files with 106 additions and 11 deletions.
2 changes: 1 addition & 1 deletion apigateway/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.2.8
version: 1.2.9

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
1 change: 1 addition & 0 deletions apigateway/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,6 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use
| `1.2.6` | Fixed commons dependency to enable metering change from 1.2.5. |
| `1.2.7` | Added possibility to rename roleBinding for API Gateway, Kibana and Elasticsearch. This allows for multiple deployments into the same namespace. Also, CRD ServiceMonitor selector corrected. Support of ES storage PVC annotations. |
| `1.2.8` | `tpl` function support in `affinity` value added. `affinity` support added for Kibana and Elasticsearch. `topologySpreadConstraints` support added for APIGW, Elasticsearch and Kibana. |
| `1.2.9` | `priorityClassName` support added for APIGW, Elasticsearch and Kibana. |

{{ template "chart.valuesSection" . }}
3 changes: 3 additions & 0 deletions apigateway/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ spec:
topologySpreadConstraints:
{{- tpl (toYaml .) $context | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
3 changes: 3 additions & 0 deletions apigateway/helm/templates/elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ spec:
topologySpreadConstraints:
{{- tpl (toYaml .) $context | nindent 12 }}
{{- end }}
{{- if .Values.elasticsearch.priorityClassName }}
priorityClassName: {{ .Values.elasticsearch.priorityClassName }}
{{- end }}
imagePullSecrets:
{{- toYaml .Values.imagePullSecrets | nindent 12 }}
containers:
Expand Down
3 changes: 3 additions & 0 deletions apigateway/helm/templates/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ spec:
topologySpreadConstraints:
{{- tpl (toYaml .) $context | nindent 8 }}
{{- end }}
{{- if .Values.kibana.priorityClassName }}
priorityClassName: {{ .Values.kibana.priorityClassName }}
{{- end }}
imagePullSecrets:
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- if .Values.kibana.serviceAccount.name }}
Expand Down
4 changes: 4 additions & 0 deletions apigateway/helm/templates/nginx-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,8 @@ spec:
items:
- key: nginx.conf
path: nginx.conf
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}

{{- end }}
10 changes: 10 additions & 0 deletions apigateway/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ affinity: {}
# -- Set Pod topology spread constraints for APIGW. You can use templates inside because `tpl` function is called for rendering.
topologySpreadConstraints: {}

# -- Set APIGW and Nginx Pods' Priority Class Name
# ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: ""

# -- Value to add extra host aliases to APIGW container.
hostAliases: []

Expand Down Expand Up @@ -609,6 +613,9 @@ elasticsearch:
# -- Set Pod topology spread constraints for ElasticSearch. You can use templates inside because `tpl` function is called for rendering.
topologySpreadConstraints: {}

# -- Set Pods' Priority Class Name
priorityClassName: ""

# -- Node sets. See official ElasticSearch documentation at:
# https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-orchestration.html
# if you specify node sets here the defaultNodeSet will not be used.
Expand Down Expand Up @@ -651,6 +658,9 @@ kibana:
# -- Set Pod topology spread constraints for Kibana. You can use templates inside because `tpl` function is called for rendering.
topologySpreadConstraints: {}

# -- Set Pods' Priority Class Name
priorityClassName: ""

# -- The image that should be used.
# By default ECK will use the official Elasticsearch images.
# Overwrite this to use an image from an internal registry or any custom images.
Expand Down
2 changes: 1 addition & 1 deletion developerportal/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.2
version: 1.0.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
1 change: 1 addition & 0 deletions developerportal/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ helm install webmethods/developerportal devportal
| `1.0.0` | Initial release |
| `1.0.1` | Supports wM version 11.0. Validate `devportal.port` value in `values.yaml` if you want to use wM image version 11.0. |
| `1.0.2` | `tpl` function support in `affinity` value added. `topologySpreadConstraints` support added. |
| `1.0.3` | `priorityClassName` support added. Error is corrected on using value `useDefaultAffinityRule == true`. Now, the release name is used in condition with `app.kubernetes.io/instance`. `affinity` and `topologySpreadConstraints` support added for Elasticsearch. |

{{ template "chart.valuesSection" . }}
12 changes: 12 additions & 0 deletions developerportal/helm/templates/elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# *
# */
{{- if .Values.elasticsearch.deploy }}
{{- $context := . }}
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
Expand Down Expand Up @@ -55,6 +56,17 @@ spec:
authz_exception: false
podTemplate:
spec:
{{- with .Values.elasticsearch.affinity }}
affinity:
{{- tpl (toYaml .) $context | nindent 12 }}
{{- end }}
{{- with .Values.elasticsearch.topologySpreadConstraints }}
topologySpreadConstraints:
{{- tpl (toYaml .) $context | nindent 12 }}
{{- end }}
{{- if .Values.elasticsearch.priorityClassName }}
priorityClassName: {{ .Values.elasticsearch.priorityClassName }}
{{- end }}
initContainers:
{{- if and .Values.elasticsearch.defaultNodeSet.setMaxMapCount .Values.elasticsearch.defaultNodeSet.memoryMapping }}
- name: sysctl
Expand Down
5 changes: 4 additions & 1 deletion developerportal/helm/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
- key: "app.kubernetes.io/instance"
operator: In
values:
- {{ include "common.names.fullname" . }}
- '{{ .Release.Name }}'
topologyKey: kubernetes.io/hostname
{{- else if .Values.affinity }}
{{ tpl (toYaml .Values.affinity) $context | nindent 8 }}
Expand All @@ -66,6 +66,9 @@ spec:
topologySpreadConstraints:
{{- tpl (toYaml .) $context | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
containers:
- name: {{ include "common.names.fullname" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
15 changes: 14 additions & 1 deletion developerportal/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ affinity: {}
# -- Set Pod topology spread constraints. You can use templates inside because `tpl` function is called for rendering.
topologySpreadConstraints: {}

# -- Set Pods' Priority Class Name
# ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: ""

# -- Extra Labels
extraLabels: {}

Expand Down Expand Up @@ -213,7 +217,16 @@ elasticsearch:
# -- The name of the secret holding the tls secret
# By default the name will be fullname of release + "es-tls-secret"
certificateSecretName: "{{ include \"common.names.fullname\" .}}-es-tls-secret"


# -- Set Pod (anti-) affinity for ElasticSearch. You can use templates inside because `tpl` function is called for rendering.
affinity: {}

# -- Set Pod topology spread constraints for ElasticSearch. You can use templates inside because `tpl` function is called for rendering.
topologySpreadConstraints: {}

# -- Set Pods' Priority Class Name
priorityClassName: ""

# -- Node sets. See official ElasticSearch documentation at:
# https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-orchestration.html
# if you specify node sets here the defaultNodeSet will not be used.
Expand Down
2 changes: 1 addition & 1 deletion microservicesruntime/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.6
version: 1.0.7

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
1 change: 1 addition & 0 deletions microservicesruntime/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,6 @@ helm install wm-msr webmethods/microservicesruntime \
| `1.0.4` | Option in `values.yaml` to create a ServiceMonitor added. Some errors in Nginx external LB corrected |
| `1.0.5` | Value `trustStorePasswordFromSecret` added in `values.yaml` to support common `1.0.2` |
| `1.0.6` | `tpl` function support in `affinity` value added. `topologySpreadConstraints` support added. |
| `1.0.7` | `priorityClassName` support added. |

{{ template "chart.valuesSection" . }}
5 changes: 4 additions & 1 deletion microservicesruntime/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ if and .Values.statefulSet .Values.volumeClaimTemplates }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
{{ if and .Values.statefulSet .Values.volumeClaimTemplates }}
volumeClaimTemplates:
{{- toYaml .Values.volumeClaimTemplates | nindent 2 }}
{{- end }}
Expand Down
15 changes: 14 additions & 1 deletion microservicesruntime/helm/templates/nginx-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# * limitations under the License.
# *
# */

{{- $context := . }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -75,4 +75,17 @@ spec:
items:
- key: nginx.conf
path: nginx.conf

{{- with .Values.affinity }}
affinity:
{{- tpl (toYaml .) $context | nindent 8 }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- tpl (toYaml .) $context | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}

{{- end }}
9 changes: 7 additions & 2 deletions microservicesruntime/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,17 @@ nodeSelector: {}

tolerations: []

# -- Set Pod (anti-) affinity. You can use templates inside because `tpl` function is called for rendering.
# -- Set MSR and Nginx Pod (anti-) affinity. You can use templates inside because `tpl` function is called for rendering.
affinity: {}

# -- Set Pod topology spread constraints. You can use templates inside because `tpl` function is called for rendering.
# -- Set MSR and Nginx Pod topology spread constraints. You can use templates inside because `tpl` function is called for rendering.
# ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
topologySpreadConstraints: {}

# -- Set MSR and Nginx Pods' Priority Class Name
# ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: ""

# -- Deploy Nginx as external LB
externalLoadBalancer: false

Expand Down
2 changes: 1 addition & 1 deletion mywebmethodsserver/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ apiVersion: v2
appVersion: "10.15"
description: My webMethods Server (MWS) Helm Chart for Kubernetes
name: mywebmethodsserver
version: 1.0.3
version: 1.0.4

dependencies:
- name: common
Expand Down
1 change: 1 addition & 0 deletions mywebmethodsserver/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ helm install wm-mws mywebmethodsserver
| `1.0.2` | `storage.enabled` added in `values.yaml`. For backward reason is this value set to `true` as default. `false` doesn't create and mount any PV. (You can test this feature if you don't want to deploy any own MWS application. MWS is more stateless and has only the database as stateful dependency.) |
| `1.0.2` | `containerName` added in `values.yaml`. Default is the Chart name. (Use `helm repo update` to get latest Helm Chart version.) |
| `1.0.3` | `tpl` function support in `affinity` value added. `topologySpreadConstraints` support added. |
| `1.0.4` | `priorityClassName` support added. |

{{ template "chart.valuesSection" . }}
3 changes: 3 additions & 0 deletions mywebmethodsserver/helm/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ spec:
topologySpreadConstraints:
{{- tpl (toYaml .) $context | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
4 changes: 4 additions & 0 deletions mywebmethodsserver/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ affinity: {}
# -- Set Pod topology spread constraints. You can use templates inside because `tpl` function is called for rendering.
topologySpreadConstraints: {}

# -- Set Pods' Priority Class Name
# ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: ""

# storage settings for the different application directories
storage:
# -- Enable or disable persistent storage handling. `true`creates (PVCs) and mounts all volumes. `false` doesn't create any PVC.
Expand Down
2 changes: 1 addition & 1 deletion universalmessaging/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.6
version: 1.0.7

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
1 change: 1 addition & 0 deletions universalmessaging/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ helm install um webmethods/universalmessaging
| `1.0.4` | `containerName` added in `values.yaml`. Default is the Chart name. (Use `helm repo update` to get latest Helm Chart version.) |
| `1.0.5` | support of PV storage annotation and class name |
| `1.0.6` | `tpl` function support in `affinity` value added. `topologySpreadConstraints` support added. |
| `1.0.7` | `priorityClassName` support added. |

{{ template "chart.valuesSection" . }}
4 changes: 4 additions & 0 deletions universalmessaging/helm/templates/nginx-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ spec:
items:
- key: nginx.conf
path: nginx.conf
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}

{{- end }}
3 changes: 3 additions & 0 deletions universalmessaging/helm/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ spec:
topologySpreadConstraints:
{{- tpl (toYaml .) $context | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
4 changes: 4 additions & 0 deletions universalmessaging/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ affinity: {}
# -- Set Pod topology spread constraints. You can use templates inside because `tpl` function is called for rendering.
topologySpreadConstraints: {}

# -- Set UM and Nginx Pods' Priority Class Name
# ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: ""

# -- Configure liveness probe
startupProbe:
httpGet:
Expand Down

0 comments on commit 041c49e

Please sign in to comment.