Add tickets thing

This commit is contained in:
Julius 2022-06-12 00:13:28 +02:00
parent 57aaf9d506
commit b4ff52cf1b
Signed by: j00lz
GPG key ID: AF241B0AA237BBA2
6 changed files with 86 additions and 0 deletions

View file

@ -4,3 +4,4 @@ resources:
- pinbot
- registry-creds.yaml
- whoami
- tickets

View file

@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: tickets-deployment
namespace: misc
labels:
app: tickets-deployment
keel.sh/policy: force
keel.sh/match-tag: "true"
spec:
replicas: 1
selector:
matchLabels:
app: tickets-deployment
template:
metadata:
labels:
app: tickets-deployment
spec:
containers:
- name: tickets-deployment
imagePullPolicy: Always
image: registry.asraphiel.dev/library/tickets:main
ports:
- containerPort: 8080
envFrom:
- secretRef:
name: tickets-secrets

View file

@ -0,0 +1,17 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: tickets-deployment-ingress
namespace: misc
spec:
rules:
- host: "tickets.asraphiel.dev"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: tickets-deployment-service
port:
number: 80

View file

@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- ingress.yaml
- service.yaml
- secret.yaml

View file

@ -0,0 +1,21 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: tickets-secrets
namespace: misc
spec:
refreshInterval: "15s"
secretStoreRef:
name: vault
kind: ClusterSecretStore
target:
name: tickets-secrets
data:
- secretKey: DATABASE_URL
remoteRef:
key: k8s/tickets
property: db-secret
- secretKey: ADMIN_PASSWORD
remoteRef:
key: k8s/tickets
property: password

View file

@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: tickets-deployment-service
namespace: misc
spec:
selector:
app: tickets-deployment
ports:
- protocol: TCP
port: 80
targetPort: 8080