Tim's Piko Fork ( original repo )
Simply setup a development proxy for your team - based on the awesome oss piko - with just a helm chart!
Specify a single DNS record *.piko.example.com -> your k8s public IP
cd operations/helm
cp values-example.yaml values.yamlThen generate your admin secret: openssl rand -base64 32 and set auth.hmac.secret.
Then modify the other helm values to your needs:
tls.certManager.issuerName: Add your k8s certmanager name hereingress.baseDomain: Your main domain (e.g.,piko.example.com)ingress.users: Your users e.g.:[user1, user2]ingress.services: Your services per-user e.g.:[service1, service2, service2]
helm upgrade --install piko ./piko -f values.yaml -n pikoThis is miss-using Piko 'services' and assuming they belong to specific users This works cause the same token can be used to access multiple services.
A user always needs an apiToken, generate it via:
export HMAC_SECRET='your-secret-from-earlier-here'
./generate-token.sh user1This generates 2 tokens:
=== Upstream Token (for services connecting to Piko) ===
UPSTREAM_TOKEN=...
=== Proxy Token (for clients accessing services) ===
PROXY_TOKEN=...Download the Piko binary, then:
piko agent http user1 3000 \
--connect.url https://<service>.<user>.piko.example.com \
--connect.token "$UPSTREAM_TOKEN"Now you can access your development proxy if you provide the correc secruity header:
curl -H "Authorization: Bearer $PROXY_TOKEN" \
https://<service>.<user>.piko.example.com/NOTE: The requirement of the
PROXY_TOKENcan be removed by settingauth.proxy.enabledtofalse. BUT: this potentially opens your development proxies up to attacks, devlopment servers are rarely secure!