mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
rkt: Replace the deprecated flag 'insecure-skip-verify' with 'insecure-options'.
This commit is contained in:
parent
2bc12a2a8e
commit
d03b705c5f
@ -366,9 +366,9 @@ func NewMainKubelet(
|
|||||||
klet.pleg = pleg.NewGenericPLEG(klet.containerRuntime, plegChannelCapacity, plegRelistPeriod, nil)
|
klet.pleg = pleg.NewGenericPLEG(klet.containerRuntime, plegChannelCapacity, plegRelistPeriod, nil)
|
||||||
case "rkt":
|
case "rkt":
|
||||||
conf := &rkt.Config{
|
conf := &rkt.Config{
|
||||||
Path: rktPath,
|
Path: rktPath,
|
||||||
Stage1Image: rktStage1Image,
|
Stage1Image: rktStage1Image,
|
||||||
InsecureSkipVerify: true,
|
InsecureOptions: "image,ondisk",
|
||||||
}
|
}
|
||||||
rktRuntime, err := rkt.New(
|
rktRuntime, err := rkt.New(
|
||||||
conf,
|
conf,
|
||||||
|
@ -19,7 +19,8 @@ package rkt
|
|||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
// Config stores the global configuration for the rkt runtime.
|
// Config stores the global configuration for the rkt runtime.
|
||||||
// Run 'rkt' for more details.
|
// Detailed documents can be found at:
|
||||||
|
// https://github.com/coreos/rkt/blob/master/Documentation/commands.md#global-options
|
||||||
type Config struct {
|
type Config struct {
|
||||||
// The absolute path to the binary, or leave empty to find it in $PATH.
|
// The absolute path to the binary, or leave empty to find it in $PATH.
|
||||||
Path string
|
Path string
|
||||||
@ -29,8 +30,9 @@ type Config struct {
|
|||||||
Debug bool
|
Debug bool
|
||||||
// The rkt data directory.
|
// The rkt data directory.
|
||||||
Dir string
|
Dir string
|
||||||
// This flag controls whether we skip image or key verification.
|
// Comma-separated list of security features to disable.
|
||||||
InsecureSkipVerify bool
|
// Allowed values: "none", "image", "tls", "ondisk", "http", "all".
|
||||||
|
InsecureOptions string
|
||||||
// The local config directory.
|
// The local config directory.
|
||||||
LocalConfigDir string
|
LocalConfigDir string
|
||||||
}
|
}
|
||||||
@ -43,7 +45,7 @@ func (c *Config) buildGlobalOptions() []string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
result = append(result, fmt.Sprintf("--debug=%v", c.Debug))
|
result = append(result, fmt.Sprintf("--debug=%v", c.Debug))
|
||||||
result = append(result, fmt.Sprintf("--insecure-skip-verify=%v", c.InsecureSkipVerify))
|
result = append(result, fmt.Sprintf("--insecure-options=%s", c.InsecureOptions))
|
||||||
if c.LocalConfigDir != "" {
|
if c.LocalConfigDir != "" {
|
||||||
result = append(result, fmt.Sprintf("--local-config=%s", c.LocalConfigDir))
|
result = append(result, fmt.Sprintf("--local-config=%s", c.LocalConfigDir))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user