Skip to content

Commit 1b80960

Browse files
committed
Chart version 0.6.0: anycable-go 1.6.3; more configurable options for the chart
1 parent 92e1953 commit 1b80960

File tree

5 files changed

+124
-32
lines changed

5 files changed

+124
-32
lines changed

README.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ To install anycable-go to your kubernetes cluster simply run:
99
```shell
1010
helm repo add anycable https://helm.anycable.io/
1111

12-
# With Helm 3
1312
helm upgrade -i anycable-go anycable/anycable-go
1413
```
1514

@@ -23,14 +22,11 @@ AnyCable uses the same protocol as ActionCable, so you can use its JavaScript cl
2322

2423
## Prerequisites
2524

26-
* Kubernetes 1.4+ with Beta APIs enabled
27-
2825
## Installing chart
2926

3027
```shell
3128
helm repo add anycable https://helm.anycable.io/
3229

33-
# With Helm 3
3430
helm upgrade -i anycable-go anycable/anycable-go
3531
```
3632

@@ -53,7 +49,7 @@ Specify each parameter using the `--set key=value[,key=value]` argument to helm
5349
```shell
5450
helm upgrade -i anycable-go \
5551
--namespace anycable-go \
56-
--set image.tag=1.0.1 \
52+
--set image.tag=1.6.3 \
5753
anycable/anycable-go
5854
```
5955

@@ -68,7 +64,7 @@ These are the values used to configure anycable-go itself:
6864
|Value|Description|Default|
6965
|-----|-----------|-------|
7066
|**image.repository**|Choose between `anycable/anycable-go` and `ghcr.io/anycable/anycable-go-pro`|`anycable/anycable-go`|
71-
|**image.tag**|Version of docker image to use|`1.4.7`|
67+
|**image.tag**|Version of docker image to use|`1.6.3`|
7268
|**image.pullSecrets.enabled**|Enable creating secret for pulling image from AnyCable Pro private registry|`false`|
7369
|**image.pullSecrets.registry**|URL of a private registry you want to authorize to|`ghcr.io`|
7470
|**image.pullSecrets.username**|Github username|``|
@@ -162,14 +158,36 @@ These are the values used to configure anycable-go itself:
162158
|Value|Description|Default|
163159
|-----|-----------|-------|
164160
|**replicas**|Number of replicas for `anycable-go` deployment (ignored when HPA is enabled)|`1`|
161+
162+
|**containerSecurityContext.enabled**|Enables container's Security Context|`false`|
163+
|**containerSecurityContext.runAsUser**|Sets webhook containers' Security Context runAsUser|`1001`|
164+
|**containerSecurityContext.runAsGroup**|Sets webhook containers' Security Context runAsGroup|`1001`|
165+
|**containerSecurityContext.runAsNonRoot**|Sets webhook containers' Security Context runAsNonRoot|`true`|
166+
|**containerSecurityContext.privileged**|Sets webhook container's Security Context privileged|`false`|
167+
|**containerSecurityContext.allowPrivilegeEscalation**|Sets webhook container's Security Context allowPrivilegeEscalation|`false`|
168+
|**containerSecurityContext.capabilities.drop**|Sets webhook container's Security Context capabilities.drop|`["ALL"]`|
169+
|**containerSecurityContext.seccompProfile.type**|Sets webhook container's Security Context seccompProfile.type|`"RuntimeDefault"`|
170+
|**containerSecurityContext.readOnlyRootFilesystem**|Sets webhook container's Security Context readOnlyRootFilesystem|`true`|
165171
|**hpa.enabled**|Enable HorizontalPodAutoscaler|`false`|
166172
|**hpa.minReplicas**|Minimum replicas for HPA|`1`|
167173
|**hpa.maxReplicas**|Maximum replicas for HPA|`3`|
168174
|**hpa.targetCPUUtilizationPercentage**|Target CPU utilization for HPA|`50`|
169175
|**pod.annotations**|User-specified Pod annotations|`{}`|
170176
|**pod.extraLabels**|User-specified Pod Labels|`{}`|
177+
|**pod.priorityClassName**|Controller pod priority class name|`""`|
178+
|**pod.runtimeClassName**|Name of the runtime class to be used by pod(s)|`""`|
179+
|**pod.schedulerName**|Name of the k8s scheduler (other than default)|`""`|
180+
|**pod.securityContext.enabled**|Enables Controller pods' Security Context|`false`|
181+
|**pod.securityContext.fsGroupChangePolicy**|Set filesystem group change policy|`"Always"`|
182+
|**pod.securityContext.sysctls**|Set kernel settings using the sysctl interface|`[]`|
183+
|**pod.securityContext.supplementalGroups**|Set filesystem extra groups|`[]`|
184+
|**pod.securityContext.fsGroup**|Set Controller pod's Security Context fsGroupo|`1001`|
185+
|**pod.serviceAccountName**|User-specified ServiceAccount for Pod identity|`""`|
171186
|**pod.tolerations**|User-specified Pod tolerations|`[]`|
172-
|**pod.serviceAccountName**|User-specified ServiceAccount for Pod identity||
187+
|**pod.topologySpreadConstraints**|Topology Spread Constraints for pod assignment|`[]`|
188+
|**pod.disruptionBudget.enabled**|Enables podDisruptionBudget configuration|`true`|
189+
|**pod.disruptionBudget.minUnavailable**|podDisruptionBudget minimum number unavailable pods|`"50%"`|
190+
|**pod.disruptionBudget.maxUnavailable**|podDisruptionBudget maximum number of unavailable pods|`""`|
173191
|**service.annotations**|User-specified Service annotations|`{}`|
174192

