4.service.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: jenkins
  5. labels:
  6. run: jenkins
  7. namespace: default
  8. annotations:
  9. prometheus.io/scrape: 'true'
  10. prometheus.io/path: /
  11. prometheus.io/port: '8080'
  12. spec:
  13. selector:
  14. run: jenkins
  15. # app: jenkins-server
  16. # type: NodePort
  17. ports:
  18. - name: http
  19. port: 80
  20. targetPort: 8080
  21. # nodePort: 32000
  22. - name: jnlpport
  23. port: 50000
  24. targetPort: 50000
  25. # nodePort: 32000
  26. ---
  27. # Hosting
  28. apiVersion: networking.k8s.io/v1
  29. kind: Ingress
  30. metadata:
  31. name: jenkins
  32. annotations:
  33. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  34. ## No basic auth for smokeping
  35. ## type of authentication
  36. #nginx.ingress.kubernetes.io/auth-type: basic
  37. ## name of the secret that contains the user/password definitions
  38. #nginx.ingress.kubernetes.io/auth-secret: basic-auth
  39. ## message to display with an appropriate context why the authentication is required
  40. #nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Octoprint'
  41. spec:
  42. tls:
  43. - hosts:
  44. - jenkins.monkeybox.org
  45. secretName: jenkins-tls
  46. rules:
  47. - host: jenkins.monkeybox.org
  48. http:
  49. paths:
  50. - path: /
  51. pathType: Prefix
  52. backend:
  53. service:
  54. name: jenkins
  55. port:
  56. number: 80