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

Docker is case sensitive about networks #2288

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
4 changes: 2 additions & 2 deletions docs/content/en/schemas/v1beta10.json
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,8 @@
},
"network": {
"type": "string",
"description": "passed through to docker and overrides the network configuration of docker builder. If unset, use whatever is configured in the underlying docker daemon. Valid modes are `Host`: use the host's networking stack. `Bridge`: use the bridged network configuration. `None`: no networking in the container.",
"x-intellij-html-description": "passed through to docker and overrides the network configuration of docker builder. If unset, use whatever is configured in the underlying docker daemon. Valid modes are <code>Host</code>: use the host's networking stack. <code>Bridge</code>: use the bridged network configuration. <code>None</code>: no networking in the container."
"description": "passed through to docker and overrides the network configuration of docker builder. If unset, use whatever is configured in the underlying docker daemon. Valid modes are `host`: use the host's networking stack. `bridge`: use the bridged network configuration. `none`: no networking in the container.",
"x-intellij-html-description": "passed through to docker and overrides the network configuration of docker builder. If unset, use whatever is configured in the underlying docker daemon. Valid modes are <code>host</code>: use the host's networking stack. <code>bridge</code>: use the bridged network configuration. <code>none</code>: no networking in the container."
},
"noCache": {
"type": "boolean",
Expand Down
4 changes: 2 additions & 2 deletions docs/content/en/schemas/v1beta11.json
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,8 @@
},
"network": {
"type": "string",
"description": "passed through to docker and overrides the network configuration of docker builder. If unset, use whatever is configured in the underlying docker daemon. Valid modes are `Host`: use the host's networking stack. `Bridge`: use the bridged network configuration. `None`: no networking in the container.",
"x-intellij-html-description": "passed through to docker and overrides the network configuration of docker builder. If unset, use whatever is configured in the underlying docker daemon. Valid modes are <code>Host</code>: use the host's networking stack. <code>Bridge</code>: use the bridged network configuration. <code>None</code>: no networking in the container."
"description": "passed through to docker and overrides the network configuration of docker builder. If unset, use whatever is configured in the underlying docker daemon. Valid modes are `host`: use the host's networking stack. `bridge`: use the bridged network configuration. `none`: no networking in the container.",
"x-intellij-html-description": "passed through to docker and overrides the network configuration of docker builder. If unset, use whatever is configured in the underlying docker daemon. Valid modes are <code>host</code>: use the host's networking stack. <code>bridge</code>: use the bridged network configuration. <code>none</code>: no networking in the container."
},
"noCache": {
"type": "boolean",
Expand Down
6 changes: 3 additions & 3 deletions pkg/skaffold/schema/latest/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -672,9 +672,9 @@ type DockerArtifact struct {
// NetworkMode is passed through to docker and overrides the
// network configuration of docker builder. If unset, use whatever
// is configured in the underlying docker daemon. Valid modes are
// `Host`: use the host's networking stack.
// `Bridge`: use the bridged network configuration.
// `None`: no networking in the container.
// `host`: use the host's networking stack.
// `bridge`: use the bridged network configuration.
// `none`: no networking in the container.
NetworkMode string `yaml:"network,omitempty"`

// CacheFrom lists the Docker images used as cache sources.
Expand Down
6 changes: 3 additions & 3 deletions pkg/skaffold/schema/v1beta10/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,9 @@ type DockerArtifact struct {
// NetworkMode is passed through to docker and overrides the
// network configuration of docker builder. If unset, use whatever
// is configured in the underlying docker daemon. Valid modes are
// `Host`: use the host's networking stack.
// `Bridge`: use the bridged network configuration.
// `None`: no networking in the container.
// `host`: use the host's networking stack.
// `bridge`: use the bridged network configuration.
// `none`: no networking in the container.
NetworkMode string `yaml:"network,omitempty"`

// CacheFrom lists the Docker images used as cache sources.
Expand Down
2 changes: 1 addition & 1 deletion pkg/skaffold/schema/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func Process(config *latest.SkaffoldConfig) error {
return fmt.Errorf(strings.Join(messages, " | "))
}

// validateDockerNetworkMode makes sure that networkMode is one of `Bridge`, `None`, or `Host` if set.
// validateDockerNetworkMode makes sure that networkMode is one of `bridge`, `none`, or `host` if set.
func validateDockerNetworkMode(artifacts []*latest.Artifact) (errs []error) {
for _, a := range artifacts {
if a.DockerArtifact == nil || a.DockerArtifact.NetworkMode == "" {
Expand Down