From 35fd9e833107f4f38642a9843542b433006384f3 Mon Sep 17 00:00:00 2001 From: Andrew Melis Date: Wed, 3 Feb 2021 17:43:51 -0500 Subject: [PATCH 1/2] Remove duplicate link in container/securityContext Two links were listed to provide more info about security context in the container documentation. One of the links now permanently redirects to the other (301 status code). This change removes the outdated link. --- staging/src/k8s.io/api/core/v1/types.go | 1 - 1 file changed, 1 deletion(-) diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index 59feb2d74ad..b6f5629b621 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -2318,7 +2318,6 @@ type Container struct { // +optional ImagePullPolicy PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"` // Security options the pod should run with. - // More info: https://kubernetes.io/docs/concepts/policy/security-context/ // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ // +optional SecurityContext *SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,15,opt,name=securityContext"` From 59e3501451107c19d9fcb2490aa0be31297cb8eb Mon Sep 17 00:00:00 2001 From: Andrew Melis Date: Wed, 3 Feb 2021 18:19:55 -0500 Subject: [PATCH 2/2] Generate specs after documentation change --- api/openapi-spec/swagger.json | 2 +- staging/src/k8s.io/api/core/v1/generated.proto | 1 - staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 8409bcd8863..db29dfee333 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -5907,7 +5907,7 @@ }, "securityContext": { "$ref": "#/definitions/io.k8s.api.core.v1.SecurityContext", - "description": "Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/" + "description": "Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/" }, "startupProbe": { "$ref": "#/definitions/io.k8s.api.core.v1.Probe", diff --git a/staging/src/k8s.io/api/core/v1/generated.proto b/staging/src/k8s.io/api/core/v1/generated.proto index 742602b2db6..bec1437882e 100644 --- a/staging/src/k8s.io/api/core/v1/generated.proto +++ b/staging/src/k8s.io/api/core/v1/generated.proto @@ -755,7 +755,6 @@ message Container { optional string imagePullPolicy = 14; // Security options the pod should run with. - // More info: https://kubernetes.io/docs/concepts/policy/security-context/ // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ // +optional optional SecurityContext securityContext = 15; diff --git a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go index 5dde8359a8b..da23059d7f7 100644 --- a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -344,7 +344,7 @@ var map_Container = 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": "Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", + "securityContext": "Security options the pod should run with. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", "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.",