Browse Source

Update example deployment

There's no need to have different deployments for standalone vs
cloud-connected, since the latter is only an argument or two
different.
Michael Bridgen 2 years ago
parent
commit
6947e6ddc5

+ 0
- 18
deploy/cloud/fluxd-dep.yaml View File

@@ -1,18 +0,0 @@
1
----
2
-apiVersion: extensions/v1beta1
3
-kind: Deployment
4
-metadata:
5
-  name: fluxd
6
-spec:
7
-  replicas: 1
8
-  template:
9
-    metadata:
10
-      labels:
11
-        name: fluxd
12
-    spec:
13
-      containers:
14
-      - name: fluxd
15
-        image: quay.io/weaveworks/fluxd:master-6cc08e4
16
-        imagePullPolicy: IfNotPresent
17
-        args:
18
-        - --token=INSERTTOKENHERE

+ 41
- 0
deploy/flux-deployment.yaml View File

@@ -0,0 +1,41 @@
1
+---
2
+apiVersion: extensions/v1beta1
3
+kind: Deployment
4
+metadata:
5
+  name: flux
6
+spec:
7
+  replicas: 1
8
+  template:
9
+    metadata:
10
+      labels:
11
+        name: flux
12
+    spec:
13
+      # The serviceAccount is only needed for Kubernetes with RBAC
14
+      # serviceAccount: flux
15
+      volumes:
16
+      - name: git-key
17
+        secret:
18
+          secretName: flux-git-deploy
19
+      containers:
20
+      - name: fluxd
21
+        image: quay.io/weaveworks/fluxd:latest
22
+        imagePullPolicy: IfNotPresent
23
+        volumeMounts:
24
+        - name: git-key
25
+          mountPath: /secrets/flux/git
26
+        args:
27
+        # if you deployed memcached, you can supply these arguments to
28
+        # tell fluxd to use it. You may need to change the namespace
29
+        # (`default`)
30
+        - --memcached-hostname=memcached.default.svc.cluster.local
31
+        - --memcached-timeout=100ms
32
+        - --memcached-service=memcached
33
+        - --registry-cache-expiry=20m
34
+        # replace (at least) the following URL
35
+        - --git-url=git@github.com:weaveworks/flux-example
36
+        - --git-key=/secrets/flux/git/id-rsa-flux
37
+        - --git-branch=master
38
+        # include these to connect to an "upstream" service (e.g.,
39
+        # Weave Cloud). The token is particular to the service.
40
+        # - --connect=ws://cloud.weave.works/api/flux
41
+        # - --token=abc123abc123abc123abc123

deploy/standalone/flux-service.yaml → deploy/flux-service.yaml View File


deploy/standalone/memcache-dep.yaml → deploy/memcache-dep.yaml View File

@@ -1,4 +1,6 @@
1 1
 ---
2
+# You can optionally deploy memcache, for the Flux daemon to cache
3
+# container image metadata.
2 4
 apiVersion: extensions/v1beta1
3 5
 kind: Deployment
4 6
 metadata:
@@ -20,4 +22,4 @@ spec:
20 22
         - -vv    # This gets us to the level of request logs.
21 23
         ports:
22 24
         - name: clients
23
-          containerPort: 11211
25
+          containerPort: 11211

deploy/standalone/memcache-svc.yaml → deploy/memcache-svc.yaml View File


+ 0
- 28
deploy/nats.yaml View File

@@ -1,28 +0,0 @@
1
----
2
-apiVersion: extensions/v1beta1
3
-kind: Deployment
4
-metadata:
5
-  name: nats
6
-spec:
7
-  replicas: 1
8
-  template:
9
-    metadata:
10
-      labels:
11
-        name: nats
12
-    spec:
13
-      containers:
14
-      - name: nats
15
-        image: library/nats:0.9.4
16
-        imagePullPolicy: IfNotPresent
17
-        args:
18
-        - nats
19
----
20
-apiVersion: v1
21
-kind: Service
22
-metadata:
23
-  name: nats
24
-spec:
25
-  ports:
26
-    - port: 4222
27
-  selector:
28
-    name: nats

+ 0
- 39
deploy/standalone/flux-deployment.yaml View File

@@ -1,39 +0,0 @@
1
-apiVersion: extensions/v1beta1
2
-kind: Deployment
3
-metadata:
4
-  name: flux
5
-spec:
6
-  replicas: 1
7
-
8
-  # Having maxSurge 0 and maxUnavailable 1 means the deployment will update one
9
-  # replica at a time as it will have to stop one (making one unavailable)
10
-  # before it can start one (surge of zero). This means if we have > 1 replica,
11
-  # we will stay available while deploying.
12
-  strategy:
13
-    rollingUpdate:
14
-      maxSurge: 0
15
-      maxUnavailable: 1
16
-
17
-  template:
18
-    metadata:
19
-      labels:
20
-        name: flux
21
-    spec:
22
-      # Give fluxsvc up to 10 minutes grace to finish jobs in progress and exit
23
-      # cleanly. Service is available during this time, as long as we don't
24
-      # stop too many replicas at once.
25
-      terminationGracePeriodSeconds: 600
26
-
27
-      containers:
28
-      - name: fluxd
29
-        image: quay.io/weaveworks/fluxd:master-952c028
30
-        args:
31
-        - --fluxsvc-address=ws://localhost:3030/api/flux
32
-      - name: fluxsvc
33
-        image: quay.io/weaveworks/fluxsvc:master-952c028
34
-        args:
35
-        - --database-source=file://flux.db
36
-        - --memcached-hostname=memcached.default.svc.cluster.local
37
-        - --memcached-timeout=100ms
38
-        - --memcached-service=memcached
39
-        - --registry-cache-expiry=20m

Loading…
Cancel
Save