argo-watcher

by shini4i

Helm chartv1.4.5App v1.5.2Verified publisher

A Helm chart for deploying argo-watcher

About this chart

argo-watcher

A Helm chart for deploying argo-watcher

Maintainers

NameEmailUrl
Vadim Gedz[email protected]https://github.com/shini4i

Source Code

Requirements

Kubernetes: >=1.21.0-0

Quick start

helm repo add shini4i https://shini4i.github.io/charts/
helm repo update
helm install argo-watcher shini4i/argo-watcher -f values.yaml

The chart deploys the argo-watcher server as a StatefulSet. The REST API your CI client talks to and the Web UI are served on the same port, so one Ingress covers both:

argo:
  url: https://argocd.argocd.svc.cluster.local
  secretName: argo-watcher
ingress:
  enabled: true
  hosts:
    - host: argo-watcher.example.com
      paths:
        - path: /
          pathType: ImplementationSpecific

Point the CI client (ghcr.io/shini4i/argo-watcher-client) at that host through ARGO_WATCHER_URL; the upstream installation guide has GitLab CI and GitHub Actions examples.

networkPolicies.enabled: true denies ingress to the pods and then allows the release namespace back in, so an Ingress in front of it needs a networkPolicies.additionalRules entry for the controller's own namespace.

The Argo CD secret

The chart creates no secrets. Create one yourself and name it in argo.secretName — it is mounted with envFrom, so every key in it becomes an environment variable:

KeyPurpose
ARGO_TOKENArgo CD API token. Required; the server refuses to start without it.
ARGO_WATCHER_DEPLOY_TOKENShared token the CI client presents. Optional, planned for deprecation upstream.
JWT_SECRETHMAC key for signing client JWTs — the recommended alternative to the deploy token.

A dedicated Argo CD account with get and sync on applications */* is enough for the token:

argocd account generate-token --account watcher

State backend

postgres.enabled: false, the default, keeps task history in the process. It is single-replica only — the chart refuses to render with replicaCount > 1 — and the history, along with any manually set deploy lock, is lost on every restart.

For a persistent, multi-replica install, point the chart at an existing PostgreSQL database:

postgres:
  enabled: true
  host: postgres.example.svc.cluster.local
  name: argo-watcher
  user: argo-watcher
  secretName: argo-watcher-postgres

The secret is consumed like the Argo CD one: with postgres.secretKey unset the whole secret is loaded through envFrom and must contain DB_PASSWORD; set postgres.secretKey to map a differently named key onto it instead.

argo-watcher connects with sslmode=disable unless told otherwise. A database that rejects plaintext connections — a Zalando postgres-operator cluster, whose pg_hba ends in hostnossl all all all reject, for one — needs postgres.sslMode set:

postgres:
  sslMode: require

The value reaches both the server and the migration Job. require encrypts but accepts any certificate; only verify-ca and verify-full authenticate the server. Without postgres.sslRootCert they check it against the image's trust store.

For a database signed by a private CA, mount the CA into both pods and point postgres.sslRootCert at it. The chart renders it as PGSSLROOTCERT:

postgres:
  sslMode: verify-full
  sslRootCert: /etc/postgres-ca/ca.crt
extraVolumes: &postgresCaVolumes
  - name: postgres-ca
    secret:
      secretName: postgres-ca
extraVolumeMounts: &postgresCaMounts
  - name: postgres-ca
    mountPath: /etc/postgres-ca
    readOnly: true
migration:
  extraVolumes: *postgresCaVolumes
  extraVolumeMounts: *postgresCaMounts

The migration Job runs as a pre-install/pre-upgrade hook, so the CA secret must exist before the release is installed or upgraded.

Migrations need no manual step. The chart schedules a pre-install/pre-upgrade hook Job that runs argo-watcher --migrate with the same image and database credentials, so helm upgrade applies new migrations before the new pods start.

GitOps updater

Setting updater.sshSecretName enables argo-watcher's built-in image tag updater, which commits to your GitOps repository instead of relying on Argo CD Image Updater. It needs three things:

  • A secret holding the private SSH key under updater.sshKey (sshPrivateKey by default), authorised to write to the GitOps repository.
  • A client credential — ARGO_WATCHER_DEPLOY_TOKEN or JWT_SECRET in the Argo CD secret above. Tasks submitted without one are still tracked, but never trigger a write-back.
  • Annotations on the Argo CD Application that say which images to update and where to write the tag; see the upstream GitOps updater guide.

Known hosts for GitHub, GitLab, Bitbucket and Azure DevOps ship with the chart. updater.extraKnownHosts appends to them; updater.knownHostsConfigMap replaces them with a ConfigMap of your own.

The persistent volume backs the updater's git clone cache (REPO_CACHE_PATH, default /data). persistence.mountPath moves the mount but not the cache path, so if you change it, set REPO_CACHE_PATH through extraEnvs to match. With the updater unused, persistence.enabled: false swaps the volume for a tmpfs emptyDir.

Authentication and the deploy lock

The oidc.* values map onto the server's OIDC_* variables; issuerUrl and clientId are required when oidc.enabled is true and the chart fails the render without them. Enabling OIDC closes the reads the Web UI consumes (/api/v1/tasks, /version, /reachability, GET /deploy-lock); the endpoints the CI client uses stay open, so no pipeline breaks.

Three settings on the provider decide whether it works:

  • Redirect URI — the application's base URL, including the trailing slash. A mismatch fails the login on the provider's own error page.
  • Web origin — the application's origin, so the browser's cross-origin userinfo request is allowed. Keycloak has a separate Web origins field.
  • groups claim — emitted in the userinfo response under a scope argo-watcher requests (profile or email).

The last two fail quietly: sign-in succeeds while the redeploy button and deploy-lock toggle stay hidden. The upstream OIDC guide covers all three per provider.

oidc.tokenValidationInterval defaults to 10 s here, against the server's own 5 min. That is one userinfo call per token per interval, so raise it if your provider is remote or rate-limited.

Recurring maintenance windows are set with scheduledLockdown and need no authentication. Locking deployments manually from the Web UI does require OIDC: without an auth backend the server never registers the lock endpoints.

MCP server

Setting mcp.enabled: true deploys argo-watcher-mcp, which exposes argo-watcher's read-only API as Model Context Protocol tools so AI agents can ask what was deployed, when, by whom, and whether it succeeded. Upstream describes the project as a proof of concept.

It runs as its own Deployment, not a sidecar, so its image and configuration change without restarting argo-watcher. mcp.image.tag is pinned independently of the chart appVersion, which tracks argo-watcher itself. The get_reachability tool needs argo-watcher v0.13.0 or newer.

[!IMPORTANT] The MCP server does not work with oidc.enabled: true. As of argo-watcher v0.15.0 the reads its tools depend on require a credential when OIDC is on, and argo-watcher-mcp v0.3.0 sends none — every tool gets a 401.

Exposing the MCP server

[!WARNING] argo-watcher-mcp performs no authentication and no authorization. Every request is anonymous, there is no token support and no per-tool permission model. Anything that can reach the endpoint can read every deployment's application, image tags, author, timestamp and outcome, the deploy-lock state, and an allowlisted subset of the instance configuration.

The server cannot create deployments or change the deploy lock, so the exposure is disclosure and request load, not tampering. It strips user:password@ credentials from URL-valued config fields, but forwards ARGO_URL_ALIAS and DOCKER_IMAGES_PROXY as argo-watcher reports them.

Port-forward — nothing is exposed. Enough for a developer workstation and the recommended default:

kubectl --namespace <namespace> port-forward svc/<release>-argo-watcher-mcp 8000:80

Then point the MCP client at http://localhost:8000.

In-cluster only. An agent running in another namespace reaches the endpoint without any Ingress. With networkPolicies.enabled: true, grant that namespace access explicitly:

networkPolicies:
  enabled: true
mcp:
  enabled: true
  networkPolicies:
    additionalRules:
      - namespaceSelector:
          matchLabels:
            kubernetes.io/metadata.name: my-agent-namespace

mcp.networkPolicies.additionalRules is deliberately separate from networkPolicies.additionalRules, and the MCP pods carry their own app.kubernetes.io/name label, so widening access to the MCP endpoint cannot also widen access to the argo-watcher API.

Ingress, behind an authenticating proxy. Since the endpoint authenticates nobody, the proxy in front of it is the only access control. Terminate authentication there — for example with oauth2-proxy or your ingress controller's external-auth support:

mcp:
  enabled: true
  ingress:
    enabled: true
    className: nginx
    annotations:
      nginx.ingress.kubernetes.io/auth-url: "https://oauth2-proxy.example.com/oauth2/auth"
      nginx.ingress.kubernetes.io/auth-signin: "https://oauth2-proxy.example.com/oauth2/start?rd=$escaped_request_uri"
    hosts:
      - host: argo-watcher-mcp.example.com
        paths:
          - path: /
            pathType: Prefix
    tls:
      - secretName: argo-watcher-mcp-tls
        hosts:
          - argo-watcher-mcp.example.com

With networkPolicies.enabled: true, the ingress controller also needs an mcp.networkPolicies.additionalRules entry for its own namespace. Without one the deny-by-default policy drops its traffic and the Ingress returns 502 with nothing pointing at the NetworkPolicy as the cause.

Two transport details to check against your proxy: the MCP endpoint is mounted at /, so it cannot share a host with another backend without a path prefix, and its streamable transport holds a long-lived server-sent-events stream open, which a proxy that buffers responses or applies a short read timeout will break.

Metrics

The MCP server serves Prometheus metrics on /metrics on the same port as the MCP endpoint itself. Set mcp.podMonitor.enabled: true to scrape it. OpenTelemetry export is configured through mcp.extraEnvs using the upstream OTEL_* variables.

Because the two share a port, a NetworkPolicy rule that lets a monitoring namespace scrape /metrics also lets it call every MCP tool. The argo-watcher PodMonitor has the same property.

Values

KeyTypeDefaultDescription
affinityobject{}
argo.apiTimeoutint60How long to wait for argocd api to respond
argo.refreshAppbooltrueIf argo-watcher should refresh app during check to make ArgoCD detect changes faster
argo.registryProxyUrlstring""argo-watcher will assume that image can be mutated and will use this value while checking app status
argo.secretNamestring""Pre-created secret with ARGO_TOKEN variable and optional ARGO_WATCHER_DEPLOY_TOKEN
argo.skipTlsVerifyboolfalseIf ssl verification should be skipped
argo.timeoutint300How long to wait for deployment to be finished
argo.urlstring"https://argocd.example.com"
argo.urlAliasstring""An alias that will be used to generate url for ArgoCD app
extraEnvslist[]Additional environment variables to add to the container (supports both value and valueFrom)
extraVolumeMountslist[]Additional volume mounts for the argo-watcher container
extraVolumeslist[]Additional volumes for the argo-watcher pod, e.g. a private database CA. The names data, tmp, ssh-key and known-hosts are taken by the chart.
fullnameOverridestring""
image.pullPolicystring"IfNotPresent"
image.repositorystring"ghcr.io/shini4i/argo-watcher"
image.tagstring""
imagePullSecretslist[]
ingress.annotationsobject{}
ingress.classNamestring""
ingress.enabledboolfalse
ingress.hosts[0].hoststring"chart-example.local"
ingress.hosts[0].paths[0].pathstring"/"
ingress.hosts[0].paths[0].pathTypestring"ImplementationSpecific"
ingress.tlslist[]
livenessProbeobject{"enabled":true,"failureThreshold":3,"initialDelaySeconds":5,"path":"/livez","periodSeconds":30,"timeoutSeconds":5}Liveness probe configuration. /livez checks no dependency.
logLevelstring"info"
mcp.affinityobject{}
mcp.enabledboolfalseDeploy t

Deploy argo-watcher with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has argo-watcher on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartargo-watcher is pinned at v1.4.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply