diff --git a/README.md b/README.md index dd505ba..52987f9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/charts/gnocpush/templates/deployment.yaml b/charts/gnocpush/templates/deployment.yaml index 4702a30..c0e38b7 100644 --- a/charts/gnocpush/templates/deployment.yaml +++ b/charts/gnocpush/templates/deployment.yaml @@ -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 }} diff --git a/charts/gnocpush/values.yaml b/charts/gnocpush/values.yaml index 5798aea..74b546f 100644 --- a/charts/gnocpush/values.yaml +++ b/charts/gnocpush/values.yaml @@ -10,6 +10,8 @@ image: # Overrides the image tag whose default is the chart appVersion. tag: sha-b3956f3 +extraArgs: [] + imagePullSecrets: [] nameOverride: "" fullnameOverride: ""