From b002596444540605637eb83c108c9472e9f27900 Mon Sep 17 00:00:00 2001 From: Jakub K Date: Thu, 1 Feb 2024 22:03:53 +0100 Subject: [PATCH] init tinyproxy --- .drone.yml | 26 ++++++++++++++++++++++++++ Dockerfile | 5 +++++ deployment.yaml | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile create mode 100644 deployment.yaml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..d60ce17 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,26 @@ + kind: pipeline +type: exec +name: default + +steps: +- name: build + commands: + - docker build --no-cache -t tinyproxy:latest . + - docker tag tinyproxy:latest registry.izaac.pl:5000/tinyproxy:latest + - docker push registry.izaac.pl:5000/tinyproxy:latest + +- name: delete + environment: + KUBECONFIG: /home/drone-runner/drone-kubeconfig + commands: + - kubectl delete deployment tinyproxy || true + +- name: deploy + environment: + KUBECONFIG: /home/drone-runner/drone-kubeconfig + commands: + - kubectl apply -f deployment.yml --insecure-skip-tls-verify + +trigger: + branch: + - master \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ad0efe8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM alpine:latest +RUN apk --no-cache add tinyproxy +# COPY tinyproxy.conf /etc/tinyproxy/tinyproxy.conf +EXPOSE 8888 +CMD ["tinyproxy", "-d"] diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..09b5c8d --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: tinyproxy + labels: + app: tinyproxy +spec: + replicas: 1 + selector: + matchLabels: + app: tinyproxy + template: + metadata: + labels: + app: tinyproxy + spec: + containers: + - name: tinyproxy + image: registry.izaac.pl:5000/tinyproxy:latest + ports: + - containerPort: 8888 +--- +apiVersion: v1 +kind: Service +metadata: + name: tinyproxy-svc +spec: + selector: + app: tinyproxy + ports: + - protocol: TCP + port: 8888 + targetPort: 8888