attempt #1
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Lee 2024-09-24 03:39:02 +01:00
parent cdbe1813cb
commit 4b9e606646
2 changed files with 78 additions and 0 deletions

View File

@ -15,3 +15,15 @@ steps:
from_secret: token
tags:
- latest
- name: Deploy SSR
image: danielgormly/drone-plugin-kube:0.2.0
settings:
build_number: ${DRONE_BUILD_NUMBER}
template: deployment.yaml
ca:
from_secret: k8s_crt
server:
from_secret: k8s_server
token:
from_secret: k8s_token

66
deployment.yaml Normal file
View File

@ -0,0 +1,66 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: scoresaber-reloaded
namespace: public-services
spec:
replicas: 1
selector:
matchLabels:
app: scoresaber-reloaded
template:
metadata:
labels:
app: scoresaber-reloaded
spec:
containers:
- name: scoresaber-reloaded-container
image: git.fascinated.cc/fascinated/scoresaber-reloaded:latest
alwaysPullImage: true
securityContext:
allowPrivilegeEscalation: false
ports:
- containerPort: 3000
resources:
requests:
cpu: 50m
memory: 100Mi
limits:
cpu: 1000m # 1 vCPU
memory: 200Mi
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: scoresaber-reloaded-ingress
namespace: public-services
annotations:
kubernetes.io/ingress.class: traefik-external
spec:
entryPoints:
- websecure
routes:
- match: Host(`ssr-staging.fascinated.cc`)
kind: Rule
middlewares:
- name: default-headers
namespace: traefik
services:
- name: scoresaber-reloaded-service
port: 3000
tls:
secretName: fascinated-cc
---
apiVersion: v1
kind: Service
metadata:
name: scoresaber-reloaded-service
namespace: public-services
spec:
type: ClusterIP
ports:
- port: 3000
targetPort: 3000
selector:
app: scoresaber-reloaded