version: 1
kind: platform-infra-static-site

metadata:
  id: hwpod-home
  owner: pikainc

defaults:
  targetId: NC01

application:
  repository: pikainc/hwpod-home
  remote: https://github.com/pikainc/hwpod-home.git
  branch: main
  sourceRoot: /root/hwpod-home
  sourceConfigPath: config/hwpod-home.yaml
  dockerfile: Dockerfile

image:
  repository: 127.0.0.1:5000/hwpod/home
  pullPolicy: IfNotPresent

delivery:
  enabled: true
  pipeline:
    namespace: devops-infra
    name: platform-infra-hwpod-home-nc01-pac
    runPrefix: hwpod-home-nc01
    serviceAccountName: hwpod-home-nc01-tekton-runner
    timeout: 600s
    workspaceSize: 2Gi
    toolsImage: 127.0.0.1:5000/hwlab/hwlab-ci-node-tools:node22-alpine-bun-v1
    buildkitImage: 127.0.0.1:5000/hwlab/buildkit:rootless
    sourceSnapshotPrefix: refs/unidesk/snapshots/gitea-actions/hwpod-home-main-nc01
  build:
    networkMode: host
    proxy:
      http: http://127.0.0.1:10808
      https: http://127.0.0.1:10808
      all: http://127.0.0.1:10808
      noProxy:
        - localhost
        - 127.0.0.1
        - "::1"
        - 127.0.0.1:5000
        - localhost:5000
        - .svc
        - .svc.cluster.local
        - .cluster.local
        - hyueapi.com
        - .hyueapi.com
  gitops:
    readUrl: http://git-mirror-http.devops-infra.svc.cluster.local:8080/pikasTech/unidesk.git
    writeUrl: http://git-mirror-write.devops-infra.svc.cluster.local:8080/pikasTech/unidesk.git
    branch: unidesk-host-gitops
    manifestPath: deploy/gitops/platform-infra/hwpod-home-nc01/resources.yaml
    releaseStatePath: deploy/gitops-state/platform-infra/hwpod-home-nc01.json
    maxPushAttempts: 3
    author:
      name: UniDesk HWPOD Home CI
      email: hwpod-home-ci@unidesk.local
    application:
      name: hwpod-home-nc01
      namespace: argocd
      project: default
      path: deploy/gitops/platform-infra/hwpod-home-nc01
      destinationNamespace: hwpod-home
      automated: true

targets:
  - id: NC01
    route: NC01:k3s
    namespace: hwpod-home
    enabled: true
    replicas: 1
    publicExposures:
      apex:
        hostname: hwpod.com
        expectedA: 152.53.229.148
        upstream: http://127.0.0.1:32011
        healthPath: /healthz
      www:
        hostname: www.hwpod.com
        expectedA: 152.53.229.148
        upstream: http://127.0.0.1:32011
        healthPath: /healthz

runtime:
  deploymentName: hwpod-home
  serviceName: hwpod-home
  containerPort: 8080
  servicePort: 8080
  nodePort: 32011
  probes:
    healthPath: /healthz
    initialDelaySeconds: 3
    periodSeconds: 10
    timeoutSeconds: 3
    failureThreshold: 6
  resources:
    requests:
      cpu: 20m
      memory: 32Mi
    limits:
      cpu: 200m
      memory: 128Mi
