Add darklight app

This commit is contained in:
Kasper Juul Hermansen 2022-05-10 11:41:55 +02:00
parent 7485edc45e
commit a304d25730
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23
6 changed files with 154 additions and 2 deletions

View File

@ -0,0 +1,52 @@
apiVersion: v1
kind: Namespace
metadata:
name: darklight
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: darklight-client-deployment
namespace: darklight
labels:
app: darklight-client
spec:
replicas: 3
selector:
matchLabels:
app: darklight-client
template:
metadata:
labels:
app: darklight-client
spec:
containers:
- name: darklight-client
image: kasperhermansen/darklight-client
ports:
- containerPort: 3000
livenessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 5
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 5
timeoutSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
name: darklight-client
namespace: darklight
spec:
ports:
- port: 80
name: http
targetPort: 3000
selector:
app: darklight-client

View File

@ -0,0 +1,26 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: darklight
namespace: darklight
spec:
entryPoints:
- web
- websecure
routes:
- match: Host(`darklight.kjuulh.app`)
kind: Rule
services:
- name: darklight-client
kind: Service
namespace: darklight
port: 80
- match: Host(`darklight-api.kjuulh.app`)
kind: Rule
services:
- name: darklight-server
kind: Service
namespace: darklight
port: 80
tls:
secretName: clank-cert

View File

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- client.yaml
- server.yaml
- ingress.yaml

View File

@ -0,0 +1,52 @@
apiVersion: v1
kind: Namespace
metadata:
name: darklight
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: darklight-client-deployment
namespace: darklight
labels:
app: darklight-client
spec:
replicas: 3
selector:
matchLabels:
app: darklight-client
template:
metadata:
labels:
app: darklight-client
spec:
containers:
- name: darklight-client
image: kasperhermansen/darklight-client
ports:
- containerPort: 3000
livenessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 5
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 5
timeoutSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
name: darklight-client
namespace: darklight
spec:
ports:
- port: 80
name: http
targetPort: 80
selector:
app: darklight-client

View File

@ -0,0 +1,16 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: darklight
namespace: prod
spec:
interval: 10m0s
retryInterval: 30s
path: ./clank/apps/prod/darklight
prune: true
sourceRef:
kind: GitRepository
name: flux-system
namespace: flux-system
targetNamespace: darklight

View File

@ -16,6 +16,6 @@ spec:
secretTemplate: secretTemplate:
annotations: annotations:
reflector.v1.k8s.emberstack.com/reflection-allowed: "true" reflector.v1.k8s.emberstack.com/reflection-allowed: "true"
reflector.v1.k8s.emberstack.com/reflection-allowed-namespaces: "platform,kube-system,wishlist" # Control destination namespaces reflector.v1.k8s.emberstack.com/reflection-allowed-namespaces: "platform,kube-system,wishlist,darklight" # Control destination namespaces
reflector.v1.k8s.emberstack.com/reflection-auto-enabled: "true" # Auto create reflection for matching namespaces reflector.v1.k8s.emberstack.com/reflection-auto-enabled: "true" # Auto create reflection for matching namespaces
reflector.v1.k8s.emberstack.com/reflection-auto-namespaces: "platform,wishlist" # Control auto-reflection namespaces reflector.v1.k8s.emberstack.com/reflection-auto-namespaces: "platform,wishlist,darklight" # Control auto-reflection namespaces