Class: KubeDSL::DSL::Policy::V1beta1::PodSecurityPolicySpec

Inherits:
KubeDSL::DSLObject show all
Defined in:
lib/kube-dsl/dsl/policy/v1beta1/pod_security_policy_spec.rb

Instance Method Summary collapse

Methods inherited from KubeDSL::DSLObject

#initialize, #to_resource

Methods included from ValueFields

#array_field, #object_field, #value_field, #value_fields

Constructor Details

This class inherits a constructor from KubeDSL::DSLObject

Instance Method Details

#kind_symObject



44
45
46
# File 'lib/kube-dsl/dsl/policy/v1beta1/pod_security_policy_spec.rb', line 44

def kind_sym
  :pod_security_policy_spec
end

#serializeObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/kube-dsl/dsl/policy/v1beta1/pod_security_policy_spec.rb', line 15

def serialize
  {}.tap do |result|
    result[:allowPrivilegeEscalation] = allow_privilege_escalation
    result[:allowedCapabilities] = allowed_capabilities
    result[:allowedProcMountTypes] = allowed_proc_mount_types
    result[:allowedUnsafeSysctls] = allowed_unsafe_sysctls
    result[:defaultAddCapabilities] = default_add_capabilities
    result[:defaultAllowPrivilegeEscalation] = default_allow_privilege_escalation
    result[:forbiddenSysctls] = forbidden_sysctls
    result[:hostIPC] = host_ipc
    result[:hostNetwork] = host_network
    result[:hostPID] = host_pid
    result[:privileged] = privileged
    result[:readOnlyRootFilesystem] = read_only_root_filesystem
    result[:requiredDropCapabilities] = required_drop_capabilities
    result[:volumes] = volumes
    result[:allowedCSIDrivers] = allowed_csi_drivers.map(&:serialize)
    result[:allowedFlexVolumes] = allowed_flex_volumes.map(&:serialize)
    result[:allowedHostPaths] = allowed_host_paths.map(&:serialize)
    result[:hostPorts] = host_ports.map(&:serialize)
    result[:fsGroup] = fs_group.serialize
    result[:runAsGroup] = run_as_group.serialize
    result[:runAsUser] = run_as_user.serialize
    result[:runtimeClass] = runtime_class.serialize
    result[:seLinux] = se_linux.serialize
    result[:supplementalGroups] = supplemental_groups.serialize
  end
end