175193
### Monitoring

anycable-go/Chart.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
22
description: A Helm chart for anycable-go websocket server.
33
name: anycable-go
4-
version: 0.5.12
5-
appVersion: 1.5.6
4+
version: 0.6.0
5+
appVersion: 1.6.3
66
home: https://anycable.io/
77
icon: https://docs.anycable.io/assets/images/logo.svg
88
keywords:
@@ -15,7 +15,3 @@ maintainers:
1515
1616
- name: palkan
1717
18-
- name: envek
19-
20-
- name: nepalez
21-

anycable-go/templates/deployment.yml

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,29 @@ spec:
4747
{{- end }}
4848
name: {{ $.Release.Name | quote }}
4949
spec:
50-
{{- if (.pod | default dict).serviceAccountName }}
51-
serviceAccountName: {{ .pod.serviceAccountName }}
50+
{{- if .image.pullSecrets.enabled }}
51+
imagePullSecrets:
52+
- name: "{{ $.Release.Name }}-docker-registry-secret"
53+
{{- end }}
54+
{{- if .pod.securityContext.enabled }}
55+
securityContext: {{- omit .pod.securityContext "enabled" | toYaml | nindent 8 }}
56+
{{- end }}
57+
{{- with .pod.schedulerName }}
58+
schedulerName: {{ . | quote }}
59+
{{- end }}
60+
{{- with .pod.topologySpreadConstraints }}
61+
topologySpreadConstraints: {{- . | toYaml 8 | nindent 8 }}
62+
{{- end }}
63+
{{- with .pod.priorityClassName }}
64+
priorityClassName: {{ . | quote }}
5265
{{- end }}
53-
{{- if .nodeSelector }}
54-
nodeSelector: {{ toYaml .nodeSelector | nindent 8 }}
66+
{{- with .pod.runtimeClassName }}
67+
runtimeClassName: {{ . | quote }}
5568
{{- end }}
69+
70+
{{- if .affinity }}
71+
affinity: {{- .affinity | toYaml | nindent 8 }}
72+
{{- else }}
5673
affinity:
5774
podAntiAffinity:
5875
preferredDuringSchedulingIgnoredDuringExecution:
@@ -63,12 +80,15 @@ spec:
6380
app: {{ template "anycableGo.name" $ }}
6481
release: {{ $.Release.Name | quote }}
6582
weight: 100
66-
{{- if (.pod | default dict).tolerations }}
67-
tolerations: {{- .pod.tolerations | toYaml | nindent 8 }}
6883
{{- end }}
69-
{{- if .image.pullSecrets.enabled }}
70-
imagePullSecrets:
71-
- name: "{{ $.Release.Name }}-docker-registry-secret"
84+
{{- with .nodeSelector }}
85+
nodeSelector: {{- . | toYaml | nindent 8 }}
86+
{{- end }}
87+
{{- with .pod.tolerations }}
88+
tolerations: {{- . | toYaml | nindent 8 }}
89+
{{- end }}
90+
{{- with .pod.serviceAccountName }}
91+
serviceAccountName: {{ . | quote }}
7292
{{- end }}
7393
containers:
7494
- name: anycable-go
@@ -133,6 +153,9 @@ spec:
133153
{{- if .resources }}
134154
resources: {{ toYaml .resources | nindent 12 }}
135155
{{- end }}
156+
{{- if .containerSecurityContext.enabled }}
157+
securityContext: {{- .containerSecurityContext | toYaml | nindent 12 }}
158+
{{- end }}
136159
terminationMessagePath: /dev/termination-log
137160
terminationMessagePolicy: File
138161
{{- if .tls }}
@@ -144,10 +167,10 @@ spec:
144167
dnsPolicy: ClusterFirst
145168
restartPolicy: Always
146169
terminationGracePeriodSeconds: 30
147-
{{- if .tls }}
170+
{{- with .tls }}
148171
volumes:
149172
- name: ssl
150173
secret:
151-
secretName: {{ .tls.secretName | quote }}
174+
secretName: {{ .secretName | quote }}
152175
{{- end }}
153176
{{- end }}

