apiVersion: apps/v1
kind: Deployment
metadata:
  name: httpserver
  labels:
    app: httpserver
spec:
  replicas: 2
  selector:
    matchLabels:
      app: httpserver
  template:
    metadata:
      labels:
        app: httpserver
    spec:
      containers:
      - name: httpserver
        image: httpserver:0.0.5
        ports:
        - containerPort: 80
          name: httpport
        readinessProbe:
          exec:
            command:
            - curl
            - http://localhost/healthcheck
            - --http0.9
          initialDelaySeconds: 10
          periodSeconds: 10
#        livenessProbe:
#          exec:
#            command:
#            - curl
#            - http://localhost/healthcheck --http0.9
#          initialDelaySeconds: 20
#          periodSeconds: 5
        securityContext:
          allowPrivilegeEscalation: false
