End-to-end smoke surfaced two bugs that combine to nuke a fresh
instance:
1. ForceDeleteApplication was unreachable because Argo's HTTP PATCH
is gRPC-gateway-backed and requires a structured body
`{name, patch, patchType}` where patch is the merge-patch encoded
as a string. We were sending a raw merge-patch with `?type=merge`,
which Argo rejects with HTTP 500: `proto: required field
"patchType" not set`. Result: every instance-delete in history is
marked "failed" because force-delete fallback never worked.
2. handleCreateInstance only checked `applicationExists` for the
conflict guard. ArgoCD's cascade can take 5+ minutes to actually
tear down (PVC protection, dead customer cluster) — long enough
that applicationExists returns false but the cascade is STILL
running. If a fresh create lands in that window, the new App
takes the same name and the stale cascade clobbers it when it
finally finishes.
Fix #2: also reject create when an instance-delete op for the same
code is in pending/running state. Operator gets a clear "delete
still in progress — please wait" message instead of the silent
ten-minutes-later "instance vanished" failure.
Confirmed in production by op log:
10:28:46 instance-delete odoo16 (running 6 min, finally errored
out at 10:34:48 with the patchType marshal error)
10:29:59 instance-create odoo16 (succeeded at 10:30:02 — landed
inside the still-cascading window)
10:36:08 addon-apply odoo16 (failed: HTTP 403 — Argo App gone)
72 lines
2.0 KiB
YAML
72 lines
2.0 KiB
YAML
# admin-platform-v3 — Tower platform default values.
|
|
|
|
backend:
|
|
enabled: true
|
|
image:
|
|
# Tower images live alongside the Docker Hub mirror on
|
|
# gitlab.odoosky.cloud — separate path, same registry. Pulled with
|
|
# the docker-mirror-pull deploy token (read-only registry scope),
|
|
# so every cluster that runs Tower needs the same imagePullSecret
|
|
# provisioned out-of-band (until cluster-platform-v3 owns it).
|
|
repository: registry.odoosky.cloud/odoosky/docker-mirror/tower
|
|
tag: "0.61.11"
|
|
pullPolicy: IfNotPresent
|
|
imagePullSecrets:
|
|
- name: docker-mirror-pull
|
|
replicas: 1
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 64Mi
|
|
limits:
|
|
cpu: "1"
|
|
memory: 256Mi
|
|
persistence:
|
|
enabled: true
|
|
size: 1Gi
|
|
|
|
frontend:
|
|
enabled: true
|
|
image:
|
|
repository: registry.odoosky.cloud/odoosky/docker-mirror/tower-ui
|
|
tag: "0.61.10"
|
|
pullPolicy: IfNotPresent
|
|
imagePullSecrets:
|
|
- name: docker-mirror-pull
|
|
replicas: 1
|
|
resources:
|
|
requests:
|
|
cpu: 10m
|
|
memory: 16Mi
|
|
limits:
|
|
cpu: 250m
|
|
memory: 64Mi
|
|
|
|
# Tower needs to talk to:
|
|
# - Gitea (create tenant repos, commit values.yaml)
|
|
# - ArgoCD (apply Application manifests)
|
|
#
|
|
# The credentials live in a K8s Secret in the same namespace, populated
|
|
# from the ExistingSecret pattern (so they aren't checked into Git).
|
|
# In Step 5+ we replace this with External Secrets sourcing from
|
|
# OpenBao at vault.odoosky.org.
|
|
config:
|
|
giteaURL: https://git.odoosky.org
|
|
giteaOrg: odoo-tower
|
|
chartRepo: instance-template-v3
|
|
argoCDURL: https://argocd.odoosky.org
|
|
argoCDUsername: admin
|
|
argoCDDestination: https://kubernetes.default.svc
|
|
argoCDProject: default
|
|
argoCDNamespace: argocd
|
|
tenantNamespace: tenants
|
|
# The Secret name (in the same namespace as Tower) that holds
|
|
# GITEA_TOKEN and ARGOCD_PASSWORD keys. Created out-of-band before
|
|
# this chart is applied.
|
|
existingSecret: tower-credentials
|
|
|
|
ingress:
|
|
domain: tower.odoosky.org
|
|
certIssuer: letsencrypt-prod
|
|
entryPoint: websecure
|