forked from polkadot-js/apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.template.yml
60 lines (60 loc) · 1.39 KB
/
deployment.template.yml
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
---
apiVersion: v1
data:
# AZURE_DOCKER_REGISTRY_CONFIG is base64 of this:
# {"auths":{"parity.azurecr.io":{"username":"parity","password":"<password>","email":"[email protected]","auth":"<base64 of user+passwoed>"}}}
.dockerconfigjson: $AZURE_DOCKER_REGISTRY_CONFIG
kind: Secret
metadata:
name: azure-docker-registry-key
type: kubernetes.io/dockerconfigjson
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: $CI_ENVIRONMENT_SLUG-backend
spec:
replicas: $REPLICAS
template:
metadata:
labels:
app: $CI_ENVIRONMENT_SLUG
component: backend
spec:
containers:
- name: $CI_ENVIRONMENT_SLUG-backend
image: $DOCKER_IMAGE_FULL_NAME
imagePullPolicy: Always
ports:
- containerPort: 80
imagePullSecrets:
- name: azure-docker-registry-key
---
apiVersion: v1
kind: Service
metadata:
name: $CI_ENVIRONMENT_SLUG-service
spec:
selector:
app: $CI_ENVIRONMENT_SLUG
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: $CI_ENVIRONMENT_SLUG-ingress
annotations:
kubernetes.io/ingress.class: traefik
traefik.frontend.entryPoints: "https,http"
spec:
rules:
- host: $AUTODEVOPS_HOST
http:
paths:
- backend:
serviceName: $CI_ENVIRONMENT_SLUG-service
servicePort: 80