diff --git a/core/v1/generated.proto b/core/v1/generated.proto index 1b7152a39c..a4546cdbd3 100644 --- a/core/v1/generated.proto +++ b/core/v1/generated.proto @@ -1337,7 +1337,8 @@ message EphemeralContainerCommon { // +optional optional string imagePullPolicy = 14; - // SecurityContext is not allowed for ephemeral containers. + // Optional: SecurityContext defines the security options the ephemeral container should be run with. + // If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. // +optional optional SecurityContext securityContext = 15; diff --git a/core/v1/types.go b/core/v1/types.go index 19eef8b135..6d0bd51849 100644 --- a/core/v1/types.go +++ b/core/v1/types.go @@ -3546,7 +3546,8 @@ type EphemeralContainerCommon struct { // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images // +optional ImagePullPolicy PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"` - // SecurityContext is not allowed for ephemeral containers. + // Optional: SecurityContext defines the security options the ephemeral container should be run with. + // If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. // +optional SecurityContext *SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,15,opt,name=securityContext"` diff --git a/core/v1/types_swagger_doc_generated.go b/core/v1/types_swagger_doc_generated.go index c03bbb89fe..399147a670 100644 --- a/core/v1/types_swagger_doc_generated.go +++ b/core/v1/types_swagger_doc_generated.go @@ -607,7 +607,7 @@ var map_EphemeralContainerCommon = map[string]string{ "terminationMessagePath": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", "terminationMessagePolicy": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", "imagePullPolicy": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", - "securityContext": "SecurityContext is not allowed for ephemeral containers.", + "securityContext": "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", "stdin": "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", "stdinOnce": "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", "tty": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", diff --git a/go.mod b/go.mod index 7e3e49923d..f9602f05f0 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ go 1.16 require ( github.com/gogo/protobuf v1.3.2 github.com/stretchr/testify v1.7.0 - k8s.io/apimachinery v0.0.0-20210708214246-ff522ab81c74 + k8s.io/apimachinery v0.0.0-20210712060818-a644435e2c13 ) -replace k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210708214246-ff522ab81c74 +replace k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210712060818-a644435e2c13 diff --git a/go.sum b/go.sum index 648a77a732..894272e8a8 100644 --- a/go.sum +++ b/go.sum @@ -207,8 +207,8 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/apimachinery v0.0.0-20210708214246-ff522ab81c74 h1:Daxg4VCqUpkKuMJjia7XcVVDHnPjH6IeKb7jcZDcQUM= -k8s.io/apimachinery v0.0.0-20210708214246-ff522ab81c74/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= +k8s.io/apimachinery v0.0.0-20210712060818-a644435e2c13 h1:Y40e5ho6n8KOvBCqdz/jm7ssKQyQLQdbZbC3lR9TaCU= +k8s.io/apimachinery v0.0.0-20210712060818-a644435e2c13/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM=