Show / Hide Table of Contents

Class SecurityContext

Security options the container should be run with.

Inheritance
object
SecurityContext
Implements
IDirectResponseSchema
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.CloudBuild.v2.Data
Assembly: Google.Apis.CloudBuild.v2.dll
Syntax
public class SecurityContext : IDirectResponseSchema

Properties

AllowPrivilegeEscalation

Optional. AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows. +optional

Declaration
[JsonProperty("allowPrivilegeEscalation")]
public virtual bool? AllowPrivilegeEscalation { get; set; }
Property Value
Type Description
bool?

Capabilities

Optional. Adds and removes POSIX capabilities from running containers.

Declaration
[JsonProperty("capabilities")]
public virtual Capabilities Capabilities { get; set; }
Property Value
Type Description
Capabilities

ETag

The ETag of the item.

Declaration
public virtual string ETag { get; set; }
Property Value
Type Description
string

Privileged

Run container in privileged mode.

Declaration
[JsonProperty("privileged")]
public virtual bool? Privileged { get; set; }
Property Value
Type Description
bool?

RunAsGroup

Optional. The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +optional

Declaration
[JsonProperty("runAsGroup")]
public virtual long? RunAsGroup { get; set; }
Property Value
Type Description
long?

RunAsNonRoot

Optional. Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. +optional

Declaration
[JsonProperty("runAsNonRoot")]
public virtual bool? RunAsNonRoot { get; set; }
Property Value
Type Description
bool?

RunAsUser

Optional. The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +optional

Declaration
[JsonProperty("runAsUser")]
public virtual long? RunAsUser { get; set; }
Property Value
Type Description
long?

Implements

IDirectResponseSchema
In this article
Back to top Generated by DocFX