From 912ac171becad95ea1aefe58b1a10d5a2cea470a Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sun, 12 Jan 2025 23:57:46 -0500 Subject: [PATCH] migrate to autodeploy Signed-off-by: Xe Iaso --- .gitea/workflows/deploy.yml | 14 +++++++++++++- manifest/deployment.yaml | 22 ++++++++++++++++++++++ manifest/ingress.yaml | 23 +++++++++++++++++++++++ manifest/kustomization.yaml | 4 ++++ manifest/service.yaml | 11 +++++++++++ src/ebook.md | 3 +-- 6 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 manifest/deployment.yaml create mode 100644 manifest/ingress.yaml create mode 100644 manifest/kustomization.yaml create mode 100644 manifest/service.yaml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 3e3f36c..08244df 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -21,4 +21,16 @@ jobs: docker build -t git.xeserv.us/tulpamancy/tulpanomicon . - name: push image run: | - docker push git.xeserv.us/tulpamancy/tulpanomicon \ No newline at end of file + docker push git.xeserv.us/tulpamancy/tulpanomicon + - uses: actions-hub/kubectl@master + env: + KUBE_CONFIG: ${{ secrets.KUBE_CONFIG_ALREST }} + KUBE_CONTEXT: alrest + with: + args: apply -k manifest + - uses: actions-hub/kubectl@master + env: + KUBE_CONFIG: ${{ secrets.KUBE_CONFIG_ALREST }} + KUBE_CONTEXT: alrest + with: + args: rollout restart -n default deployment/tulpanomicon \ No newline at end of file diff --git a/manifest/deployment.yaml b/manifest/deployment.yaml new file mode 100644 index 0000000..edf03b5 --- /dev/null +++ b/manifest/deployment.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: tulpanomicon +spec: + selector: + matchLabels: + app: tulpanomicon + template: + metadata: + labels: + app: tulpanomicon + spec: + containers: + - name: tulpanomicon + image: git.xeserv.us/tulpamancy/tulpanomicon:latest + resources: + limits: + memory: "128Mi" + cpu: "500m" + ports: + - containerPort: 80 diff --git a/manifest/ingress.yaml b/manifest/ingress.yaml new file mode 100644 index 0000000..1484f8c --- /dev/null +++ b/manifest/ingress.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: tulpanomicon + annotations: + cert-manager.io/cluster-issuer: "letsencrypt-prod" +spec: + ingressClassName: nginx + tls: + - hosts: + - tulpanomicon.guide + secretName: tulpanomicon-public-tls + rules: + - host: tulpanomicon.guide + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: tulpanomicon + port: + name: http \ No newline at end of file diff --git a/manifest/kustomization.yaml b/manifest/kustomization.yaml new file mode 100644 index 0000000..aa222a5 --- /dev/null +++ b/manifest/kustomization.yaml @@ -0,0 +1,4 @@ +resources: + - deployment.yaml + - ingress.yaml + - service.yaml \ No newline at end of file diff --git a/manifest/service.yaml b/manifest/service.yaml new file mode 100644 index 0000000..c4571c2 --- /dev/null +++ b/manifest/service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: tulpanomicon +spec: + selector: + app: tulpanomicon + ports: + - port: 80 + targetPort: 80 + name: http diff --git a/src/ebook.md b/src/ebook.md index 7005253..7a5b629 100644 --- a/src/ebook.md +++ b/src/ebook.md @@ -1,7 +1,6 @@ ## eBook Edition -The following is the eBook edition of the tulpanomicon. +The following is the eBook edition of the tulpanomicon. - [ePub (iBooks)](./tulpanomicon.epub) -- [Kindle](./tulpanomicon.mobi) - [PDF](./tulpanomicon.pdf)