view deploy.yaml @ 24:03803832a087 default tip

add view definition for streamed-graph viewer
author drewp@bigasterisk.com
date Tue, 29 Mar 2022 21:17:56 -0700
parents b9fe6d26b3fa
children
line wrap: on
line source

apiVersion: apps/v1
kind: Deployment
metadata:
  name: reposync
spec:
  replicas: 1
  selector:
    matchLabels:
      app: reposync
  template:
    metadata:
      labels:
        app: reposync
    spec:
      containers:
        - name: view
          image: bang5:5000/reposync_image
          command:
            - pnpx
            - vite
            - --mode=dev
          ports:
            - containerPort: 3000
        - name: github-status
          image: bang5:5000/reposync_image
          ports:
            - containerPort: 8000
          command:
            - pipenv
            - run
            - python
            - repo_github_status.py
            # - "-v"
        - name: hg-status
          image: bang5:5000/reposync_image
          ports:
            - containerPort: 8001
          command:
            - pipenv
            - run
            - python
            - repo_local_status.py
            # - "-v"
          volumeMounts:
            - { name: my, mountPath: /my }

      volumes:
        - { name: my, persistentVolumeClaim: { claimName: my } }
      dnsConfig:
        options:
          - name: ndots
            value: "1"
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: "kubernetes.io/hostname"
                    operator: In
                    values: ["bang"]
---
apiVersion: v1
kind: Service
metadata:
  name: reposync
spec:
  ports:
    - { port: 80, targetPort: 3000, name: http }
    - { port: 8000, targetPort: 8000, name: localrepos }
    - { port: 8001, targetPort: 8001, name: githubrepos }
  selector:
    app: reposync