Add pinbot to cluster

This commit is contained in:
Julius 2022-05-24 12:38:44 +02:00
parent 5dcc6c8eb5
commit c39218582d
Signed by: j00lz
GPG key ID: AF241B0AA237BBA2
12 changed files with 50 additions and 75 deletions

View file

@ -1,7 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- test
- misc
- authentik
- networking
- drone

View file

@ -1,6 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- ingress.yaml
- service.yaml
- pinbot

View file

@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- pinbot.yaml
- secret.yaml

View file

@ -0,0 +1,29 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: pinbot-deployment
namespace: misc
labels:
app: pinbot-deployment
keel.sh/policy: force
spec:
replicas: 1
selector:
matchLabels:
app: pinbot-deployment
template:
metadata:
labels:
app: pinbot-deployment
spec:
containers:
- name: pinbot-deployment
image: registry.asraphiel.dev/library/pinbot:main
env:
- name: DISCORD_TOKEN
valueFrom:
secretKeyRef:
name: pinbot-secrets
key: token
imagePullSecrets:
- name: registry-creds

View file

@ -1,17 +1,17 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: vault-example
namespace: test
name: pinbot-secrets
namespace: misc
spec:
refreshInterval: "15s"
secretStoreRef:
name: vault
kind: ClusterSecretStore
target:
name: example-sync
name: pinbot-secrets
data:
- secretKey: foobar
- secretKey: pinbot-discord-token
remoteRef:
key: k8s/foo
property: my-value
key: k8s/pinbot
property: token

View file

@ -2,7 +2,7 @@ apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: registry-creds
namespace: test
namespace: misc
spec:
refreshInterval: "5m"
secretStoreRef:

View file

@ -1,27 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: whoami-deployment
namespace: test
labels:
app: whoami-deployment
keel.sh/policy: force
keel.sh/match-tag: "true"
spec:
replicas: 1
selector:
matchLabels:
app: whoami-deployment
template:
metadata:
labels:
app: whoami-deployment
spec:
containers:
- name: whoami-deployment
imagePullPolicy: Always
image: registry.asraphiel.dev/whoami
ports:
- containerPort: 80
imagePullSecrets:
- name: registry-creds

View file

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

View file

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

View file

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

View file

@ -8,3 +8,4 @@ resources:
- drone.yaml
- keel.yaml
- family.yaml
- misc.yaml

View file

@ -0,0 +1,6 @@
kind: Namespace
apiVersion: v1
metadata:
name: misc
labels:
name: misc