feat: add spegel support for k0s (#1178)

* feat: add spegel support for k0s

Signed-off-by: Devin Buhl <devin@buhl.casa>

* chore: add spegel to e2e tests

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: update containerd file paths and run apply from k0s-config dir

Signed-off-by: Devin Buhl <devin@buhl.casa>

* fix: move containerd files after upload

Signed-off-by: Devin Buhl <devin@buhl.casa>

---------

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl authored and GitHub committed 2024-01-17 16:00:28 -05:00
1 parent edbcf28139
commit ca9d1818fc
13 files changed
+138 -13

No files matched your search

@@ -8,3 +8,6 @@ resources:
- ./coredns/ks.yaml
#% endif %#
- ./metrics-server/ks.yaml
#% if bootstrap_distribution == "k0s" and spegel.enabled | default(false) %#
- ./spegel/ks.yaml
#% endif %#
@@ -0,0 +1,37 @@
#% if bootstrap_distribution == "k0s" and spegel.enabled | default(false) %#
---
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: spegel
spec:
interval: 30m
chart:
spec:
chart: spegel
version: v0.0.17
sourceRef:
kind: HelmRepository
name: xenitab
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
values:
spegel:
#% if bootstrap_distribution == "k0s" %#
containerdSock: /run/k0s/containerd.sock
containerdRegistryConfigPath: /var/lib/k0s/containerd/certs.d
#% endif %#
service:
registry:
hostPort: 29999
serviceMonitor:
enabled: true
#% endif %#
@@ -0,0 +1,7 @@
#% if bootstrap_distribution == "k0s" and spegel.enabled | default(false) %#
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
#% endif %#
@@ -0,0 +1,22 @@
#% if bootstrap_distribution == "k0s" and spegel.enabled | default(false) %#
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app spegel
namespace: flux-system
spec:
targetNamespace: kube-system
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/kube-system/spegel/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m
#% endif %#