Skip to content

Commit

Permalink
migrate #12: adding more fixes/cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
donkeyx committed Aug 16, 2023
1 parent 9f1f6cc commit f98c2e2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# # multi stage build, yo!
FROM golang:1.21
COPY . /app/
WORKDIR /app
COPY . /app/

LABEL org.opencontainers.image.source https://github.com/donkeyx/cluster-utils-api
LABEL maintainer="David Binney <[email protected]>"

RUN make deps build

# switched for potential shell
# no longer using musl dns moved to debian
FROM debian:stable-slim
WORKDIR /app
ENV \
LANG en_AU.UTF-8 \
LANGUAGE en_AU.UTF-8 \
LC_ALL en_AU.UTF-8 \
LC_CTYPE=en_AU.UTF-8 \
TZ="Australia/Adelaide"

COPY --from=0 /app/bin/cu-api /app/cu-api
ENTRYPOINT [ "./cu-api" ]
16 changes: 4 additions & 12 deletions k8s-cluster-util-apis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,12 @@ spec:
- name: PORT
value: "8080"
resources:
limits:
requests:
cpu: "0.1"
memory: "50Mi"
limits:
cpu: "0.5"
memory: 100Mi
initContainers:
- name: init-dns
image: curlimages/curl
command:
[
"sh",
"-c",
"until curl -fsS https://google.com >> /dev/null; do sleep 2 ; done ;",
]
imagePullSecrets:
- name: dockerhub-reg-cred

---
apiVersion: v1
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func main() {
router.GET("/healthz", healthHandler)
router.GET("/ready", readyHandler)
router.GET("/readyz", readyHandler)

router.GET("/headers", headersHandler)
router.GET("/headersz", headersHandler)

// Start the server
port := "8080"
Expand Down

0 comments on commit f98c2e2

Please sign in to comment.