2023-10-04 17:11:46 +00:00
|
|
|
#! Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
|
2020-11-16 16:40:18 +00:00
|
|
|
#! SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
#@ load("@ytt:data", "data")
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: proxy
|
2021-04-05 22:01:17 +00:00
|
|
|
namespace: tools
|
2020-11-16 16:40:18 +00:00
|
|
|
labels:
|
|
|
|
app: proxy
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: proxy
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: proxy
|
|
|
|
spec:
|
2020-12-03 17:28:48 +00:00
|
|
|
volumes:
|
|
|
|
- name: log-dir
|
|
|
|
emptyDir: {}
|
2020-11-16 16:40:18 +00:00
|
|
|
containers:
|
|
|
|
- name: proxy
|
2021-06-03 18:24:26 +00:00
|
|
|
image: #@ data.values.proxy_image
|
2021-07-21 14:17:24 +00:00
|
|
|
imagePullPolicy: IfNotPresent
|
2020-11-16 16:40:18 +00:00
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
containerPort: 3128
|
2020-12-03 17:28:48 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: log-dir
|
|
|
|
mountPath: "/var/log/squid/"
|
2020-11-16 16:40:18 +00:00
|
|
|
readinessProbe:
|
|
|
|
tcpSocket:
|
|
|
|
port: http
|
|
|
|
initialDelaySeconds: 5
|
|
|
|
timeoutSeconds: 5
|
|
|
|
periodSeconds: 5
|
|
|
|
failureThreshold: 2
|
2020-12-03 17:28:48 +00:00
|
|
|
- name: accesslogs
|
2021-06-03 18:24:26 +00:00
|
|
|
image: #@ data.values.proxy_image
|
2021-07-21 14:17:24 +00:00
|
|
|
imagePullPolicy: IfNotPresent
|
2020-12-03 17:28:48 +00:00
|
|
|
command:
|
|
|
|
- "/bin/sh"
|
|
|
|
- "-c"
|
|
|
|
args:
|
|
|
|
- tail -F /var/log/squid/access.log
|
|
|
|
volumeMounts:
|
|
|
|
- name: log-dir
|
|
|
|
mountPath: "/var/log/squid/"
|
2020-11-16 16:40:18 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: proxy
|
2021-04-05 22:01:17 +00:00
|
|
|
namespace: tools
|
2020-11-16 16:40:18 +00:00
|
|
|
labels:
|
|
|
|
app: proxy
|
|
|
|
spec:
|
|
|
|
type: NodePort
|
|
|
|
selector:
|
|
|
|
app: proxy
|
|
|
|
ports:
|
|
|
|
- port: 3128
|
2021-04-05 22:01:17 +00:00
|
|
|
nodePort: #@ data.values.ports.node
|