mirror of
https://github.com/kairos-io/provider-k3s.git
synced 2025-10-21 13:38:38 +00:00
fixed arch builds and k3s not starting on openrc
This commit is contained in:
7
.github/workflows/publish.yaml
vendored
7
.github/workflows/publish.yaml
vendored
@@ -20,9 +20,6 @@ jobs:
|
|||||||
- v1.23.9+k3s1
|
- v1.23.9+k3s1
|
||||||
- v1.22.11+k3s2
|
- v1.22.11+k3s2
|
||||||
- v1.21.14+k3s1
|
- v1.21.14+k3s1
|
||||||
platform:
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm64
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: quay.io
|
REGISTRY: quay.io
|
||||||
REGISTRY_USER: ${{ secrets.QUAY_USERNAME }}
|
REGISTRY_USER: ${{ secrets.QUAY_USERNAME }}
|
||||||
@@ -36,6 +33,6 @@ jobs:
|
|||||||
- run: echo $REGISTRY_PASSWORD | docker login -u $REGISTRY_USER --password-stdin $REGISTRY
|
- run: echo $REGISTRY_PASSWORD | docker login -u $REGISTRY_USER --password-stdin $REGISTRY
|
||||||
- run: env | grep ACTIONS_ID_TOKEN_REQUEST > .env
|
- run: env | grep ACTIONS_ID_TOKEN_REQUEST > .env
|
||||||
- run: env | grep REGISTRY >> .env
|
- run: env | grep REGISTRY >> .env
|
||||||
- run: earthly --ci --push --platform=${{ matrix.platform }} +docker --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }}
|
- run: earthly --ci --push +docker-all-platforms --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }}
|
||||||
- run: earthly --ci +cosign --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }}
|
- run: earthly --ci +cosign-all-platforms --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }}
|
||||||
|
|
||||||
|
5
.github/workflows/pull_request.yaml
vendored
5
.github/workflows/pull_request.yaml
vendored
@@ -33,13 +33,10 @@ jobs:
|
|||||||
- v1.23.9+k3s1
|
- v1.23.9+k3s1
|
||||||
- v1.22.11+k3s2
|
- v1.22.11+k3s2
|
||||||
- v1.21.14+k3s1
|
- v1.21.14+k3s1
|
||||||
platform:
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm64
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: docker-practice/actions-setup-docker@master
|
- uses: docker-practice/actions-setup-docker@master
|
||||||
- uses: earthly/actions-setup@v1
|
- uses: earthly/actions-setup@v1
|
||||||
with:
|
with:
|
||||||
version: "latest"
|
version: "latest"
|
||||||
- run: earthly --ci --platform=${{ matrix.platform }} +docker --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }}
|
- run: earthly --ci +docker-all-platforms --K3S_VERSION=${{ matrix.k3s-version }} --BASE_IMAGE=${{ matrix.base-image }}
|
||||||
|
16
Earthfile
16
Earthfile
@@ -49,10 +49,6 @@ VERSION:
|
|||||||
|
|
||||||
SAVE ARTIFACT VERSION VERSION
|
SAVE ARTIFACT VERSION VERSION
|
||||||
|
|
||||||
build-provider:
|
|
||||||
FROM +go-deps
|
|
||||||
DO +BUILD_GOLANG --BIN=agent-provider-k3s --SRC=main.go
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
FROM golang:$GOLANG_VERSION
|
FROM golang:$GOLANG_VERSION
|
||||||
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $GOLINT_VERSION
|
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $GOLINT_VERSION
|
||||||
@@ -60,6 +56,10 @@ lint:
|
|||||||
COPY . .
|
COPY . .
|
||||||
RUN golangci-lint run
|
RUN golangci-lint run
|
||||||
|
|
||||||
|
build-provider:
|
||||||
|
FROM +go-deps
|
||||||
|
DO +BUILD_GOLANG --BIN=agent-provider-k3s --SRC=main.go
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
DO +VERSION
|
DO +VERSION
|
||||||
ARG VERSION=$(cat VERSION)
|
ARG VERSION=$(cat VERSION)
|
||||||
@@ -118,3 +118,11 @@ cosign:
|
|||||||
RUN cosign sign $IMAGE_REPOSITORY/${BASE_IMAGE_NAME}-k3s:${BASE_IMAGE_TAG}
|
RUN cosign sign $IMAGE_REPOSITORY/${BASE_IMAGE_NAME}-k3s:${BASE_IMAGE_TAG}
|
||||||
RUN cosign sign $IMAGE_REPOSITORY/${BASE_IMAGE_NAME}-k3s:${BASE_IMAGE_TAG}_${K3S_VERSION_TAG}
|
RUN cosign sign $IMAGE_REPOSITORY/${BASE_IMAGE_NAME}-k3s:${BASE_IMAGE_TAG}_${K3S_VERSION_TAG}
|
||||||
RUN cosign sign $IMAGE_REPOSITORY/${BASE_IMAGE_NAME}-k3s:${BASE_IMAGE_TAG}_${K3S_VERSION_TAG}_${VERSION}
|
RUN cosign sign $IMAGE_REPOSITORY/${BASE_IMAGE_NAME}-k3s:${BASE_IMAGE_TAG}_${K3S_VERSION_TAG}_${VERSION}
|
||||||
|
|
||||||
|
docker-all-platforms:
|
||||||
|
BUILD --platform=linux/amd64 +docker
|
||||||
|
BUILD --platform=linux/arm64 +docker
|
||||||
|
|
||||||
|
cosign-all-platforms:
|
||||||
|
BUILD --platform=linux/amd64 +cosign
|
||||||
|
BUILD --platform=linux/arm64 +cosign
|
||||||
|
1
main.go
1
main.go
@@ -83,6 +83,7 @@ func clusterProvider(cluster clusterplugin.Cluster) yip.YipConfig {
|
|||||||
If: "[ -x /sbin/openrc-run ]",
|
If: "[ -x /sbin/openrc-run ]",
|
||||||
Commands: []string{
|
Commands: []string{
|
||||||
fmt.Sprintf("rc-update add %s default >/dev/null", systemName),
|
fmt.Sprintf("rc-update add %s default >/dev/null", systemName),
|
||||||
|
fmt.Sprintf("service %s start", systemName),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user