added repo

This commit is contained in:
Your Name
2026-08-26 03:39:42 +05:30
parent 45c25a95af
commit b8575bb8b9
6889 changed files with 1217125 additions and 0 deletions
@@ -0,0 +1,4 @@
apiVersion: v2
name: elasticsearch-mcp
description: MCP Server for Elasticsearch — exposes ES tools over HTTP for AI clients
version: 1.0.0
@@ -0,0 +1,10 @@
{{- define "elasticsearch-mcp.name" -}}
{{- .Values.fullnameOverride | default .Release.Name }}
{{- end }}
{{- define "elasticsearch-mcp.labels" -}}
app: {{ include "elasticsearch-mcp.name" . }}
{{- with .Values.labels }}
{{ toYaml . }}
{{- end }}
{{- end }}
@@ -0,0 +1,68 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "elasticsearch-mcp.name" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "elasticsearch-mcp.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicas }}
selector:
matchLabels:
app: {{ include "elasticsearch-mcp.name" . }}
template:
metadata:
labels:
app: {{ include "elasticsearch-mcp.name" . }}
{{- with .Values.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ if .Values.serviceAccount.name }}{{ .Values.serviceAccount.name }}{{ else }}{{ include "elasticsearch-mcp.name" . }}{{ end }}
{{- end }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: elasticsearch-mcp
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- http
envFrom:
- secretRef:
name: {{ include "elasticsearch-mcp.name" . }}-creds
ports:
- name: http
containerPort: {{ .Values.service.port }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
@@ -0,0 +1,20 @@
{{- if .Values.externalSecrets -}}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: {{ include "elasticsearch-mcp.name" . }}-creds
namespace: {{ .Release.Namespace }}
spec:
refreshInterval: {{ .Values.externalSecrets.refreshInterval }}
secretStoreRef:
name: {{ .Values.externalSecrets.secretStoreRef.name }}
kind: {{ .Values.externalSecrets.secretStoreRef.kind }}
target:
name: {{ include "elasticsearch-mcp.name" . }}-creds
creationPolicy: Owner
deletionPolicy: Retain
dataFrom:
- extract:
conversionStrategy: Default
key: {{ .Values.externalSecrets.dataFrom.secretKey }}
{{- end }}
@@ -0,0 +1,29 @@
{{- if .Values.ingress.enabled -}}
{{- if .Values.createContourGateway -}}
{{- if or ( eq "contour-internal" .Values.ingress.ingressClassName ) ( eq "contour-external" .Values.ingress.ingressClassName ) ( eq "contour-internal-0" .Values.ingress.ingressClassName ) ( eq "contour-internal-1" .Values.ingress.ingressClassName ) ( eq "contour-external-0" .Values.ingress.ingressClassName ) ( eq "contour-external-1" .Values.ingress.ingressClassName ) }}
{{- $serviceName := include "elasticsearch-mcp.name" . -}}
{{- $servicePortNumber := .Values.ingress.servicePortNumber | default 8080 -}}
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
namespace: {{ .Release.Namespace }}
name: {{ $serviceName }}
labels:
{{- include "elasticsearch-mcp.labels" . | nindent 4 }}
annotations:
projectcontour.io/ingress.class: {{ .Values.ingress.ingressClassName }}
spec:
ingressClassName: {{ .Values.ingress.ingressClassName }}
routes:
- services:
- name: {{ $serviceName }}
port: {{ $servicePortNumber }}
{{- if .Values.ingress.slowStart.enabled }}
slowStartPolicy:
window: {{ .Values.ingress.slowStart.window }}
aggression: {{ .Values.ingress.slowStart.aggression | float64 | squote }}
minWeightPercent: {{ .Values.ingress.slowStart.minPercent }}
{{- end }}
{{- end -}}
{{- end -}}
{{- end -}}
@@ -0,0 +1,39 @@
{{- if .Values.ingress.enabled -}}
{{- if .Values.createContourGateway -}}
{{- if or (eq "contour-internal" .Values.ingress.ingressClassName) (eq "contour-internal-0" .Values.ingress.ingressClassName) (eq "contour-internal-1" .Values.ingress.ingressClassName) }}
{{- $serviceName := include "elasticsearch-mcp.name" . -}}
{{- $servicePortNumber := .Values.ingress.servicePortNumber | default 8080 -}}
{{- $intraIngressClass := "" -}}
{{- if eq .Values.ingress.ingressClassName "contour-internal" -}}
{{- $intraIngressClass = "contour-internal-intra" -}}
{{- else if eq .Values.ingress.ingressClassName "contour-internal-0" -}}
{{- $intraIngressClass = "contour-internal-intra-0" -}}
{{- else if eq .Values.ingress.ingressClassName "contour-internal-1" -}}
{{- $intraIngressClass = "contour-internal-intra-1" -}}
{{- end -}}
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
namespace: {{ .Release.Namespace }}
name: {{ $serviceName }}-intra
labels:
{{- include "elasticsearch-mcp.labels" . | nindent 4 }}
annotations:
projectcontour.io/ingress.class: {{ $intraIngressClass }}
spec:
ingressClassName: {{ $intraIngressClass }}
routes:
- services:
- name: {{ $serviceName }}
port: {{ $servicePortNumber }}
{{- if .Values.ingress.slowStart.enabled }}
slowStartPolicy:
window: {{ .Values.ingress.slowStart.window }}
aggression: {{ .Values.ingress.slowStart.aggression | float64 | squote }}
minWeightPercent: {{ .Values.ingress.slowStart.minPercent }}
{{- end }}
{{- end -}}
{{- end -}}
{{- end -}}
@@ -0,0 +1,48 @@
{{- if .Values.ingress.enabled -}}
{{- if .Values.createContourGateway -}}
{{- if or (eq "contour-internal" .Values.ingress.ingressClassName) (eq "contour-internal-0" .Values.ingress.ingressClassName) (eq "contour-internal-1" .Values.ingress.ingressClassName) }}
{{- $serviceName := include "elasticsearch-mcp.name" . -}}
{{- $servicePortNumber := .Values.ingress.servicePortNumber | default 8080 -}}
{{- $intraIngressClass := "" -}}
{{- if eq .Values.ingress.ingressClassName "contour-internal" -}}
{{- $intraIngressClass = "contour-internal-intra" -}}
{{- else if eq .Values.ingress.ingressClassName "contour-internal-0" -}}
{{- $intraIngressClass = "contour-internal-intra-0" -}}
{{- else if eq .Values.ingress.ingressClassName "contour-internal-1" -}}
{{- $intraIngressClass = "contour-internal-intra-1" -}}
{{- end -}}
{{ $count := 0 | int }}
{{- range .Values.ingress.hosts }}
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
namespace: {{ $.Release.Namespace }}
name: {{ $serviceName }}-intra-{{ $count }}
labels:
{{- include "elasticsearch-mcp.labels" $ | nindent 4 }}
annotations:
projectcontour.io/ingress.class: {{ $intraIngressClass }}
spec:
ingressClassName: {{ $intraIngressClass }}
virtualhost:
fqdn: "{{ .host }}"
includes:
{{- range .paths }}
- conditions:
{{- if or (eq (lower .pathType) "prefix") (eq (lower .pathType) "implementationspecific") }}
- prefix: {{ .path }}
{{- end }}
{{- if eq (lower .pathType) "exact" }}
- exact: {{ .path }}
{{- end }}
name: {{ $serviceName }}-intra
namespace: {{ $.Release.Namespace }}
{{- end }}
---
{{ $count = add1 $count }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
@@ -0,0 +1,39 @@
{{- if .Values.ingress.enabled -}}
{{- if .Values.createContourGateway -}}
{{- if or ( eq "contour-internal" .Values.ingress.ingressClassName ) ( eq "contour-external" .Values.ingress.ingressClassName ) ( eq "contour-internal-0" .Values.ingress.ingressClassName ) ( eq "contour-internal-1" .Values.ingress.ingressClassName ) ( eq "contour-external-0" .Values.ingress.ingressClassName ) ( eq "contour-external-1" .Values.ingress.ingressClassName ) }}
{{- $serviceName := include "elasticsearch-mcp.name" . -}}
{{- $servicePortNumber := .Values.ingress.servicePortNumber | default 8080 -}}
{{- $ingressClassName := .Values.ingress.ingressClassName -}}
{{ $count := 0 | int }}
{{- range .Values.ingress.hosts }}
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
namespace: {{ $.Release.Namespace }}
name: {{ $serviceName }}-{{ $count }}
labels:
{{- include "elasticsearch-mcp.labels" $ | nindent 4 }}
annotations:
projectcontour.io/ingress.class: {{ $ingressClassName }}
spec:
ingressClassName: {{ $ingressClassName }}
virtualhost:
fqdn: "{{ .host }}"
includes:
{{- range .paths }}
- conditions:
{{- if or ( eq ( lower .pathType ) "prefix" ) ( eq ( lower .pathType ) "implementationspecific") }}
- prefix: {{ .path }}
{{- end }}
{{- if ( eq ( lower .pathType ) "exact" ) }}
- exact: {{ .path }}
{{- end }}
name: {{ $serviceName }}
namespace: {{ $.Release.Namespace }}
{{- end }}
---
{{ $count = add1 $count }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
@@ -0,0 +1,36 @@
{{- if .Values.ingress.enabled -}}
{{- if or ( eq "nginx-internal" .Values.ingress.ingressClassName ) ( eq "nginx-external" .Values.ingress.ingressClassName ) -}}
{{- $serviceName := include "elasticsearch-mcp.name" . -}}
{{- $servicePortNumber := .Values.ingress.servicePortNumber | default 8080 -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $serviceName }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "elasticsearch-mcp.labels" . | nindent 4 }}
{{- if .Values.ingress.annotations }}
annotations:
{{- toYaml .Values.ingress.annotations | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host }}
http:
paths:
{{- range .paths }}
- pathType: {{ .pathType }}
path: {{ .path }}
backend:
service:
name: {{ $serviceName }}
port:
number: {{ $servicePortNumber }}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "elasticsearch-mcp.name" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "elasticsearch-mcp.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- name: http
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
selector:
app: {{ include "elasticsearch-mcp.name" . }}
@@ -0,0 +1,14 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ if .Values.serviceAccount.name }}{{ .Values.serviceAccount.name }}{{ else }}{{ include "elasticsearch-mcp.name" . }}{{ end }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "elasticsearch-mcp.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: false
{{- end }}
+165
View File
@@ -0,0 +1,165 @@
---
# Source: elasticsearch-mcp/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: elasticsearch-mcp
namespace: default
labels:
app: elasticsearch-mcp
bu: central
env: prd
service: elasticsearch-mcp
team: devops
automountServiceAccountToken: false
---
# Source: elasticsearch-mcp/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: elasticsearch-mcp
namespace: default
labels:
app: elasticsearch-mcp
bu: central
env: prd
service: elasticsearch-mcp
team: devops
spec:
type: ClusterIP
ports:
- name: http
port: 8080
targetPort: 8080
selector:
app: elasticsearch-mcp
---
# Source: elasticsearch-mcp/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: elasticsearch-mcp
namespace: default
labels:
app: elasticsearch-mcp
bu: central
env: prd
service: elasticsearch-mcp
team: devops
spec:
replicas: 1
selector:
matchLabels:
app: elasticsearch-mcp
template:
metadata:
labels:
app: elasticsearch-mcp
bu: central
env: prd
service: elasticsearch-mcp
team: devops
spec:
serviceAccountName: elasticsearch-mcp
nodeSelector:
dedicated: devops-mcp
tolerations:
- effect: NoSchedule
key: dedicated
operator: Equal
value: devops-mcp
containers:
- name: elasticsearch-mcp
image: "docker.elastic.co/mcp/elasticsearch:0.4.6"
imagePullPolicy: IfNotPresent
args:
- http
envFrom:
- secretRef:
name: elasticsearch-mcp-creds
ports:
- name: http
containerPort: 8080
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
livenessProbe:
failureThreshold: 3
httpGet:
path: /
port: 8080
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
httpGet:
path: /
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
resources:
limits:
cpu: 2000m
memory: 2Gi
requests:
cpu: 500m
memory: 1Gi
---
# Source: elasticsearch-mcp/templates/ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: elasticsearch-mcp
namespace: default
labels:
app: elasticsearch-mcp
bu: central
env: prd
service: elasticsearch-mcp
team: devops
annotations:
kubernetes.io/ingress.class: nginx-internal
nginx.ingress.kubernetes.io/proxy-body-size: 10m
nginx.ingress.kubernetes.io/proxy-buffer-size: 16k
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
ingressClassName: nginx-internal
rules:
- host: elastic-mcp-prd.meeshogcp.in
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: elasticsearch-mcp
port:
number: 8080
---
# Source: elasticsearch-mcp/templates/externalSecret.yaml
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: elasticsearch-mcp-creds
namespace: default
spec:
refreshInterval: 150s
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
target:
name: elasticsearch-mcp-creds
creationPolicy: Owner
deletionPolicy: Retain
dataFrom:
- extract:
conversionStrategy: Default
key: meesho/prd/cntr/devop/elasticsearch-mcp
@@ -0,0 +1,101 @@
fullnameOverride: "elasticsearch-mcp"
replicas: 1
image:
repository: docker.elastic.co/mcp/elasticsearch
tag: latest
pullPolicy: Always
labels:
bu: infra
team: devops
serviceAccount:
create: true
annotations: {}
name: ""
podAnnotations: {}
podSecurityContext: {}
securityContext:
runAsNonRoot: true
runAsUser: 1000
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
priorityClassName: ""
nodeSelector: {}
tolerations: []
affinity: {}
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
service:
port: 8080
type: ClusterIP
# ExternalSecret — syncs ES credentials from Vault via ClusterSecretStore "vault-backend"
# Vault path: meesho/stg/cntr/devop/elasticsearch-mcp keys: ES_URL, ES_API_KEY
externalSecrets:
refreshInterval: "150s"
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
dataFrom:
secretKey: ""
createContourGateway: false
ingress:
enabled: true
ingressClassName: nginx-internal
servicePortNumber: 8080
hosts:
- host: ""
paths:
- path: /
pathType: Prefix
annotations:
kubernetes.io/ingress.class: nginx-internal
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
nginx.ingress.kubernetes.io/proxy-buffer-size: "16k"
slowStart:
enabled: false
window: "120s"
aggression: 1
minPercent: 10