104 lines
1.8 KiB
YAML
104 lines
1.8 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: php-fpm-img
|
|
namespace: rock
|
|
labels:
|
|
app: img
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: img
|
|
backend: php
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: img
|
|
backend: php
|
|
spec:
|
|
containers:
|
|
- name: php
|
|
image: git.picklesniffers.com/rock.ru/img:0.1-php
|
|
ports:
|
|
- containerPort: 9000
|
|
env:
|
|
- name: TZ
|
|
value: "Asia/Bangkok"
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: php-fpm-img
|
|
namespace: rock
|
|
spec:
|
|
selector:
|
|
app: img
|
|
backend: php
|
|
ports:
|
|
- protocol: TCP
|
|
port: 9000
|
|
targetPort: 9000
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nginx-img
|
|
namespace: rock
|
|
labels:
|
|
app: img
|
|
frontend: nginx
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: img
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: img
|
|
frontend: nginx
|
|
spec:
|
|
volumes:
|
|
- name: album
|
|
hostPath:
|
|
path: /srv/data/img/album
|
|
- name: artist
|
|
hostPath:
|
|
path: /srv/data/img/artist
|
|
- name: forum
|
|
hostPath:
|
|
path: /srv/data/img/forum
|
|
containers:
|
|
- name: nginx
|
|
image: git.picklesniffers.com/rock.ru/img:0.2.1-nginx
|
|
volumeMounts:
|
|
- name: album
|
|
mountPath: /var/www/img.rock.ru/album
|
|
- name: artist
|
|
mountPath: /var/www/img.rock.ru/artist
|
|
- name: forum
|
|
mountPath: /var/www/img.rock.ru/forum
|
|
ports:
|
|
- containerPort: 8080
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: img-http
|
|
namespace: rock
|
|
spec:
|
|
selector:
|
|
app: img
|
|
frontend: nginx
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 8080
|
|
type: LoadBalancer
|
|
allocateLoadBalancerNodePorts: false
|