blog.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. ---
  2. apiVersion: v1
  3. kind: Namespace
  4. metadata:
  5. name: blog
  6. ---
  7. apiVersion: apps/v1
  8. kind: Deployment
  9. metadata:
  10. name: jekyll
  11. namespace: blog
  12. spec:
  13. selector:
  14. matchLabels:
  15. app: jekyll
  16. replicas: 2
  17. template:
  18. metadata:
  19. labels:
  20. app: jekyll
  21. spec:
  22. containers:
  23. - name: jekyll
  24. image: jibby0/docker-jekyll-webhook:latest
  25. ports:
  26. - containerPort: 80
  27. name: http-web-svc
  28. # TODO re-add caching
  29. # tbh this whole auto-update thing isn't really necessary with k8s anymore
  30. #volumeMounts:
  31. #- mountPath: "/vendor"
  32. # name: vendor-cache
  33. env:
  34. - name: TZ
  35. value: America/New_York
  36. - name: REPO
  37. value: https://github.com/jibby0/blog.git
  38. - name: WEBHOOK_SECRET
  39. envFrom:
  40. - secretRef:
  41. name: webhook
  42. livenessProbe:
  43. httpGet:
  44. path: /
  45. port: 80
  46. failureThreshold: 10
  47. initialDelaySeconds: 300
  48. periodSeconds: 10
  49. ---
  50. apiVersion: v1
  51. kind: Service
  52. metadata:
  53. name: jekyll-service
  54. namespace: blog
  55. spec:
  56. selector:
  57. app: jekyll
  58. type: ClusterIP
  59. ports:
  60. - name: jekyll-port
  61. protocol: TCP
  62. port: 80
  63. targetPort: http-web-svc
  64. ---
  65. apiVersion: traefik.containo.us/v1alpha1
  66. kind: IngressRoute
  67. metadata:
  68. name: jekyll
  69. namespace: blog
  70. spec:
  71. entryPoints:
  72. - websecure
  73. routes:
  74. - kind: Rule
  75. match: Host(`jibby.org`)
  76. services:
  77. - kind: Service
  78. name: jekyll-service
  79. port: 80