-
Notifications
You must be signed in to change notification settings - Fork 0
/
pixiecore.yaml
93 lines (89 loc) · 2.53 KB
/
pixiecore.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
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: pixiecore
namespace: kube-system
spec:
chart:
spec:
chart: generic
sourceRef:
kind: HelmRepository
name: community-tooling-charts
namespace: flux-system
version: 7.7.0
interval: 1h
values:
# https://github.com/community-tooling/charts/blob/main/charts/generic/values.yaml
additionalContainers:
- name: api
image: alpine:3
command:
- ash
- -uexo
- pipefail
- -c
- |
apk add bash curl fcgiwrap jq nginx # sops
# 3.9.0 is quite new, is what ships the new (awesome) encrypted comment support
curl -sLo /usr/local/bin/sops https://github.com/getsops/sops/releases/download/v3.9.0/sops-v3.9.0.linux.amd64
chmod +x /usr/local/bin/sops
mkdir /ignition
for f in /butane/*.bu; do
name=$(basename $f)
cat $f
sops --input-type=yaml --output-type=yaml -d $f | chroot /host butane --strict > /ignition/${name/.bu}.ign
done
install -m755 /scripts/boot-request.sh /usr/local/bin/boot-request
install -m755 /scripts/generate-ignition.sh /usr/local/bin/generate-ignition
install -m644 /scripts/nginx.conf /etc/nginx/http.d/default.conf
fcgiwrap -s 'tcp:0.0.0.0:9000' &
nginx -g "daemon off;"
env:
- name: SOPS_AGE_KEY
valueFrom:
secretKeyRef:
name: ignition-key
key: age.agekey
volumeMounts:
- name: host
mountPath: /host
- name: butane
mountPath: /butane
- name: scripts
mountPath: /scripts
additionalVolumes:
- name: host
hostPath:
path: /
- name: butane
configMap:
name: butane
- name: scripts
configMap:
name: pixiecore-api-scripts
annotations:
reloader.stakater.com/auto: "true"
args:
- api
- http://localhost:38122
- --port
- '38123'
deploymentStrategy:
type: Recreate
envValueFrom:
hostNetwork: true
image:
repository: pixiecore/pixiecore
tag: master
livenessProbe:
httpGet: ~
nodeSelector:
node-role.kubernetes.io/control-plane: ""
ports:
readinessProbe: ~
replicaCount: 1
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists