Unverified Commit ba62c79f authored by Hussein Galal's avatar Hussein Galal Committed by GitHub

Update to v1.25.0-k3s1 (#6040)

parent 79bb7bcc
ARG GOLANG=golang:1.18.1-alpine3.15 ARG GOLANG=golang:1.19.0-alpine3.15
FROM ${GOLANG} FROM ${GOLANG}
ARG http_proxy=$http_proxy ARG http_proxy=$http_proxy
......
...@@ -83,7 +83,7 @@ func forkIfLoggingOrReaping() error { ...@@ -83,7 +83,7 @@ func forkIfLoggingOrReaping() error {
return nil return nil
} }
//reapChildren calls Wait4 whenever SIGCHLD is received // reapChildren calls Wait4 whenever SIGCHLD is received
func reapChildren() { func reapChildren() {
sigs := make(chan os.Signal, 1) sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGCHLD) signal.Notify(sigs, syscall.SIGCHLD)
......
...@@ -401,11 +401,13 @@ var _bindata = map[string]func() (*asset, error){ ...@@ -401,11 +401,13 @@ var _bindata = map[string]func() (*asset, error){
// directory embedded in the file by go-bindata. // directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the // For example if you run go-bindata on data/... and data contains the
// following hierarchy: // following hierarchy:
// data/ //
// foo.txt // data/
// img/ // foo.txt
// a.png // img/
// b.png // a.png
// b.png
//
// then AssetDir("data") would return []string{"foo.txt", "img"} // then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"} // AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error // AssetDir("foo.txt") and AssetDir("notexist") would return an error
......
...@@ -37,14 +37,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ ...@@ -37,14 +37,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
// AddToScheme adds all types of this clientset into the given scheme. This allows composition // AddToScheme adds all types of this clientset into the given scheme. This allows composition
// of clientsets, like in: // of clientsets, like in:
// //
// import ( // import (
// "k8s.io/client-go/kubernetes" // "k8s.io/client-go/kubernetes"
// clientsetscheme "k8s.io/client-go/kubernetes/scheme" // clientsetscheme "k8s.io/client-go/kubernetes/scheme"
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" // aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
// ) // )
// //
// kclientset, _ := kubernetes.NewForConfig(c) // kclientset, _ := kubernetes.NewForConfig(c)
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
// //
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
// correctly. // correctly.
......
...@@ -37,14 +37,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ ...@@ -37,14 +37,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
// AddToScheme adds all types of this clientset into the given scheme. This allows composition // AddToScheme adds all types of this clientset into the given scheme. This allows composition
// of clientsets, like in: // of clientsets, like in:
// //
// import ( // import (
// "k8s.io/client-go/kubernetes" // "k8s.io/client-go/kubernetes"
// clientsetscheme "k8s.io/client-go/kubernetes/scheme" // clientsetscheme "k8s.io/client-go/kubernetes/scheme"
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" // aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
// ) // )
// //
// kclientset, _ := kubernetes.NewForConfig(c) // kclientset, _ := kubernetes.NewForConfig(c)
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
// //
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
// correctly. // correctly.
......
...@@ -181,11 +181,13 @@ var _bindata = map[string]func() (*asset, error){ ...@@ -181,11 +181,13 @@ var _bindata = map[string]func() (*asset, error){
// directory embedded in the file by go-bindata. // directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the // For example if you run go-bindata on data/... and data contains the
// following hierarchy: // following hierarchy:
// data/ //
// foo.txt // data/
// img/ // foo.txt
// a.png // img/
// b.png // a.png
// b.png
//
// then AssetDir("data") would return []string{"foo.txt", "img"} // then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"} // AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error // AssetDir("foo.txt") and AssetDir("notexist") would return an error
......
...@@ -8,9 +8,9 @@ fi ...@@ -8,9 +8,9 @@ fi
. ./scripts/version.sh . ./scripts/version.sh
# Try to keep the K3s binary under 64 megabytes. # Try to keep the K3s binary under 70 megabytes.
# "64M ought to be enough for anybody" # "64M ought to be enough for anybody"
MAX_BINARY_MB=64 MAX_BINARY_MB=70
MAX_BINARY_SIZE=$((MAX_BINARY_MB * 1024 * 1024)) MAX_BINARY_SIZE=$((MAX_BINARY_MB * 1024 * 1024))
BIN_SUFFIX="-${ARCH}" BIN_SUFFIX="-${ARCH}"
if [ ${ARCH} = amd64 ]; then if [ ${ARCH} = amd64 ]; then
......
...@@ -73,9 +73,9 @@ func IsExistingServer() bool { ...@@ -73,9 +73,9 @@ func IsExistingServer() bool {
// K3sCmd launches the provided K3s command via exec. Command blocks until finished. // K3sCmd launches the provided K3s command via exec. Command blocks until finished.
// Command output from both Stderr and Stdout is provided via string. Input can // Command output from both Stderr and Stdout is provided via string. Input can
// be a single string with space separated args, or multiple string args // be a single string with space separated args, or multiple string args
// cmdEx1, err := K3sCmd("etcd-snapshot", "ls") // cmdEx1, err := K3sCmd("etcd-snapshot", "ls")
// cmdEx2, err := K3sCmd("kubectl get pods -A") // cmdEx2, err := K3sCmd("kubectl get pods -A")
// cmdEx2, err := K3sCmd("kubectl", "get", "pods", "-A") // cmdEx2, err := K3sCmd("kubectl", "get", "pods", "-A")
func K3sCmd(inputArgs ...string) (string, error) { func K3sCmd(inputArgs ...string) (string, error) {
if !IsRoot() { if !IsRoot() {
return "", errors.New("integration tests must be run as sudo/root") return "", errors.New("integration tests must be run as sudo/root")
......
...@@ -111,7 +111,7 @@ func RunCommand(cmd string) (string, error) { ...@@ -111,7 +111,7 @@ func RunCommand(cmd string) (string, error) {
return string(out), err return string(out), err
} }
//Used to count the pods using prefix passed in the list of pods // CountOfStringInSlice Used to count the pods using prefix passed in the list of pods
func CountOfStringInSlice(str string, pods []Pod) int { func CountOfStringInSlice(str string, pods []Pod) int {
count := 0 count := 0
for _, pod := range pods { for _, pod := range pods {
......
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