Developing with a proxy for external queries to dogu container or helm registry
Component can mount a proxy stored in the ces-proxy secret.
To test this behaviour be sure to configure the proxy in the setup values of the setup's helm chart,
or create the secret manually by:
kubectl create secret generic ces-proxy --from-literal=url=http://test:test@192.168.56.1:3128 -n ecosystem
Setup local proxy in docker
Run container with host network mode to reach the development registry in the cluster if required.
docker run --net=host -d --name squid -e TZ=UTC -p 3128:3128 ubuntu/squid:5.2-22.04_beta
Configure auth and connection to dev registry
docker exec -it squid /bin/bashapt update && apt-get install -y apache2-utilshtpasswd -c -d /etc/squid/passwords testchmod o+r /etc/squid/passwordsapt-get install vimvi /etc/squid/conf.d/auth.conf-
acl allcomputers src all auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwords auth_param basic realm proxy acl authenticated proxy_auth REQUIRED http_access allow authenticated allcomputers
-
echo "localhost k3ces.local" >> /etc/hostssquid -k reconfigure
Check access logs
docker logs -f squid
Setup local proxy in k8s
1. Install squid proxy server
apiVersion: v1
kind: ConfigMap
metadata:
name: squid-auth-config
data:
auth.conf: |
acl allcomputers src all
http_access allow allcomputers
---
apiVersion: v1
kind: ConfigMap
metadata:
name: squid-hosts-config
data:
hosts: |
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
localhost ecosystem.svc.cluster.local
---
apiVersion: v1
kind: Pod
metadata:
name: squid-proxy
labels:
app: squid
spec:
containers:
- name: squid
image: ubuntu/squid:latest
ports:
- containerPort: 3128
name: proxy
protocol: TCP
volumeMounts:
- name: auth-config
mountPath: /etc/squid/conf.d/auth.conf
subPath: auth.conf
- name: hosts-config
mountPath: /etc/hosts
subPath: hosts
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
volumes:
- name: auth-config
configMap:
name: squid-auth-config
- name: hosts-config
configMap:
name: squid-hosts-config
---
apiVersion: v1
kind: Service
metadata:
name: squid-proxy-service
spec:
selector:
app: squid
ports:
- protocol: TCP
port: 3128
targetPort: 3128
type: ClusterIP2. Add proxy settings to global-config
proxy:
enabled: "true"
server: "squid-proxy-service.ecosystem.svc.cluster.local"
port: "3128"Last updated on 4/30/2026