mirror of https://github.com/k3s-io/k3s
Merge remote-tracking branch 'upstream/master' into issue-112
commit
15d7b61939
|
@ -12,7 +12,7 @@ If you're interested in contributing documentation, please note the following:
|
|||
|
||||
## Developer Certificate Of Origin ##
|
||||
|
||||
To contribute to this project, you must agree to the Developer Certificate of Origin (DCO) for each commit you make. The DCO is a simple statement that you, as a contributor, have the legal rite to make the contribution.
|
||||
To contribute to this project, you must agree to the Developer Certificate of Origin (DCO) for each commit you make. The DCO is a simple statement that you, as a contributor, have the legal right to make the contribution.
|
||||
|
||||
See the [DCO](DCO) file for the full text of what you must agree to.
|
||||
|
||||
|
|
4
Makefile
4
Makefile
|
@ -29,3 +29,7 @@ generate: build/data
|
|||
|
||||
build/data:
|
||||
mkdir -p $@
|
||||
|
||||
.PHONY: binary-size-check
|
||||
binary-size-check:
|
||||
scripts/binary_size_check.sh
|
||||
|
|
|
@ -70,7 +70,7 @@ There are two major ways that K3s is lighter weight than upstream Kubernetes:
|
|||
1. The memory footprint to run it is smaller
|
||||
2. The binary, which contains all the non-containerized components needed to run a cluster, is smaller
|
||||
|
||||
The memory footprint is reduced primarily by running many components inside of single process. This eliminates significant overhead that would otherwise be duplicated for each component.
|
||||
The memory footprint is reduced primarily by running many components inside of a single process. This eliminates significant overhead that would otherwise be duplicated for each component.
|
||||
|
||||
The binary is smaller by removing third-party storage drivers and cloud providers, which is explained in more detail below.
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ package cmds
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/rancher/k3s/pkg/daemons/config"
|
||||
"github.com/rancher/k3s/pkg/version"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
@ -60,7 +59,7 @@ type Server struct {
|
|||
ClusterReset bool
|
||||
ClusterResetRestorePath string
|
||||
EncryptSecrets bool
|
||||
StartupHooks []func(context.Context, config.Control) error
|
||||
StartupHooks []func(context.Context, <-chan struct{}, string) error
|
||||
EtcdDisableSnapshots bool
|
||||
EtcdSnapshotDir string
|
||||
EtcdSnapshotCron string
|
||||
|
|
|
@ -61,7 +61,7 @@ func StartServer(ctx context.Context, config *Config) error {
|
|||
}
|
||||
|
||||
for _, hook := range config.StartupHooks {
|
||||
if err := hook(ctx, config.ControlConfig); err != nil {
|
||||
if err := hook(ctx, config.ControlConfig.Runtime.APIServerReady, config.ControlConfig.Runtime.KubeConfigAdmin); err != nil {
|
||||
return errors.Wrap(err, "startup hook")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,5 +12,5 @@ type Config struct {
|
|||
ControlConfig config.Control
|
||||
Rootless bool
|
||||
SupervisorPort int
|
||||
StartupHooks []func(context.Context, config.Control) error
|
||||
StartupHooks []func(context.Context, <-chan struct{}, string) error
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "${DEBUG}" = 1 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
MAX_BINARY_SIZE=61000000
|
||||
SIZE=$(ls -l dist/artifacts/k3s | awk -F ' ' '{print $5}')
|
||||
|
||||
if [ ${SIZE} -gt ${MAX_BINARY_SIZE} ]; then
|
||||
echo "k3s binary exceeds acceptable size of "${MAX_BINARY_SIZE}
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
|
@ -7,5 +7,7 @@ cd $(dirname $0)
|
|||
if [ -z "$SKIP_VALIDATE" ]; then
|
||||
./validate
|
||||
fi
|
||||
|
||||
./build
|
||||
./package
|
||||
./binary_size_check.sh
|
||||
|
|
Loading…
Reference in New Issue