Deploy ECK operator and create instances for int and prod

This commit is contained in:
dvirlabs 2025-05-15 08:30:39 +03:00
parent 24984f2a7c
commit 3da8980b0f
8 changed files with 110 additions and 0 deletions

View File

@ -0,0 +1,38 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: eck-resources
namespace: argocd
spec:
generators:
- list:
elements:
- env: prod
valuesFile: values-prod.yaml
nameSuffix: eck-prod
host: kibana-prod.dvirlabs.com
- env: int
valuesFile: values-int.yaml
nameSuffix: eck-int
host: kibana-int.dvirlabs.com
template:
metadata:
name: '{{nameSuffix}}'
spec:
project: observability
source:
repoURL: https://git.dvirlabs.com/dvirlabs/observability-stack.git
targetRevision: master
path: charts/eck-resources
helm:
valueFiles:
- my-values/{{valuesFile}}
destination:
server: https://kubernetes.default.svc
namespace: observability-stack
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

View File

@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: eck-operator
namespace: argocd
spec:
project: observability
source:
repoURL: https://helm.elastic.co
chart: eck-operator
targetRevision: 2.10.0
helm:
releaseName: eck-operator
destination:
server: https://kubernetes.default.svc
namespace: observability-stack
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

View File

@ -0,0 +1,5 @@
apiVersion: v2
name: eck-resources
description: Deploy Elasticsearch and Kibana via ECK
version: 0.1.0
appVersion: "8.12.0"

View File

@ -0,0 +1,2 @@
env: int
host: kibana-int.dvirlabs.com

View File

@ -0,0 +1,2 @@
env: prod
host: kibana-prod.dvirlabs.com

View File

@ -0,0 +1,20 @@
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: elasticsearch-{{ .Values.env }}
spec:
version: 8.12.0
nodeSets:
- name: default
count: 1
config:
node.store.allow_mmap: false
volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: nfs-client
resources:
requests:
storage: 5Gi

View File

@ -0,0 +1,21 @@
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kibana-{{ .Values.env }}
spec:
version: 8.12.0
count: 1
elasticsearchRef:
name: elasticsearch-{{ .Values.env }}
http:
service:
spec:
type: ClusterIP
ingress:
enabled: true
ingressClassName: traefik
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
hosts:
- host: {{ .Values.host }}