SHARE
TWEET

Untitled

a guest Jun 18th, 2019 249 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---
  2. apiVersion: v1
  3. kind: ServiceAccount
  4. metadata:
  5.   name: traefik-ingress-controller
  6.   namespace: kube-system
  7. ---
  8. apiVersion: extensions/v1beta1
  9. kind: Deployment
  10. metadata:
  11.   name: traefik-ingress-controller
  12.   namespace: kube-system
  13.   labels:
  14.     k8s-app: traefik-ingress-lb
  15. spec:
  16.   replicas: 1
  17.   selector:
  18.     matchLabels:
  19.       k8s-app: traefik-ingress-lb
  20.   template:
  21.     metadata:
  22.       labels:
  23.         k8s-app: traefik-ingress-lb
  24.         name: traefik-ingress-lb
  25.     spec:
  26.       serviceAccountName: traefik-ingress-controller
  27.       terminationGracePeriodSeconds: 60
  28.       containers:
  29.         - image: traefik:1.7.12
  30.           name: traefik-ingress-lb
  31.           ports:
  32.             - name: http
  33.               containerPort: 80
  34.             - name: https
  35.               containerPort: 443
  36.             - name: admin
  37.               containerPort: 8080
  38.           args:
  39.             - --api
  40.             - --kubernetes
  41.             - --logLevel=INFO
  42.             - --defaultentrypoints=http,https
  43.             - --entrypoints=Name:https Address::443 TLS
  44.             - --entrypoints=Name:http Address::80
  45.             - --insecureSkipVerify=true
  46. ---
  47. apiVersion: v1
  48. kind: Service
  49. metadata:
  50.   name: traefik-ingress-service
  51.   namespace: kube-system
  52. spec:
  53.   selector:
  54.     k8s-app: traefik-ingress-lb
  55.   ports:
  56.     - protocol: TCP
  57.       port: 80
  58.       name: web
  59.     - protocol: TCP
  60.       port: 443
  61.       name: web-secure
  62.     - protocol: TCP
  63.       port: 8080
  64.       name: admin
  65.   type: LoadBalancer
  66.      
  67. apiVersion: v1
  68. kind: Service
  69. metadata:
  70.   name: traefik-web-ui
  71.   namespace: kube-system
  72. spec:
  73.   selector:
  74.     k8s-app: traefik-ingress-lb
  75.   ports:
  76.     - name: web
  77.       port: 80
  78.       targetPort: 8080
  79.     - name: web-secure
  80.       port: 443
  81.       targetPort: 8080
  82. ---
  83. apiVersion: extensions/v1beta1
  84. kind: Ingress
  85. metadata:
  86.   name: traefik-web-ui
  87.   namespace: kube-system
  88.   annotations:
  89.     kubernetes.io/ingress.class: traefik
  90. spec:
  91.   rules:
  92.     - host: traefik.localhost
  93.       http:
  94.         paths:
  95.           - backend:
  96.               serviceName: traefik-web-ui
  97.               servicePort: 80
  98.      
  99. apiVersion: extensions/v1beta1
  100. kind: Ingress
  101. metadata:
  102.   name: behive-backend
  103.   annotations:
  104.     kubernetes.io/ingress.class: traefik
  105.     ingress.kubernetes.io/protocol: https
  106.     traefik.ingress.kubernetes.io/redirect-entry-point: https
  107.     traefik.ingress.kubernetes.io/redirect-permanent: "true"
  108. spec:
  109.   rules:
  110.     - host: wh-entry.behive.io
  111.       http:
  112.         paths:
  113.           - path: /
  114.             backend:
  115.               serviceName: webhook-service
  116.               servicePort: 3000
  117.   tls:
  118.     - secretName: traefik-ui-tls-cert
  119.      
  120. apiVersion: v1
  121. kind: Service
  122. metadata:
  123.   name: webhook-service
  124.   labels:
  125.     app: behive-webhook-entry
  126. spec:
  127.   ports:
  128.     - name: node-app
  129.       port: 3000
  130.       targetPort: 3000
  131.   selector:
  132.     app: behive-webhook-entry
  133. ---
  134. apiVersion: extensions/v1beta1
  135. kind: Deployment
  136. metadata:
  137.   name: webhook-deployment
  138.   labels:
  139.     app: behive-webhook-entry
  140.     env: prod
  141. spec:
  142.   selector:
  143.     matchLabels:
  144.       app: behive-webhook-entry
  145.   replicas: 1
  146.   strategy:
  147.     type: Recreate
  148.   template:
  149.     metadata:
  150.       annotations:
  151.         ad.datadoghq.com/nodejs.logs: '[{"source":"nodejs","service":"webhook-entry"}]'
  152.       labels:
  153.         app: behive-webhook-entry
  154.         env: prod
  155.     spec:
  156.       containers:
  157.         - name: webhook
  158.           image: mutterpedro/behive-wh-entry:1.0.0
  159.           ports:
  160.             - name: app
  161.               containerPort: 3000
  162.               hostPort: 3000
  163.           livenessProbe:
  164.             httpGet:
  165.               port: 3000
  166.               path: /liveness
  167.             initialDelaySeconds: 60
  168.             periodSeconds: 300
  169.           readinessProbe:
  170.             httpGet:
  171.               port: 3000
  172.               path: /readiness
  173.             initialDelaySeconds: 90
  174.             periodSeconds: 300
  175.           env:
  176.             - name: KAFKA_HOST
  177.               value: kafka-service:9092
  178.             - name: FIREBASE_API_KEY
  179.               valueFrom:
  180.                 secretKeyRef:
  181.                   name: firebase
  182.                   key: api-key
  183.             - name: FIREBASE_DATABASE_URL
  184.               valueFrom:
  185.                 secretKeyRef:
  186.                   name: firebase
  187.                   key: database-url
  188.             - name: FIREBASE_PROJECT_ID
  189.               valueFrom:
  190.                 secretKeyRef:
  191.                   name: firebase
  192.                   key: project-id
  193.             - name: AUTH_USER
  194.               valueFrom:
  195.                 secretKeyRef:
  196.                   name: wh-basic-auth
  197.                   key: user
  198.             - name: AUTH_PASSWORD
  199.               valueFrom:
  200.                 secretKeyRef:
  201.                   name: wh-basic-auth
  202.                   key: password
  203.             - name: DD_API_KEY
  204.               valueFrom:
  205.                 secretKeyRef:
  206.                   name: datadog-secret
  207.                   key: api-key
  208.       imagePullSecrets:
  209.         - name: regcred
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top