hiphop-deploy+svc.yaml 936 Bytes
Newer Older
Nane Kratzke's avatar
Nane Kratzke committed
1
2
3
4
apiVersion: apps/v1
kind: Deployment
metadata:
  name: hiphop-deployment-{{ TIER }}
Nane Kratzke's avatar
Nane Kratzke committed
5
6
  labels:
    app: hiphop-{{ TIER }}
Nane Kratzke's avatar
Nane Kratzke committed
7
spec:
Nane Kratzke's avatar
Nane Kratzke committed
8
  replicas: 1
Nane Kratzke's avatar
Nane Kratzke committed
9
10
  selector:
    matchLabels:
Nane Kratzke's avatar
Nane Kratzke committed
11
      app: hiphop-{{ TIER }}
Nane Kratzke's avatar
Nane Kratzke committed
12
13
14
  template:
    metadata:
      labels:
Nane Kratzke's avatar
Nane Kratzke committed
15
        app: hiphop-{{ TIER }}
Nane Kratzke's avatar
Nane Kratzke committed
16
17
18
19
20
    spec:
      imagePullSecrets:
      - name: gitlab-registry-credentials
      containers:
      - name: hiphop
Nane Kratzke's avatar
Nane Kratzke committed
21
        image: {{ CI_REGISTRY_IMAGE }}/hiphop:latest
Nane Kratzke's avatar
Nane Kratzke committed
22
23
24
25
26
        imagePullPolicy: Always
        ports:
        - containerPort: 80
        env:
        - name: HIPHOP
Nane Kratzke's avatar
Nane Kratzke committed
27
          value: "hiphop-{{ ID }}-svc"
Nane Kratzke's avatar
Nane Kratzke committed
28
        - name: TIER
Nane Kratzke's avatar
Nane Kratzke committed
29
          value: "{{ TIER }}"
Nane Kratzke's avatar
Nane Kratzke committed
30
        - name: ELASTIC_APM_SERVER_URL
Nane Kratzke's avatar
Nane Kratzke committed
31
          value: {{ TRACING_SERVER }}
Nane Kratzke's avatar
Nane Kratzke committed
32
33
34
35
---
apiVersion: v1
kind: Service
metadata:
Nane Kratzke's avatar
Nane Kratzke committed
36
  name: hiphop-svc-{{ TIER }}
Nane Kratzke's avatar
Nane Kratzke committed
37
38
  labels:
    app: hiphop-{{ TIER }}
Nane Kratzke's avatar
Nane Kratzke committed
39
40
spec:
  selector:
Nane Kratzke's avatar
Nane Kratzke committed
41
    app: hiphop-{{ TIER }}
Nane Kratzke's avatar
Nane Kratzke committed
42
43
44
45
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80