mirror of
https://github.com/michaelthomson0797/fleet-infra.git
synced 2026-02-04 13:09:53 +00:00
todos app
This commit is contained in:
18
bootstrap/kustomizations/kustomization-todos.yaml
Normal file
18
bootstrap/kustomizations/kustomization-todos.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: todo
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
interval: 15m
|
||||||
|
path: ./todo
|
||||||
|
prune: true # remove any elements later removed from the above path
|
||||||
|
timeout: 2m # if not set, this defaults to interval duration, which is 1h
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: flux-system
|
||||||
|
healthChecks:
|
||||||
|
- apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: todo
|
||||||
|
namespace: todo
|
||||||
4
bootstrap/namespaces/namespace-todo.yaml
Normal file
4
bootstrap/namespaces/namespace-todo.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: todo
|
||||||
15
todo/app-secret.yaml
Normal file
15
todo/app-secret.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
apiVersion: bitnami.com/v1alpha1
|
||||||
|
kind: SealedSecret
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: database-url
|
||||||
|
namespace: todo
|
||||||
|
spec:
|
||||||
|
encryptedData:
|
||||||
|
DATABASE_URL: AgBgS5ia5yF0eTcAJypY/Ca3fDM3ya9+JPQ6bXHk/WhIVhoWxq/yp5rhlt+d/nyYfk2SPhCeBz1+CX2/kedage/kXDnWVcOkBKqVggb0dLGNS26i9mZImq3CVCOlvTUv1+IlQwkkS+MMrHbMRiFDJNZNJwnVW1ibXvyKYXCOnzxQdtkL/eB2urko54Lf9YTDmEYRo+23LXZOocDA3KsUV2ieh95AVD2LUwyFo64NfeD3+U24CwWzj6LXnmHZNhn+e4sP2Q3fUjyWYiiO9qbbmTi+fgGKR1wUNlaWxbzyBSa/UBe1NPdjAVMDjFPuJncM8oyhhoCvzBRLWYgysVAIZhPtJtiTNkKvWdxjhyqaTMRXOgZhk/z0j5LvLw9eXuXFuZLSTSwzLWKdCw5fERY8kd/WNXI31Pz9ODRRJwzonojYJ07CwowxS+b6oecvuzmo9vOE4i1Ghs2uukrVN/t9d5phX0VBrsh4S1sKOrMfQpkgABZmKt8CctU34t+C+rAY2GNvig0URcXnJW1ZKxylp0cGaEg9SeH5UdvRAFdkyyf6VTE/+uG+6qFjGTqcRcXdfY/wBgoOpq9y4wka+w4lkvJPaiuDW+kkR4+I1Q92D0x+1o/nSBnGjmMS8qMxe7039awGXGbyaGcjdFw6iBUbCkAiSTEa2Ms6ksgl6Tfs1hiACAO1pkNWrym+mYDXHYqwRnMJ6fo7BFEaOzpeXtDWHif08imkfANlZfuKgXHiahhqQP1Hp1DHhpouSPLzfxlPvKBy/nHnHsG7Q1XGRQxTFaAFqzE=
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: database-url
|
||||||
|
namespace: todo
|
||||||
29
todo/deployment.yaml
Normal file
29
todo/deployment.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: todo
|
||||||
|
namespace: todo
|
||||||
|
labels:
|
||||||
|
app: todo
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: todo
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: todo
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: gitea.michaelthomson.dev/mthomson/go-todos-app:latest
|
||||||
|
name: todo
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 3000
|
||||||
|
env:
|
||||||
|
- name: DATABASE_URL
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: database-url
|
||||||
|
key: DATABASE_URL
|
||||||
24
todo/ingress.yaml
Normal file
24
todo/ingress.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: todo
|
||||||
|
namespace: todo
|
||||||
|
annotations:
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: todo.michaelthomson.dev
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- pathType: ImplementationSpecific
|
||||||
|
path: /
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: todo
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- todo.michaelthomson.dev
|
||||||
|
secretName: letsencrypt-wildcard-cert-michaelthomson.dev
|
||||||
12
todo/service.yaml
Normal file
12
todo/service.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: todo
|
||||||
|
namespace: todo
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: todo
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: http
|
||||||
|
name: http
|
||||||
Reference in New Issue
Block a user