GitOps for k8s
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

flux-deploy-all.yaml 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ---
  2. apiVersion: extensions/v1beta1
  3. kind: Deployment
  4. metadata:
  5. name: memcached
  6. spec:
  7. replicas: 1
  8. template:
  9. metadata:
  10. labels:
  11. name: memcached
  12. spec:
  13. containers:
  14. - name: memcached
  15. image: memcached:1.4.25
  16. imagePullPolicy: IfNotPresent
  17. args:
  18. - -m 64 # Maximum memory to use, in megabytes. 64MB is default.
  19. - -p 11211 # Default port, but being explicit is nice.
  20. - -vv # This gets us to the level of request logs.
  21. ports:
  22. - name: clients
  23. containerPort: 11211
  24. ---
  25. apiVersion: v1
  26. kind: Service
  27. metadata:
  28. name: memcached
  29. spec:
  30. # The memcache client uses DNS to get a list of memcached servers and then
  31. # uses a consistent hash of the key to determine which server to pick.
  32. clusterIP: None
  33. ports:
  34. - name: memcached
  35. port: 11211
  36. selector:
  37. name: memcached
  38. ---
  39. # Expose Flux to fluxctl
  40. apiVersion: v1
  41. kind: Service
  42. metadata:
  43. name: flux
  44. spec:
  45. type: NodePort
  46. ports:
  47. - port: 80
  48. targetPort: 3030
  49. nodePort: 30080 # Hardwired for test harness access
  50. selector:
  51. name: flux
  52. ---
  53. apiVersion: extensions/v1beta1
  54. kind: Deployment
  55. metadata:
  56. name: flux
  57. spec:
  58. replicas: 1
  59. strategy:
  60. type: Recreate
  61. template:
  62. metadata:
  63. labels:
  64. name: flux
  65. spec:
  66. volumes:
  67. - name: git-key
  68. secret:
  69. secretName: flux-git-deploy
  70. - name: ssh-known-hosts
  71. configMap:
  72. name: ssh-known-hosts
  73. items:
  74. - key: known_hosts
  75. path: known_hosts
  76. containers:
  77. - name: flux
  78. # Require locally built image
  79. image: docker.io/weaveworks/flux:latest
  80. imagePullPolicy: Never
  81. ports:
  82. - containerPort: 3030 # informational
  83. volumeMounts:
  84. - name: git-key
  85. mountPath: /etc/fluxd/ssh
  86. - name: ssh-known-hosts
  87. mountPath: /root/.ssh
  88. args:
  89. - --memcached-hostname=memcached
  90. - --memcached-timeout=100ms
  91. - --memcached-service=memcached
  92. - --registry-cache-expiry=20m
  93. # Access minikube hosted config repo by ssh
  94. - --git-url=ssh://docker@MINIKUBE_IP:/home/docker/flux.git
  95. - --git-branch=master
  96. # Tune up to make tests run quicker
  97. - --registry-poll-interval=60s
  98. - --git-poll-interval=60s