apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: jupyterhub
    chart: jupyterhub-1.2.0
    component: proxy
    heritage: Helm
    release: RELEASE-NAME
  name: proxy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jupyterhub
      component: proxy
      release: RELEASE-NAME
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        checksum/auth-token: 48ba
        checksum/proxy-secret: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
      labels:
        app: jupyterhub
        component: proxy
        hub.jupyter.org/network-access-hub: "true"
        hub.jupyter.org/network-access-singleuser: "true"
        release: RELEASE-NAME
    spec:
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - preference:
              matchExpressions:
              - key: hub.jupyter.org/node-purpose
                operator: In
                values:
                - core
            weight: 100
      containers:
      - command:
        - configurable-http-proxy
        - --ip=
        - --api-ip=
        - --api-port=8001
        - --default-target=http://hub:$(HUB_SERVICE_PORT)
        - --error-target=http://hub:$(HUB_SERVICE_PORT)/hub/error
        - --port=8000
        env:
        - name: CONFIGPROXY_AUTH_TOKEN
          valueFrom:
            secretKeyRef:
              key: hub.config.ConfigurableHTTPProxy.auth_token
              name: hub
        image: jupyterhub/configurable-http-proxy:4.5.0
        livenessProbe:
          httpGet:
            path: /_chp_healthz
            port: http
            scheme: HTTP
          initialDelaySeconds: 60
          periodSeconds: 10
        name: chp
        ports:
        - containerPort: 8000
          name: http
        - containerPort: 8001
          name: api
        readinessProbe:
          httpGet:
            path: /_chp_healthz
            port: http
            scheme: HTTP
          initialDelaySeconds: 0
          periodSeconds: 2
        securityContext:
          allowPrivilegeEscalation: false
          runAsGroup: 65534
          runAsUser: 65534
      nodeSelector: {}
      terminationGracePeriodSeconds: 60
      tolerations:
      - effect: NoSchedule
        key: hub.jupyter.org/dedicated
        operator: Equal
        value: core
      - effect: NoSchedule
        key: hub.jupyter.org_dedicated
        operator: Equal
        value: core
