diff --git a/applicationsets/eck-resources.yaml b/applicationsets/eck-resources.yaml index e69de29..1586ffc 100644 --- a/applicationsets/eck-resources.yaml +++ b/applicationsets/eck-resources.yaml @@ -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 \ No newline at end of file diff --git a/argocd-apps-operators/eck-operator.yaml b/argocd-apps-operators/eck-operator.yaml new file mode 100644 index 0000000..022377e --- /dev/null +++ b/argocd-apps-operators/eck-operator.yaml @@ -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 \ No newline at end of file diff --git a/argocd-apps/eck-operator.yaml b/argocd-apps/eck-operator.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/charts/eck-resources/Chart.yaml b/charts/eck-resources/Chart.yaml new file mode 100644 index 0000000..111143f --- /dev/null +++ b/charts/eck-resources/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: eck-resources +description: Deploy Elasticsearch and Kibana via ECK +version: 0.1.0 +appVersion: "8.12.0" \ No newline at end of file diff --git a/charts/eck-resources/my-values/values-int.yaml b/charts/eck-resources/my-values/values-int.yaml new file mode 100644 index 0000000..8159326 --- /dev/null +++ b/charts/eck-resources/my-values/values-int.yaml @@ -0,0 +1,2 @@ +env: int +host: kibana-int.dvirlabs.com \ No newline at end of file diff --git a/charts/eck-resources/my-values/values-prod.yaml b/charts/eck-resources/my-values/values-prod.yaml new file mode 100644 index 0000000..4277e0e --- /dev/null +++ b/charts/eck-resources/my-values/values-prod.yaml @@ -0,0 +1,2 @@ +env: prod +host: kibana-prod.dvirlabs.com \ No newline at end of file diff --git a/charts/eck-resources/templates/elasticsearch.yaml b/charts/eck-resources/templates/elasticsearch.yaml new file mode 100644 index 0000000..b27a586 --- /dev/null +++ b/charts/eck-resources/templates/elasticsearch.yaml @@ -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 \ No newline at end of file diff --git a/charts/eck-resources/templates/kibana.yaml b/charts/eck-resources/templates/kibana.yaml new file mode 100644 index 0000000..0d9fee0 --- /dev/null +++ b/charts/eck-resources/templates/kibana.yaml @@ -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 }} \ No newline at end of file