apiVersion: apps/v1
kind: Deployment
metadata:
  name: sserve
spec:
  replicas: 1
  selector:
    matchLabels:
      name: sserve
  template:
    metadata:
      labels:
        name: sserve
    spec:
      containers:
      - name: sgetserve
        image: quay.io/merklecounty/rget
        imagePullPolicy: Always
        env:
        - name: PUBLIC_REPO
          value: "https://github.com/merklecounty/records"
        - name: PRIVATE_REPO
          value: "https://github.com/philips/rget-certificates"
        - name: GITHUB_USERNAME
          valueFrom:
            secretKeyRef:
              name: github
              key: username
        - name: GITHUB_PASSWORD
          valueFrom:
            secretKeyRef:
              name: github
              key: password
        command: ["/rget"]
        args: ["server", "$(PUBLIC_REPO)", "$(PRIVATE_REPO)"]
