Skip to content

Commit 7aa8d5b

Browse files
committed
fix: ready check path in helm chart, switched to alpine base image because of liveness check issue
1 parent 0aeed5e commit 7aa8d5b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ENV CGO_ENABLED=0
2626
RUN make build
2727

2828

29-
FROM scratch AS runtime
29+
FROM alpine:3.13 AS runtime
3030
COPY --from=build /go/src/zero-notification-service ./
3131
EXPOSE 80/tcp
3232
ENTRYPOINT ["./zero-notification-service"]

charts/zero-notifcation-service/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.0.3
18+
version: 0.0.4
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/zero-notifcation-service/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ spec:
4646
periodSeconds: 5
4747
readinessProbe:
4848
httpGet:
49-
path: /status/ready
49+
path: /v1/status/ready
5050
port: http
5151
initialDelaySeconds: 5
5252
periodSeconds: 10

cmd/server/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func main() {
6464
zap.S().Infof("Serving at http://%s/", serverAddress)
6565
err := server.ListenAndServe()
6666
if err != http.ErrServerClosed {
67-
zap.S().Fatalf("Fatal error while serving HTTP: %v\n", err)
67+
zap.S().Fatalf("Fatal error while serving HTTP: %v", err)
6868
close(stop)
6969
}
7070
}()
@@ -78,7 +78,7 @@ func main() {
7878
defer cancel()
7979
err := server.Shutdown(ctx)
8080
if err != nil {
81-
zap.S().Fatalf("Error during shutdown, client requests have been terminated: %v\n", err)
81+
zap.S().Fatalf("Error during shutdown, client requests have been terminated: %v", err)
8282
} else {
8383
zap.S().Infof("Graceful shutdown complete")
8484
}
@@ -88,7 +88,7 @@ func heartbeat() {
8888
for range time.Tick(4 * time.Second) {
8989
fh, err := os.Create("/tmp/service-alive")
9090
if err != nil {
91-
zap.S().Warnf("Unable to write file for liveness check!")
91+
zap.S().Errorf("Unable to write file for liveness check: $v", err)
9292
} else {
9393
fh.Close()
9494
}

0 commit comments

Comments
 (0)