move k8s cluster data to its own dir
This commit is contained in:
154
kubernetes/apps/production/flyimg/config.yaml
Normal file
154
kubernetes/apps/production/flyimg/config.yaml
Normal file
@ -0,0 +1,154 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: flyimg-config
|
||||
namespace: public-services
|
||||
data:
|
||||
parameters.yml: |
|
||||
---
|
||||
# Debug
|
||||
debug: false
|
||||
|
||||
# Home page title
|
||||
home_page_title: Flyimg
|
||||
|
||||
# Number of days for header cache expires `max_age`
|
||||
header_cache_days: 365
|
||||
|
||||
# To enable the Cleanup Cronjob to purge the var/tmp folder
|
||||
enable_cronjob_cleanup: true
|
||||
|
||||
# The cronjob interval to cleanup the var/tmp folder
|
||||
cronjob_cleanup_interval: "0 */5 * * *"
|
||||
|
||||
# Options separator
|
||||
# When changing this value, you should change the OPTIONS_SEPARATOR value in web/js/main.js!
|
||||
options_separator: ','
|
||||
|
||||
# Security: Signature generation
|
||||
# Security key
|
||||
security_key: ''
|
||||
# Secret Initialization vector(IV)
|
||||
security_iv: ''
|
||||
|
||||
# Restrict domains, false by default
|
||||
restricted_domains: false
|
||||
|
||||
# If restricted_domains is enabled, put whitelist domains here
|
||||
whitelist_domains:
|
||||
- domain-1.com
|
||||
- domain-2.com
|
||||
|
||||
# Default storage system is local, to use AWS S3, change this param to s3
|
||||
storage_system: local
|
||||
|
||||
# In case storage_system: s3, you need to add those AWS S3 parameters:
|
||||
aws_s3:
|
||||
access_id: ''
|
||||
secret_key: ''
|
||||
region: 'eu-central-1'
|
||||
bucket_name: ''
|
||||
|
||||
# Number of threads for Imagemagick to use
|
||||
thread: 1
|
||||
|
||||
# For Avif format: conversion speed parameter for the HEIF library.
|
||||
heic_speed: 8
|
||||
|
||||
# Read source image timeout in seconds
|
||||
source_image_request_timeout: 5
|
||||
|
||||
# When set to true the generated image will be deleted from the cache in web/upload and served directly in the response
|
||||
disable_cache: false
|
||||
|
||||
# When supported by the browser, AVIF format will be served as default output
|
||||
enable_avif: true
|
||||
|
||||
# When supported by the browser, Webp format will be served as default output (after checking AVIF support)
|
||||
enable_webp: true
|
||||
|
||||
# Extra options for the header sent to source image server, as some servers requires the User-Agent.
|
||||
header_extra_options:
|
||||
- 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:2.2) Gecko/20110201'
|
||||
|
||||
# List of request header to forward to source image server (example Authorization)
|
||||
forward_request_headers: []
|
||||
|
||||
# Keys used in url to match options. Ex: q_80,w_200,h_100
|
||||
options_keys:
|
||||
q: quality
|
||||
o: output
|
||||
unsh: unsharp
|
||||
sh: sharpen
|
||||
blr: blur
|
||||
fc: face-crop
|
||||
fcp: face-crop-position
|
||||
fb: face-blur
|
||||
w: width
|
||||
h: height
|
||||
c: crop
|
||||
bg: background
|
||||
st: strip
|
||||
ao: auto-orient
|
||||
rz: resize
|
||||
g: gravity
|
||||
f: filter
|
||||
r: rotate
|
||||
sc: scale
|
||||
sf: sampling-factor
|
||||
rf: refresh
|
||||
smc: smart-crop
|
||||
ett: extent
|
||||
par: preserve-aspect-ratio
|
||||
pns: preserve-natural-size
|
||||
webpl: webp-lossless
|
||||
gf: gif-frame
|
||||
e: extract
|
||||
p1x: extract-top-x
|
||||
p1y: extract-top-y
|
||||
p2x: extract-bottom-x
|
||||
p2y: extract-bottom-y
|
||||
pdfp: pdf-page-number
|
||||
tm: time
|
||||
clsp: colorspace
|
||||
mnchr: monochrome
|
||||
|
||||
# Default options values
|
||||
default_options:
|
||||
quality: 70
|
||||
output: webp
|
||||
unsharp: null
|
||||
sharpen: null
|
||||
blur: null
|
||||
face-crop: 0
|
||||
face-crop-position: 0
|
||||
face-blur: 0
|
||||
width: null
|
||||
height: null
|
||||
crop: null
|
||||
background: null
|
||||
strip: 1
|
||||
auto-orient: 0
|
||||
resize: null
|
||||
gravity: Center
|
||||
filter: Lanczos
|
||||
rotate: null
|
||||
scale: null
|
||||
sampling-factor: 1x1
|
||||
refresh: false
|
||||
smart-crop: false
|
||||
extent: null
|
||||
preserve-aspect-ratio: 1
|
||||
preserve-natural-size: 1
|
||||
webp-lossless: 0
|
||||
gif-frame: 0
|
||||
extract: null
|
||||
extract-top-x: null
|
||||
extract-top-y: null
|
||||
extract-bottom-x: null
|
||||
extract-bottom-y: null
|
||||
pdf-page-number: 1
|
||||
time: '00:00:01'
|
||||
colorspace: 'sRGB'
|
||||
monochrome: null
|
45
kubernetes/apps/production/flyimg/deployment.yaml
Normal file
45
kubernetes/apps/production/flyimg/deployment.yaml
Normal file
@ -0,0 +1,45 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: flyimg
|
||||
namespace: public-services
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: flyimg
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: flyimg
|
||||
spec:
|
||||
containers:
|
||||
- name: flyimg-container
|
||||
image: flyimg/flyimg:1.4.12
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 1000m # 1 vCPU
|
||||
memory: 200Mi
|
||||
volumeMounts:
|
||||
- name: flyimg-storage
|
||||
mountPath: /var/www/html/web/uploads
|
||||
- name: config-volume
|
||||
mountPath: /var/www/html/config/parameters.yml
|
||||
subPath: parameters.yml
|
||||
volumes:
|
||||
- name: flyimg-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: flyimg-pvc
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: flyimg-config
|
21
kubernetes/apps/production/flyimg/ingress.yaml
Normal file
21
kubernetes/apps/production/flyimg/ingress.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: capacitor-external-ingress
|
||||
namespace: public-services
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-external
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`img.fascinated.cc`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: default-headers
|
||||
namespace: traefik
|
||||
services:
|
||||
- name: flyimg-service
|
||||
port: 80
|
||||
tls:
|
||||
secretName: fascinated-cc
|
10
kubernetes/apps/production/flyimg/kustomization.yaml
Normal file
10
kubernetes/apps/production/flyimg/kustomization.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: public-services
|
||||
resources:
|
||||
- config.yaml
|
||||
- pvc.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
12
kubernetes/apps/production/flyimg/pvc.yaml
Normal file
12
kubernetes/apps/production/flyimg/pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: flyimg-pvc
|
||||
namespace: public-services
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
13
kubernetes/apps/production/flyimg/service.yaml
Normal file
13
kubernetes/apps/production/flyimg/service.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: flyimg-service
|
||||
namespace: public-services
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: flyimg
|
Reference in New Issue
Block a user