Skip to content

Commit

Permalink
Working Kubernetes deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
fredex42 committed Dec 8, 2023
1 parent a59dd3b commit ca680e0
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 0 deletions.
58 changes: 58 additions & 0 deletions deployment/concierge-graphql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
apiVersion: v1
kind: Service
metadata:
labels:
service: concierge-graphql
stack: concierge-graphql
name: concierge-graphql
spec:
ports:
- name: webapp
port: 9000
targetPort: 9000
selector:
service: concierge-graphql
stack: concierge-graphql
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
service: concierge-graphql
stack: concierge-graphql
name: concierge-graphql
spec:
replicas: 1
revisionHistoryLimit: 5
selector:
matchLabels:
service: concierge-graphql
stack: concierge-graphql
template:
metadata:
labels:
service: concierge-graphql
stack: concierge-graphql
spec:
containers:
- name: concierge-graphql
image: andyg42/concierge-graphql:DEV
env:
- name: ELASTICSEARCH_HOST
value: capi-elasticsearch
imagePullPolicy: Always
ports:
- containerPort: 9000
readinessProbe:
httpGet:
path: /healthcheck
port: 9000
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
httpGet:
path: /healthcheck
port: 9000
initialDelaySeconds: 15
periodSeconds: 3

75 changes: 75 additions & 0 deletions deployment/elasticsearch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.19.0 (f63a961c)
creationTimestamp: null
labels:
io.kompose.service: capi-elasticsearch
name: capi-elasticsearch
spec:
type: NodePort
ports:
- name: '9200'
port: 9200
targetPort: 9200
- name: '9300'
port: 9300
targetPort: 9300
selector:
service: elasticsearch
stack: concierge-graphql
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
service: elasticsearch
stack: concierge-graphql
name: capi-elasticsearch
spec:
replicas: 1
selector:
matchLabels:
service: elasticsearch
stack: concierge-graphql
serviceName: capi-elasticsearch
template:
metadata:
labels:
service: elasticsearch
stack: concierge-graphql
name: capi-elasticsearch
spec:
#initContainers:
#- image: elasticsearch:7.17.14
# name: install-plugins
# command:
# - bin/elasticsearch-plugin
# - install
# - repository-s3
containers:
- env:
- name: ES_JAVA_OPTS
value: -Xmx2048m -Xms2048m
- name: discovery.type
value: single-node
image: andyg42/elasticsearch-with-s3snap:7.17.14
name: capi-elasticsearch
ports:
- containerPort: 9200
- containerPort: 9300
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: esdata
volumeClaimTemplates:
- metadata:
name: esdata
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 80Gi

16 changes: 16 additions & 0 deletions deployment/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: concierge-graphql-ingress
spec:
rules:
- host: concierge-graphql.test
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: concierge-graphql
port:
number: 9000

0 comments on commit ca680e0

Please sign in to comment.