2020-11-16 16:40:18 +00:00
|
|
|
#! Copyright 2020 the Pinniped contributors. All Rights Reserved.
|
|
|
|
#! SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
#@ load("@ytt:data", "data")
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: proxy
|
|
|
|
namespace: dex
|
|
|
|
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
|
2020-12-17 23:41:13 +00:00
|
|
|
image: projects.registry.vmware.com/pinniped/test-forward-proxy
|
2020-11-16 16:40:18 +00:00
|
|
|
imagePullPolicy: Always
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
containerPort: 3128
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: "10m"
|
|
|
|
memory: "64Mi"
|
|
|
|
limits:
|
|
|
|
cpu: "10m"
|
|
|
|
memory: "64Mi"
|
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-02-10 21:56:56 +00:00
|
|
|
image: debian:10.8-slim
|
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
|
|
|
|
namespace: dex
|
|
|
|
labels:
|
|
|
|
app: proxy
|
|
|
|
spec:
|
|
|
|
type: NodePort
|
|
|
|
selector:
|
|
|
|
app: proxy
|
|
|
|
ports:
|
|
|
|
- port: 3128
|
|
|
|
nodePort: #@ data.values.ports.node
|