openziti / sdk-golang

Ziti SDK for Golang
Apache License 2.0
100 stars 15 forks source link

example Reflect Server fails to load if identity file is symbolic link #186

Closed qrkourier closed 1 year ago

qrkourier commented 3 years ago

Kubernetes secrets are often symbolic links because of the way that files are "projected" into a configurable file path. This caused me to discover the Reflect server can't run in Kubernetes because it treats symlinks as a file not found.

# I modified the Dockerfile to run `ls -lA /identity/` which is the dir where the identity is mounted, and here we can see the symlink
reflect-server_1  | lrwxrwxrwx 1 appuser appgroup   49 Aug 11 21:23 KenReflectSrv1.json -> /home/kbingham/.ziti-edge-tunnel/Reflect1748.json
# reflect server --verbose --identity=/identity/KenReflectSrv1.json --serviceName="${SERVICE_NAME}"
reflect-server_1  | FATAL   failed to load ziti configuration file: config file (/identity/KenReflectSrv1.json) is not found  
qrkourier commented 2 years ago

Even better if the Reflect client and server apps got the Ziti identity from an env var named ZITI_IDENTITY_JSON like some of the others.

qrkourier commented 1 year ago

stale