From a4212e86d1c69e0739019b1cf21c1052247e5da7 Mon Sep 17 00:00:00 2001 From: falsfour Date: Fri, 12 Dec 2025 18:29:51 +0100 Subject: [PATCH] elastic and drawio --- apps/drawio/deployment.yaml | 2 ++ apps/elasticsearch/deployment.yaml | 49 ++++++++++++++++++++++++++++++ apps/elasticsearch/pvc.yaml | 11 +++++++ apps/elasticsearch/secret.yaml | 8 +++++ apps/elasticsearch/service.yaml | 15 +++++++++ 5 files changed, 85 insertions(+) create mode 100644 apps/elasticsearch/deployment.yaml create mode 100644 apps/elasticsearch/pvc.yaml create mode 100644 apps/elasticsearch/secret.yaml create mode 100644 apps/elasticsearch/service.yaml diff --git a/apps/drawio/deployment.yaml b/apps/drawio/deployment.yaml index e03efdd..875b808 100644 --- a/apps/drawio/deployment.yaml +++ b/apps/drawio/deployment.yaml @@ -12,6 +12,8 @@ spec: labels: app: drawio spec: + nodeSelector: + role: sebastianscode containers: - name: drawio image: docker.io/jgraph/drawio diff --git a/apps/elasticsearch/deployment.yaml b/apps/elasticsearch/deployment.yaml new file mode 100644 index 0000000..a10fbc2 --- /dev/null +++ b/apps/elasticsearch/deployment.yaml @@ -0,0 +1,49 @@ + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: elasticsearch +spec: + replicas: 1 + selector: + matchLabels: + app: elasticsearch + template: + metadata: + labels: + app: elasticsearch + spec: + containers: + - name: elasticsearch + image: docker.elastic.co/elasticsearch/elasticsearch:8.14.3 + ports: + - containerPort: 9200 + - containerPort: 9300 + env: + - name: discovery.type + value: "single-node" + - name: ES_JAVA_OPTS + value: "-Xms2g -Xmx2g" + - name: ELASTIC_PASSWORD + valueFrom: + secretKeyRef: + name: elasticsearch-secret + key: elastic-password + - name: xpack.security.enabled + value: "true" + - name: xpack.security.http.ssl.enabled + value: "false" + resources: + requests: + memory: "3Gi" + cpu: "250m" + limits: + memory: "4Gi" + cpu: "1" + volumeMounts: + - name: data + mountPath: /usr/share/elasticsearch/data + volumes: + - name: data + persistentVolumeClaim: + claimName: elasticsearch-data diff --git a/apps/elasticsearch/pvc.yaml b/apps/elasticsearch/pvc.yaml new file mode 100644 index 0000000..5b0decb --- /dev/null +++ b/apps/elasticsearch/pvc.yaml @@ -0,0 +1,11 @@ + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: elasticsearch-data +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 75Gi diff --git a/apps/elasticsearch/secret.yaml b/apps/elasticsearch/secret.yaml new file mode 100644 index 0000000..1f69f1c --- /dev/null +++ b/apps/elasticsearch/secret.yaml @@ -0,0 +1,8 @@ + +apiVersion: v1 +kind: Secret +metadata: + name: elasticsearch-secret +type: Opaque +stringData: + elastic-password: "6YYHw676cSnl19wjKebHTXwCfe9xAzCxsqklPIJYYFhQr7tUReIyOIOndAUzalWM4TVl4+S/A/BE01jU" diff --git a/apps/elasticsearch/service.yaml b/apps/elasticsearch/service.yaml new file mode 100644 index 0000000..dcc86dc --- /dev/null +++ b/apps/elasticsearch/service.yaml @@ -0,0 +1,15 @@ + +apiVersion: v1 +kind: Service +metadata: + name: elasticsearch +spec: + selector: + app: elasticsearch + ports: + - port: 9200 + targetPort: 9200 + name: http + - port: 9300 + targetPort: 9300 + name: transport