Skip to content

Commit

Permalink
Merge pull request #20 from MPV/helm-allow-setting-command-and-max-size
Browse files Browse the repository at this point in the history
Helm: allow setting command and max size (+ bump to 1.2.0)
  • Loading branch information
mr-karan committed May 21, 2020
2 parents 1b22181 + 771b51d commit 2c35118
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions helm/README.md
Expand Up @@ -29,6 +29,7 @@ configmap:
| `image.repository` | Docker image repository | mrkaran/calert |
| `image.tag` | Docker image tag | 1.0.0-stable |
| `image.pullPolicy` | Docker image pull policy | Always |
| `command` | Command to run | "..." (see values) |
| `replicaCount` | Number of pod replicas | 1 |
| `template_file` | Content of Application template file | "..." (see values) |
| `configmap.server.address` | Port that the app listens to in the pod | ":6000" |
Expand All @@ -38,6 +39,7 @@ configmap:
| `configmap.server.write_timeout` | Write timeout in milliseconds | "8000" |
| `configmap.server.keepalive_timeout` | Keepalive timeout in milliseconds | "300000" |
| `configmap.app.template_file` | Application template file | "/etc/calert/message.tmpl" |
| `configmap.app.max_size` | Maximum size of a single push to the webhook URL | 4000 |
| `configmap.app.http_client.max_idle_conns` | Client max idele connections | "100" |
| `configmap.app.http_client.request_timeout` | Client request timeout in milliseconds | "8000" |
| `configmap.rooms` | List of webhooks to send to. See `calert_values.yaml` above | [app.chat.alertManagerTestRoom] |
Expand Down
1 change: 1 addition & 0 deletions helm/templates/configmap.yaml
Expand Up @@ -25,6 +25,7 @@ data:
[app]
template_file = {{ .Values.configmap.app.template_file | quote }}
max_size = {{ .Values.configmap.app.max_size }}
[app.http_client]
max_idle_conns = {{ .Values.configmap.app.http_client.max_idle_conns }}
Expand Down
4 changes: 4 additions & 0 deletions helm/templates/deployment.yaml
Expand Up @@ -27,6 +27,10 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
{{- range .Values.command }}
- {{ . | quote }}
{{- end }}
ports:
- containerPort: {{ .Values.service.port }}
protocol: TCP
Expand Down
7 changes: 6 additions & 1 deletion helm/values.yaml
Expand Up @@ -14,6 +14,7 @@ configmap:
keepalive_timeout: "300000"
app:
template_file: "/etc/calert/message.tmpl"
max_size: 4000
http_client:
max_idle_conns: "100"
request_timeout: "8000"
Expand All @@ -35,9 +36,13 @@ replicaCount: 1

image:
repository: mrkaran/calert
tag: 1.0.0-stable
tag: v1.2.0
pullPolicy: Always

command:
- "./calert"
- "--config.file=/etc/calert/config.toml"

nameOverride: ""
fullnameOverride: ""

Expand Down

0 comments on commit 2c35118

Please sign in to comment.