web-check.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: web-check
  5. spec:
  6. replicas: 1
  7. selector:
  8. matchLabels:
  9. name: web-check
  10. template:
  11. metadata:
  12. labels:
  13. nginx: backend
  14. name: web-check
  15. spec:
  16. affinity:
  17. nodeAffinity:
  18. requiredDuringSchedulingIgnoredDuringExecution:
  19. nodeSelectorTerms:
  20. - matchExpressions:
  21. - key: kubernetes.io/arch
  22. operator: In
  23. values:
  24. - amd64
  25. containers:
  26. - name: web-check
  27. image: lissy93/web-check:latest
  28. imagePullPolicy: "Always"
  29. env:
  30. - name: GOOGLE_CLOUD_API_KEY
  31. valueFrom:
  32. secretKeyRef:
  33. name: web-check
  34. key: googlecloud
  35. - name: REACT_APP_SHODAN_API_KEY
  36. valueFrom:
  37. secretKeyRef:
  38. name: web-check
  39. key: shodan
  40. - name: REACT_APP_WHO_API_KEY
  41. valueFrom:
  42. secretKeyRef:
  43. name: web-check
  44. key: whoapi
  45. - name: SECURITY_TRAILS_API_KEY
  46. valueFrom:
  47. secretKeyRef:
  48. name: web-check
  49. key: securitytrails
  50. - name: BUILT_WITH_API_KEY
  51. valueFrom:
  52. secretKeyRef:
  53. name: web-check
  54. key: builtwith
  55. - name: TRANCO_USERNAME
  56. valueFrom:
  57. secretKeyRef:
  58. name: web-check
  59. key: tranco-username
  60. - name: TRANCO_API_KEY
  61. valueFrom:
  62. secretKeyRef:
  63. name: web-check
  64. key: tranco-api-key
  65. ports:
  66. - containerPort: 3000
  67. name: http
  68. livenessProbe:
  69. initialDelaySeconds: 600
  70. timeoutSeconds: 10
  71. httpGet:
  72. port: 3000
  73. httpHeaders:
  74. - name: Host
  75. value: "web-check.dodges.it"
  76. ---
  77. apiVersion: v1
  78. kind: Service
  79. metadata:
  80. name: web-check
  81. spec:
  82. type: ClusterIP
  83. ipFamilyPolicy: PreferDualStack
  84. selector:
  85. name: web-check
  86. ports:
  87. - protocol: TCP
  88. port: 3000
  89. targetPort: 3000
  90. name: http
  91. ---
  92. apiVersion: networking.k8s.io/v1
  93. kind: Ingress
  94. metadata:
  95. name: web-check-ingress
  96. annotations:
  97. cert-manager.io/cluster-issuer: "letsencrypt"
  98. acme.cert-manager.io/http01-edit-in-place: "true"
  99. nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
  100. spec:
  101. tls:
  102. - hosts:
  103. - web-check.dodges.it
  104. secretName: web-check-le-secret
  105. rules:
  106. - host: web-check.dodges.it
  107. http:
  108. paths:
  109. - path: /
  110. pathType: Prefix
  111. backend:
  112. service:
  113. name: web-check
  114. port:
  115. number: 3000
  116. ingressClassName: nginx