anycable-go/templates/pdb.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{{- with .Values.pod.disruptionBudget -}}
2+
{{- if .enabled }}
3+
apiVersion: policy/v1
4+
kind: PodDisruptionBudget
5+
metadata:
6+
name: {{ template "anycableGo.fullname" $ }}
7+
labels:
8+
app: {{ template "anycableGo.name" $ }}
9+
component: anycable-go
10+
chart: "{{ $.Chart.Name }}-{{ $.Chart.Version | replace "+" "_" }}"
11+
release: {{ $.Release.Name | quote }}
12+
heritage: {{ $.Release.Service | quote }}
13+
spec:
14+
{{- if .minAvailable }}
15+
minAvailable: {{ .minAvailable }}
16+
{{- end }}
17+
{{- if .maxUnavailable }}
18+
maxUnavailable: {{ .maxUnavailable }}
19+
{{- end }}
20+
selector:
21+
matchLabels:
22+
app: {{ template "anycableGo.name" $ }}
23+
component: anycable-go
24+
release: {{ $.Release.Name | quote }}
25+
{{- end -}}
26+
{{- end }}

anycable-go/values.yaml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,25 @@ nodeSelector: {}
22

33
replicas: 1
44

5-
hpa:
6-
enabled: false
7-
minReplicas: 1
8-
maxReplicas: 3
9-
# ATTENTION: This argument will be renamed in the future.
10-
targetCPUUtilizationPercentage: 50
11-
125
image:
136
repository: anycable/anycable-go
14-
tag: 1.5.6
7+
tag: 1.6.3
158
pullPolicy: IfNotPresent
169
pullSecrets:
1710
enabled: false
1811
registry: "ghcr.io"
1912
username: ""
2013
password: ""
2114

15+
affinity: {}
16+
17+
hpa:
18+
enabled: false
19+
minReplicas: 1
20+
maxReplicas: 3
21+
# ATTENTION: This argument will be renamed in the future.
22+
targetCPUUtilizationPercentage: 50
23+
2224
ingress:
2325
enable: false
2426
className: ""
@@ -62,6 +64,15 @@ resources:
6264
pod:
6365
annotations: {}
6466
extraLabels: {}
67+
priorityClassName: ""
68+
runtimeClassName: ""
69+
schedulerName: ""
70+
securityContext:
71+
enabled: false
72+
fsGroupChangePolicy: Always
73+
sysctls: []
74+
supplementalGroups: []
75+
fsGroup: 65534
6576
# Use a different ServiceAccount
6677
# (leave blank for default)
6778
serviceAccountName: ""
@@ -72,6 +83,23 @@ pod:
7283
# value: value1
7384
# effect: NoExecute
7485
# tolerationSeconds: 3600
86+
topologySpreadConstraints: []
87+
disruptionBudget:
88+
enabled: true
89+
minAvailable: 50%
90+
91+
containerSecurityContext:
92+
enabled: false
93+
runAsUser: 65534
94+
runAsGroup: 65534
95+
runAsNonRoot: true
96+
privileged: false
97+
allowPrivilegeEscalation: false
98+
capabilities:
99+
drop: ["ALL"]
100+
seccompProfile:
101+
type: "RuntimeDefault"
102+
readOnlyRootFilesystem: true
75103

76104
service:
77105
annotations: {}
@@ -124,6 +152,7 @@ serviceMonitor:
124152
# release: prometheus-operator
125153
labels: {}
126154

155+
127156
tls: {}
128157
# secretName: "anycable-go-tls-secret"
129158
# Keep empty to use existing secret

0 commit comments

Comments
 (0)