diff --git a/packages/k8s/k0s/build.yaml b/packages/k8s/k0s/build.yaml new file mode 100644 index 000000000..34c86e3a5 --- /dev/null +++ b/packages/k8s/k0s/build.yaml @@ -0,0 +1,41 @@ +{{ if eq .Values.name "k0s-openrc" }} +image: "alpine" +{{ else }} +requires: +- name: "toolchain-go-ubuntu" + category: "development" + version: ">=0" +{{ end }} +env: + - K0S_VERSION=v{{ regexReplaceAll "\\+\\d+$" .Values.version "" }}+k0s.{{.Values.k0s_version}} +steps: + {{ if eq .Values.name "k0s-openrc" }} + - apk update + - apk add openrc curl upx + {{ else }} + - apt-get update && apt-get install -y systemctl + - mkdir -p /etc/systemd/system/ + # required by https://github.com/kardianos/service/blob/becf2eb62b83ed01f5e782cb8da7bb739ded2bb5/service_systemd_linux.go#L23 + - mkdir -p /run/systemd/system + {{ end }} + - curl -sfL https://get.k0s.sh > installer.sh + - sh installer.sh + - rm -rf installer.sh + - k0s install controller --single --debug --verbose + - chmod +x /usr/local/bin/k0s + - upx -1 /usr/local/bin/k0s + - mv /usr/local/bin/k0s /usr/bin/k0s + - ls -las /usr/bin/k0s + +includes: +- ^/usr/bin/k0s +{{ if eq .Values.name "k0s-openrc" }} +- ^/etc/init.d/$ +- ^/etc/init.d/k0s* +- ^/etc/k0s/$ +- ^/etc/k0s/k0s$ +{{ else }} +- ^/etc/systemd$ +- ^/etc/systemd/system$ +- ^/etc/systemd/system/k0s*.service$ +{{ end }} diff --git a/packages/k8s/k0s/collection.yaml b/packages/k8s/k0s/collection.yaml new file mode 100644 index 000000000..04a163200 --- /dev/null +++ b/packages/k8s/k0s/collection.yaml @@ -0,0 +1,79 @@ +packages: + - name: k0s-openrc + category: k8s + version: "1.31.3" + k0s_version: "0" + labels: + github.owner: "k0sproject" + github.repo: "k0s" + autobump.sed_script: 's/\+k0s.[0-9]//g' + autobump.skip_if_contains: '["k0s"]' # disable autobump + uri: + - https://github.com/k0sproject/k0s + license: "APL-2" + description: " The Zero Friction Kubernetes " + - name: k0s-openrc + category: k8s + version: "1.30.7" + k0s_version: "0" + labels: + github.owner: "k0sproject" + github.repo: "k0s" + autobump.sed_script: 's/\+k0s.[0-9]//g' + autobump.skip_if_contains: '["k0s"]' # disable autobump + uri: + - https://github.com/k0sproject/k0s + license: "APL-2" + description: " The Zero Friction Kubernetes " + - name: k0s-openrc + category: k8s + version: "1.29.11" + k0s_version: "0" + labels: + github.owner: "k0sproject" + github.repo: "k0s" + autobump.sed_script: 's/\+k0s.[0-9]//g' + autobump.skip_if_contains: '["k0s"]' # disable autobump + uri: + - https://github.com/k0sproject/k0s + license: "APL-2" + description: " The Zero Friction Kubernetes " + - name: k0s-systemd + category: k8s + version: "1.31.3" + k0s_version: "0" + labels: + github.owner: "k0sproject" + github.repo: "k0s" + autobump.sed_script: 's/\+k0s.[0-9]//g' + autobump.skip_if_contains: '["k0s"]' # disable autobump + uri: + - https://github.com/k0sproject/k0s + license: "APL-2" + description: " The Zero Friction Kubernetes " + - name: k0s-systemd + category: k8s + version: "1.30.7" + k0s_version: "0" + labels: + github.owner: "k0sproject" + github.repo: "k0s" + autobump.sed_script: 's/\+k0s.[0-9]//g' + autobump.skip_if_contains: '["k0s"]' # disable autobump + uri: + - https://github.com/k0sproject/k0s + license: "APL-2" + description: " The Zero Friction Kubernetes " + - name: k0s-systemd + category: k8s + version: "1.29.11" + k0s_version: "0" + labels: + github.owner: "k0sproject" + github.repo: "k0s" + autobump.sed_script: 's/\+k0s.[0-9]//g' + autobump.skip_if_contains: '["k0s"]' # disable autobump + uri: + - https://github.com/k0sproject/k0s + license: "APL-2" + description: " The Zero Friction Kubernetes " diff --git a/packages/static/kairos-overlay-files/collection.yaml b/packages/static/kairos-overlay-files/collection.yaml index f9545ee18..d000ddec3 100644 --- a/packages/static/kairos-overlay-files/collection.yaml +++ b/packages/static/kairos-overlay-files/collection.yaml @@ -1,4 +1,4 @@ packages: - name: "kairos-overlay-files" category: "static" - version: "1.6.3" + version: "1.6.4" diff --git a/packages/static/kairos-overlay-files/files/etc/systemd/system/k0scontroller.service.d/override.conf b/packages/static/kairos-overlay-files/files/etc/systemd/system/k0scontroller.service.d/override.conf new file mode 100644 index 000000000..14c3c0eb9 --- /dev/null +++ b/packages/static/kairos-overlay-files/files/etc/systemd/system/k0scontroller.service.d/override.conf @@ -0,0 +1,7 @@ +[Unit] +ConditionFileIsExecutable= +ConditionFileIsExecutable=/usr/bin/k0s + +[Service] +ExecStart= +ExecStart=/usr/bin/k0s controller --debug=true --single=true --verbose=true