apiVersion: v1
kind: Pod
metadata:
  name: gke-workload-metrics
  labels:
    app: gke-workload-metrics
spec:
  containers:
  - name: gke-workload-metrics
    image: node:lts-alpine
    command: ["/bin/sh"]
    args:
      - -c
      - >
        apk add git
        && git clone https://github.com/edclement/gke-workload-metrics.git
        && cd gke-workload-metrics
        && npm install
        && npm start
    ports:
      - name: web
        containerPort: 3000
        protocol: TCP
    resources:
      requests:
        cpu: 500m
        memory: 512Mi
    livenessProbe:
      initialDelaySeconds: 60
      periodSeconds: 10
      httpGet:
        path: /health
        port: web
    readinessProbe:
      initialDelaySeconds: 60
      periodSeconds: 10
      httpGet:
        path: /health
        port: web
