func (s *ServerGroupSpecSecurityContext) GetAddCapabilities() []core.Capability {
	if s == nil {
		return nil
	}
	if s.AddCapabilities == nil {
		return nil
	}
	return s.AddCapabilities
}
GetAddCapabilities add capabilities to pod context
package v2alpha1
import (
	"math"
	"strings"
	"github.com/arangodb/kube-arangodb/pkg/util/errors"
	"github.com/arangodb/kube-arangodb/pkg/apis/shared"
	core "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/api/resource"
	"github.com/arangodb/kube-arangodb/pkg/util"
	arangodOptions "github.com/arangodb/kube-arangodb/pkg/util/arangod/options"
	arangosyncOptions "github.com/arangodb/kube-arangodb/pkg/util/arangosync/options"
	"github.com/arangodb/kube-arangodb/pkg/util/k8sutil"
)
type ServerGroupShutdownMethod string
func (s *ServerGroupShutdownMethod) Default() ServerGroupShutdownMethod {
	return ServerGroupShutdownMethodAPI
}
func (s *ServerGroupShutdownMethod) Get() ServerGroupShutdownMethod {
	if s == nil {
		return s.Default()
	}
	switch t := *s; t {
	case ServerGroupShutdownMethodAPI, ServerGroupShutdownMethodDelete:
		return t
	default:
		return s.Default()
	}
}
const (
	ServerGroupShutdownMethodAPI ServerGroupShutdownMethod = "api"
	ServerGroupShutdownMethodDelete ServerGroupShutdownMethod = "delete"
)
type ServerGroupSpec struct {
	Count *int `json:"count,omitempty"`
	MinCount *int `json:"minCount,omitempty"`
	MaxCount *int `json:"maxCount,omitempty"`
	Args []string `json:"args,omitempty"`
	Entrypoint *string `json:"entrypoint,omitempty"`
	SchedulerName *string `json:"schedulerName,omitempty"`
	StorageClassName *string `json:"storageClassName,omitempty"`
	Resources core.ResourceRequirements `json:"resources,omitempty"`
	OverrideDetectedTotalMemory *bool `json:"overrideDetectedTotalMemory,omitempty"`
	OverrideDetectedNumberOfCores *bool `json:"overrideDetectedNumberOfCores,omitempty"`
	Tolerations []core.Toleration `json:"tolerations,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
	AnnotationsIgnoreList []string `json:"annotationsIgnoreList,omitempty"`
	AnnotationsMode *LabelsMode `json:"annotationsMode,omitempty"`
	Labels map[string]string `json:"labels,omitempty"`
	LabelsIgnoreList []string `json:"labelsIgnoreList,omitempty"`
	LabelsMode *LabelsMode `json:"labelsMode,omitempty"`
	Envs ServerGroupEnvVars `json:"envs,omitempty"`
	ServiceAccountName *string `json:"serviceAccountName,omitempty"`
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	Probes *ServerGroupProbesSpec `json:"probes,omitempty"`
	PriorityClassName string `json:"priorityClassName,omitempty"`
	VolumeClaimTemplate *core.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"`
	VolumeResizeMode  *PVCResizeMode `json:"pvcResizeMode,omitempty"`
	VolumeAllowShrink *bool          `json:"volumeAllowShrink,omitempty"`
	AntiAffinity *core.PodAntiAffinity `json:"antiAffinity,omitempty"`
	Affinity *core.PodAffinity `json:"affinity,omitempty"`
	NodeAffinity *core.NodeAffinity `json:"nodeAffinity,omitempty"`
	Sidecars []core.Container `json:"sidecars,omitempty"`
	SecurityContext *ServerGroupSpecSecurityContext `json:"securityContext,omitempty"`
	Volumes ServerGroupSpecVolumes `json:"volumes,omitempty"`
	VolumeMounts ServerGroupSpecVolumeMounts `json:"volumeMounts,omitempty"`
	EphemeralVolumes *EphemeralVolumes `json:"ephemeralVolumes,omitempty"`
	ExtendedRotationCheck *bool `json:"extendedRotationCheck,omitempty"`
	InitContainers *ServerGroupInitContainers `json:"initContainers,omitempty"`
	ShutdownMethod *ServerGroupShutdownMethod `json:"shutdownMethod,omitempty"`
	ShutdownDelay *int `json:"shutdownDelay,omitempty"`
	InternalPort *int `json:"internalPort,omitempty"`
	AllowMemberRecreation *bool `json:"allowMemberRecreation,omitempty"`
}
type ServerGroupSpecSecurityContext struct {
	DropAllCapabilities *bool `json:"dropAllCapabilities,omitempty"`
	AddCapabilities []core.Capability `json:"addCapabilities,omitempty"`
	AllowPrivilegeEscalation *bool  `json:"allowPrivilegeEscalation,omitempty"`
	Privileged               *bool  `json:"privileged,omitempty"`
	ReadOnlyRootFilesystem   *bool  `json:"readOnlyRootFilesystem,omitempty"`
	RunAsNonRoot             *bool  `json:"runAsNonRoot,omitempty"`
	RunAsUser                *int64 `json:"runAsUser,omitempty"`
	RunAsGroup               *int64 `json:"runAsGroup,omitempty"`
	SupplementalGroups []int64 `json:"supplementalGroups,omitempty"`
	FSGroup            *int64  `json:"fsGroup,omitempty"`
}
func (s *ServerGroupSpecSecurityContext) GetDropAllCapabilities() bool {
	if s == nil {
		return true
	}
	if s.DropAllCapabilities == nil {
		return true
	}
	return *s.DropAllCapabilities
}