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

Add support for --dns flag in Docker config #12789

Merged
merged 1 commit into from
Nov 24, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,11 @@ spec:
items:
type: string
type: array
dns:
description: DNS is the IP address of the DNS server
items:
type: string
type: array
execOpt:
description: ExecOpt is a series of options passed to the runtime
items:
Expand Down
12 changes: 12 additions & 0 deletions nodeup/pkg/model/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,18 @@ func TestDockerBuilder_BuildFlags(t *testing.T) {
kops.DockerConfig{InsecureRegistries: []string{"registry1", "registry2"}},
"--insecure-registry=registry1 --insecure-registry=registry2",
},
{
kops.DockerConfig{DNS: []string{}},
"",
},
{
kops.DockerConfig{DNS: []string{"8.8.4.4"}},
"--dns=8.8.4.4",
},
{
kops.DockerConfig{DNS: []string{"8.8.4.4", "8.8.8.8"}},
"--dns=8.8.4.4 --dns=8.8.8.8",
},
}

for _, g := range grid {
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/dockerconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ type DockerConfig struct {
DefaultUlimit []string `json:"defaultUlimit,omitempty" flag:"default-ulimit,repeat"`
// DefaultRuntime is the default OCI runtime for containers (default "runc")
DefaultRuntime *string `json:"defaultRuntime,omitempty" flag:"default-runtime"`
// DNS is the IP address of the DNS server
DNS []string `json:"dns,omitempty" flag:"dns,repeat"`
// ExecOpt is a series of options passed to the runtime
ExecOpt []string `json:"execOpt,omitempty" flag:"exec-opt,repeat"`
// ExecRoot is the root directory for execution state files (default "/var/run/docker")
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/dockerconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ type DockerConfig struct {
DefaultUlimit []string `json:"defaultUlimit,omitempty" flag:"default-ulimit,repeat"`
// DefaultRuntime is the default OCI runtime for containers (default "runc")
DefaultRuntime *string `json:"defaultRuntime,omitempty" flag:"default-runtime"`
// DNS is the IP address of the DNS server
DNS []string `json:"dns,omitempty" flag:"dns,repeat"`
// ExecOpt is a series of options passed to the runtime
ExecOpt []string `json:"execOpt,omitempty" flag:"exec-opt,repeat"`
// ExecRoot is the root directory for execution state files (default "/var/run/docker")
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha3/dockerconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ type DockerConfig struct {
DefaultUlimit []string `json:"defaultUlimit,omitempty" flag:"default-ulimit,repeat"`
// DefaultRuntime is the default OCI runtime for containers (default "runc")
DefaultRuntime *string `json:"defaultRuntime,omitempty" flag:"default-runtime"`
// DNS is the IP address of the DNS server
DNS []string `json:"dns,omitempty" flag:"dns,repeat"`
// ExecOpt is a series of options passed to the runtime
ExecOpt []string `json:"execOpt,omitempty" flag:"exec-opt,repeat"`
// ExecRoot is the root directory for execution state files (default "/var/run/docker")
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha3/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.