Unverified Commit f2bde63e authored by Derek Nola's avatar Derek Nola Committed by GitHub

Kubernetes v1.27.1 (#7271)

* Bump go version to 1.20.3 to match upstream * Bump cri-dockerd * Bump golanci-lint * go generate * Bump selinux in cgroup test * Bump to v1.27.1 tags * Release documentation improvements * Only run upgrade e2e test on PR Signed-off-by: 's avatarDerek Nola <derek.nola@suse.com> Signed-off-by: 's avatarBrad Davidson <brad.davidson@rancher.com> Co-authored-by: 's avatarBrad Davidson <brad.davidson@rancher.com>
parent 8d0255af
......@@ -746,8 +746,11 @@ steps:
- cd ../secretsencryption
- vagrant destroy -f
- go test -v -timeout=30m ./secretsencryption_test.go -ci -local
- cd ../upgradecluster
- E2E_RELEASE_CHANNEL="latest" go test -v -timeout=45m ./upgradecluster_test.go -ci -local
- |
if [ "$DRONE_BUILD_EVENT" = "pull_request" ]; then
cd ../upgradecluster
E2E_RELEASE_CHANNEL="latest" go test -v -timeout=45m ./upgradecluster_test.go -ci -local
fi
- docker stop registry && docker rm registry
volumes:
......
......@@ -39,7 +39,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.19.8'
go-version: '1.20.3'
check-latest: true
cache: true
cache-dependency-path: |
......
......@@ -41,7 +41,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.19.8'
go-version: '1.20.3'
check-latest: true
cache: true
cache-dependency-path: |
......
ARG GOLANG=golang:1.19.8-alpine3.17
ARG GOLANG=golang:1.20.3-alpine3.17
FROM ${GOLANG}
ARG http_proxy=$http_proxy
......@@ -37,7 +37,7 @@ RUN GOPROXY=direct go install golang.org/x/tools/cmd/goimports@gopls/v0.11.0
RUN rm -rf /go/src /go/pkg
RUN if [ "$(go env GOARCH)" = "amd64" ]; then \
curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/v1.51.2/install.sh | sh -s -- v1.51.2; \
curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.51.2; \
fi
ARG SELINUX=true
......
ARG GOLANG=golang:1.19.8-alpine3.17
ARG GOLANG=golang:1.20.3-alpine3.17
FROM ${GOLANG}
COPY --from=plugins/manifest:1.2.3 /bin/* /bin/
......
ARG GOLANG=golang:1.19.8-alpine3.17
ARG GOLANG=golang:1.20.3-alpine3.17
FROM ${GOLANG} as test-base
RUN apk -U --no-cache add bash jq
......
......@@ -2,7 +2,7 @@ package main
import (
"github.com/k3s-io/k3s/pkg/containerd"
"k8s.io/klog"
"k8s.io/klog/v2"
)
func main() {
......
# Generate Build Container
1. set env variable PATH_TO_KUBERNETES_REPO to the path to your local kubernetes/kubernetes copy: `export PATH_TO_KUBERNETES_REPO="/Users/mtrachier/go/src/github.com/kubernetes/kubernetes"`
1. set env variable GOVERSION to the expected version of go for the kubernetes/kubernetes version checked out: `export GOVERSION=$(yq -e '.dependencies[] | select(.name == "golang: upstream version").version' $PATH_TO_KUBERNETES_REPO/build/dependencies.yaml)`
1. set env variable GOIMAGE to the expected container image to base our custom build image on: `export GOIMAGE="golang:${GOVERSION}-alpine3.15"`
1. set env variable BUILD_CONTAINER to the contents of a dockerfile for the build container: `export BUILD_CONTAINER="FROM ${GOIMAGE}\nRUN apk add --no-cache bash git make tar gzip curl git coreutils rsync alpine-sdk"`
1. use Docker to create the build container: `echo -e $BUILD_CONTAINER | docker build -t ${GOIMAGE}-dev -`
1. set env variable PATH_TO_KUBERNETES_REPO to the path to your local kubernetes/kubernetes copy:
```
export GHUSER="mtrachier"
export PATH_TO_KUBERNETES_REPO="/Users/$GHUSER/go/src/github.com/kubernetes/kubernetes"
```
2. set env variable GOVERSION to the expected version of go for the kubernetes/kubernetes version checked out:
```
export GOVERSION=$(yq -e '.dependencies[] | select(.name == "golang: upstream version").version' $PATH_TO_KUBERNETES_REPO/build/dependencies.yaml)
```
3. set env variable GOIMAGE to the expected container image to base our custom build image on:
```
export GOIMAGE="golang:${GOVERSION}-alpine"
```
4. set env variable BUILD_CONTAINER to the contents of a dockerfile for the build container:
```
export BUILD_CONTAINER="FROM ${GOIMAGE}\nRUN apk add --no-cache bash gnupg git make tar gzip curl git coreutils rsync alpine-sdk"
```
5. use Docker to create the build container:
```
echo -e $BUILD_CONTAINER | docker build -t ${GOIMAGE}-dev -
```
......@@ -12,7 +12,6 @@
Example Full Command List (this is not a script!):
```
export SSH_MOUNT_PATH="/var/folders/...krzO/agent.452"
export GLOBAL_GITCONFIG_PATH="/Users/mtrachier/.gitconfig"
export GLOBAL_GIT_CONFIG_PATH="/Users/mtrachier/.gitconfig"
export OLD_K8S="v1.22.14"
export NEW_K8S="v1.22.15"
......
......@@ -22,29 +22,33 @@ This guide helps you navigate the creation of those variables.
1. search for the "golang: upstream version" stanza and the go version is the "version" in that stanza
1. example: https://github.com/kubernetes/kubernetes/blob/v1.25.1/build/dependencies.yaml#L90-L91
1. set GOIMAGE to the go version followed by the alpine container version
1. example: "golang:1.16.15-alpine3.15"
1. example: "golang:1.16.15-alpine"
1. the first part correlates to the go version in this example the GOVERSION would be '1.16.15'
1. the second part is usually the same "-alpine3.15"
1. the prefix the the dockerhub group where this image exists (golang)
1. the second part is usually the same "-alpine"
1. set BUILD_CONTAINER to the contents of a Dockerfile to build the "build container" for generating the tags
1. the FROM line is the GOIMAGE
1. the only other line is a RUN which adds a few utilities: "bash git make tar gzip curl git coreutils rsync alpine-sdk"
1. example: BUILD_CONTAINER="FROM golang:1.16.15-alpine3.15\n RUN apk add --no-cache bash git make tar gzip curl git coreutils rsync alpine-sdk"
1. example: BUILD_CONTAINER="FROM golang:1.16.15-alpine\n RUN apk add --no-cache bash git make tar gzip curl git coreutils rsync alpine-sdk"
1. I like to set this to a file and source it, it helps in case you need to set it again or to see what you did
1. example:
```
export SSH_MOUNT_PATH="/var/folders/m7/1d53xcj57d76n1qxv_ykgr040000gp/T//ssh-dmtrX2MOkrzO/agent.45422"
export GLOBAL_GITCONFIG_PATH="/Users/mtrachier/.gitconfig"
export GLOBAL_GIT_CONFIG_PATH="/Users/mtrachier/.gitconfig"
export OLD_K8S="v1.22.13"
export NEW_K8S="v1.22.14"
export OLD_K8S_CLIENT="v0.22.13"
export NEW_K8S_CLIENT="v0.22.14"
export OLD_K3S_VER="v1.22.13-k3s1"
export NEW_K3S_VER="v1.22.14-k3s1"
export RELEASE_BRANCH="release-1.22"
export GOPATH="/Users/mtrachier/go"
export GOVERSION="1.16.15"
export GOIMAGE="golang:1.16.15-alpine3.15"
export BUILD_CONTAINER="FROM golang:1.16.15-alpine3.15\n RUN apk add --no-cache bash git make tar gzip curl git coreutils rsync alpine-sdk"
```
\ No newline at end of file
export SSH_MOUNT_PATH="/var/folders/m7/1d53xcj57d76n1qxv_ykgr040000gp/T//ssh-dmtrX2MOkrzO/agent.45422"
export OLD_K8S="v1.22.13"
export NEW_K8S="v1.22.14"
export OLD_K8S_CLIENT="v0.22.13"
export NEW_K8S_CLIENT="v0.22.14"
export OLD_K3S_VER="v1.22.13-k3s1"
export NEW_K3S_VER="v1.22.14-k3s1"
export RELEASE_BRANCH="release-1.22"
export GOVERSION="1.16.15"
export GOIMAGE="golang:1.16.15-alpine"
# On Linux
export GLOBAL_GIT_CONFIG_PATH="$HOME/.gitconfig"
export GOPATH="$HOME/go"
# On Mac
export GLOBAL_GIT_CONFIG_PATH="/Users/mtrachier/.gitconfig"
export GOPATH="/Users/mtrachier/go"
export BUILD_CONTAINER="FROM golang:1.16.15-alpine\n RUN apk add --no-cache bash gnupg git make tar gzip curl git coreutils rsync alpine-sdk"
```
\ No newline at end of file
......@@ -2,20 +2,23 @@
1. run the tag.sh script
1. the tag.sh script is in the commits that exist in the k3s-io/kubernetes copy but not the kubernetes/kubernetes copy
1. when we fetched all from both copies to our local copy we got the tag.sh
1. when we rebased our local copy the tag.sh appears in HEAD
1. the tag.sh requires a strict env to run in, which is why we generated the build container
1. we can now run the tag.sh script in the docker container
1. `docker run --rm -u $(id -u) --mount type=tmpfs,destination=${GOPATH}/pkg -v ${GOPATH}/src:/go/src -v ${GOPATH}/.cache:/go/.cache -v ${GLOBAL_GIT_CONFIG_PATH}:/go/.gitconfig -e HOME=/go -e GOCACHE=/go/.cache -w /go/src/github.com/kubernetes/kubernetes ${GOIMAGE}-dev ./tag.sh ${NEW_K3S_VER} 2>&1 | tee tags-${NEW_K3S_VER}.log`
1. the tag.sh script builds a lot of binaries and creates a commit in your name
1. this can take a while, like 45min in my case
1. the tag.sh script creates a lot of tags in the local copy
1. the "push" output from the tag.sh is a list of commands to be run
1. you should review the commits and tags that the tag.sh creates
1. always review automated commits before pushing
1. build and run the push script
1. there is a lot of output, but only about half of it are git push commands, only copy the commands to build a "push" script
1. after pasting the push commands to a file, make the file executable
1. make sure you are able to push to the k3s-io/kubernetes repo, this is where you will be pushing the tags and commits
1. make sure to set the REMOTE env variable to "k3s-io" before running the script
1. the push script pushes up the tags and commits from your local copy to the k3s-io/kubernetes copy
\ No newline at end of file
2. when we fetched all from both copies to our local copy we got the tag.sh
3. when we rebased our local copy the tag.sh appears in HEAD
4. the tag.sh requires a strict env to run in, which is why we generated the build container
5. we can now run the tag.sh script in the docker container:
```
docker run --rm -u $(id -u) --mount type=tmpfs,destination=${GOPATH}/pkg -v ${GOPATH}/src:/go/src -v ${GOPATH}/.cache:/go/.cache -v ${GLOBAL_GIT_CONFIG_PATH}:/go/.gitconfig -v ${HOME}/.gnupg:/go/.gnupg -e HOME=/go -e GOCACHE=/go/.cache -w /go/src/github.com/kubernetes/kubernetes ${GOIMAGE}-dev ./tag.sh ${NEW_K3S_VER} 2>&1 | tee tags-${NEW_K3S_VER}.log
```
2. the tag.sh script builds a lot of binaries and creates a commit in your name
- this can take a while, like 45min in my case
3. the tag.sh script creates a lot of tags in the local copy
4. the "push" output from the tag.sh is a list of commands to be run. Always review the commits and tags that the tag.sh creates before pushing
5. build and run the push script
1. there is a lot of output, but only about half of it are git push commands, only copy the "git push" commands
2. after pasting the push commands to a file, make the file executable
3. make sure you are able to push to the k3s-io/kubernetes repo, this is where you will be pushing the tags and commits
4. Set the REMOTE env to k3s-io before running the script:
```
export REMOTE=k3s-io
```
5. Run the push script to add the tags from your local copy to the k3s-io/kubernetes copy
\ No newline at end of file
......@@ -50,7 +50,7 @@ git rebase --onto ${NEW_K8S} ${OLD_K8S} ${OLD_K3S_VER}~1
# This command is not backwards compatible and requires versions of yq greater than 4.0, as the query syntax has changed throughout the history of the project.
export GOVERSION=$(yq -e '.dependencies[] | select(.name == "golang: upstream version").version' build/dependencies.yaml)
export GOIMAGE="golang:${GOVERSION}-alpine3.16"
export GOIMAGE="golang:${GOVERSION}-alpine"
export BUILD_CONTAINER="FROM ${GOIMAGE}\n \
RUN apk add --no-cache \
......@@ -74,6 +74,7 @@ docker run --rm -u $(id -u) \
-v ${GOPATH}/src:/go/src \
-v ${GOPATH}/.cache:/go/.cache \
-v ${GLOBAL_GIT_CONFIG_PATH}:/go/.gitconfig \
-e GIT_TRACE=1 \
-e HOME=/go \
-e GOCACHE=/go/.cache \
-w /go/src/github.com/kubernetes/kubernetes ${GOIMAGE}-dev ./tag.sh ${NEW_K3S_VER} 2>&1 | tee ~/tags-${NEW_K3S_VER}.log
......@@ -131,8 +132,25 @@ sed -Ei "s/${OLD_K8S_CLIENT}/${NEW_K8S_CLIENT}/g" go.mod
# since drone perform the builds and tests for the updated tags we no longer need to run make locally.
# We now update the go.sum by running go mod tidy:
go mod tidy
git add go.mod go.sum
# Update the depdencies that we override to match upstream using the ecm-distro-tools script
curl -s https://raw.githubusercontent.com/rancher/ecm-distro-tools/master/bin/k3s_modsync.sh | sh -
```
## Validate that K3s builds
```sh
SKIP_VALIDATE=1 make
```
If you run into build issues, you may need to update other repos with forks of upstream components such as:
- https://github.com/k3s-io/klog
- https://github.com/k3s-io/cri-dockerd
- https://github.com/k3s-io/containerd
For these repos, you will need to build and push new tags and then update the go.mod with the new tags.
## Create a PR
```sh
git commit --all --signoff -m "Update to ${NEW_K8S}"
git push --set-upstream origin ${NEW_K3S_VER}
```
......
......@@ -25,7 +25,7 @@ import (
"os"
"strings"
"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/apiserver/pkg/authentication/authenticator"
"k8s.io/apiserver/pkg/authentication/user"
......
......@@ -80,7 +80,7 @@ func init() {
}
func (k *k3s) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{}) {
ctx, _ := wait.ContextForChannel(stop)
ctx := wait.ContextForChannel(stop)
config := clientBuilder.ConfigOrDie(controllerName)
k.client = kubernetes.NewForConfigOrDie(config)
......
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by main. DO NOT EDIT.
// This package has the automatically generated clientset.
package versioned
......@@ -21,10 +21,9 @@ package fake
import (
"context"
k3scattleiov1 "github.com/k3s-io/k3s/pkg/apis/k3s.cattle.io/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "github.com/k3s-io/k3s/pkg/apis/k3s.cattle.io/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
......@@ -36,25 +35,25 @@ type FakeAddons struct {
ns string
}
var addonsResource = schema.GroupVersionResource{Group: "k3s.cattle.io", Version: "v1", Resource: "addons"}
var addonsResource = v1.SchemeGroupVersion.WithResource("addons")
var addonsKind = schema.GroupVersionKind{Group: "k3s.cattle.io", Version: "v1", Kind: "Addon"}
var addonsKind = v1.SchemeGroupVersion.WithKind("Addon")
// Get takes name of the addon, and returns the corresponding addon object, and an error if there is any.
func (c *FakeAddons) Get(ctx context.Context, name string, options v1.GetOptions) (result *k3scattleiov1.Addon, err error) {
func (c *FakeAddons) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Addon, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(addonsResource, c.ns, name), &k3scattleiov1.Addon{})
Invokes(testing.NewGetAction(addonsResource, c.ns, name), &v1.Addon{})
if obj == nil {
return nil, err
}
return obj.(*k3scattleiov1.Addon), err
return obj.(*v1.Addon), err
}
// List takes label and field selectors, and returns the list of Addons that match those selectors.
func (c *FakeAddons) List(ctx context.Context, opts v1.ListOptions) (result *k3scattleiov1.AddonList, err error) {
func (c *FakeAddons) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AddonList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(addonsResource, addonsKind, c.ns, opts), &k3scattleiov1.AddonList{})
Invokes(testing.NewListAction(addonsResource, addonsKind, c.ns, opts), &v1.AddonList{})
if obj == nil {
return nil, err
......@@ -64,8 +63,8 @@ func (c *FakeAddons) List(ctx context.Context, opts v1.ListOptions) (result *k3s
if label == nil {
label = labels.Everything()
}
list := &k3scattleiov1.AddonList{ListMeta: obj.(*k3scattleiov1.AddonList).ListMeta}
for _, item := range obj.(*k3scattleiov1.AddonList).Items {
list := &v1.AddonList{ListMeta: obj.(*v1.AddonList).ListMeta}
for _, item := range obj.(*v1.AddonList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
......@@ -74,69 +73,69 @@ func (c *FakeAddons) List(ctx context.Context, opts v1.ListOptions) (result *k3s
}
// Watch returns a watch.Interface that watches the requested addons.
func (c *FakeAddons) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
func (c *FakeAddons) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(addonsResource, c.ns, opts))
}
// Create takes the representation of a addon and creates it. Returns the server's representation of the addon, and an error, if there is any.
func (c *FakeAddons) Create(ctx context.Context, addon *k3scattleiov1.Addon, opts v1.CreateOptions) (result *k3scattleiov1.Addon, err error) {
func (c *FakeAddons) Create(ctx context.Context, addon *v1.Addon, opts metav1.CreateOptions) (result *v1.Addon, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(addonsResource, c.ns, addon), &k3scattleiov1.Addon{})
Invokes(testing.NewCreateAction(addonsResource, c.ns, addon), &v1.Addon{})
if obj == nil {
return nil, err
}
return obj.(*k3scattleiov1.Addon), err
return obj.(*v1.Addon), err
}
// Update takes the representation of a addon and updates it. Returns the server's representation of the addon, and an error, if there is any.
func (c *FakeAddons) Update(ctx context.Context, addon *k3scattleiov1.Addon, opts v1.UpdateOptions) (result *k3scattleiov1.Addon, err error) {
func (c *FakeAddons) Update(ctx context.Context, addon *v1.Addon, opts metav1.UpdateOptions) (result *v1.Addon, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(addonsResource, c.ns, addon), &k3scattleiov1.Addon{})
Invokes(testing.NewUpdateAction(addonsResource, c.ns, addon), &v1.Addon{})
if obj == nil {
return nil, err
}
return obj.(*k3scattleiov1.Addon), err
return obj.(*v1.Addon), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeAddons) UpdateStatus(ctx context.Context, addon *k3scattleiov1.Addon, opts v1.UpdateOptions) (*k3scattleiov1.Addon, error) {
func (c *FakeAddons) UpdateStatus(ctx context.Context, addon *v1.Addon, opts metav1.UpdateOptions) (*v1.Addon, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(addonsResource, "status", c.ns, addon), &k3scattleiov1.Addon{})
Invokes(testing.NewUpdateSubresourceAction(addonsResource, "status", c.ns, addon), &v1.Addon{})
if obj == nil {
return nil, err
}
return obj.(*k3scattleiov1.Addon), err
return obj.(*v1.Addon), err
}
// Delete takes name of the addon and deletes it. Returns an error if one occurs.
func (c *FakeAddons) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
func (c *FakeAddons) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(addonsResource, c.ns, name, opts), &k3scattleiov1.Addon{})
Invokes(testing.NewDeleteActionWithOptions(addonsResource, c.ns, name, opts), &v1.Addon{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeAddons) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
func (c *FakeAddons) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
action := testing.NewDeleteCollectionAction(addonsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &k3scattleiov1.AddonList{})
_, err := c.Fake.Invokes(action, &v1.AddonList{})
return err
}
// Patch applies the patch and returns the patched addon.
func (c *FakeAddons) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *k3scattleiov1.Addon, err error) {
func (c *FakeAddons) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Addon, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(addonsResource, c.ns, name, pt, data, subresources...), &k3scattleiov1.Addon{})
Invokes(testing.NewPatchSubresourceAction(addonsResource, c.ns, name, pt, data, subresources...), &v1.Addon{})
if obj == nil {
return nil, err
}
return obj.(*k3scattleiov1.Addon), err
return obj.(*v1.Addon), err
}
......@@ -29,7 +29,7 @@ Vagrant.configure("2") do |config|
install -vm 755 /vagrant/k3s /usr/local/bin
# Install k3s SELinux policy
dnf install -y https://github.com/k3s-io/k3s-selinux/releases/download/v0.5.testing.2/k3s-selinux-0.5-2.el8.noarch.rpm
dnf install -y https://github.com/k3s-io/k3s-selinux/releases/download/v1.2.stable.2/k3s-selinux-1.2-2.el8.noarch.rpm
# Install k3s systemd service (not launched here)
install -vm 644 -T /home/vagrant/k3s-rootfull.service /etc/systemd/system/k3s-server.service
......@@ -37,7 +37,7 @@ Vagrant.configure("2") do |config|
systemctl daemon-reload
# Install sonobuoy binary
SONOBUOY_VER=0.56.15
SONOBUOY_VER=0.56.16
curl -fsSL https://github.com/vmware-tanzu/sonobuoy/releases/download/v"$SONOBUOY_VER"/sonobuoy_"$SONOBUOY_VER"_linux_amd64.tar.gz | tar xzvC /usr/local/bin sonobuoy
# [Rootless] Configure sysctl
......
......@@ -34,9 +34,7 @@ def provision(vm, role, role_num, node_num)
vm.provision "shell", path: "../scripts/latest_commit.sh", args: ["master", "/tmp/k3s_commits"]
install_type = "INSTALL_K3S_COMMIT=$(head\ -n\ 1\ /tmp/k3s_commits)"
else
vm.provision "latest version", type: "shell",
inline: "curl -w '%{url_effective}' -L -s -S https://update.k3s.io/v1-release/channels/#{RELEASE_CHANNEL} -o /dev/null | sed -e 's|.*/||' &> /tmp/k3s_version"
install_type = "INSTALL_K3S_VERSION=$(cat\ /tmp/k3s_version)"
install_type = "INSTALL_K3S_CHANNEL=#{RELEASE_CHANNEL}"
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment