Create osbuilder consumable bundles

This commit is contained in:
Ettore Di Giacinto 2022-11-27 14:33:42 +00:00
parent db3f68ed57
commit fe7905688e
6 changed files with 53 additions and 33 deletions

View File

@ -0,0 +1,23 @@
{{ if eq .Values.init "systemd" }}
image: golang:1.18
prelude:
- apt-get update
- apt-get install -y git curl systemd
{{ else }}
image: golang:1.18-alpine
prelude:
- apk add git curl openrc
{{ end }}
- curl -sfL https://get.k3s.io > installer.sh
steps:
- bash installer.sh
- bash installer.sh agent
- mkdir -p /etc/rancher/k3s/ && touch /etc/rancher/k3s/.keep
exclude:
- etc/rancher/k3s/k3s.env
- etc/rancher/k3s/k3s-agent.env
env:
- INSTALL_K3S_VERSION={{.Values.version}}
- INSTALL_K3S_SKIP_START="true"
- INSTALL_K3S_SKIP_ENABLE="true"

View File

@ -0,0 +1,9 @@
packages:
- name: "k3s-systemd"
category: "osbuilder-bundles"
version: "v1.21.14+k3s1"
init: systemd
- name: "k3s-openrc"
category: "osbuilder-bundles"
version: "v1.21.14+k3s1"
init: openrc

View File

@ -1,26 +0,0 @@
{{ if eq .Values.init "systemd" }}
image: golang:1.18
prelude:
- apt-get update
- apt-get install -y git curl systemd
{{ else }}
image: golang:1.18-alpine
prelude:
- apk add git curl openrc
{{ end }}
- git clone https://github.com/c3os-io/provider-c3os
- cd provider-c3os && git checkout {{.Values.tag}}
- curl -sfL https://get.k3s.io > installer.sh
steps:
- cd provider-c3os && go build -o agent-provider-c3os ./
- mv provider-c3os/agent-provider-c3os /usr/local/bin
- bash installer.sh
- bash installer.sh agent
{{ if ne .Values.init "systemd" }}
- rm -rf /etc/rancher/k3s/k3s.env /etc/rancher/k3s/k3s-agent.env && touch /etc/rancher/k3s/.keep
{{end}}
env:
- INSTALL_K3S_VERSION={{.Values.k3s_version}}
- INSTALL_K3S_SKIP_START="true"
- INSTALL_K3S_SKIP_ENABLE="true"

View File

@ -1,7 +0,0 @@
packages:
- name: "provider-kairos"
category: "bundles"
k3s_version: "v1.21.14+k3s1"
version: "0.0.1-alpha2+k3s1.21.14"
tag: "v0.0.1-alpha2"
init: systemd

View File

@ -0,0 +1,17 @@
{{ if eq .Values.init "systemd" }}
image: golang:1.18
prelude:
- apt-get update
- apt-get install -y git
{{ else }}
image: golang:1.18-alpine
prelude:
- apk add git
{{ end }}
- git clone https://github.com/kairos-io/provider-kairos
- PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && \
cd provider-kairos && git checkout $PACKAGE_VERSION
steps:
- cd provider-kairos && go build -o agent-provider-kairos ./
- mv provider-kairos/agent-provider-kairos /system/providers/agent-provider-kairos
- ln -s /system/providers/agent-provider-kairos /usr/bin/kairos

View File

@ -0,0 +1,4 @@
packages:
- name: "provider-kairos"
category: "bundles"
tag: "v1.2.0"