-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
13 changed files
with
138 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,6 @@ discord_template_notifier: | |
|
||
volsync: | ||
enabled: true | ||
|
||
spegel: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
bootstrap/templates/kubernetes/apps/kube-system/spegel/app/helmrelease.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %# |
7 changes: 7 additions & 0 deletions
7
bootstrap/templates/kubernetes/apps/kube-system/spegel/app/kustomization.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %# |
22 changes: 22 additions & 0 deletions
22
bootstrap/templates/kubernetes/apps/kube-system/spegel/ks.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ resources: | |
- ./prometheus-community.yaml | ||
- ./stakater.yaml | ||
- ./weave-gitops.yaml | ||
- ./xenitab.yaml |
10 changes: 10 additions & 0 deletions
10
bootstrap/templates/kubernetes/flux/repositories/helm/xenitab.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
apiVersion: source.toolkit.fluxcd.io/v1beta2 | ||
kind: HelmRepository | ||
metadata: | ||
name: xenitab | ||
namespace: flux-system | ||
spec: | ||
type: oci | ||
interval: 5m | ||
url: oci://ghcr.io/xenitab/helm-charts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
bootstrap/templates/kubernetes/k0s/resources/containerd/spegel.toml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#% if bootstrap_distribution == 'k0s' and spegel.enabled | default(false) %# | ||
[plugins."io.containerd.grpc.v1.cri".containerd] | ||
discard_unpacked_layers = false | ||
[plugins."io.containerd.grpc.v1.cri".registry] | ||
config_path = "/var/lib/k0s/containerd/certs.d" | ||
#% endif %# |
5 changes: 5 additions & 0 deletions
5
bootstrap/templates/kubernetes/k0s/resources/containerd/unprivileged-ports.toml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#% if bootstrap_distribution == 'k0s' and spegel.enabled | default(false) %# | ||
[plugins."io.containerd.grpc.v1.cri"] | ||
enable_unprivileged_ports = true | ||
enable_unprivileged_icmp = true | ||
#% endif %# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters