Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
add multi cluster config
Browse files Browse the repository at this point in the history
  • Loading branch information
berndonline committed Dec 14, 2019
1 parent e94395b commit c843bfe
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 25 deletions.
Expand Up @@ -2,19 +2,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: eks
name: eks1
namespace: default
annotations:
fluxcd.io/automated: "true"
spec:
replicas: 2
replicas: 1
selector:
matchLabels:
app: eks
app: eks1
template:
metadata:
labels:
app: eks
app: eks1
spec:
containers:
- name: hello-kubernetes
Expand All @@ -23,4 +21,4 @@ spec:
- containerPort: 8080
env:
- name: MESSAGE
value: Hello Kubernetes! - EKS
value: Hello Kubernetes! - EKS v1
File renamed without changes.
6 changes: 2 additions & 4 deletions base/eks/service.yaml → clusters/eks/eks-app1/service.yaml
Expand Up @@ -2,14 +2,12 @@
apiVersion: v1
kind: Service
metadata:
name: eks
name: eks1
namespace: default
annotations:
fluxcd.io/automated: "true"
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
selector:
app: eks
app: eks1
2 changes: 1 addition & 1 deletion clusters/eks/kustomization.yaml
@@ -1,4 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../../base/eks
- ./eks-app1/
2 changes: 0 additions & 2 deletions clusters/gke/gke-app1/deployment.yaml
Expand Up @@ -4,8 +4,6 @@ kind: Deployment
metadata:
name: gke1
namespace: default
annotations:
fluxcd.io/automated: "true"
spec:
replicas: 1
selector:
Expand Down
2 changes: 0 additions & 2 deletions clusters/gke/gke-app1/service.yaml
Expand Up @@ -4,8 +4,6 @@ kind: Service
metadata:
name: gke1
namespace: default
annotations:
fluxcd.io/automated: "true"
spec:
type: LoadBalancer
ports:
Expand Down
2 changes: 0 additions & 2 deletions clusters/gke/gke-app2/deployment.yaml
Expand Up @@ -4,8 +4,6 @@ kind: Deployment
metadata:
name: gke2
namespace: default
annotations:
fluxcd.io/automated: "true"
spec:
replicas: 1
selector:
Expand Down
2 changes: 0 additions & 2 deletions clusters/gke/gke-app2/service.yaml
Expand Up @@ -4,8 +4,6 @@ kind: Service
metadata:
name: gke2
namespace: default
annotations:
fluxcd.io/automated: "true"
spec:
type: LoadBalancer
ports:
Expand Down
2 changes: 0 additions & 2 deletions common/prod/flux-patch.yaml
Expand Up @@ -2,8 +2,6 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
flux.weave.works/automated: "true"
name: common
namespace: default
spec:
Expand Down
2 changes: 0 additions & 2 deletions common/stage/flux-patch.yaml
Expand Up @@ -2,8 +2,6 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
flux.weave.works/automated: "true"
name: common
namespace: common
spec:
Expand Down
2 changes: 1 addition & 1 deletion common/stage/kustomization.yaml
@@ -1,5 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

bases:
- ../../base/common
- ./team1/
24 changes: 24 additions & 0 deletions common/stage/team1/deployment.yaml
@@ -0,0 +1,24 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: team1
namespace: team1
spec:
replicas: 1
selector:
matchLabels:
app: team1
template:
metadata:
labels:
app: team1
spec:
containers:
- name: hello-kubernetes
image: paulbouwer/hello-kubernetes:1.5
ports:
- containerPort: 8080
env:
- name: MESSAGE
value: Hello Kubernetes! - team1
6 changes: 6 additions & 0 deletions common/stage/team1/kustomization.yaml
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- deployment.yaml
- service.yaml
5 changes: 5 additions & 0 deletions common/stage/team1/namespace.yaml
@@ -0,0 +1,5 @@

apiVersion: v1
kind: Namespace
metadata:
name: team1
13 changes: 13 additions & 0 deletions common/stage/team1/service.yaml
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: team1
namespace: default
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
selector:
app: team1

0 comments on commit c843bfe

Please sign in to comment.