arlon
arlon copied to clipboard
[Bug] Arlon Controller Fails to Create Socket for ArgoCD gRPC Proxy Client
Describe the bug
A gRPC proxy server is started by the ArgoCD API client if grpc-web-root-path
is set in the configuration which is passed: https://github.com/argoproj/argo-cd/blob/master/pkg/apiclient/apiclient.go#L496-L498
e.g.
❯ cat ~/.config/argocd/config
contexts:
- name: example
server: example.domain.tld
user: [email protected]
current-context: example
servers:
- grpc-web-root-path: argocd
server: example.domain.tld
...
The arlon-controller
pod will transition into a CrashLoopBackOff
once deployed as it tries to initialize the client, but, fails (due to a socket binding failure shown below). https://github.com/arlonproj/arlon/blob/58caaef5bf9e276e951fdc071b732df8eadd9a89/controllers/clusterregistration_controller.go#L112
❯ k get po
NAME READY STATUS RESTARTS AGE
arlon-controller-75ccb8dc5d-gtvdg 0/1 CrashLoopBackOff 7 13m
❯ k logs arlon-controller-75ccb8dc5d-dt4t8
time="2022-09-21T16:56:39Z" level=fatal msg="Failed to establish connection to example.domain.tld:443: listen unix /tmp/argocd-mMgptNUtlpbVjcHJ.sock: bind: read-only file system"
The issue is due to the "read-only file system" as called out in the error. The securityContext
will need to be modified to account for this edge-case.
Version Impacted: v0.9.9
To Reproduce
-
argocd login example.domain.tld --sso --grpc-web-root-path argocd
-
cp ${HOME}/.config/argocd/config /tmp/config
-
kubectl -n arlon create secret generic argocd-creds --from-file /tmp/config
-
kubectl apply -f deploy/manifests/deploy.yaml
Expected behavior
The arlon-controller
svc/pod would transition into a Ready
state after successfully establishing a connection to ArgoCD.