Skip to content

Commit

Permalink
Merge pull request #33 from anycable/0.5.6
Browse files Browse the repository at this point in the history
Release v0.5.6
  • Loading branch information
nepalez authored Oct 19, 2022
2 parents 5f44575 + 8fc1130 commit 0d7b993
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 9 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,14 @@ These are the values used to configure anycable-go itself:

|Value|Description|Default|
|-----|-----------|-------|
|**replicas**|Number of replicas for `anycable-go` deployment (ignored when HPA is enabled)|`1`|
|**hpa.enabled**|Enable HorizontalPodAutoscaler|`false`|
|**hpa.minReplicas**|Minimum replicas for HPA|`1`|
|**hpa.maxReplicas**|Maximum replicas for HPA|`3`|
|**hpa.targetCPUUtilizationPercentage**|Target CPU utilization for HPA|`50`|
|**pod.annotations**|User-specified Pod annotations|`{}`|
|**pod.extraLabels**|User-specified Pod Labels|`{}`|
|**pod.tolerations**|User-specified Pod tolerations|`[]`|
|**pod.serviceAccountName**|User-specified ServiceAccount for Pod identity||
|**service.annotations**|User-specified Service annotations|`{}`|

Expand Down
8 changes: 4 additions & 4 deletions anycable-go/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
description: A Helm chart for anycable-go websocket server.
name: anycable-go
version: 0.5.5
appVersion: 1.2.0
version: 0.5.6
appVersion: 1.2.4
home: https://anycable.io/
icon: https://docs.anycable.io/assets/images/logo.svg
keywords:
Expand All @@ -11,11 +11,11 @@ keywords:
sources:
- https://github.com/anycable/anycable-go
maintainers:
- name: gfrntz
email: [email protected]
- name: dragonsmith
email: [email protected]
- name: palkan
email: [email protected]
- name: envek
email: [email protected]
- name: nepalez
email: [email protected]
4 changes: 2 additions & 2 deletions anycable-go/OWNERS
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
approvers:
- gfrntz
- dragonsmith
- palkan
- envek
- nepalez
reviewers:
- gfrntz
- dragonsmith
- palkan
- envek
- nepalez
8 changes: 8 additions & 0 deletions anycable-go/templates/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ metadata:
heritage: {{ $.Release.Service | quote }}
spec:
progressDeadlineSeconds: 600
{{- if eq .hpa.enabled false }}
replicas: {{ .replicas | default 2 }}
{{- end }}
revisionHistoryLimit: {{ .revisionHistoryLimit | default 10 }}
selector:
matchLabels:
Expand All @@ -35,6 +37,9 @@ spec:
chart: "{{ $.Chart.Name }}-{{ $.Chart.Version | replace "+" "_" }}"
release: {{ $.Release.Name | quote }}
heritage: {{ $.Release.Service | quote }}
{{- if (.pod | default dict).extraLabels }}
{{- .pod.extraLabels | toYaml | nindent 8 }}
{{- end }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/env-secret.yml") $ | sha256sum }}
{{- if (.pod | default dict).annotations }}
Expand All @@ -58,6 +63,9 @@ spec:
app: {{ template "anycableGo.name" $ }}
release: {{ $.Release.Name | quote }}
weight: 100
{{- if (.pod | default dict).tolerations }}
tolerations: {{- .pod.tolerations | toYaml | nindent 8 }}
{{- end }}
{{- if .image.pullSecrets.enabled }}
imagePullSecrets:
- name: "{{ $.Release.Name }}-docker-registry-secret"
Expand Down
24 changes: 24 additions & 0 deletions anycable-go/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- $values := include "anycableGo.values" . | fromYaml }}
{{- with $values.hpa }}
{{- if .enabled }}
{{- $apiVersion := include "anycableGo.apiVersions.hpa" $ }}
---
apiVersion: {{ $apiVersion }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "anycableGo.fullname" $ }}
labels:
app: {{ template "anycableGo.name" $ }}
chart: "{{ $.Chart.Name }}-{{ $.Chart.Version | replace "+" "_" }}"
release: {{ $.Release.Name | quote }}
heritage: {{ $.Release.Service | quote }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "anycableGo.fullname" $ }}
minReplicas: {{ .minReplicas }}
maxReplicas: {{ .maxReplicas }}
targetCPUUtilizationPercentage: {{ .targetCPUUtilizationPercentage }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion anycable-go/templates/service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ spec:
app: {{ template "anycableGo.name" $ }}
component: anycable-go
release: {{ $.Release.Name | quote }}
type: ClusterIP
type: {{ $values.service.type | default "ClusterIP" }}
{{- end }}
18 changes: 16 additions & 2 deletions anycable-go/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ nodeSelector: {}

replicas: 1

hpa:
enabled: false
minReplicas: 1
maxReplicas: 3
targetCPUUtilizationPercentage: 50

image:
repository: anycable/anycable-go
tag: 1.2.0
tag: 1.2.4
pullPolicy: IfNotPresent
pullSecrets:
enabled: false
Expand Down Expand Up @@ -53,13 +59,21 @@ resources:

pod:
annotations: {}

extraLabels: {}
# Use a different ServiceAccount
# (leave blank for default)
serviceAccountName: ""
# Add tolerations to pods
tolerations: []
# - key: key1
# operator: Equal
# value: value1
# effect: NoExecute
# tolerationSeconds: 3600

service:
annotations: {}
type: ClusterIP

# Define names or additional secrets to overwrite env variables
# from the `env-secret.yml`.
Expand Down

0 comments on commit 0d7b993

Please sign in to comment.