apiVersion: v1
kind: Service
metadata:
  labels:
    service: graphiql-server
    stack: graphiql-server
  name: graphiql-explorer
spec:
  ports:
    - name: webapp
      port: 80 
      targetPort: 80
  selector:
    service: graphiql-server
    stack: graphiql-server
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    service: graphiql-server
    stack: graphiql-server
  name: graphiql-server
spec:
  replicas: 1
  revisionHistoryLimit: 5
  selector:
    matchLabels:
      service: graphiql-server
      stack: graphiql-server
  template:
    metadata:
      labels:
        service: graphiql-server
        stack: graphiql-server
    spec:
      containers:
        - name: graphiql-server
          image: ghcr.io/guardian/concierge-graphql/graphiql-explorer:6
          ports:
            - containerPort: 80 
          readinessProbe:
            httpGet:
              path: /
              port: 80
            initialDelaySeconds: 2
            periodSeconds: 10
          livenessProbe:
            httpGet:
              path: /
              port: 80
            initialDelaySeconds: 5
            periodSeconds: 3
