Add parameters for interactive containers. Useful with kubectl attach.

This commit is contained in:
Brendan Burns 2015-07-29 21:16:54 -07:00
parent 769230e735
commit 51757f6552
8 changed files with 7046 additions and 8089 deletions

View File

@ -12394,6 +12394,14 @@
"securityContext": {
"$ref": "v1.SecurityContext",
"description": "security options the pod should run with; see http://releases.k8s.io/HEAD/docs/design/security_context.md"
},
"stdin": {
"type": "boolean",
"description": "Whether this container should allocate a buffer for stdin in the container runtime; default is false"
},
"tty": {
"type": "boolean",
"description": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true; default is false"
}
}
},

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -204,6 +204,8 @@ func deepCopy_api_Container(in Container, out *Container, c *conversion.Cloner)
} else {
out.SecurityContext = nil
}
out.Stdin = in.Stdin
out.TTY = in.TTY
return nil
}

View File

@ -726,6 +726,11 @@ type Container struct {
ImagePullPolicy PullPolicy `json:"imagePullPolicy"`
// Optional: SecurityContext defines the security options the pod should be run with
SecurityContext *SecurityContext `json:"securityContext,omitempty"`
// Variables for interactive containers, these have very specialized use-cases (e.g. debugging)
// and shouldn't be used for general purpose containers.
Stdin bool `json:"stdin,omitempty" description:"Whether this container should allocate a buffer for stdin in the container runtime; default is false"`
TTY bool `json:"tty,omitempty" description:"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true; default is false"`
}
// Handler defines a specific action that should be taken

View File

@ -222,6 +222,8 @@ func convert_api_Container_To_v1_Container(in *api.Container, out *Container, s
} else {
out.SecurityContext = nil
}
out.Stdin = in.Stdin
out.TTY = in.TTY
return nil
}
@ -2472,6 +2474,8 @@ func convert_v1_Container_To_api_Container(in *Container, out *api.Container, s
} else {
out.SecurityContext = nil
}
out.Stdin = in.Stdin
out.TTY = in.TTY
return nil
}

View File

@ -217,6 +217,8 @@ func deepCopy_v1_Container(in Container, out *Container, c *conversion.Cloner) e
} else {
out.SecurityContext = nil
}
out.Stdin = in.Stdin
out.TTY = in.TTY
return nil
}

View File

@ -704,6 +704,11 @@ type Container struct {
ImagePullPolicy PullPolicy `json:"imagePullPolicy,omitempty" description:"image pull policy; one of Always, Never, IfNotPresent; defaults to Always if :latest tag is specified, or IfNotPresent otherwise; cannot be updated; see http://releases.k8s.io/HEAD/docs/user-guide/images.md#updating-images"`
// Optional: SecurityContext defines the security options the pod should be run with
SecurityContext *SecurityContext `json:"securityContext,omitempty" description:"security options the pod should run with; see http://releases.k8s.io/HEAD/docs/design/security_context.md"`
// Variables for interactive containers, these have very specialized use-cases (e.g. debugging)
// and shouldn't be used for general purpose containers.
Stdin bool `json:"stdin,omitempty" description:"Whether this container should allocate a buffer for stdin in the container runtime; default is false"`
TTY bool `json:"tty,omitempty" description:"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true; default is false"`
}
// Handler defines a specific action that should be taken