apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  annotations:
    run.googleapis.com/ingress: all
    run.googleapis.com/ingress-status: all
    run.googleapis.com/maxScale: '3'
    run.googleapis.com/operation-id: f762270b-0668-4a12-b97a-ee1c632ecf68
    run.googleapis.com/urls: '["https://preview-accounts-svc-plus-266500572462.asia-northeast1.run.app","https://preview-accounts-svc-plus-pztvwzbmpq-an.a.run.app"]'
    serving.knative.dev/creator: haitaopanhq@gmail.com
    serving.knative.dev/lastModifier: haitaopanhq@gmail.com
  creationTimestamp: '2026-02-10T04:24:00.262049Z'
  generation: 1
  labels:
    cloud.googleapis.com/location: asia-northeast1
  name: preview-accounts-svc-plus
  namespace: '266500572462'
  resourceVersion: AAZKcKDLPaQ
  selfLink: /apis/serving.knative.dev/v1/namespaces/266500572462/services/preview-accounts-svc-plus
  uid: 9f3ef847-3927-429c-bde5-9d4d59da66bb
spec:
  template:
    metadata:
      annotations:
        autoscaling.knative.dev/maxScale: '1'
        run.googleapis.com/startup-cpu-boost: 'true'
      labels:
        run.googleapis.com/startupProbeType: Default
    spec:
      containerConcurrency: 80
      containers:
      - env:
        - name: CONFIG_TEMPLATE
          value: /app/config/account.cloudrun.yaml
        - name: PGADMIN_PASSWORD
          value: admin_password
        - name: DB_PASSWORD
          valueFrom:
            secretKeyRef:
              key: latest
              name: postgres-password
        - name: POSTGRES_PASSWORD
          valueFrom:
            secretKeyRef:
              key: latest
              name: postgres-password
        - name: DB_HOST
          value: 127.0.0.1
        - name: DB_PORT
          value: '15432'
        - name: DB_USER
          value: postgres
        - name: POSTGRES_USER
          value: postgres
        - name: DB_NAME
          value: account
        - name: INTERNAL_SERVICE_TOKEN
          valueFrom:
            secretKeyRef:
              key: latest
              name: internal-service-token
        - name: SMTP_HOST
          value: smtp.qq.com
        - name: SMTP_PORT
          value: '587'
        - name: SMTP_FROM
          value: XControl Account <manbuzhe2009@qq.com>
        - name: SMTP_USERNAME
          valueFrom:
            secretKeyRef:
              key: latest
              name: smtp-username
        - name: SMTP_PASSWORD
          valueFrom:
            secretKeyRef:
              key: latest
              name: smtp-password
        image: asia-northeast1-docker.pkg.dev/xzerolab-480008/cloud-run-source-deploy/accounts.svc.plus/preview-accounts-svc-plus:latest
        name: accounts-api
        ports:
        - containerPort: 8080
          name: http1
        resources:
          limits:
            cpu: 1000m
            memory: 512Mi
        startupProbe:
          failureThreshold: 1
          periodSeconds: 240
          tcpSocket:
            port: 8080
          timeoutSeconds: 240
      - command:
        - stunnel
        - /etc/stunnel/stunnel.conf
        image: dweomer/stunnel
        name: stunnel-sidecar
        resources:
          limits:
            cpu: 200m
            memory: 128Mi
        volumeMounts:
        - mountPath: /etc/stunnel
          name: stunnel-conf-vol
      serviceAccountName: 266500572462-compute@developer.gserviceaccount.com
      timeoutSeconds: 300
      volumes:
      - name: stunnel-conf-vol
        secret:
          items:
          - key: latest
            path: stunnel.conf
          secretName: stunnel-config
  traffic:
  - latestRevision: true
    percent: 100
status:
  address:
    url: https://preview-accounts-svc-plus-pztvwzbmpq-an.a.run.app
  conditions:
  - lastTransitionTime: '2026-02-10T04:24:14.730660Z'
    status: 'True'
    type: Ready
  - lastTransitionTime: '2026-02-10T04:24:07.936488Z'
    status: 'True'
    type: ConfigurationsReady
  - lastTransitionTime: '2026-02-10T04:24:14.703060Z'
    status: 'True'
    type: RoutesReady
  latestCreatedRevisionName: preview-accounts-svc-plus-00001-8k7
  latestReadyRevisionName: preview-accounts-svc-plus-00001-8k7
  observedGeneration: 1
  traffic:
  - latestRevision: true
    percent: 100
    revisionName: preview-accounts-svc-plus-00001-8k7
  url: https://preview-accounts-svc-plus-pztvwzbmpq-an.a.run.app
