diff --git a/apigateway/helm/Chart.yaml b/apigateway/helm/Chart.yaml index eb3854c..30e3dd9 100644 --- a/apigateway/helm/Chart.yaml +++ b/apigateway/helm/Chart.yaml @@ -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 diff --git a/apigateway/helm/README.md b/apigateway/helm/README.md index 2d175f8..79b4782 100644 --- a/apigateway/helm/README.md +++ b/apigateway/helm/README.md @@ -169,6 +169,7 @@ 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. | ## Values @@ -224,6 +225,7 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use | elasticsearch.podDisruptionBudget | object | `{"data":{},"enabled":true}` | Customization of ElasticSearchs PodDisruptionBudget Policy. Elastic Cloud on Kubernetes operator (ECK) creates a default PodDisruptionBudget Policy. | | elasticsearch.podDisruptionBudget.data | object | `{}` | Overwrite the default PodDisruptionBudget Policy. Overwriting with custom PodDisruptionBudget Policy requires enabled=true. Examples can be seen here: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ | | elasticsearch.podDisruptionBudget.enabled | bool | `true` | Whether a PodDisruptionBudget Policy should be created. Enabled=true results in ECK deploying the default (or custom, see data) PodDisruptionBudget Policy. Enabled=false results in no PodDisruptionBudget Policy deployment. | +| elasticsearch.priorityClassName | string | `""` | Set Pods' Priority Class Name | | elasticsearch.resources | object | `{}` | Resource Settings for Elasticsearch Example: limits: cpu: 100m memory: 128Mi requests: cpu: 100m memory: 128Mi | | elasticsearch.secretName | string | `""` | The secret name that holds the sag es user for API Gateway. | | elasticsearch.secretPasswordKey | string | `""` | The key that holds the Elasticsearch password; defauls to "password" | @@ -338,6 +340,7 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use | kibana.livenessProbe | object | `{}` | Configure Kibana's livenessProbe. | | kibana.podSecurityContext | object | `{}` | The pod securityContext for kibana pod. | | kibana.port | int | `5601` | The default Kibana Port | +| kibana.priorityClassName | string | `""` | Set Pods' Priority Class Name | | kibana.readinessProbe | object | `{"failureThreshold":3,"httpGet":{"path":"/status","port":5601,"scheme":"HTTP"},"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1}` | Configure Kibana's readinessProbe. | | kibana.resources | object | `{}` | Resource Settings for Kibana Example: limits: cpu: 100m memory: 128Mi requests: cpu: 100m memory: 128Mi | | kibana.secretName | string | `""` | The secret name that holds the kibana user for API Gateway. | @@ -380,6 +383,7 @@ Sub-folder `examples` contains some *values* examples for more use-cases. To use | nodeSelector | object | `{}` | | | podAnnotations | object | `{}` | | | podSecurityContext | object | `{}` | | +| priorityClassName | string | `""` | Set APIGW and Nginx Pods' Priority Class Name ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ | | prometheus | object | `{"interval":"10s","path":"/metrics","port":"5555","scheme":"http","scrape":"true","scrapeTimeout":"10s"}` | Define values for Prometheus Operator to scrap metrics via annotation or ServiceMonitor. | | prometheus-elasticsearch-exporter | object | `{"enabled":true,"es":{"uri":"http://$(ES_USER):$(ES_PASSWORD)@apigw-apigateway-es-http:9200"},"extraEnvSecrets":{"ES_PASSWORD":{"key":"password","secret":"apigw-apigateway-sag-user-es"},"ES_USER":{"key":"username","secret":"apigw-apigateway-sag-user-es"}},"podAnnotations":{"prometheus.io/path":"/metrics","prometheus.io/port":"9108","prometheus.io/scheme":"http","prometheus.io/scrape":"true"},"serviceMonitor":{"enabled":false}}` | Elasticsearch exporter settings. See https://github.com/prometheus-community/elasticsearch_exporter for details. | | prometheus-elasticsearch-exporter.enabled | bool | `true` | Deploy the prometheus exporter for elasticsearch | diff --git a/apigateway/helm/README.md.gotmpl b/apigateway/helm/README.md.gotmpl index 0d4942a..920259c 100644 --- a/apigateway/helm/README.md.gotmpl +++ b/apigateway/helm/README.md.gotmpl @@ -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" . }} diff --git a/apigateway/helm/templates/deployment.yaml b/apigateway/helm/templates/deployment.yaml index 7e74019..351dce4 100644 --- a/apigateway/helm/templates/deployment.yaml +++ b/apigateway/helm/templates/deployment.yaml @@ -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 }} diff --git a/apigateway/helm/templates/elasticsearch.yaml b/apigateway/helm/templates/elasticsearch.yaml index 8fcdf2d..00f79da 100644 --- a/apigateway/helm/templates/elasticsearch.yaml +++ b/apigateway/helm/templates/elasticsearch.yaml @@ -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: diff --git a/apigateway/helm/templates/kibana.yaml b/apigateway/helm/templates/kibana.yaml index c0bc97d..4a1b1aa 100644 --- a/apigateway/helm/templates/kibana.yaml +++ b/apigateway/helm/templates/kibana.yaml @@ -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 }} diff --git a/apigateway/helm/templates/nginx-deployment.yaml b/apigateway/helm/templates/nginx-deployment.yaml index 61f32df..09b44dd 100644 --- a/apigateway/helm/templates/nginx-deployment.yaml +++ b/apigateway/helm/templates/nginx-deployment.yaml @@ -78,4 +78,8 @@ spec: items: - key: nginx.conf path: nginx.conf + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} + {{- end }} \ No newline at end of file diff --git a/apigateway/helm/values.yaml b/apigateway/helm/values.yaml index fd594ad..c16c729 100644 --- a/apigateway/helm/values.yaml +++ b/apigateway/helm/values.yaml @@ -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: [] @@ -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. @@ -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. diff --git a/developerportal/helm/Chart.yaml b/developerportal/helm/Chart.yaml index fa6ae54..5dbc03b 100644 --- a/developerportal/helm/Chart.yaml +++ b/developerportal/helm/Chart.yaml @@ -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 diff --git a/developerportal/helm/README.md b/developerportal/helm/README.md index 99be637..3fbc4c8 100644 --- a/developerportal/helm/README.md +++ b/developerportal/helm/README.md @@ -48,6 +48,7 @@ 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. | ## Values @@ -64,6 +65,7 @@ helm install webmethods/developerportal devportal | devportal.elasticSearchDeployment | bool | `true` | Deploy Elasticsearch. Depends on Elasic Search Helm Charts. See https://github.com/elastic/helm-charts/blob/main/elasticsearch | | devportal.port | int | `8083` | HTTP listening port. Use on wM version 10.15 (default): `8083`, 11.0: `8080` | | devportal.useDefaultAffinityRule | bool | `true` | Use the default anti pod affinity. Specifies a Pod Anti-Affinity rule for Kubernetes pods. The default Pod Anti-Affinity is a scheduling preference that indicates how Kubernetes should distribute pods across nodes to avoid having multiple pods of the same application or with specific labels running on the same node. If you want to use your on rules, refer to affinity value and provide your own configuration. | +| elasticsearch.affinity | object | `{}` | Set Pod (anti-) affinity for ElasticSearch. You can use templates inside because `tpl` function is called for rendering. | | elasticsearch.certificateSecretName | string | `"{{ include \"common.names.fullname\" .}}-es-tls-secret"` | The name of the secret holding the tls secret By default the name will be fullname of release + "es-tls-secret" | | elasticsearch.defaultNodeSet | object | `{"count":1,"extraConfig":{},"extraInitContainers":{},"installPlugins":["mapper-size"],"memoryMapping":false,"setMaxMapCount":true}` | Default Node Set | | elasticsearch.defaultNodeSet.count | int | `1` | the number of replicas for Elastic Search | @@ -77,9 +79,11 @@ helm install webmethods/developerportal devportal | elasticsearch.keystoreSecretName | string | `""` | The secret name that holds the keystore password | | elasticsearch.nodeSets | object | `{}` | 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. | | elasticsearch.port | int | `9200` | The default elasticsearch instance http communication port | +| elasticsearch.priorityClassName | string | `""` | Set Pods' Priority Class Name | | elasticsearch.secretName | string | `""` | The secret name that holds the sag es user for Developer Portal. | | elasticsearch.serviceName | string | `""` | The elasticsearch http service name that Developer Portal uses. The default is compiled of the fullname (releasename + chart name) + "-http" You MUST override this if you use an external elastic search service and do not deploy the embedded elastic CRD from this chart. | | elasticsearch.tlsEnabled | bool | `false` | Whether the communication from Developer Portal should be HTTPS Note: you will need to create certificate and a separate truststore for the communication. | +| elasticsearch.topologySpreadConstraints | object | `{}` | Set Pod topology spread constraints for ElasticSearch. You can use templates inside because `tpl` function is called for rendering. | | elasticsearch.version | string | `"8.2.3"` | The ECK version to be used | | extraConfigMaps | list | `[]` | Extra config maps for additional configurations such as extra ports, etc. | | extraContainers | list | `[]` | Extra containers which should run in addition to the main container as a sidecar | @@ -108,6 +112,7 @@ helm install webmethods/developerportal devportal | nodeSelector | object | `{}` | | | podAnnotations | object | `{}` | | | podSecurityContext | object | `{}` | | +| priorityClassName | string | `""` | Set Pods' Priority Class Name ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ | | prometheus-elasticsearch-exporter.es.uri | string | `"{{ .Release.Name }}-developerportal-es-http:9200"` | | | prometheus-elasticsearch-exporter.image.pullPolicy | string | `"IfNotPresent"` | | | prometheus-elasticsearch-exporter.image.pullSecret | string | `""` | | diff --git a/developerportal/helm/README.md.gotmpl b/developerportal/helm/README.md.gotmpl index 965bb06..ab75747 100644 --- a/developerportal/helm/README.md.gotmpl +++ b/developerportal/helm/README.md.gotmpl @@ -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" . }} diff --git a/developerportal/helm/templates/elasticsearch.yaml b/developerportal/helm/templates/elasticsearch.yaml index d8b8019..ae51803 100644 --- a/developerportal/helm/templates/elasticsearch.yaml +++ b/developerportal/helm/templates/elasticsearch.yaml @@ -17,6 +17,7 @@ # * # */ {{- if .Values.elasticsearch.deploy }} +{{- $context := . }} apiVersion: elasticsearch.k8s.elastic.co/v1 kind: Elasticsearch metadata: @@ -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 diff --git a/developerportal/helm/templates/statefulset.yaml b/developerportal/helm/templates/statefulset.yaml index 073295a..3539b2c 100644 --- a/developerportal/helm/templates/statefulset.yaml +++ b/developerportal/helm/templates/statefulset.yaml @@ -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 }} @@ -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 }}" diff --git a/developerportal/helm/values.yaml b/developerportal/helm/values.yaml index 64330dd..e0fd7ef 100644 --- a/developerportal/helm/values.yaml +++ b/developerportal/helm/values.yaml @@ -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: {} @@ -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. diff --git a/microservicesruntime/helm/Chart.yaml b/microservicesruntime/helm/Chart.yaml index c899e8e..ff9bf96 100644 --- a/microservicesruntime/helm/Chart.yaml +++ b/microservicesruntime/helm/Chart.yaml @@ -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 diff --git a/microservicesruntime/helm/README.md b/microservicesruntime/helm/README.md index 933e04e..4a96026 100644 --- a/microservicesruntime/helm/README.md +++ b/microservicesruntime/helm/README.md @@ -111,12 +111,13 @@ 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. | ## Values | Key | Type | Default | Description | |-----|------|---------|-------------| -| affinity | object | `{}` | Set Pod (anti-) affinity. You can use templates inside because `tpl` function is called for rendering. | +| affinity | object | `{}` | Set MSR and Nginx Pod (anti-) affinity. You can use templates inside because `tpl` function is called for rendering. | | autoscaling.enabled | bool | `false` | | | autoscaling.maxReplicas | int | `100` | | | autoscaling.minReplicas | int | `1` | | @@ -194,6 +195,7 @@ helm install wm-msr webmethods/microservicesruntime \ | persistence.storageClassName | string | `""` | | | podAnnotations | object | `{}` | pod annotations | | podSecurityContext.fsGroup | int | `1724` | | +| priorityClassName | string | `""` | Set MSR and Nginx Pods' Priority Class Name ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ | | prometheus | object | `{"interval":"10s","path":"/metrics","port":"5555","scheme":"http","scrape":"true","scrapeTimeout":"10s"}` | Define values for Prometheus Operator to scrap metrics via annotation or ServiceMonitor. | | readinessProbe | object | `{"failureThreshold":3,"httpGet":{"path":"/health/readiness","port":"http"},"initialDelaySeconds":0,"periodSeconds":15,"successThreshold":1,"timeoutSeconds":30}` | Configure readiness probe | | replicaCount | int | `1` | Number of replicates in Deployment | @@ -210,5 +212,5 @@ helm install wm-msr webmethods/microservicesruntime \ | startupProbe | object | `{"failureThreshold":60,"periodSeconds":30,"tcpSocket":{"port":"http"}}` | startup probe for container | | statefulSet | bool | `false` | StatefulSet or Deployment. You should only change this if you require Client Side queuing (CSQ) or functionality in IS which requires stable hostnames and filesystems. Default is false => Deployment. Keep in mind, you must disable CSQ on each webMethods messaging and JMS connection if you don't use stateful-sets. See examples in Process Engine deployment for disableing CSQ. | | tolerations | list | `[]` | | -| topologySpreadConstraints | object | `{}` | Set Pod topology spread constraints. You can use templates inside because `tpl` function is called for rendering. | +| topologySpreadConstraints | object | `{}` | 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 | | volumeClaimTemplates | list | `[]` | Volume Claim Templates, only to be used when running as a Statefulset (e.g. using client-side queuing) | diff --git a/microservicesruntime/helm/README.md.gotmpl b/microservicesruntime/helm/README.md.gotmpl index 638db99..59d7201 100644 --- a/microservicesruntime/helm/README.md.gotmpl +++ b/microservicesruntime/helm/README.md.gotmpl @@ -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" . }} diff --git a/microservicesruntime/helm/templates/deployment.yaml b/microservicesruntime/helm/templates/deployment.yaml index eeecb90..efd7020 100644 --- a/microservicesruntime/helm/templates/deployment.yaml +++ b/microservicesruntime/helm/templates/deployment.yaml @@ -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 }} diff --git a/microservicesruntime/helm/templates/nginx-deployment.yaml b/microservicesruntime/helm/templates/nginx-deployment.yaml index 0e54029..128a045 100644 --- a/microservicesruntime/helm/templates/nginx-deployment.yaml +++ b/microservicesruntime/helm/templates/nginx-deployment.yaml @@ -17,7 +17,7 @@ # * limitations under the License. # * # */ - +{{- $context := . }} apiVersion: apps/v1 kind: Deployment metadata: @@ -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 }} \ No newline at end of file diff --git a/microservicesruntime/helm/values.yaml b/microservicesruntime/helm/values.yaml index 4188686..e16cbca 100644 --- a/microservicesruntime/helm/values.yaml +++ b/microservicesruntime/helm/values.yaml @@ -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 diff --git a/mywebmethodsserver/helm/Chart.yaml b/mywebmethodsserver/helm/Chart.yaml index be8da60..af49851 100644 --- a/mywebmethodsserver/helm/Chart.yaml +++ b/mywebmethodsserver/helm/Chart.yaml @@ -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 diff --git a/mywebmethodsserver/helm/README.md b/mywebmethodsserver/helm/README.md index f8af7f5..8e1efeb 100644 --- a/mywebmethodsserver/helm/README.md +++ b/mywebmethodsserver/helm/README.md @@ -49,6 +49,7 @@ 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. | ## Values @@ -91,6 +92,7 @@ helm install wm-mws mywebmethodsserver | nodeSelector | object | `{}` | | | podAnnotations | object | `{}` | | | podSecurityContext | object | `{}` | | +| priorityClassName | string | `""` | Set Pods' Priority Class Name ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ | | prometheus | object | `{"interval":"10s","path":"/metrics","port":"8585","scheme":"http","scrape":"true","scrapeTimeout":"10s"}` | Define values for Prometheus Operator to scrap metrics via annotation or ServiceMonitor. | | replicaCount | int | `1` | | | resources | object | `{}` | Define CPU and memory resources for container | diff --git a/mywebmethodsserver/helm/README.md.gotmpl b/mywebmethodsserver/helm/README.md.gotmpl index 642c24d..ec9dcfa 100644 --- a/mywebmethodsserver/helm/README.md.gotmpl +++ b/mywebmethodsserver/helm/README.md.gotmpl @@ -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" . }} diff --git a/mywebmethodsserver/helm/templates/statefulset.yaml b/mywebmethodsserver/helm/templates/statefulset.yaml index 6a25ee7..a5281ba 100644 --- a/mywebmethodsserver/helm/templates/statefulset.yaml +++ b/mywebmethodsserver/helm/templates/statefulset.yaml @@ -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 }} diff --git a/mywebmethodsserver/helm/values.yaml b/mywebmethodsserver/helm/values.yaml index d886a54..f98bcc7 100644 --- a/mywebmethodsserver/helm/values.yaml +++ b/mywebmethodsserver/helm/values.yaml @@ -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. diff --git a/universalmessaging/helm/Chart.yaml b/universalmessaging/helm/Chart.yaml index 2c319cb..6e6e831 100644 --- a/universalmessaging/helm/Chart.yaml +++ b/universalmessaging/helm/Chart.yaml @@ -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 diff --git a/universalmessaging/helm/README.md b/universalmessaging/helm/README.md index f335a29..3add751 100644 --- a/universalmessaging/helm/README.md +++ b/universalmessaging/helm/README.md @@ -64,6 +64,7 @@ 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. | ## Values @@ -105,6 +106,7 @@ helm install um webmethods/universalmessaging | nodeSelector | object | `{}` | | | podAnnotations | object | `{}` | pod annotations | | podSecurityContext.fsGroup | int | `1724` | | +| priorityClassName | string | `""` | Set UM and Nginx Pods' Priority Class Name ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ | | prometheus | object | `{"interval":"10s","path":"/metrics","port":"9200","scheme":"http","scrape":"true","scrapeTimeout":"10s"}` | Define values for Prometheus Operator to scrap metrics via annotation or ServiceMonitor. | | readinessProbe | object | `{"failureThreshold":3,"httpGet":{"path":"/health/","port":9000},"initialDelaySeconds":0,"periodSeconds":15,"successThreshold":1,"timeoutSeconds":30}` | Configure readiness probe | | replicaCount | int | `1` | Number of replicas | diff --git a/universalmessaging/helm/README.md.gotmpl b/universalmessaging/helm/README.md.gotmpl index 26f173a..58ff09f 100644 --- a/universalmessaging/helm/README.md.gotmpl +++ b/universalmessaging/helm/README.md.gotmpl @@ -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" . }} diff --git a/universalmessaging/helm/templates/nginx-deployment.yaml b/universalmessaging/helm/templates/nginx-deployment.yaml index d93cd72..dae74f7 100644 --- a/universalmessaging/helm/templates/nginx-deployment.yaml +++ b/universalmessaging/helm/templates/nginx-deployment.yaml @@ -76,4 +76,8 @@ spec: items: - key: nginx.conf path: nginx.conf + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} + {{- end }} \ No newline at end of file diff --git a/universalmessaging/helm/templates/statefulset.yaml b/universalmessaging/helm/templates/statefulset.yaml index cbd7e98..2f78a1a 100644 --- a/universalmessaging/helm/templates/statefulset.yaml +++ b/universalmessaging/helm/templates/statefulset.yaml @@ -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 }} diff --git a/universalmessaging/helm/values.yaml b/universalmessaging/helm/values.yaml index ea96206..d70fbbc 100644 --- a/universalmessaging/helm/values.yaml +++ b/universalmessaging/helm/values.yaml @@ -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: