From cd8f5ce5f44d3dd5a81f41d697f54ae4d5ef3b07 Mon Sep 17 00:00:00 2001 From: Ryan Luckie Date: Sun, 15 Jul 2018 12:53:56 -0500 Subject: [PATCH] [stable/consul] Add support for priorityClasses (#6583) --- stable/consul/Chart.yaml | 2 +- stable/consul/README.md | 11 ++++++----- stable/consul/templates/consul-statefulset.yaml | 3 +++ stable/consul/values.yaml | 3 +++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/stable/consul/Chart.yaml b/stable/consul/Chart.yaml index f5fa469d48..0b5ac7869c 100755 --- a/stable/consul/Chart.yaml +++ b/stable/consul/Chart.yaml @@ -1,6 +1,6 @@ name: consul home: https://github.com/hashicorp/consul -version: 3.2.0 +version: 3.3.0 appVersion: 1.0.0 description: Highly available and distributed service discovery and key-value store designed with support for the modern data center to make distributed systems and diff --git a/stable/consul/README.md b/stable/consul/README.md index 6f41242c34..7b8620e0d5 100644 --- a/stable/consul/README.md +++ b/stable/consul/README.md @@ -42,6 +42,7 @@ The following table lists the configurable parameters of the consul chart and th | `StorageClass` | Persistent volume storage class | `nil` | | `HttpPort` | Consul http listening port | `8500` | | `Resources` | Container resource requests and limits| `{}` | +| `priorityClassName` | priorityClassName | `nil` | | `RpcPort` | Consul rpc listening port | `8400` | | `SerflanPort` | Container serf lan listening port | `8301` | | `SerflanUdpPort` | Container serf lan UDP listening port | `8301` | @@ -49,14 +50,14 @@ The following table lists the configurable parameters of the consul chart and th | `SerfwanUdpPort` | Container serf wan UDP listening port | `8302` | | `ServerPort` | Container server listening port | `8300` | | `ConsulDnsPort` | Container dns listening port | `8600` | -| `affinity` | Consul affinity settings | `see values.yaml` | +| `affinity` | Consul affinity settings | `see values.yaml` | | `nodeSelector` | Node labels for pod assignment | `{}` | | `maxUnavailable` | Pod disruption Budget maxUnavailable | `1` | -| `ui.enabled` | Enable Consul Web UI | `true` | -| `uiService.enabled` | Create dedicated Consul Web UI svc | `true` | +| `ui.enabled` | Enable Consul Web UI | `true` | +| `uiService.enabled` | Create dedicated Consul Web UI svc | `true` | | `uiService.type` | Dedicate Consul Web UI svc type | `NodePort` | -| `test.image` | Test container image requires kubectl + bash (used for helm test) | `lachlanevenson/k8s-kubectl` | -| `test.imageTag` | Test container image tag (used for helm test) | `v1.4.8-bash` | +| `test.image` | Test container image requires kubectl + bash (used for helm test) | `lachlanevenson/k8s-kubectl` | +| `test.imageTag` | Test container image tag (used for helm test) | `v1.4.8-bash` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. diff --git a/stable/consul/templates/consul-statefulset.yaml b/stable/consul/templates/consul-statefulset.yaml index 7a8082f5d6..20af2f7741 100644 --- a/stable/consul/templates/consul-statefulset.yaml +++ b/stable/consul/templates/consul-statefulset.yaml @@ -27,6 +27,9 @@ spec: spec: securityContext: fsGroup: 1000 +{{- if .Values.priorityClassName }} + priorityClassName: "{{ .Values.priorityClassName }}" +{{- end }} {{- if .Values.affinity }} affinity: {{ tpl .Values.affinity . | indent 8 }} diff --git a/stable/consul/values.yaml b/stable/consul/values.yaml index e8f40a8d4c..372265cd02 100644 --- a/stable/consul/values.yaml +++ b/stable/consul/values.yaml @@ -31,6 +31,9 @@ Resources: {} # cpu: "500m" # memory: "512Mi" ## Persistent volume size + +priorityClassName: "" + Storage: "1Gi" ## Needed for 0.8.0 and later IF all consul containers are spun up