From 84677fe10d38aef23d25bbe1fe8c7df551b80c07 Mon Sep 17 00:00:00 2001 From: Sam Day Date: Tue, 2 Jul 2024 16:26:20 +0200 Subject: [PATCH] cluster/squid: yeet --- cluster/squid/config.yaml | 10 ---- cluster/squid/ingress.yaml | 24 --------- cluster/squid/namespace.yaml | 4 -- cluster/squid/service.yaml | 28 ----------- cluster/squid/statefulset.yaml | 91 ---------------------------------- 5 files changed, 157 deletions(-) delete mode 100644 cluster/squid/config.yaml delete mode 100644 cluster/squid/ingress.yaml delete mode 100644 cluster/squid/namespace.yaml delete mode 100644 cluster/squid/service.yaml delete mode 100644 cluster/squid/statefulset.yaml diff --git a/cluster/squid/config.yaml b/cluster/squid/config.yaml deleted file mode 100644 index dc47cc57..00000000 --- a/cluster/squid/config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: config - namespace: squid -data: - squid.conf: | - icp_port 3130 - icp_access allow localnet - cache_dir ufs /var/spool/squid 8192 16 256 diff --git a/cluster/squid/ingress.yaml b/cluster/squid/ingress.yaml deleted file mode 100644 index e9675456..00000000 --- a/cluster/squid/ingress.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: squid - namespace: squid - annotations: - nginx.ingress.kubernetes.io/proxy-body-size: "0" - cert-manager.io/cluster-issuer: letsencrypt -spec: - ingressClassName: nginx - rules: - - host: squid.samcday.com - http: - paths: - - backend: - service: - name: squid-public - port: - number: 3128 - path: / - pathType: Prefix - tls: - - hosts: [squid.samcday.com] - secretName: tls diff --git a/cluster/squid/namespace.yaml b/cluster/squid/namespace.yaml deleted file mode 100644 index 1a989211..00000000 --- a/cluster/squid/namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: squid diff --git a/cluster/squid/service.yaml b/cluster/squid/service.yaml deleted file mode 100644 index c4c6bd1f..00000000 --- a/cluster/squid/service.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: squid - namespace: squid -spec: - ports: - - port: 3128 - protocol: TCP - targetPort: 3128 - publishNotReadyAddresses: true - selector: - app.kubernetes.io/name: squid ---- -apiVersion: v1 -kind: Service -metadata: - name: squid-public - namespace: squid -spec: - loadBalancerClass: io.cilium/l2-announcer - ports: - - port: 3128 - protocol: TCP - targetPort: 3128 - selector: - app.kubernetes.io/name: squid - type: LoadBalancer diff --git a/cluster/squid/statefulset.yaml b/cluster/squid/statefulset.yaml deleted file mode 100644 index 0d55f15d..00000000 --- a/cluster/squid/statefulset.yaml +++ /dev/null @@ -1,91 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: squid - namespace: squid -spec: - replicas: 2 - selector: - matchLabels: - app.kubernetes.io/name: squid - serviceName: squid - template: - metadata: - labels: - app.kubernetes.io/name: squid - spec: - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchLabels: - app.kubernetes.io/name: squid - topologyKey: kubernetes.io/hostname - weight: 1 - initContainers: - - name: peers - image: alpine:3 - command: - - /bin/ash - - -c - - | - set -uexo pipefail - for n in $(seq 0 1); do - [[ "$n" -eq "$STSIDX" ]] && continue; - echo "cache_peer squid-${n}.squid.squid.svc.home-cluster.local. sibling 3128 3130 default" >> /peers/peers.conf - done - env: - - name: STSIDX - valueFrom: - fieldRef: - fieldPath: metadata.labels['apps.kubernetes.io/pod-index'] - volumeMounts: - - name: peers - mountPath: /peers - containers: - - name: squid - image: ubuntu/squid:6.6-24.04_beta - ports: - - containerPort: 3128 - name: squid - protocol: TCP - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - successThreshold: 1 - tcpSocket: - port: 3128 - timeoutSeconds: 1 - readinessProbe: - failureThreshold: 3 - periodSeconds: 10 - successThreshold: 1 - tcpSocket: - port: 3128 - timeoutSeconds: 1 - volumeMounts: - - name: config - mountPath: /etc/squid/conf.d/squid.conf - subPath: squid.conf - - name: peers - mountPath: /etc/squid/conf.d/peers.conf - subPath: peers.conf - - name: squid - mountPath: /var/spool/squid - securityContext: - fsGroup: 13 - volumes: - - name: config - configMap: - name: config - - name: peers - emptyDir: {} - volumeClaimTemplates: - - metadata: - name: squid - spec: - accessModes: [ReadWriteOnce] - resources: - requests: - storage: 10Gi