[][src]Struct openshift_openapi::api::security::v1::SecurityContextConstraints

pub struct SecurityContextConstraints {
    pub allow_host_dir_volume_plugin: bool,
    pub allow_host_ipc: bool,
    pub allow_host_network: bool,
    pub allow_host_pid: bool,
    pub allow_host_ports: bool,
    pub allow_privilege_escalation: Option<bool>,
    pub allow_privileged_container: bool,
    pub allowed_capabilities: Vec<String>,
    pub allowed_flex_volumes: Option<Vec<AllowedFlexVolume>>,
    pub allowed_unsafe_sysctls: Option<Vec<String>>,
    pub default_add_capabilities: Vec<String>,
    pub default_allow_privilege_escalation: Option<bool>,
    pub forbidden_sysctls: Option<Vec<String>>,
    pub fs_group: Option<FSGroupStrategyOptions>,
    pub groups: Option<Vec<String>>,
    pub metadata: Option<ObjectMeta>,
    pub priority: i32,
    pub read_only_root_filesystem: bool,
    pub required_drop_capabilities: Vec<String>,
    pub run_as_user: Option<RunAsUserStrategyOptions>,
    pub se_linux_context: Option<SELinuxContextStrategyOptions>,
    pub seccomp_profiles: Option<Vec<String>>,
    pub supplemental_groups: Option<SupplementalGroupsStrategyOptions>,
    pub users: Option<Vec<String>>,
    pub volumes: Vec<String>,
}

SecurityContextConstraints governs the ability to make requests that affect the SecurityContext that will be applied to a container. For historical reasons SCC was exposed under the core Kubernetes API group. That exposure is deprecated and will be removed in a future release - users should instead use the security.openshift.io group to manage SecurityContextConstraints.

Fields

allow_host_dir_volume_plugin: bool

AllowHostDirVolumePlugin determines if the policy allow containers to use the HostDir volume plugin

allow_host_ipc: bool

AllowHostIPC determines if the policy allows host ipc in the containers.

allow_host_network: bool

AllowHostNetwork determines if the policy allows the use of HostNetwork in the pod spec.

allow_host_pid: bool

AllowHostPID determines if the policy allows host pid in the containers.

allow_host_ports: bool

AllowHostPorts determines if the policy allows host ports in the containers.

allow_privilege_escalation: Option<bool>

AllowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.

allow_privileged_container: bool

AllowPrivilegedContainer determines if a container can request to be run as privileged.

allowed_capabilities: Vec<String>

AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field maybe added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. To allow all capabilities you may use '*'.

allowed_flex_volumes: Option<Vec<AllowedFlexVolume>>

AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the "Volumes" field.

allowed_unsafe_sysctls: Option<Vec<String>>

AllowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.

Examples: e.g. "foo/" allows "foo/bar", "foo/baz", etc. e.g. "foo." allows "foo.bar", "foo.baz", etc.

default_add_capabilities: Vec<String>

DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities.

default_allow_privilege_escalation: Option<bool>

DefaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.

forbidden_sysctls: Option<Vec<String>>

ForbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.

Examples: e.g. "foo/" forbids "foo/bar", "foo/baz", etc. e.g. "foo." forbids "foo.bar", "foo.baz", etc.

fs_group: Option<FSGroupStrategyOptions>

FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.

groups: Option<Vec<String>>

The groups that have permission to use this security context constraints

metadata: Option<ObjectMeta>

Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata

priority: i32

Priority influences the sort order of SCCs when evaluating which SCCs to try first for a given pod request based on access in the Users and Groups fields. The higher the int, the higher priority. An unset value is considered a 0 priority. If scores for multiple SCCs are equal they will be sorted from most restrictive to least restrictive. If both priorities and restrictions are equal the SCCs will be sorted by name.

read_only_root_filesystem: bool

ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the SCC should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.

required_drop_capabilities: Vec<String>

RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.

run_as_user: Option<RunAsUserStrategyOptions>

RunAsUser is the strategy that will dictate what RunAsUser is used in the SecurityContext.

se_linux_context: Option<SELinuxContextStrategyOptions>

SELinuxContext is the strategy that will dictate what labels will be set in the SecurityContext.

seccomp_profiles: Option<Vec<String>>

SeccompProfiles lists the allowed profiles that may be set for the pod or container's seccomp annotations. An unset (nil) or empty value means that no profiles may be specifid by the pod or container. The wildcard '*' may be used to allow all profiles. When used to generate a value for a pod the first non-wildcard profile will be used as the default.

supplemental_groups: Option<SupplementalGroupsStrategyOptions>

SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.

users: Option<Vec<String>>

The users who have permissions to use this security context constraints

volumes: Vec<String>

Volumes is a white list of allowed volume plugins. FSType corresponds directly with the field names of a VolumeSource (azureFile, configMap, emptyDir). To allow all volumes you may use "*". To allow no volumes, set to ["none"].

Implementations

