aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/squid
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/squid')
-rwxr-xr-xkubernetes/squid/deploy.sh4
-rw-r--r--kubernetes/squid/squid-configmap.yaml7
-rw-r--r--kubernetes/squid/squid-proxy-deployment.yaml36
3 files changed, 21 insertions, 26 deletions
diff --git a/kubernetes/squid/deploy.sh b/kubernetes/squid/deploy.sh
new file mode 100755
index 0000000..0ff1d92
--- /dev/null
+++ b/kubernetes/squid/deploy.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env sh
+
+kubectl create configmap squid-config-file --from-file=squid.conf
+kubectl apply -f ./squid-proxy-deployment.yaml
diff --git a/kubernetes/squid/squid-configmap.yaml b/kubernetes/squid/squid-configmap.yaml
deleted file mode 100644
index 8820f6d..0000000
--- a/kubernetes/squid/squid-configmap.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: squid-configmap
-data:
- pihole_tz: iran/tehran
- squid_config_vol: /etc/squid/
diff --git a/kubernetes/squid/squid-proxy-deployment.yaml b/kubernetes/squid/squid-proxy-deployment.yaml
index 1ef2c40..1fa2c4c 100644
--- a/kubernetes/squid/squid-proxy-deployment.yaml
+++ b/kubernetes/squid/squid-proxy-deployment.yaml
@@ -2,12 +2,12 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: squid
- lables:
+ labels:
app: squid
spec:
replicas: 1
- selctor:
- matchlabels:
+ selector:
+ matchLabels:
app: squid
template:
metadata:
@@ -16,21 +16,17 @@ spec:
spec:
containers:
- name: squid
- image: bloodstalker/squid:apline-5.0
+ image: b4tman/squid:5.2
ports:
- - containerPort: 80
- env:
- - name: TZ
- valueFrom:
- configMapKeyRef:
- name: squid-configmap
- key: pihole_tz
+ - containerPort: 80
+ volumeMounts:
+ - name: squid-conf
+ mountPath: /etc/squid/squid.conf
+ readOnly: true
volumes:
- - name: squid-config-volume
- valueFrom:
- configMapKeyRef:
- name: k3s-rpi-configmap
- key: squid_config_vol
+ - name: squid-conf
+ configMap:
+ name: squid-config-file
---
apiVersion: v1
kind: Service
@@ -39,13 +35,15 @@ metadata:
spec:
selector:
app: squid
- type: LoadBalancer
+ type: NodePort
ports:
- protocol: UDP
port: 80
targetPort: 80
- nodePort: 80
+ nodePort: 30880
+ name: "squid-udp-80"
- protocol: TCP
port: 80
targetPort: 80
- nodePort: 80
+ nodePort: 30880
+ name: "squid-tcp-80"