Add CDN thingy
This commit is contained in:
parent
5f0c4e8a51
commit
d34ec0ad1e
53
flux/cluster/apps/misc/cdn-control/deployment.yaml
Normal file
53
flux/cluster/apps/misc/cdn-control/deployment.yaml
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: cdn-deployment
|
||||||
|
namespace: family
|
||||||
|
labels:
|
||||||
|
app: cdn-deployment
|
||||||
|
keel.sh/policy: force
|
||||||
|
keel.sh/match-tag: "true"
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: cdn-deployment
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: cdn-deployment
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: cdn-deployment
|
||||||
|
imagePullPolicy: Always
|
||||||
|
image: registry.asraphiel.dev/library/cdn-control:main
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: CDN_ACCESS_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: cdn-secrets
|
||||||
|
key: access-key
|
||||||
|
- name: CDN_SECRET_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: cdn-secrets
|
||||||
|
key: secret-key
|
||||||
|
- name: CDN_ENDPOINT
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: cdn-secrets
|
||||||
|
key: endpoint
|
||||||
|
- name: CDN_BASE_PATH
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: cdn-secrets
|
||||||
|
key: base-path
|
||||||
|
- name: CDN_BUCKET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: cdn-secrets
|
||||||
|
key: bucket
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: registry-creds
|
27
flux/cluster/apps/misc/cdn-control/ingress.yaml
Normal file
27
flux/cluster/apps/misc/cdn-control/ingress.yaml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: cdn-deployment-ingress
|
||||||
|
namespace: misc
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: "cdn.asraphiel.dev"
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: cdn-deployment-service
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
- host: "cdn.voidcorp.nl"
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: cdn-deployment-service
|
||||||
|
port:
|
||||||
|
number: 80
|
7
flux/cluster/apps/misc/cdn-control/kustomization.yaml
Normal file
7
flux/cluster/apps/misc/cdn-control/kustomization.yaml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- deployment.yaml
|
||||||
|
- ingress.yaml
|
||||||
|
- service.yaml
|
||||||
|
- secret.yaml
|
33
flux/cluster/apps/misc/cdn-control/secret.yaml
Normal file
33
flux/cluster/apps/misc/cdn-control/secret.yaml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: cdn-secrets
|
||||||
|
namespace: cdn
|
||||||
|
spec:
|
||||||
|
refreshInterval: "15s"
|
||||||
|
secretStoreRef:
|
||||||
|
name: vault
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
target:
|
||||||
|
name: cdn-secrets
|
||||||
|
data:
|
||||||
|
- secretKey: access-key
|
||||||
|
remoteRef:
|
||||||
|
key: k8s/cdn
|
||||||
|
property: access-key
|
||||||
|
- secretKey: secret-key
|
||||||
|
remoteRef:
|
||||||
|
key: k8s/cdn
|
||||||
|
property: secret-key
|
||||||
|
- secretKey: endpoint
|
||||||
|
remoteRef:
|
||||||
|
key: k8s/cdn
|
||||||
|
property: endpoint
|
||||||
|
- secretKey: base-path
|
||||||
|
remoteRef:
|
||||||
|
key: k8s/cdn
|
||||||
|
property: base-path
|
||||||
|
- secretKey: bucket
|
||||||
|
remoteRef:
|
||||||
|
key: k8s/cdn
|
||||||
|
property: bucket
|
12
flux/cluster/apps/misc/cdn-control/service.yaml
Normal file
12
flux/cluster/apps/misc/cdn-control/service.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: cdn-deployment-service
|
||||||
|
namespace: misc
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: cdn-deployment
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 8080
|
|
@ -3,3 +3,4 @@ kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- pinbot
|
- pinbot
|
||||||
- registry-creds.yaml
|
- registry-creds.yaml
|
||||||
|
- cdn-control
|
||||||
|
|
Loading…
Reference in a new issue