Skip to content

Commit

Permalink
fix k8s manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
83bytes committed Jul 1, 2024
1 parent b26239b commit 3409f75
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /

COPY ./alertmanager ./alertmanager

EXPOSE 8080
EXPOSE 8081

USER nonroot:nonroot

Expand Down
14 changes: 7 additions & 7 deletions deployment/toy_alert_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
app: tam
data:
alert-manager-config-2.yml: |
alert-manager-config.yml: |
alert_pipelines:
- alert_name: NOOP_ALERT
enrichments:
Expand Down Expand Up @@ -62,12 +62,12 @@ spec:
image: sohom83/tam:0.0.1
args:
- "server"
- "--config.file=/etc/alertmanager/alert-manager-config-2.yml"
- "--log.level=debug"
- "--config-file=/etc/alertmanager/alert-manager-config.yml"
- "--log-level=debug"
volumeMounts:
- name: config-volume
mountPath: /etc/alertmanager
subPath: alert-manager-config-2.yml
mountPath: /etc/alertmanager/alert-manager-config.yml
subPath: alert-manager-config.yml
volumes:
- name: config-volume
configMap:
Expand All @@ -81,8 +81,8 @@ metadata:
app: tam
spec:
ports:
- port: 8080
targetPort: 8080
- port: 8081
targetPort: 8081
selector:
app: tam
type: ClusterIP
3 changes: 1 addition & 2 deletions enrichment/getPromQlEnrichment.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"
)

Expand Down Expand Up @@ -35,7 +34,7 @@ func GetPromQLEnrichment(alert types.Alert, e types.Enrichment) (interface{}, er

resp, err := http.Get(e.EnrichmentArgs)
if err != nil {
log.Fatal(err)
return nil, fmt.Errorf("error reaching server at: %s", e.EnrichmentArgs)
}
defer resp.Body.Close()

Expand Down

0 comments on commit 3409f75

Please sign in to comment.