hunk.code_window:       working-directory: ./apps/electron
         with:
           timeout_minutes: 10
           max_attempts: 3
           retry_on: timeout
           command: yarn add @electron-forge/maker-dmg --dev
         env:
           HUSKY: '0'
           PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
           ELECTRON_SKIP_BINARY_DOWNLOAD: '1'
  
hunk.labels: keep replace replace replace replace replace keep keep keep keep
hunk.after_edit:       run: yarn add @electron-forge/maker-dmg --dev
  
hunk.file_path: .github/actions/setup-maker/action.yml
hunk.type: replace
file: apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: "{{ include "affine-cloud.fullname" . }}"
    labels:
      {{- include "affine-cloud.labels" . | nindent 4 }}
  spec:
    replicas: 1
    selector:
      matchLabels:
        {{- include "affine-cloud.selectorLabels" . | nindent 6 }}
    strategy:
      type: RollingUpdate
      rollingUpdate:
        maxUnavailable: 2
    template:
      metadata:
        labels:
          {{- include "affine-cloud.selectorLabels" . | nindent 8 }}
      spec:
        restartPolicy: Always
        containers:
        - name: affine-cloud
          image: "ghcr.io/toeverything/cloud-self-hosted:{{ .Values.affineCloud.tag | default .Chart.AppVersion }}"
          env:
          - name: PG_USER
            value: "{{ .Values.postgresql.auth.username }}"
          - name: PG_PASS
            value: "{{ .Values.postgresql.auth.password }}"
          - name: PG_DATABASE
            value: "{{ .Values.postgresql.auth.database }}"
          - name: PG_HOST
            value: "{{ .Values.postgresql.fullnameOverride | default (printf "%s-postgresql" .Release.Name) }}"
          - name: DATABASE_URL
            value: "{{ .Values.affineCloud.databaseUrl | default "postgresql://$(PG_USER):$(PG_PASS)@$(PG_HOST)/$(PG_DATABASE)" }}"
          envFrom:
          - secretRef:
              name: affine-cloud-secret
          ports:
          - containerPort: 3000
          livenessProbe:
            httpGet:
              path: /api/healthz
              port: 3000
            failureThreshold: 1
            initialDelaySeconds: 10
            periodSeconds: 10
          resources:
            limits:
              cpu: "{{ .Values.affineCloud.resources.cpu }}"
              memory: "{{ .Values.affineCloud.resources.memory }}"
  