diff --git a/deploy/README.md b/deploy/README.md new file mode 100644 index 0000000..b22ae8d --- /dev/null +++ b/deploy/README.md @@ -0,0 +1,3 @@ +This is a Deployment Code for Kubernetes +This code would be used by Flux to deploy to a kubernretes environment +Test after enforcing branching model diff --git a/deploy/redis/deployment.yaml b/deploy/redis/deployment.yaml new file mode 100644 index 0000000..4fd1839 --- /dev/null +++ b/deploy/redis/deployment.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + app: redis + name: redis +spec: + replicas: 1 + selector: + matchLabels: + app: redis + strategy: {} + template: + metadata: + creationTimestamp: null + labels: + app: redis + spec: + containers: + - image: redis:alpine + name: redis + resources: {} diff --git a/deploy/redis/service.yaml b/deploy/redis/service.yaml new file mode 100644 index 0000000..5e5fbc9 --- /dev/null +++ b/deploy/redis/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + creationTimestamp: null + labels: + app: redis + name: redis +spec: + ports: + - name: "6379" + port: 6379 + protocol: TCP + targetPort: 6379 + selector: + app: redis + type: ClusterIP diff --git a/deploy/vote/deployment.yaml b/deploy/vote/deployment.yaml new file mode 100644 index 0000000..9617fc3 --- /dev/null +++ b/deploy/vote/deployment.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + app: vote + tier: front + name: vote +spec: + replicas: 2 + selector: + matchLabels: + app: vote + strategy: {} + template: + metadata: + creationTimestamp: null + labels: + app: vote + tier: front + spec: + containers: + - image: schoolofdevops/vote:v1 + name: vote + resources: {} diff --git a/deploy/vote/service.yaml b/deploy/vote/service.yaml new file mode 100644 index 0000000..ddd9489 --- /dev/null +++ b/deploy/vote/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + creationTimestamp: null + labels: + app: vote + tier: front + name: vote +spec: + ports: + - name: "80" + nodePort: 30000 + port: 80 + protocol: TCP + targetPort: 80 + selector: + app: vote + type: NodePort