Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rkt: Replace the deprecated flag 'insecure-skip-verify' with 'insecure-options' #20174

Merged
merged 1 commit into from Feb 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/kubelet/kubelet.go
Expand Up @@ -366,9 +366,9 @@ func NewMainKubelet(
klet.pleg = pleg.NewGenericPLEG(klet.containerRuntime, plegChannelCapacity, plegRelistPeriod, nil)
case "rkt":
conf := &rkt.Config{
Path: rktPath,
Stage1Image: rktStage1Image,
InsecureSkipVerify: true,
Path: rktPath,
Stage1Image: rktStage1Image,
InsecureOptions: "image,ondisk",
}
rktRuntime, err := rkt.New(
conf,
Expand Down
10 changes: 6 additions & 4 deletions pkg/kubelet/rkt/config.go
Expand Up @@ -19,7 +19,8 @@ package rkt
import "fmt"

// 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 {
// The absolute path to the binary, or leave empty to find it in $PATH.
Path string
Expand All @@ -29,8 +30,9 @@ type Config struct {
Debug bool
// The rkt data directory.
Dir string
// This flag controls whether we skip image or key verification.
InsecureSkipVerify bool
// Comma-separated list of security features to disable.
// Allowed values: "none", "image", "tls", "ondisk", "http", "all".
InsecureOptions string
// The local config directory.
LocalConfigDir string
}
Expand All @@ -43,7 +45,7 @@ func (c *Config) buildGlobalOptions() []string {
}

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 != "" {
result = append(result, fmt.Sprintf("--local-config=%s", c.LocalConfigDir))
}
Expand Down