apiVersion: v1
kind: Pod
metadata:
  labels:
    jenkins: slave
    jenkins/label: static-nodejs
  name: static-nodejs-0
  namespace: ci
spec:
  containers:
  - name: jnlp
    env:
    - name: JENKINS_SECRET
      value: "3fa298c2f5b1ea7ef1452dca54e15006ce710c1053faa1416453ce487c2a84fe"
    - name: JAVA_OPTS
      value: -server -Djava.awt.headless=true -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.EPollSelectorProvider
        -Dfile.encoding=UTF8 -Xverify:none -XX:MetaspaceSize=128m -XX:+UseNUMA -XX:+UseNUMAInterleaving
        -XX:NUMAInterleaveGranularity=65536 -XX:+UseLargePages -XX:+UseCompressedOops
        -XX:MaxMetaspaceSize=512m -XX:ReservedCodeCacheSize=240M -XX:MaxRAMFraction=2
        -XshowSettings:vm -XX:+AggressiveOpts -Djute.maxbuffer=41943040 -XX:-UseBiasedLocking
        -XX:+UseFastAccessorMethods -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
        -XX:+UseCompressedOops -XX:+CMSClassUnloadingEnabled  -XX:+CMSScavengeBeforeRemark
        -XX:+DisableExplicitGC -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -XX:SoftRefLRUPolicyMSPerMB=0
        -XX:G1ReservePercent=25 -XX:G1NewSizePercent=10 -XX:G1MaxNewSizePercent=25
        -XX:MaxGCPauseMillis=20 -XX:-OmitStackTraceInFastThrow -XX:+ParallelRefProcEnabled
        -XX:ParallelGCThreads=8 -XX:MaxTenuringThreshold=1 -XX:G1HeapWastePercent=10
        -XX:SurvivorRatio=8 -XX:G1MixedGCCountTarget=16 -XX:G1MixedGCLiveThresholdPercent=90
        -XX:InitiatingHeapOccupancyPercent=35 -XX:G1HeapRegionSize=32m -XX:+PerfDisableSharedMem
        -XX:-ResizePLAB
    - name: JENKINS_AGENT_NAME
      value: static-nodejs-0
    - name: JENKINS_NAME
      value: static-nodejs-0
    - name: JENKINS_AGENT_WORKDIR
      value: /home/jenkins
    - name: JENKINS_URL
      value: http://jenkins.ci/
    image: slpcat/kube-jenkins-dind-agent:jdk8
    imagePullPolicy: Always
    resources:
      limits:
        cpu: "4"
        memory: 4Gi
      requests:
        cpu: "4"
        memory: 4Gi
    securityContext:
      #privileged: true
      runAsUser: 0
      runAsGroup: 0
      #fsGroup: 1000
    volumeMounts:
    - mountPath: /home/jenkins
      name: workspace-volume
    - mountPath: /var/run/docker.sock
      name: docker-sock
    workingDir: /home/jenkins
  #imagePullSecrets:
  #- name: ali-vpc
  nodeSelector:
    kubernetes.io/os: linux
  volumes:
  - name: workspace-volume
    persistentVolumeClaim:
      claimName: static-nodejs-0
  - name: docker-sock
    hostPath:
      # directory location on host
      path: /var/run/docker.sock
      # this field is optional
      type: Socket
