diff --git a/deployment/concierge-graphql.yaml b/deployment/concierge-graphql.yaml new file mode 100644 index 0000000..841aba6 --- /dev/null +++ b/deployment/concierge-graphql.yaml @@ -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 + diff --git a/deployment/elasticsearch.yaml b/deployment/elasticsearch.yaml new file mode 100644 index 0000000..29f5522 --- /dev/null +++ b/deployment/elasticsearch.yaml @@ -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 + diff --git a/deployment/ingress.yaml b/deployment/ingress.yaml new file mode 100644 index 0000000..28e47c0 --- /dev/null +++ b/deployment/ingress.yaml @@ -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