apiVersion: apps/v1
kind: Deployment
metadata:
  name: ghss-website
spec:
  selector:
    matchLabels:
      app: ghss-website
  replicas: 1
  template:
    metadata:
      labels:
        app: ghss-website
    spec:
      containers:
        - name: website
          image: frigus02/ghss-website
          env:
            - name: HOST
              value: https://github-status-stats.kuehle.me
            - name: GH_CLIENT_ID
              valueFrom:
                secretKeyRef:
                  name: ghss-github
                  key: CLIENT_ID
            - name: GH_CLIENT_SECRET
              valueFrom:
                secretKeyRef:
                  name: ghss-github
                  key: CLIENT_SECRET
            - name: GH_WEBHOOK_SECRET
              valueFrom:
                secretKeyRef:
                  name: ghss-github
                  key: WEBHOOK_SECRET
            - name: STORE_URL
              value: http://ghss-store:50051
            - name: TOKEN_SECRET
              valueFrom:
                secretKeyRef:
                  name: ghss-website
                  key: TOKEN_SECRET
            - name: OTEL_AGENT_ENDPOINT
              value: ghss-otel-collector:6831
          ports:
            - containerPort: 8888
          readinessProbe:
            httpGet:
              path: /
              port: 8888
          resources:
            requests:
              cpu: 50m
              memory: 50Mi
            limits:
              cpu: 200m
              memory: 200Mi
