From e3a09de776b94c8665de465c656a30553aa19d5c Mon Sep 17 00:00:00 2001 From: Victor Sollerhed Date: Wed, 20 May 2020 16:33:45 +0200 Subject: [PATCH 1/3] Helm: allow setting command (to run) --- helm/README.md | 1 + helm/templates/deployment.yaml | 4 ++++ helm/values.yaml | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/helm/README.md b/helm/README.md index c4ad8fa..b244baa 100644 --- a/helm/README.md +++ b/helm/README.md @@ -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" | diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 491e8b9..c3006dc 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -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 diff --git a/helm/values.yaml b/helm/values.yaml index 2935428..6f9328e 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -38,6 +38,10 @@ image: tag: 1.0.0-stable pullPolicy: Always +command: +- "./calert" +- "--config.file=/etc/calert/config.toml" + nameOverride: "" fullnameOverride: "" From 6b4bded3c8bc102684f46905baf5626c15296188 Mon Sep 17 00:00:00 2001 From: Victor Sollerhed Date: Wed, 20 May 2020 16:36:23 +0200 Subject: [PATCH 2/3] Helm: allow setting app.max_size --- helm/README.md | 1 + helm/templates/configmap.yaml | 1 + helm/values.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/helm/README.md b/helm/README.md index b244baa..6c02abd 100644 --- a/helm/README.md +++ b/helm/README.md @@ -39,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] | diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index 10bc0e6..b589f4f 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -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 }} diff --git a/helm/values.yaml b/helm/values.yaml index 6f9328e..aacf726 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -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" From 771b51d2c795723406a4b62e1591070ba8ac7b16 Mon Sep 17 00:00:00 2001 From: Victor Sollerhed Date: Wed, 20 May 2020 16:37:17 +0200 Subject: [PATCH 3/3] Helm: bump version (1.0.0-stable -> v1.2.0) --- helm/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/values.yaml b/helm/values.yaml index aacf726..6ec51b7 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -36,7 +36,7 @@ replicaCount: 1 image: repository: mrkaran/calert - tag: 1.0.0-stable + tag: v1.2.0 pullPolicy: Always command: