Skip to content

Add new agent-ro user - #61

Merged
cjeanner merged 1 commit into
mainfrom
feat/agent-ro
Dec 4, 2026
Merged

cjeanner merged 1 commit into
mainfrom
feat/agent-ro

Conversation

@cjeanner

@cjeanner cjeanner commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Add new agent-ro user

This user can only access via the CLI, using an authentication token. It
has read-only accesses on the ArgoCD level.

The token can be retrieved like this:
```
oc get secret agent-ro-local-user \
        -n vp-gitops \
        -o jsonpath='{.data.apiToken}' | base64 -d
```

It can also be exposed as an environemnt var in a pod like this:
```
env:
  - name: ARGOCD_AUTH_TOKEN
    valueFrom:
      secretKeyRef:
        name: agent-ro-local-user
        key: apiToken
```

This is especially nice for OpenStack Assistant, for instance, or the
ArgoCD MCP.

@cjeanner cjeanner self-assigned this Dec 2, 2026
@cjeanner
cjeanner force-pushed the feat/agent-ro branch 3 times, most recently from f969cf9 to 4693f4e Compare December 2, 2026 13:34
@cjeanner

cjeanner commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator Author

I could successfully get the right rights with that change:

# Proof we're not authenticated
argocd app list --grpc-web
{"level":"fatal","msg":"rpc error: code = Unauthenticated desc = no session information","time":"2026-12-02T14:09:42Z"}

# Read-only action using the token
ARGOCD_AUTH_TOKEN=$(cat ~/agent-ro.token) argocd app list --grpc-web
NAME                               CLUSTER                         NAMESPACE          PROJECT                  STATUS  HEALTH       SYNCPOLICY  CONDITIONS  REPO                                                    PATH                                  TARGET
vp-gitops/openstack-controlplane   https://kubernetes.default.svc                     default                  Synced  Healthy      Auto        <none>      https://gitlab.cee.redhat.com/rhos-gitops/examples.git  environments/cifmw-demo/controlplane  main
[...]

# Try a mutating call (app sync)
ARGOCD_AUTH_TOKEN=$(cat ~/agent-ro.token) argocd --grpc-web app sync openstack-controlplane
{"level":"fatal","msg":"rpc error: code = PermissionDenied desc = permission denied: applications, sync, default/openstack-controlplane, sub: agent-ro, iat: 2026-12-02T14:05:47Z","time":"2026-12-02T14:11:10Z"}

@cjeanner
cjeanner marked this pull request as ready for review December 2, 2026 14:12
@cjeanner
cjeanner marked this pull request as draft December 3, 2026 08:26
cjeanner added a commit to openstack-k8s-operators/gitops that referenced this pull request Dec 3, 2026
We're enabling a read-only local user in ArgoCD[1]. This specific
`localUser` creates a secret in ArgoCD namespace (`vp-gitops` when
deploying via the rhoso-gitops validated pattern) we then can copy
into the `openstack` namespace via ESO directly.

Doing so, we enable the OpenStack Assistant as well as other pods to
access ArgoCD in a read-only fashion. This is especially interesting for
debugging, understanding the deployment, or to gather data for support.

[1] validatedpatterns/rhoso-gitops#61
This user can only access via the CLI, using an authentication token. It
has read-only accesses on the ArgoCD level.

The token can be retrieved like this:
```
oc get secret agent-ro-local-user \
	-n vp-gitops \
	-o jsonpath='{.data.apiToken}' | base64 -d
```

It can also be exposed as an environemnt var in a pod like this:
```
env:
  - name: ARGOCD_AUTH_TOKEN
    valueFrom:
      secretKeyRef:
        name: agent-ro-local-user
        key: apiToken
```

This is especially nice for OpenStack Assistant, for instance, or the
ArgoCD MCP.
cjeanner added a commit to openstack-k8s-operators/gitops that referenced this pull request Dec 3, 2026
We're enabling a read-only local user in ArgoCD[1]. This specific
`localUser` creates a secret in ArgoCD namespace (`vp-gitops` when
deploying via the rhoso-gitops validated pattern) we then can copy
into the `openstack` namespace via ESO directly.

Doing so, we enable the OpenStack Assistant as well as other pods to
access ArgoCD in a read-only fashion. This is especially interesting for
debugging, understanding the deployment, or to gather data for support.

We also add a new resource sync-wave to ensure deployment happens
properly.

[1] validatedpatterns/rhoso-gitops#61
@cjeanner
cjeanner marked this pull request as ready for review December 3, 2026 12:18
cjeanner added a commit to openstack-k8s-operators/gitops that referenced this pull request Dec 3, 2026
We're enabling a read-only local user in ArgoCD[1]. This specific
`localUser` creates a secret in ArgoCD namespace (`vp-gitops` when
deploying via the rhoso-gitops validated pattern) we then can copy
into the `openstack` namespace via ESO directly.

Doing so, we enable the OpenStack Assistant as well as other pods to
access ArgoCD in a read-only fashion. This is especially interesting for
debugging, understanding the deployment, or to gather data for support.

We also add a new resource sync-wave to ensure deployment happens
properly.

[1] validatedpatterns/rhoso-gitops#61
cjeanner added a commit to openstack-k8s-operators/gitops that referenced this pull request Dec 3, 2026
We're enabling a read-only local user in ArgoCD[1]. This specific
`localUser` creates a secret in ArgoCD namespace (`vp-gitops` when
deploying via the rhoso-gitops validated pattern) we then can copy
into the `openstack` namespace via ESO directly.

Doing so, we enable the OpenStack Assistant as well as other pods to
access ArgoCD in a read-only fashion. This is especially interesting for
debugging, understanding the deployment, or to gather data for support.

We also add a new resource sync-wave to ensure deployment happens
properly.

[1] validatedpatterns/rhoso-gitops#61
@cjeanner
cjeanner merged commit e68edd1 into main Dec 4, 2026
25 checks passed
@cjeanner
cjeanner deleted the feat/agent-ro branch December 4, 2026 07:34
cjeanner added a commit to openstack-k8s-operators/gitops that referenced this pull request Dec 4, 2026
We're enabling a read-only local user in ArgoCD[1]. This specific
`localUser` creates a secret in ArgoCD namespace (`vp-gitops` when
deploying via the rhoso-gitops validated pattern) we then can copy
into the `openstack` namespace via ESO directly.

Doing so, we enable the OpenStack Assistant as well as other pods to
access ArgoCD in a read-only fashion. This is especially interesting for
debugging, understanding the deployment, or to gather data for support.

We also add a new resource sync-wave to ensure deployment happens
properly.

[1] validatedpatterns/rhoso-gitops#61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants