apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: react-k8s-env-demo
  name: react-k8s-env-demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: react-k8s-env-demo
  template:
    metadata:
      labels:
        app: react-k8s-env-demo
    spec:
      containers:
        - name: react-k8s-env-demo-demo
          image: react-k8s-env-demo
          imagePullPolicy: Never
          ports:
            - containerPort: 3000
          livenessProbe:
            httpGet:
              path: /
              port: 3000
            initialDelaySeconds: 5
            timeoutSeconds: 20
          readinessProbe:
            httpGet:
              path: /
              port: 3000
          volumeMounts:
            - name: config
              mountPath: "/usr/share/nginx/html/config.js"
              subPath: "config.js"
      terminationGracePeriodSeconds: 10
      volumes:
        - name: config
          configMap:
            name: react-k8s-env-demo
            items:
              - key: "web.properties"
                path: "config.js"