Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ RUN apk add --no-cache curl git && \

FROM docker.io/alpine:3.24
LABEL maintainer="Said Sef <saidsef@gmail.com> (saidsef.co.uk/)"
ENV PORT=${PORT:-8080}

USER nobody

COPY --from=builder /app/faas-reverse-geocoding /usr/bin/

HEALTHCHECK --interval=60s --timeout=10s CMD curl --fail 'http://localhost:${PORT}/' || exit 1
# The final image has busybox wget but no curl.
HEALTHCHECK --interval=60s --timeout=10s CMD wget -q -O /dev/null http://localhost:8080/ || exit 1

EXPOSE ${PORT}
EXPOSE 8080

CMD ["/usr/bin/faas-reverse-geocoding"]
5 changes: 1 addition & 4 deletions deployment/base/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ spec:
- name: geocode
image: ghcr.io/saidsef/faas-reverse-geocoding:latest
imagePullPolicy: Always
env:
- name: "PORT"
value: "8080"
securityContext:
runAsNonRoot: true
runAsGroup: 65534
Expand Down Expand Up @@ -59,7 +56,7 @@ spec:
exec:
command:
- pgrep
- geocode
- faas-reverse-geocoding
initialDelaySeconds: 5
periodSeconds: 30
failureThreshold: 2
Expand Down
14 changes: 0 additions & 14 deletions deployment/ingress-nginx/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,3 @@ kind: Kustomization
resources:
- ../base
- ingress.yml

replacements:
- source:
fieldPath: spec.rules[0].host
group: networking.k8s.io
kind: Ingress
name: geocode
version: v1
targets:
- select:
kind: Ingress
name: geocode
version: v1
group: networking.k8s.io
5 changes: 0 additions & 5 deletions deployment/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,5 @@ kind: Kustomization
resources:
- ./base

images:
- name: geocode
newName: ghcr.io/saidsef/faas-reverse-geocoding
newTag: "2023.12"

commonAnnotations:
app.kubernetes.io/part-of: geocode
2 changes: 1 addition & 1 deletion geocode.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func loggingMiddleware(next http.HandlerFunc) http.HandlerFunc {
func main() {
flag.IntVar(&port, "port", 8080, "HTTP listening PORT")
flag.BoolVar(&verbose, "verbose", false, "Enable verbose logging")
flag.IntVar(&cache, "cache", 60, "Cache duration minutes (default 30)")
flag.IntVar(&cache, "cache", 60, "Cache duration in minutes")
flag.Parse()

// Set the verbosity level in the utils package
Expand Down
Loading