Split manifests into infra/ and applications/
This commit is contained in:
20
applications/pelican/pelican-configmap.yaml
Normal file
20
applications/pelican/pelican-configmap.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: pelican-config
|
||||
namespace: pelican
|
||||
data:
|
||||
APP_NAME: Pelican
|
||||
APP_URL: https://pelican.jsme.be
|
||||
BEHIND_PROXY: "true"
|
||||
ADMIN_EMAIL: jeffreysmeets@jsme.be
|
||||
DB_CONNECTION: pgsql
|
||||
DB_HOST: pelican-postgres
|
||||
DB_PORT: "5432"
|
||||
CACHE_STORE: redis
|
||||
QUEUE_CONNECTION: redis
|
||||
SESSION_DRIVER: redis
|
||||
REDIS_HOST: pelican-redis
|
||||
REDIS_PORT: "6379"
|
||||
XDG_DATA_HOME: /pelican-data
|
||||
AWS_USE_PATH_STYLE_ENDPOINT: "true"
|
||||
12
applications/pelican/pelican-data-persistentvolumeclaim.yaml
Normal file
12
applications/pelican/pelican-data-persistentvolumeclaim.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: pelican-data-pvc
|
||||
namespace: pelican
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
57
applications/pelican/pelican-deployment.yaml
Normal file
57
applications/pelican/pelican-deployment.yaml
Normal file
@@ -0,0 +1,57 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pelican
|
||||
namespace: pelican
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pelican
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pelican
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
securityContext:
|
||||
fsGroup: 82
|
||||
containers:
|
||||
- name: pelican
|
||||
image: ghcr.io/pelican-dev/panel:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: pelican-config
|
||||
env:
|
||||
- name: DB_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pelican-secrets
|
||||
key: DB_USERNAME
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pelican-secrets
|
||||
key: DB_PASSWORD
|
||||
- name: DB_DATABASE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pelican-secrets
|
||||
key: DB_DATABASE
|
||||
volumeMounts:
|
||||
- name: pelican-data
|
||||
mountPath: /pelican-data
|
||||
volumes:
|
||||
- name: pelican-data
|
||||
persistentVolumeClaim:
|
||||
claimName: pelican-data-pvc
|
||||
48
applications/pelican/pelican-httproute.yaml
Normal file
48
applications/pelican/pelican-httproute.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: pelican-route
|
||||
namespace: pelican
|
||||
spec:
|
||||
parentRefs:
|
||||
- group: gateway.networking.k8s.io
|
||||
kind: Gateway
|
||||
name: gateway-internal
|
||||
namespace: envoy-gateway
|
||||
sectionName: pelican
|
||||
hostnames:
|
||||
- "pelican.jsme.be"
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
filters:
|
||||
- type: RequestHeaderModifier
|
||||
requestHeaderModifier:
|
||||
set:
|
||||
- name: X-Forwarded-Host
|
||||
value: "pelican.jsme.be"
|
||||
- name: X-Forwarded-Proto
|
||||
value: https
|
||||
- type: ResponseHeaderModifier
|
||||
responseHeaderModifier:
|
||||
set:
|
||||
- name: Strict-Transport-Security
|
||||
value: "max-age=31536000; includeSubDomains"
|
||||
- name: X-Content-Type-Options
|
||||
value: nosniff
|
||||
- name: X-Frame-Options
|
||||
value: SAMEORIGIN
|
||||
- name: Referrer-Policy
|
||||
value: strict-origin-when-cross-origin
|
||||
- name: Permissions-Policy
|
||||
value: "camera=(), microphone=(), geolocation=(), payment=()"
|
||||
- name: Content-Security-Policy
|
||||
value: "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdnjs.cloudflare.com; style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com; img-src 'self' data: blob: https://gravatar.com https://www.gravatar.com; font-src 'self' data: https://cdnjs.cloudflare.com; connect-src 'self' https://wings.jsme.be wss://wings.jsme.be ws: wss:; worker-src blob:; frame-ancestors 'self'"
|
||||
backendRefs:
|
||||
- name: pelican
|
||||
port: 80
|
||||
kind: Service
|
||||
group: ""
|
||||
weight: 1
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: pelican-postgres-pvc
|
||||
namespace: pelican
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
11
applications/pelican/pelican-postgres-service.yaml
Normal file
11
applications/pelican/pelican-postgres-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pelican-postgres
|
||||
namespace: pelican
|
||||
spec:
|
||||
selector:
|
||||
app: pelican-postgres
|
||||
ports:
|
||||
- port: 5432
|
||||
targetPort: 5432
|
||||
55
applications/pelican/pelican-postgres-statefulset.yaml
Normal file
55
applications/pelican/pelican-postgres-statefulset.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: pelican-postgres
|
||||
namespace: pelican
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pelican-postgres
|
||||
serviceName: pelican-postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pelican-postgres
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 60
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:17-alpine
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
volumeMounts:
|
||||
- name: pelican-postgres-data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
env:
|
||||
- name: PGDATA
|
||||
value: /var/lib/postgresql/data/pgdata
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pelican-secrets
|
||||
key: DB_USERNAME
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pelican-secrets
|
||||
key: DB_PASSWORD
|
||||
- name: POSTGRES_DB
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pelican-secrets
|
||||
key: DB_DATABASE
|
||||
volumes:
|
||||
- name: pelican-postgres-data
|
||||
persistentVolumeClaim:
|
||||
claimName: pelican-postgres-pvc
|
||||
28
applications/pelican/pelican-redis-deployment.yaml
Normal file
28
applications/pelican/pelican-redis-deployment.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pelican-redis
|
||||
namespace: pelican
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pelican-redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pelican-redis
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
containers:
|
||||
- name: valkey
|
||||
image: valkey/valkey:8-alpine
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
11
applications/pelican/pelican-redis-service.yaml
Normal file
11
applications/pelican/pelican-redis-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pelican-redis
|
||||
namespace: pelican
|
||||
spec:
|
||||
selector:
|
||||
app: pelican-redis
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
13
applications/pelican/pelican-service.yaml
Normal file
13
applications/pelican/pelican-service.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pelican
|
||||
namespace: pelican
|
||||
spec:
|
||||
selector:
|
||||
app: pelican
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
type: ClusterIP
|
||||
18
applications/pelican/pelican-wings-endpointslice.yaml
Normal file
18
applications/pelican/pelican-wings-endpointslice.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
apiVersion: discovery.k8s.io/v1
|
||||
kind: EndpointSlice
|
||||
metadata:
|
||||
name: wings
|
||||
namespace: pelican
|
||||
labels:
|
||||
kubernetes.io/service-name: wings
|
||||
addressType: IPv4
|
||||
ports:
|
||||
- port: 8080
|
||||
protocol: TCP
|
||||
endpoints:
|
||||
- addresses:
|
||||
- "10.8.11.50"
|
||||
conditions:
|
||||
ready: true
|
||||
serving: true
|
||||
terminating: false
|
||||
25
applications/pelican/pelican-wings-httproute.yaml
Normal file
25
applications/pelican/pelican-wings-httproute.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: wings-route
|
||||
namespace: pelican
|
||||
spec:
|
||||
parentRefs:
|
||||
- group: gateway.networking.k8s.io
|
||||
kind: Gateway
|
||||
name: gateway-internal
|
||||
namespace: envoy-gateway
|
||||
sectionName: wings
|
||||
hostnames:
|
||||
- "wings.jsme.be"
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
backendRefs:
|
||||
- name: wings
|
||||
port: 8080
|
||||
kind: Service
|
||||
group: ""
|
||||
weight: 1
|
||||
11
applications/pelican/pelican-wings-service.yaml
Normal file
11
applications/pelican/pelican-wings-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: wings
|
||||
namespace: pelican
|
||||
spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
type: ClusterIP
|
||||
Reference in New Issue
Block a user