fixed geoip tag
This commit is contained in:
+204
-204
@@ -42,62 +42,62 @@ spec:
|
||||
app.kubernetes.io/name: plantit-db
|
||||
spec:
|
||||
containers:
|
||||
- name: mysql
|
||||
image: mysql:8.0
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: root-password
|
||||
- name: MYSQL_DATABASE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: database
|
||||
- name: MYSQL_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: username
|
||||
- name: MYSQL_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: password
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
name: mysql
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/mysql
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
- name: mysql
|
||||
image: mysql:8.0
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: root-password
|
||||
- name: MYSQL_DATABASE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: database
|
||||
- name: MYSQL_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: username
|
||||
- name: MYSQL_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: password
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
name: mysql
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/mysql
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- mysqladmin ping -u root -p$MYSQL_ROOT_PASSWORD
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: plantit-db
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: plantit-db
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@@ -120,18 +120,18 @@ spec:
|
||||
app.kubernetes.io/name: plantit-cache
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:7.2.1
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
- name: redis
|
||||
image: redis:7.2.1
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@@ -158,91 +158,91 @@ spec:
|
||||
app.kubernetes.io/version: "1.0.0"
|
||||
spec:
|
||||
containers:
|
||||
- name: plantit
|
||||
image: msdeluise/plant-it-server:0.10.0
|
||||
env:
|
||||
# Database
|
||||
- name: MYSQL_HOST
|
||||
value: "plantit-db"
|
||||
- name: MYSQL_PORT
|
||||
value: "3306"
|
||||
- name: MYSQL_DATABASE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: database
|
||||
- name: MYSQL_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: username
|
||||
- name: MYSQL_PSW
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: password
|
||||
# JWT
|
||||
- name: JWT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-app
|
||||
key: jwt-secret
|
||||
- name: JWT_EXP
|
||||
value: "1"
|
||||
# Server config
|
||||
- name: API_PORT
|
||||
value: "8080"
|
||||
- name: USERS_LIMIT
|
||||
value: "-1"
|
||||
- name: UPLOAD_DIR
|
||||
value: "/upload-dir"
|
||||
- name: LOG_LEVEL
|
||||
value: "INFO"
|
||||
- name: ALLOWED_ORIGINS
|
||||
value: "*"
|
||||
# Cache
|
||||
- name: CACHE_TYPE
|
||||
value: "redis"
|
||||
- name: CACHE_TTL
|
||||
value: "86400"
|
||||
- name: CACHE_HOST
|
||||
value: "plantit-cache"
|
||||
- name: CACHE_PORT
|
||||
value: "6379"
|
||||
# FloraCodex API key (optional)
|
||||
- name: FLORACODEX_KEY
|
||||
value: ""
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: api
|
||||
- containerPort: 3000
|
||||
name: frontend
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- name: uploads
|
||||
mountPath: /upload-dir
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 10
|
||||
failureThreshold: 6
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 30
|
||||
failureThreshold: 5
|
||||
- name: plantit
|
||||
image: msdeluise/plant-it-server:0.10.0
|
||||
env:
|
||||
# Database
|
||||
- name: MYSQL_HOST
|
||||
value: "plantit-db"
|
||||
- name: MYSQL_PORT
|
||||
value: "3306"
|
||||
- name: MYSQL_DATABASE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: database
|
||||
- name: MYSQL_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: username
|
||||
- name: MYSQL_PSW
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-db
|
||||
key: password
|
||||
# JWT
|
||||
- name: JWT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: plantit-app
|
||||
key: jwt-secret
|
||||
- name: JWT_EXP
|
||||
value: "1"
|
||||
# Server config
|
||||
- name: API_PORT
|
||||
value: "8080"
|
||||
- name: USERS_LIMIT
|
||||
value: "-1"
|
||||
- name: UPLOAD_DIR
|
||||
value: "/upload-dir"
|
||||
- name: LOG_LEVEL
|
||||
value: "INFO"
|
||||
- name: ALLOWED_ORIGINS
|
||||
value: "*"
|
||||
# Cache
|
||||
- name: CACHE_TYPE
|
||||
value: "redis"
|
||||
- name: CACHE_TTL
|
||||
value: "86400"
|
||||
- name: CACHE_HOST
|
||||
value: "plantit-cache"
|
||||
- name: CACHE_PORT
|
||||
value: "6379"
|
||||
# FloraCodex API key (optional)
|
||||
- name: FLORACODEX_KEY
|
||||
value: ""
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: api
|
||||
- containerPort: 3000
|
||||
name: frontend
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- name: uploads
|
||||
mountPath: /upload-dir
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 10
|
||||
failureThreshold: 6
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 30
|
||||
failureThreshold: 5
|
||||
volumes:
|
||||
- name: uploads
|
||||
persistentVolumeClaim:
|
||||
claimName: plantit-uploads
|
||||
- name: uploads
|
||||
persistentVolumeClaim:
|
||||
claimName: plantit-uploads
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
@@ -255,9 +255,9 @@ metadata:
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: mysql
|
||||
port: 3306
|
||||
targetPort: mysql
|
||||
- name: mysql
|
||||
port: 3306
|
||||
targetPort: mysql
|
||||
selector:
|
||||
app.kubernetes.io/instance: plantit
|
||||
app.kubernetes.io/name: plantit-db
|
||||
@@ -273,9 +273,9 @@ metadata:
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: redis
|
||||
port: 6379
|
||||
targetPort: redis
|
||||
- name: redis
|
||||
port: 6379
|
||||
targetPort: redis
|
||||
selector:
|
||||
app.kubernetes.io/instance: plantit
|
||||
app.kubernetes.io/name: plantit-cache
|
||||
@@ -291,12 +291,12 @@ metadata:
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: frontend
|
||||
port: 3000
|
||||
targetPort: frontend
|
||||
- name: api
|
||||
port: 8080
|
||||
targetPort: api
|
||||
- name: frontend
|
||||
port: 3000
|
||||
targetPort: frontend
|
||||
- name: api
|
||||
port: 8080
|
||||
targetPort: api
|
||||
selector:
|
||||
app.kubernetes.io/instance: plantit
|
||||
app.kubernetes.io/name: plantit
|
||||
@@ -321,50 +321,50 @@ metadata:
|
||||
nginx.ingress.kubernetes.io/auth-snippet: |
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||
if ($geoip2_city_country_code != "HU") {
|
||||
if ($geoip2_country_code != "HU") {
|
||||
return 403 "Access restricted to Hungary";
|
||||
}
|
||||
spec:
|
||||
ingressClassName: nginx-internal
|
||||
rules:
|
||||
- host: plantit.dooplex.hu
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: plantit
|
||||
port:
|
||||
number: 3000
|
||||
- path: /api
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: plantit
|
||||
port:
|
||||
number: 8080
|
||||
- host: plantit.home
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: plantit
|
||||
port:
|
||||
number: 3000
|
||||
- path: /api
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: plantit
|
||||
port:
|
||||
number: 8080
|
||||
- host: plantit.dooplex.hu
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: plantit
|
||||
port:
|
||||
number: 3000
|
||||
- path: /api
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: plantit
|
||||
port:
|
||||
number: 8080
|
||||
- host: plantit.home
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: plantit
|
||||
port:
|
||||
number: 3000
|
||||
- path: /api
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: plantit
|
||||
port:
|
||||
number: 8080
|
||||
tls:
|
||||
- hosts:
|
||||
- plantit.dooplex.hu
|
||||
secretName: plantit-tls
|
||||
- hosts:
|
||||
- plantit.dooplex.hu
|
||||
secretName: plantit-tls
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
@@ -378,7 +378,7 @@ metadata:
|
||||
recurring-job.longhorn.io/source: enabled
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
@@ -396,8 +396,8 @@ metadata:
|
||||
recurring-job.longhorn.io/source: enabled
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
storage: 5Gi
|
||||
|
||||
Reference in New Issue
Block a user