Add apps/yarr
Anirudh Oppiliappan x@icyphox.sh
Thu, 17 Jun 2021 17:29:46 +0530
3 files changed,
85 insertions(+),
0 deletions(-)
A
apps/yarr/Dockerfile
@@ -0,0 +1,12 @@
+FROM golang:alpine AS build +RUN apk add build-base git +WORKDIR /src +COPY . . +RUN make build_linux + +FROM alpine:latest +RUN apk add --no-cache ca-certificates && \ + update-ca-certificates +COPY --from=build /src/_output/linux/yarr /usr/local/bin/yarr +EXPOSE 7070 +CMD ["/usr/local/bin/yarr", "-addr", "0.0.0.0:7070", "-db", "/data/yarr.db"]
A
apps/yarr/ing.yaml
@@ -0,0 +1,23 @@
+apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + kubernetes.io/tls-acme: 'true' + cert-manager.io/issuer: "letsencrypt-prod" + name: yarr-ingress +spec: + tls: + - hosts: + - f.icyphox.sh + secretName: yarr-certs + rules: + - host: f.icyphox.sh + http: + paths: + - backend: + service: + name: yarr + port: + number: 7070 + path: / + pathType: Prefix
A
apps/yarr/yarr.yaml
@@ -0,0 +1,50 @@
+apiVersion: apps/v1 +kind: Deployment +metadata: + name: yarr + labels: + app: yarr +spec: + selector: + matchLabels: + app: yarr + template: + metadata: + labels: + app: yarr + spec: + imagePullSecrets: + - name: registry-creds + nodeSelector: + arch: "arm" + containers: + - name: yarr + image: reg.icyphox.sh/yarr + imagePullPolicy: Always + volumeMounts: + - name: auth + mountPath: "/config" + readOnly: true + ports: + - name: http + containerPort: 7070 + command: ["/bin/sh"] + args: + - -c + - /usr/local/bin/yarr -auth-file /config/auth -addr 0.0.0.0:7070 + volumes: + - name: auth + secret: + secretName: yarr-auth +--- +apiVersion: v1 +kind: Service +metadata: + name: yarr +spec: + selector: + app: yarr + ports: + - name: http + port: 7070 + targetPort: 7070