blob: 8f4541b018ebf1c0a45c56f5897791db60620dff [file] [log] [blame]
giolekva01b3d3b2021-11-09 17:48:28 +04001---
2apiVersion: v1
3kind: Service
4metadata:
5 name: pihole-oauth2-proxy
6 namespace: {{ .Release.Namespace }}
7spec:
8 type: ClusterIP
9 selector:
10 app: pihole-oauth2-proxy
11 ports:
12 - name: http
13 port: 80
14 targetPort: http
15 protocol: TCP
16---
17apiVersion: networking.k8s.io/v1
18kind: Ingress
19metadata:
20 name: ingress
21 namespace: {{ .Release.Namespace }}
22 annotations:
23 cert-manager.io/cluster-issuer: "{{ .Values.certificateIssuer }}"
24 acme.cert-manager.io/http01-edit-in-place: "true"
25spec:
26 ingressClassName: {{ .Values.ingressClassName }}
27 tls:
28 - hosts:
29 - pihole.{{ .Values.domain }}
30 secretName: cert-pihole.{{ .Values.domain }}
31 rules:
32 - host: pihole.{{ .Values.domain }}
33 http:
34 paths:
35 - path: /
36 pathType: Prefix
37 backend:
38 service:
39 name: pihole-oauth2-proxy
40 port:
41 name: http
42---
43apiVersion: apps/v1
44kind: Deployment
45metadata:
46 name: pihole-oauth2-proxy
47 namespace: {{ .Release.Namespace }}
48spec:
49 selector:
50 matchLabels:
51 app: pihole-oauth2-proxy
52 replicas: 1
53 template:
54 metadata:
55 labels:
56 app: pihole-oauth2-proxy
57 spec:
58 volumes:
59 - name: config
60 configMap:
61 name: {{ .Values.oauth2.configName }}
62 containers:
63 - name: pihole-oauth2-proxy
64 image: quay.io/oauth2-proxy/oauth2-proxy:v7.2.0-arm64
65 imagePullPolicy: Always
66 ports:
67 - name: http
68 containerPort: 8080
69 protocol: TCP
70 command:
71 - oauth2-proxy
72 - --config=/etc/oauth2-proxy/oauth2-proxy.cfg
73 volumeMounts:
74 - name: config
75 mountPath: /etc/oauth2-proxy
76 readOnly: true
77 resources:
78 requests:
79 memory: "10Mi"
80 cpu: "10m"
81 limits:
82 memory: "20Mi"
83 cpu: "100m"
84 tolerations:
85 - key: "pcloud"
86 operator: "Equal"
87 value: "role"
88 effect: "NoSchedule"