3.deployment.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: jenkins
  5. namespace: default
  6. spec:
  7. replicas: 1
  8. selector:
  9. matchLabels:
  10. run: jenkins
  11. template:
  12. metadata:
  13. labels:
  14. run: jenkins
  15. spec:
  16. securityContext:
  17. fsGroup: 1000
  18. runAsUser: 1000
  19. serviceAccountName: jenkins-admin
  20. containers:
  21. - name: jenkins
  22. image: jenkins/jenkins:lts-jdk11
  23. resources:
  24. limits:
  25. memory: "2Gi"
  26. cpu: "1500m"
  27. requests:
  28. memory: "500Mi"
  29. cpu: "500m"
  30. ports:
  31. - name: http
  32. containerPort: 8080
  33. - name: jnlpport
  34. containerPort: 50000
  35. # 2023-01-31 can't get these to work. By default, host and scheme are blank
  36. # livenessProbe:
  37. # httpGet:
  38. # host: "jenkins.monkeybox.org"
  39. # scheme: HTTPS
  40. # path: "/login"
  41. # #port: 8080
  42. # port: 443
  43. # initialDelaySeconds: 90
  44. # periodSeconds: 10
  45. # timeoutSeconds: 5
  46. # failureThreshold: 5
  47. # readinessProbe:
  48. # httpGet:
  49. # host: "jenkins.monkeybox.org"
  50. # scheme: HTTPS
  51. # path: "/login"
  52. # #port: 8080
  53. # port: 443
  54. # initialDelaySeconds: 60
  55. # periodSeconds: 10
  56. # timeoutSeconds: 5
  57. # failureThreshold: 3
  58. volumeMounts:
  59. - name: jenkins-data
  60. mountPath: /var/jenkins_home
  61. # Initially installed without dnsConfig. We'll see if it's needed.
  62. # dnsConfig:
  63. # nameservers:
  64. # - 10.42.42.239
  65. # - 10.42.42.1
  66. # searches:
  67. # - default.svc.cluster.local
  68. # - svc.cluster.local
  69. # - cluster.local
  70. # options:
  71. # - name: ndots
  72. # value: "2"
  73. # - name: edns0
  74. # - name: trust-ad
  75. volumes:
  76. - name: jenkins-data
  77. persistentVolumeClaim:
  78. claimName: jenkins-pv-claim