Skip to content

Commit

Permalink
add extraArgs chart parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Apr 29, 2024
1 parent 8bd138d commit 984b84b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,29 @@ docker push lsstit/gnocpush
docker run -e GNOC_USERNAME=$GNOC_USERNAME -e GNOC_PASSWORD=$GNOC_PASSWORD -e GNOC_SERVER=$GNOC_SERVER -e GNOC_REALM=$GNOC_REALM --network=host lsstit/gnocpush
```

## Testing gnocgateway with curl
## Testing on k8s

```bash
curl http://localhost:8080/push -v --json @- -u alertmanager:hello < alerts.json
helm upgrade --install \
gnocpush ./charts/gnocpush \
--create-namespace --namespace gnocpush \
-f ./values.yaml
```

## Testing gnocgateway with curl
```bash
k logs alertmanager-kube-prometheus-stack-alertmanager-0 --tail=100 -f

k logs -l app.kubernetes.io/instance=gnocpush -f
```

### prometheus metrics

```bash
k -n gnocpush port-forward gnocpush-dc4d94d8-mqvqq 8080
$ curl localhost:8080/metrics
```

## Testing gnocpush with curl

### without auth

Expand Down
5 changes: 5 additions & 0 deletions charts/gnocpush/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- --listen 0.0.0.0:{{ .Values.service.port }}
{{- if .Values.extraArgs }}
{{- toYaml .Values.extraArgs | nindent 12 }}
{{- end }}
env:
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 12 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/gnocpush/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: sha-b3956f3

extraArgs: []

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
Expand Down

0 comments on commit 984b84b

Please sign in to comment.