summaryrefslogtreecommitdiffstats
path: root/etc/kubernetes/manifests/030_deploy.yaml
blob: 53b88ca1f9ce9092fc2653a8153c699bd82fa702 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
################################################################################
##      Copyright (C) 2020        Sebastian Francisco Colomar Bauza           ##
##      Copyright (C) 2020        Alejandro Colomar Andrés                    ##
##      SPDX-License-Identifier:  GPL-2.0-only                                ##
################################################################################

apiVersion: apps/v1
kind: Deployment
metadata:
    name: www-deploy
spec:
    replicas: 1
    selector:
        matchLabels:
            app: www-label
    template:
        metadata:
            name: www-pod
            labels:
                app: www-label
        spec:
            containers:
            -
                image: "docker.io/alejandrocolomar/www:0.48-rc5"
                livenessProbe:
                    httpGet:
                        path: /
                        port: 8080
                    initialDelaySeconds: 30
                name: www-container
                ports:
                -
                    containerPort: 8080
                readinessProbe:
                    httpGet:
                        path: /
                        port: 8080
                    initialDelaySeconds: 1
                resources:
                    limits:
                        cpu: '0.5'
#                        memory: '1Gi'
                    requests:
                        cpu: '0.5'
#                        memory: '1Gi'
                volumeMounts:
                -
                    mountPath: /etc/nginx/conf.d/security-parameters.conf
                    name: etc-nginx-conf-d-security-parameters-conf-www-volume
                    readOnly: true
                    subPath: security-parameters.conf
                -
                    mountPath: /etc/nginx/conf.d/server.conf
                    name: etc-nginx-conf-d-server-conf-www-volume
                    readOnly: true
                    subPath: server.conf
                -
                    mountPath: /var/cache/nginx/
                    name: var-cache-nginx-www-volume
                -
                    mountPath: /var/log/nginx/
                    name: var-log-nginx-www-volume
                -
                    mountPath: /var/run/
                    name: var-run-www-volume
            volumes:
            -
                configMap:
                    name: etc-nginx-conf-d-security-parameters-conf-www-cm
                name: etc-nginx-conf-d-security-parameters-conf-www-volume
            -
                configMap:
                    name: etc-nginx-conf-d-server-conf-www-cm
                name: etc-nginx-conf-d-server-conf-www-volume
            -
                emptyDir: {}
                name: var-cache-nginx-www-volume
            -
                emptyDir: {}
                name: var-log-nginx-www-volume
            -
                emptyDir: {}
                name: var-run-www-volume