# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::ContainerService::Mgmt::V2020_12_01
  module Models
    #
    # Kubelet configurations of agent nodes.
    #
    class KubeletConfig

      include MsRestAzure

      # @return [String] CPU Manager policy to use.
      attr_accessor :cpu_manager_policy

      # @return [Boolean] Enable CPU CFS quota enforcement for containers that
      # specify CPU limits.
      attr_accessor :cpu_cfs_quota

      # @return [String] Sets CPU CFS quota period value.
      attr_accessor :cpu_cfs_quota_period

      # @return [Integer] The percent of disk usage after which image garbage
      # collection is always run.
      attr_accessor :image_gc_high_threshold

      # @return [Integer] The percent of disk usage before which image garbage
      # collection is never run.
      attr_accessor :image_gc_low_threshold

      # @return [String] Topology Manager policy to use.
      attr_accessor :topology_manager_policy

      # @return [Array<String>] Allowlist of unsafe sysctls or unsafe sysctl
      # patterns (ending in `*`).
      attr_accessor :allowed_unsafe_sysctls

      # @return [Boolean] If set to true it will make the Kubelet fail to start
      # if swap is enabled on the node.
      attr_accessor :fail_swap_on

      # @return [Integer] The maximum size (e.g. 10Mi) of container log file
      # before it is rotated.
      attr_accessor :container_log_max_size_mb

      # @return [Integer] The maximum number of container log files that can be
      # present for a container. The number must be ≥ 2.
      attr_accessor :container_log_max_files

      # @return [Integer] The maximum number of processes per pod.
      attr_accessor :pod_max_pids


      #
      # Mapper for KubeletConfig class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'KubeletConfig',
          type: {
            name: 'Composite',
            class_name: 'KubeletConfig',
            model_properties: {
              cpu_manager_policy: {
                client_side_validation: true,
                required: false,
                serialized_name: 'cpuManagerPolicy',
                type: {
                  name: 'String'
                }
              },
              cpu_cfs_quota: {
                client_side_validation: true,
                required: false,
                serialized_name: 'cpuCfsQuota',
                type: {
                  name: 'Boolean'
                }
              },
              cpu_cfs_quota_period: {
                client_side_validation: true,
                required: false,
                serialized_name: 'cpuCfsQuotaPeriod',
                type: {
                  name: 'String'
                }
              },
              image_gc_high_threshold: {
                client_side_validation: true,
                required: false,
                serialized_name: 'imageGcHighThreshold',
                type: {
                  name: 'Number'
                }
              },
              image_gc_low_threshold: {
                client_side_validation: true,
                required: false,
                serialized_name: 'imageGcLowThreshold',
                type: {
                  name: 'Number'
                }
              },
              topology_manager_policy: {
                client_side_validation: true,
                required: false,
                serialized_name: 'topologyManagerPolicy',
                type: {
                  name: 'String'
                }
              },
              allowed_unsafe_sysctls: {
                client_side_validation: true,
                required: false,
                serialized_name: 'allowedUnsafeSysctls',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              fail_swap_on: {
                client_side_validation: true,
                required: false,
                serialized_name: 'failSwapOn',
                type: {
                  name: 'Boolean'
                }
              },
              container_log_max_size_mb: {
                client_side_validation: true,
                required: false,
                serialized_name: 'containerLogMaxSizeMB',
                type: {
                  name: 'Number'
                }
              },
              container_log_max_files: {
                client_side_validation: true,
                required: false,
                serialized_name: 'containerLogMaxFiles',
                constraints: {
                  InclusiveMinimum: 2
                },
                type: {
                  name: 'Number'
                }
              },
              pod_max_pids: {
                client_side_validation: true,
                required: false,
                serialized_name: 'podMaxPids',
                type: {
                  name: 'Number'
                }
              }
            }
          }
        }
      end
    end
  end
end
