-
Notifications
You must be signed in to change notification settings - Fork 0
/
helmrelease.yaml
189 lines (185 loc) · 5.72 KB
/
helmrelease.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/app-template-3.6.0/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: esphome
namespace: esphome
spec:
chart:
spec:
chart: app-template
version: 3.6.0
reconcileStrategy: ChartVersion
sourceRef:
kind: HelmRepository
namespace: flux-system
name: bjw-s
interval: 1h
driftDetection:
mode: enabled
values:
defaultPodOptions:
affinity:
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
app.kubernetes.io/name: esphome
securityContext:
runAsNonRoot: true
runAsUser: 65534
runAsGroup: 65534
fsGroup: 65534
fsGroupChangePolicy: OnRootMismatch
seccompProfile: { type: RuntimeDefault }
controllers:
esphome:
containers:
app:
image:
repository: ghcr.io/esphome/esphome
tag: 2024.12.2@sha256:ce313b07edc3d0bde937ce23821b5e0476dcc1cfb62456bef7a6f79b8109f678
pullPolicy: IfNotPresent
env:
TZ: America/Chicago
# From https://github.com/ptr727/ESPHome-NonRoot
PLATFORMIO_CORE_DIR: /cache/pio
# ESPHome "build_path" option, default is "/config/.esphome/build/[project]"
ESPHOME_BUILD_PATH: /cache/build
# ESPHome "data_dir" option, default is "/config/.esphome"
ESPHOME_DATA_DIR: /cache/data
# Set pip cache directory, default is "~/.cache/pip"
PIP_CACHE_DIR: /cache/pip
probes:
startup:
enabled: true
spec:
failureThreshold: 30
periodSeconds: 5
liveness:
enabled: true
readiness:
enabled: true
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities: { drop: [ALL] }
pod:
annotations:
k8s.v1.cni.cncf.io/networks: ipvlan
terminationGracePeriodSeconds: 1
dnsConfig:
nameservers:
- 192.168.1.221
dnsPolicy: None
labels:
policy.gabe565.com/egress-adguard-dns: "true"
policy.gabe565.com/egress-world-with-lan: "true"
policy.gabe565.com/ingress-ingress: "true"
code:
containers:
app:
image:
repository: ghcr.io/coder/code-server
tag: 4.96.2@sha256:6b8c0e944caec80057e71d2c2f352cee38fe00ae4b7515fc4458eb300844f699
pullPolicy: IfNotPresent
args:
- --disable-telemetry
- --disable-update-check
- --auth=none
- --user-data-dir=/cache
- --extensions-dir=/cache
- /config
resources:
limits:
cpu: 500m
memory: 500Mi
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities: { drop: [ALL] }
pod:
labels:
policy.gabe565.com/egress-world: "true"
policy.gabe565.com/ingress-ingress: "true"
service:
esphome:
controller: esphome
ports:
http:
port: 6052
code:
controller: code
ports:
http:
port: 8080
persistence:
config:
enabled: true
storageClass: nfs-client
accessMode: ReadWriteMany
size: 8Gi
retain: true
cache:
enabled: true
storageClass: longhorn-ssd
accessMode: ReadWriteOnce
size: 8Gi
advancedMounts:
esphome:
app:
- path: /cache
subPath: esphome
code:
app:
- path: /cache
subPath: code
tmp:
enabled: true
type: emptyDir
globalMounts:
- path: /nonexistent
subPath: home
- path: /tmp
subPath: tmp
ingress:
esphome:
enabled: true
annotations:
nginx.ingress.kubernetes.io/auth-url: |-
http://ak-outpost-gabernetes.authentik.svc.cluster.local:9000/outpost.goauthentik.io/auth/nginx
nginx.ingress.kubernetes.io/auth-signin: |-
https://$host/outpost.goauthentik.io/start
nginx.ingress.kubernetes.io/auth-response-headers: |-
Set-Cookie,X-authentik-username,X-authentik-groups,X-authentik-email,X-authentik-name,X-authentik-uid
nginx.ingress.kubernetes.io/auth-snippet: |
proxy_set_header X-Forwarded-Host $http_host;
hosts:
- host: ${app_url}
paths:
- path: /
service:
identifier: esphome
port: http
tls:
- secretName: ${certificate_name}
hosts:
- ${app_url}
code:
enabled: true
annotations:
nginx.ingress.kubernetes.io/whitelist-source-range: "192.168.1.0/24,10.42.0.0/16"
hosts:
- host: ${code_url}
paths:
- path: /
service:
identifier: code
port: http
tls:
- secretName: ${certificate_name}
hosts:
- ${code_url}