fix(argocd-pr-env-deploy): reach ArgoCD over the in-cluster Service (ENG-2079) - #59
Merged
Merged
Conversation
…ENG-2079)
PR-env deploys have been failing on:
rpc error: code = Unknown desc = POST
https://argo.dev.mindsdb.com/application.ApplicationService/Get
failed with status code 404
That is an HTTP 404 wrapped as gRPC `Unknown`, not an ArgoCD NotFound, so it
matches none of the tolerated states in the `app set` retry and fails the job.
The internal-ops cutover moved argo.dev.mindsdb.com to the private ingress class
before its private DNS record existed. The name still resolves through the
`*.dev.mindsdb.com` wildcard to the public ALB, whose controller no longer
reconciles that Ingress and answers its default 404. `dig` confirms the public
ALB is still the target.
Every caller of this action runs on `mdb-dev`, a runner pod inside the same
cluster as ArgoCD, so the public hostname was never the shortest path. Default
to the in-cluster Service instead. It depends on no ingress, no ALB and no DNS
record, so it is correct both today and after the cutover completes.
argocd-server runs with `server.insecure: true`, serving cleartext on Service
port 80 and expecting TLS to terminate at the ingress. `--plaintext` is
therefore required for the Service and wrong for the hostname. Rather than make
callers keep two inputs consistent, `argocd-plaintext: auto` derives the
transport from the endpoint; `true`/`false` still override it.
The five argocd call sites now share one resolved flag array instead of
repeating `--grpc-web`.
Refs: ENG-2079
mindsdb-devops
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User story
As an engineer with a
deploy-labelled PR, I want the environment rollout to reach ArgoCD without depending on ingress or DNS state, so that an ops-network cutover cannot take every repo's PR environments down with it.What is broken today
That is an HTTP 404 wrapped as gRPC
Unknown, not an ArgoCDNotFound, so it matches none of the tolerated states in theapp setretry loop and fails the job outright.The internal-ops cutover moved
argo.dev.mindsdb.comto the private ingress class before its private DNS record existed. The name still resolves through the*.dev.mindsdb.comwildcard to the public ALB, whose controller no longer reconciles that Ingress and returns its default 404. Confirmed:That is the public ALB.
The change
flowchart LR R["deploy-pr-env<br/>on mdb-dev<br/>(pod in newdev)"] R -->|"before"| DNS["argo.dev.mindsdb.com"] DNS --> PUB["public ALB"] --> NG["public nginx"] --> X["404"] R -->|"after"| SVC["argo-cd-argocd-server<br/>.argocd.svc.cluster.local:80"] SVC --> A["argocd-server"] style X fill:#c0392b,color:#fff style A fill:#1e8449,color:#fffEvery caller of this action runs on
mdb-dev, a runner pod in the same cluster as ArgoCD, so the public hostname was never the shortest path. The Service route depends on no ingress, no ALB and no DNS record, so it is correct both now and after the cutover finishes.argocd-plaintextis new and defaults toauto. argocd-server runs withserver.insecure: true, serving cleartext on Service port 80 and expecting TLS to terminate at the ingress, so--plaintextis required for the Service and wrong for the hostname. Deriving it fromargocd-servermeans the pair cannot drift;true/falsestill override.Acceptance criteria
argocd-plaintextfails loudly rather than silentlyVerified locally
pytest tests/ -qactionlint(as CI runs it)scripts/workflow_graph.py --allow-external-reusableshelm templateService name and portargo-cd-argocd-server, nsargocd, port 80 → 8080bogus::error::The Service name is render-verified, not guessed: the subchart sets
nameOverride: argocd, so the fullname isargo-cd-argocd, andargo-cd-server...would not resolve.Reviewer notes
internal_ops_dns_cutover.newdev_alband addargo.dev.mindsdb.comtohostsin the terraform repo. That is blocked on the internal ALB existing (terraform#188 is still open) and on AWS metadata I cannot read. Once it lands, this change stays correct but stops being load-bearing.ci-pr-envsJWT now crosses the pod network in cleartext instead of inside TLS, and NetworkPolicy enforcement is off in this cluster (--enable-network-policy=false). The internal ALB's allowlist already admits every pod in the cluster, so no control that was constraining this caller is removed, but the token is no longer wrapped. Say so if you want TLS kept and I will instead route through the ingress and gate this PR on the DNS apply.publish.ymlandprod-build-deploy.ymlsetbuild-runner: mdb-prodbut leavepr-environmentfalse, sodeploy-pr-envnever runs there.bash -non the extracted script fails identically onorigin/mainand on this branch. That is macOS bash 3.2, which cannot parse a pre-existingcasein theDeploys:parser; runners use bash 5.Ships with