impl SecurityContextConstraints[src]

pub fn create_security_context_constraints(
    body: &SecurityContextConstraints,
    optional: CreateOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<CreateResponse<Self>>), RequestError>
[src]

create SecurityContextConstraints

Use the returned k8s_openapi::ResponseBody<k8s_openapi::CreateResponse<Self>> constructor, or k8s_openapi::CreateResponse<Self> directly, to parse the HTTP response.

Arguments

  • body

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl SecurityContextConstraints[src]

pub fn delete_collection_security_context_constraints(
    delete_optional: DeleteOptional,
    list_optional: ListOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<DeleteResponse<List<Self>>>), RequestError>
[src]

delete collection of SecurityContextConstraints

Use the returned k8s_openapi::ResponseBody<k8s_openapi::DeleteResponse<k8s_openapi::List<Self>>> constructor, or k8s_openapi::DeleteResponse<k8s_openapi::List<Self>> directly, to parse the HTTP response.

Arguments

  • delete_optional

    Delete options. Use Default::default() to not pass any.

  • list_optional

    List options. Use Default::default() to not pass any.

impl SecurityContextConstraints[src]

pub fn delete_security_context_constraints(
    name: &str,
    optional: DeleteOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<DeleteResponse<Self>>), RequestError>
[src]

delete SecurityContextConstraints

Use the returned k8s_openapi::ResponseBody<k8s_openapi::DeleteResponse<Self>> constructor, or k8s_openapi::DeleteResponse<Self> directly, to parse the HTTP response.

Arguments

  • name

    name of the SecurityContextConstraints

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl SecurityContextConstraints[src]

pub fn list_security_context_constraints(
    optional: ListOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ListResponse<Self>>), RequestError>
[src]

list or watch objects of kind SecurityContextConstraints

This operation only supports listing all items of this type.

Use the returned k8s_openapi::ResponseBody<k8s_openapi::ListResponse<Self>> constructor, or k8s_openapi::ListResponse<Self> directly, to parse the HTTP response.

Arguments

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl SecurityContextConstraints[src]

pub fn patch_security_context_constraints(
    name: &str,
    body: &Patch,
    optional: PatchOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<PatchResponse<Self>>), RequestError>
[src]

partially update the specified SecurityContextConstraints

Use the returned k8s_openapi::ResponseBody<k8s_openapi::PatchResponse<Self>> constructor, or k8s_openapi::PatchResponse<Self> directly, to parse the HTTP response.

Arguments

  • name

    name of the SecurityContextConstraints

  • body

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl SecurityContextConstraints[src]

pub fn read_security_context_constraints(
    name: &str,
    optional: ReadSecurityContextConstraintsOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ReadSecurityContextConstraintsResponse>), RequestError>
[src]

read the specified SecurityContextConstraints

Use the returned k8s_openapi::ResponseBody<ReadSecurityContextConstraintsResponse> constructor, or ReadSecurityContextConstraintsResponse directly, to parse the HTTP response.

Arguments

  • name

    name of the SecurityContextConstraints

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl SecurityContextConstraints[src]

pub fn replace_security_context_constraints(
    name: &str,
    body: &SecurityContextConstraints,
    optional: ReplaceOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<ReplaceResponse<Self>>), RequestError>
[src]

replace the specified SecurityContextConstraints

Use the returned k8s_openapi::ResponseBody<k8s_openapi::ReplaceResponse<Self>> constructor, or k8s_openapi::ReplaceResponse<Self> directly, to parse the HTTP response.

Arguments

  • name

    name of the SecurityContextConstraints

  • body

  • optional

    Optional parameters. Use Default::default() to not pass any.

impl SecurityContextConstraints[src]

pub fn watch_security_context_constraints(
    optional: WatchOptional
) -> Result<(Request<Vec<u8>>, fn(_: StatusCode) -> ResponseBody<WatchResponse<Self>>), RequestError>
[src]

list or watch objects of kind SecurityContextConstraints

This operation only supports watching one item, or a list of items, of this type for changes.

Use the returned k8s_openapi::ResponseBody<k8s_openapi::WatchResponse<Self>> constructor, or k8s_openapi::WatchResponse<Self> directly, to parse the HTTP response.

Arguments

  • optional

    Optional parameters. Use Default::default() to not pass any.

Trait Implementations

impl Clone for SecurityContextConstraints[src]

impl Debug for SecurityContextConstraints[src]

impl Default for SecurityContextConstraints[src]

impl<'de> Deserialize<'de> for SecurityContextConstraints[src]

impl ListableResource for SecurityContextConstraints[src]

impl Metadata for SecurityContextConstraints[src]

type Ty = ObjectMeta

The type of the metadata object.

impl PartialEq<SecurityContextConstraints> for SecurityContextConstraints[src]

impl Resource for SecurityContextConstraints[src]

impl Serialize for SecurityContextConstraints[src]

impl StructuralPartialEq for SecurityContextConstraints[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.