{{#accordion-list-item
      title=(t 'formSecurity.title')
      detail=(t 'formSecurity.detail' appName=settings.appName)
      expandAll=expandAll
      expand=(action expandFn)
      expanded=expanded
}}
  <div class="row box">
    <div class="col span-4">
      <label class="acc-label">{{t 'formSecurity.pullImage.label'}}</label>
      {{#input-or-display editable=editing value=instance.imagePullPolicy}}
        <div class="radio">
          <label>{{radio-button selection=instance.imagePullPolicy value="Always"}} {{t 'formSecurity.pullImage.always'}}</label>
        </div>
        <div class="radio">
          <label>{{radio-button selection=instance.imagePullPolicy value="IfNotPresent"}} {{t 'formSecurity.pullImage.ifNotPresent'}}</label>
        </div>
        <div class="radio">
          <label>{{radio-button selection=instance.imagePullPolicy value="Never"}} {{t 'generic.never'}}</label>
        </div>
      {{/input-or-display}}
    </div>
    <div class="col span-4">
      <label class="acc-label">{{t 'formSecurity.privileged.label'}}</label>
      {{#input-or-display editable=editing value=instance.privileged}}
        <div class="radio">
          <label>{{radio-button selection=instance.privileged value=false}} {{t 'formSecurity.privileged.disable'}}</label>
        </div>
        <div class="radio">
          <label>{{radio-button selection=instance.privileged value=true}} {{t 'formSecurity.privileged.enable'}}</label>
        </div>
      {{/input-or-display}}
    </div>
    <div class="col span-4">
      <label class="acc-label">{{t 'formSecurity.allowPrivilegeEscalation.label'}}</label>
      {{#input-or-display editable=editing value=instance.allowPrivilegeEscalation}}
        <div class="radio">
          <label>{{radio-button selection=instance.allowPrivilegeEscalation value=false disabled=allowPrivilegeEscalationDisabled}} {{t 'formSecurity.allowPrivilegeEscalation.disable'}}</label>
        </div>
        <div class="radio">
          <label>{{radio-button selection=instance.allowPrivilegeEscalation value=true disabled=allowPrivilegeEscalationDisabled}} {{t 'formSecurity.allowPrivilegeEscalation.enable'}}</label>
        </div>
      {{/input-or-display}}
    </div>
  </div>

  <div class="row box mt-20">
    <div class="col span-6">
      <label class="acc-label">{{t 'formSecurity.hostPID.label'}}</label>
      {{#input-or-display editable=editing value=service.hostPID}}
        <div class="radio">
          <label>{{radio-button selection=service.hostPID value=false}} {{t 'generic.no'}}</label>
        </div>
        <div class="radio">
          <label>{{radio-button selection=service.hostPID value=true}} {{t 'generic.yes'}}</label>
        </div>
      {{/input-or-display}}
    </div>
    <div class="col span-6">
      <label class="acc-label">{{t 'formSecurity.hostIPC.label'}}</label>
      {{#input-or-display editable=editing value=service.hostIPC}}
        <div class="radio">
          <label>{{radio-button selection=service.hostIPC value=false}} {{t 'generic.no'}}</label>
        </div>
        <div class="radio">
          <label>{{radio-button selection=service.hostIPC value=true}} {{t 'generic.yes'}}</label>
        </div>
      {{/input-or-display}}
    </div>
  </div>
  <div class="row box mt-20">
    <div class="col span-6">
      <label class="acc-label">{{t 'formSecurity.runAsNonRoot.label'}}</label>
      {{#input-or-display editable=editing value=instance.runAsNonRoot}}
        <div class="radio">
          <label>{{radio-button selection=instance.runAsNonRoot value=false}} {{t 'formSecurity.runAsNonRoot.disable'}}</label>
        </div>
        <div class="radio">
          <label>{{radio-button selection=instance.runAsNonRoot value=true}} {{t 'formSecurity.runAsNonRoot.enable'}}</label>
        </div>
      {{/input-or-display}}
    </div>
    <div class="col span-6">
      <label class="acc-label">{{t 'formSecurity.readOnlyRootFilesystem.label'}}</label>
      {{#input-or-display editable=editing value=instance.readOnly}}
        <div class="radio">
          <label>{{radio-button selection=instance.readOnly value=false}} {{t 'formSecurity.readOnlyRootFilesystem.disable'}}</label>
        </div>
        <div class="radio">
          <label>{{radio-button selection=instance.readOnly value=true}} {{t 'formSecurity.readOnlyRootFilesystem.enable'}}</label>
        </div>
      {{/input-or-display}}
    </div>
  </div>

  <div class="row mt-20">
    <div class="col box span-4">
      <label class="acc-label">{{t 'formSecurity.memoryReservation.label'}}</label>
      {{#input-or-display editable=editing value=requests.memory classesForDisplay="text-muted form-control-static"}}
        <div class="input-group">
          {{input-integer min="4" step="1" value=memoryReservationMb classNames="form-control" placeholder=(t 'formSecurity.memoryReservation.placeholder')}}
          <div class="input-group-addon bg-default">{{t 'generic.mibibyte'}}</div>
        </div>
      {{/input-or-display}}

      <label class="acc-label mt-20">{{t 'formSecurity.memoryLimit.label'}}</label>
      {{#input-or-display editable=editing value=limits.memory classesForDisplay="text-muted form-control-static"}}
        <div class="radio">
          <label>{{radio-button selection=memoryMode value="unlimited"}} {{t 'formSecurity.memoryLimit.unlimited'}}</label>
        </div>
        <div class="radio">
          <label>
            {{radio-button selection=memoryMode value="set"}} {{t 'formSecurity.memoryLimit.set'}}
            <span class="with-input" style="width: 175px;">
              <div class="input-group input-sm">
                {{input-integer min="4" step="1" value=memoryMb disabled=(not-eq memoryMode 'set')}}
                <div class="input-group-addon bg-default">{{t 'generic.mibibyte'}}</div>
              </div>
            </span>
          </label>
        </div>
      {{/input-or-display}}
    </div>

    <div class="col box span-4">
      <label class="acc-label">{{t 'formSecurity.milliCpuReservation.label'}}</label>
      {{#input-or-display editable=editing value=requests.cpu classesForDisplay="text-muted form-control-static"}}
        <span class="with-input">
          <div class="input-group">
            {{input-integer min="0" step="100" value=cpuReservationMillis classNames="form-control" placeholder=(t 'formSecurity.milliCpuReservation.placeholder')}}
            <div class="input-group-addon bg-default">{{t 'formSecurity.milliCpuReservation.unit'}}</div>
          </div>
        </span>
      {{/input-or-display}}

      <label class="acc-label mt-20">{{t 'formSecurity.cpuLimit.label'}}</label>
      {{#input-or-display editable=editing value=limits.cpu classesForDisplay="text-muted form-control-static"}}
        <div class="radio">
          <label>{{radio-button selection=cpuMode value="unlimited"}} {{t 'formSecurity.cpuLimit.unlimited'}}</label>
        </div>
        <div class="radio">
          <label>
            {{radio-button selection=cpuMode value="set"}} {{t 'formSecurity.cpuLimit.set'}}
            <span class="with-input" style="width: 175px;">
              <div class="input-group input-sm">
                {{input-integer min="0" step="100" value=cpuMillis disabled=(not-eq cpuMode 'set')}}
                <div class="input-group-addon bg-default">{{t 'formSecurity.cpuLimit.unit'}}</div>
              </div>
            </span>
          </label>
        </div>
      {{/input-or-display}}
    </div>

    <div class="col box span-4">
      <label class="acc-label">{{t 'formSecurity.gpuReservation.label'}}</label>
      {{#input-or-display editable=editing value=gpuReservation classesForDisplay="text-muted form-control-static"}}
        <span class="with-input">
          <div class="input-group">
            {{input-integer min="0" step="1" value=gpuReservation classNames="form-control" placeholder=(t 'formSecurity.gpuReservation.placeholder')}}
            <div class="input-group-addon bg-default">{{t 'formSecurity.gpuReservation.unit'}}</div>
          </div>
        </span>
      {{/input-or-display}}
    </div>
  </div>

  <div class="row mt-20">
    <div class="col box span-6">
      <label class="acc-label">{{t 'formSecurity.capabilities.add'}}</label>
      {{#if editing}}
        <select class="form-control select-cap-add" multiple="true" onchange={{action 'modifyCapabilities' 'capAdd' }}>
          {{#each capabilityChoices as |choice|}}
            <option value={{choice}} selected={{array-includes instance.capAdd choice}}>{{choice}}</option>
          {{/each}}
        </select>
      {{else}}
        {{#if instance.capAdd}}
          {{#each instance.capAdd as |choice index|}}
            {{if index ", "}} {{choice}}
          {{/each}}
        {{else}}
          <div>{{t 'generic.none'}}</div>
        {{/if}}
      {{/if}}
    </div>

    <div class="col box span-6">
      <label class="acc-label">{{t 'formSecurity.capabilities.drop'}}</label>
      {{#if editing}}
        <select class="form-control select-cap-drop" multiple="true" onchange={{action 'modifyCapabilities' 'capDrop'}}>
          {{#each capabilityChoices as |choice|}}
            <option value={{choice}} selected={{array-includes instance.capDrop choice}}>{{choice}}</option>
          {{/each}}
        </select>
      {{else}}
        {{#if instance.capDrop}}
          {{#each instance.capDrop as |choice index|}}
            {{if index ", "}} {{choice}}
          {{/each}}
        {{else}}
          <div>{{t 'generic.none'}}</div>
        {{/if}}
      {{/if}}
    </div>
  </div>

  {{#if editing}}
    <div class="row">
      <div class="col span-12 text-center text-info m-0">
        {{t 'formSecurity.capabilities.helpBlock.text'}}
        <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html" target="_blank">{{t 'formSecurity.capabilities.helpBlock.link'}}</a>
      </div>
    </div>
  {{/if}}
{{/accordion-list-item}}
