diff --git a/src/main/resources/matomo/certificate.yaml b/src/main/resources/matomo/certificate.yaml new file mode 100644 index 0000000..630e7f9 --- /dev/null +++ b/src/main/resources/matomo/certificate.yaml @@ -0,0 +1,13 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: shynet-cert + namespace: default +spec: + secretName: shynet-secret + commonName: fqdn + dnsNames: + - fqdn + issuerRef: + name: letsencrypt-staging-issuer + kind: ClusterIssuer \ No newline at end of file diff --git a/src/main/resources/matomo/deployments.yaml b/src/main/resources/matomo/deployments.yaml new file mode 100644 index 0000000..5d1d776 --- /dev/null +++ b/src/main/resources/matomo/deployments.yaml @@ -0,0 +1,52 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shynet-webserver + namespace: default + labels: + app: shynet-webserver +spec: + selector: + matchLabels: + app: shynet-webserver + strategy: + type: Recreate + replicas: 1 + template: + metadata: + labels: + app: shynet-webserver + spec: + containers: + - name: shynet-webserver + image: milesmcc/shynet:edge + imagePullPolicy: IfNotPresent + envFrom: + - secretRef: + name: shynet-settings +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shynet-celeryworker + namespace: default + labels: + app: shynet-celeryworker +spec: + selector: + matchLabels: + app: shynet-celeryworker + replicas: 1 + template: + metadata: + labels: + app: shynet-celeryworker + spec: + containers: + - name: shynet-celeryworker + image: milesmcc/shynet:edge + command: ["./celeryworker.sh"] + imagePullPolicy: IfNotPresent + envFrom: + - secretRef: + name: shynet-settings diff --git a/src/main/resources/matomo/ingress.yaml b/src/main/resources/matomo/ingress.yaml new file mode 100644 index 0000000..724485a --- /dev/null +++ b/src/main/resources/matomo/ingress.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: shynet-webserver-ingress + annotations: + kubernetes.io/ingress.class: addon-http-application-routing + nginx.ingress.kubernetes.io/proxy-body-size: "256m" + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/rewrite-target: / + nginx.ingress.kubernetes.io/proxy-connect-timeout: "300" + nginx.ingress.kubernetes.io/proxy-send-timeout: "300" + nginx.ingress.kubernetes.io/proxy-read-timeout: "300" +spec: + tls: + - hosts: + - fqdn + secretName: jira-secret + rules: + - host: fqdn + http: + paths: + - backend: + serviceName: shynet-webserver-service + servicePort: 8080 + path: / \ No newline at end of file diff --git a/src/main/resources/matomo/services.yaml b/src/main/resources/matomo/services.yaml new file mode 100644 index 0000000..f88db12 --- /dev/null +++ b/src/main/resources/matomo/services.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: Service +metadata: + name: shynet-redis +spec: + ports: + - port: 6379 + name: redis + clusterIP: None + selector: + app: shynet-redis +--- +apiVersion: v1 +kind: Service +metadata: + name: shynet-webserver-service +spec: + type: ClusterIP + ports: + - port: 8080 + selector: + app: shynet-webserver \ No newline at end of file diff --git a/src/main/resources/matomo/statefulsets.yaml b/src/main/resources/matomo/statefulsets.yaml new file mode 100644 index 0000000..5970e87 --- /dev/null +++ b/src/main/resources/matomo/statefulsets.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: shynet-redis +spec: + selector: + matchLabels: + app: shynet-redis + serviceName: shynet-redis + replicas: 1 + template: + metadata: + labels: + app: shynet-redis + spec: + containers: + - name: shynet-redis + image: redis:6.2.6 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 6379 + name: redis \ No newline at end of file