mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/consul] Consul 1.0.0 (#2724)
* Update consul image to 1.0.0 This fixes a lot of the stability issues on k8s * Add pod anti affinity to spec This ensures a single node failure doesn't take out multiple consul services * Use the rolling update strategy for updates * Add a pod disruption budget * Bump chart version * Update README to reflect ImageTag update * Make anti-affinity settings configurable in Values.yaml * Bump [stable/consul] to 1.0.0
This commit is contained in:
committed by
Matt Farina
parent
5417a05aa9
commit
22c8cfc981
@@ -1,7 +1,7 @@
|
||||
name: consul
|
||||
home: https://github.com/hashicorp/consul
|
||||
version: 0.4.2
|
||||
appVersion: 0.8.3
|
||||
version: 1.0.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 configuration easy.
|
||||
icon: https://raw.githubusercontent.com/hashicorp/consul/bce3809dfca37b883828c3715b84143dd71c0f85/website/source/assets/images/favicons/android-chrome-512x512.png
|
||||
sources:
|
||||
|
||||
@@ -28,7 +28,7 @@ The following tables lists the configurable parameters of the consul chart and t
|
||||
| ----------------------- | ---------------------------------- | ---------------------------------------------------------- |
|
||||
| `Name` | Consul statefulset name | `consul` |
|
||||
| `Image` | Container image name | `consul` |
|
||||
| `ImageTag` | Container image tag | `v0.7.5` |
|
||||
| `ImageTag` | Container image tag | `1.0.0` |
|
||||
| `ImagePullPolicy` | Container pull policy | `Always` |
|
||||
| `Replicas` | k8s statefulset replicas | `3` |
|
||||
| `Component` | k8s selector key | `consul` |
|
||||
@@ -46,11 +46,13 @@ The following tables lists the configurable parameters of the consul chart and t
|
||||
| `SerfwanUdpPort` | Container serf wan UDP listening port | `8302` |
|
||||
| `ServerPort` | Container server listening port | `8300` |
|
||||
| `ConsulDnsPort` | Container dns listening port | `8600` |
|
||||
| `antiAffinity` | Consul pod anti-affinity setting | `hard` |
|
||||
| `maxUnavailable` | Pod disruption Budget maxUnavailable | `1` |
|
||||
| `ui.enabled` | Enable Consul Web UI | `false` |
|
||||
| `uiService.enabled` | Create dedicated Consul Web UI svc | `false` |
|
||||
| `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`.
|
||||
|
||||
|
||||
@@ -25,6 +25,18 @@ spec:
|
||||
type: "{{ .Values.uiService.type }}"
|
||||
{{- end }}
|
||||
---
|
||||
{{- if .Values.maxUnavailable }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: "{{ template "fullname" . }}-pdb"
|
||||
spec:
|
||||
maxUnavailable: {{ .Values.maxUnavailable }}
|
||||
selector:
|
||||
matchLabels:
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
@@ -77,6 +89,8 @@ metadata:
|
||||
spec:
|
||||
serviceName: "{{ template "fullname" . }}"
|
||||
replicas: {{ default 3 .Values.Replicas }}
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
name: "{{ template "fullname" . }}"
|
||||
@@ -88,6 +102,31 @@ spec:
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
{{- if eq .Values.antiAffinity "hard" }}
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: component
|
||||
operator: In
|
||||
values:
|
||||
- "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
topologyKey: kubernetes.io/hostname
|
||||
{{- else if eq .Values.antiAffinity "soft" }}
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: component
|
||||
operator: In
|
||||
values:
|
||||
- "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: "{{ template "fullname" . }}"
|
||||
image: "{{ .Values.Image }}:{{ .Values.ImageTag }}"
|
||||
|
||||
@@ -16,7 +16,7 @@ ConsulDnsPort: 8600
|
||||
Component: "consul"
|
||||
Replicas: 3
|
||||
Image: "consul"
|
||||
ImageTag: "0.8.3"
|
||||
ImageTag: "1.0.0"
|
||||
ImagePullPolicy: "Always"
|
||||
Resources: {}
|
||||
# requests:
|
||||
@@ -43,6 +43,21 @@ EncryptGossip: true
|
||||
## StorageClass name for use with Persistent Volume Claim (PVC) using beta notations
|
||||
# StorageClass:
|
||||
|
||||
## Setting maxUnavailable will create a pod disruption budget that will prevent
|
||||
## voluntarty cluster administration from taking down too many consul pods. If
|
||||
## you set maxUnavailable, you should set it to ceil((n/2) - 1), where
|
||||
## n = Replicas. For example, if you have 5 or 6 Replicas, you'll want to set
|
||||
## maxUnavailable = 2. If you are using the default of 3 Replicas, you'll want
|
||||
## to set maxUnavailable to 1.
|
||||
maxUnavailable: 1
|
||||
|
||||
## Anti-Affinity setting. The default "hard" will use pod anti-affinity that is
|
||||
## requiredDuringSchedulingIgnoredDuringExecution to ensure 2 services don't
|
||||
## end up on the same node. Setting this to "soft" will use
|
||||
## preferredDuringSchedulingIgnoredDuringExecution. If set to anything else,
|
||||
## no anti-affinity rules will be configured.
|
||||
antiAffinity: "hard"
|
||||
|
||||
## Enable Consul Web UI
|
||||
##
|
||||
ui:
|
||||
|
||||
Reference in New Issue
Block a user