From 043f43fbaba607ebea81a4d85d692c2b8b624c81 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Fri, 4 Oct 2024 19:45:15 +0200 Subject: [PATCH] add pastebin to apps --- app-files/apps.yaml | 21 +++++ paste/manifest.yaml | 87 ++++++++++++++++++++ tests/test-storage.yaml | 174 ++++++++++++++++++++-------------------- 3 files changed, 195 insertions(+), 87 deletions(-) create mode 100644 paste/manifest.yaml diff --git a/app-files/apps.yaml b/app-files/apps.yaml index 2641ebf..428d27b 100644 --- a/app-files/apps.yaml +++ b/app-files/apps.yaml @@ -28,3 +28,24 @@ spec: - CreateNamespace=true automated: prune: false +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: paste + namespace: argocd +spec: + project: default + source: + repoURL: https://git.ar21.de/yolokube/core-deployments.git + targetRevision: HEAD + path: paste + destination: + server: https://kubernetes.default.svc + namespace: paste + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: + selfHeal: false + prune: false diff --git a/paste/manifest.yaml b/paste/manifest.yaml new file mode 100644 index 0000000..3dadd98 --- /dev/null +++ b/paste/manifest.yaml @@ -0,0 +1,87 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: paste +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: paste-pvc + namespace: paste +spec: + accessModes: + - ReadWriteOnce + volumeMode: Filesystem + resources: + requests: + storage: 8Gi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: paste-deployment + namespace: paste + labels: + app: paste +spec: + replicas: 1 + selector: + matchLabels: + app: paste + template: + metadata: + labels: + app: paste + spec: + securityContext: + fsGroup: 82 + containers: + - name: paste + image: privatebin/nginx-fpm-alpine + ports: + - containerPort: 8080 + volumeMounts: + - mountPath: "/srv/data" + name: paste-volume + volumes: + - name: paste-volume + persistentVolumeClaim: + claimName: paste-pvc +--- +apiVersion: v1 +kind: Service +metadata: + name: paste-service + namespace: paste +spec: + selector: + app: paste + ports: + - protocol: TCP + port: 80 + targetPort: 8080 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + kubernetes.io/tls-acme: "true" + name: paste-ingress + namespace: paste +spec: + rules: + - host: "paste.apps.yolokube.de" + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: paste-service + port: + number: 80 + tls: + - hosts: + - paste.apps.yolokube.de + secretName: paste-tls-key diff --git a/tests/test-storage.yaml b/tests/test-storage.yaml index e2ccafc..b86e250 100644 --- a/tests/test-storage.yaml +++ b/tests/test-storage.yaml @@ -1,88 +1,88 @@ ### example app "privatebin" to test storage ---- -apiVersion: v1 -kind: Namespace -metadata: - name: paste ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: paste-pvc - namespace: paste -spec: - accessModes: - - ReadWriteOnce - volumeMode: Filesystem - resources: - requests: - storage: 8Gi ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: paste-deployment - namespace: paste - labels: - app: paste -spec: - replicas: 1 - selector: - matchLabels: - app: paste - template: - metadata: - labels: - app: paste - spec: - securityContext: - fsGroup: 82 - containers: - - name: paste - image: privatebin/nginx-fpm-alpine - ports: - - containerPort: 8080 - volumeMounts: - - mountPath: "/srv/data" - name: paste-volume - volumes: - - name: paste-volume - persistentVolumeClaim: - claimName: paste-pvc ---- -apiVersion: v1 -kind: Service -metadata: - name: paste-service - namespace: paste -spec: - selector: - app: paste - ports: - - protocol: TCP - port: 80 - targetPort: 8080 ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - kubernetes.io/tls-acme: "true" - name: paste-ingress - namespace: paste -spec: - rules: - - host: "paste.apps.yolokube.de" - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: paste-service - port: - number: 80 - tls: - - hosts: - - paste.apps.yolokube.de - secretName: paste-tls-key +#--- +#apiVersion: v1 +#kind: Namespace +#metadata: +# name: paste +#--- +#apiVersion: v1 +#kind: PersistentVolumeClaim +#metadata: +# name: paste-pvc +# namespace: paste +#spec: +# accessModes: +# - ReadWriteOnce +# volumeMode: Filesystem +# resources: +# requests: +# storage: 8Gi +#--- +#apiVersion: apps/v1 +#kind: Deployment +#metadata: +# name: paste-deployment +# namespace: paste +# labels: +# app: paste +#spec: +# replicas: 1 +# selector: +# matchLabels: +# app: paste +# template: +# metadata: +# labels: +# app: paste +# spec: +# securityContext: +# fsGroup: 82 +# containers: +# - name: paste +# image: privatebin/nginx-fpm-alpine +# ports: +# - containerPort: 8080 +# volumeMounts: +# - mountPath: "/srv/data" +# name: paste-volume +# volumes: +# - name: paste-volume +# persistentVolumeClaim: +# claimName: paste-pvc +#--- +#apiVersion: v1 +#kind: Service +#metadata: +# name: paste-service +# namespace: paste +#spec: +# selector: +# app: paste +# ports: +# - protocol: TCP +# port: 80 +# targetPort: 8080 +#--- +#apiVersion: networking.k8s.io/v1 +#kind: Ingress +#metadata: +# annotations: +# kubernetes.io/tls-acme: "true" +# name: paste-ingress +# namespace: paste +#spec: +# rules: +# - host: "paste.apps.yolokube.de" +# http: +# paths: +# - pathType: Prefix +# path: "/" +# backend: +# service: +# name: paste-service +# port: +# number: 80 +# tls: +# - hosts: +# - paste.apps.yolokube.de +# secretName: paste-tls-key