deployment.yaml 1008 Bytes
Newer Older
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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: $CI_ENVIRONMENT_SLUG
  namespace: $KUBE_NAMESPACE
  labels:
    app: $CI_ENVIRONMENT_SLUG
    pipeline_id: "$CI_PIPELINE_ID"
    build_id: "$CI_BUILD_ID"
spec:
  replicas: $REPLICAS
  template:
    metadata:
      labels:
        name: $CI_ENVIRONMENT_SLUG
        app: $CI_ENVIRONMENT_SLUG
    spec:
      containers:
      - name: app
        image: $CI_REGISTRY_IMAGE:$CI_REGISTRY_TAG
        imagePullPolicy: Always
        ports:
        - containerPort: ${HTTP_PORT}
          name: web
        env:
        - name: OIC_REDIRECT_URI
          value: ${CI_ENVIRONMENT_URL}/
        - name: NODE_ENV
          value: 'production'
        livenessProbe:
          httpGet:
            path: /
            port: $HTTP_PORT
          initialDelaySeconds: 15
          timeoutSeconds: 15
        readinessProbe:
          httpGet:
            path: /
            port: $HTTP_PORT
          initialDelaySeconds: 5
          timeoutSeconds: 15