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