diff --git a/charts/meilisearch/Chart.yaml b/charts/meilisearch/Chart.yaml index f97e65b..29a889f 100644 --- a/charts/meilisearch/Chart.yaml +++ b/charts/meilisearch/Chart.yaml @@ -15,12 +15,12 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.6.0 +version: 0.7.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: v1.1.0 +appVersion: v1.3.0 maintainers: - name: deshetti diff --git a/charts/meilisearch/templates/servicemonitor.yaml b/charts/meilisearch/templates/servicemonitor.yaml new file mode 100644 index 0000000..f580c66 --- /dev/null +++ b/charts/meilisearch/templates/servicemonitor.yaml @@ -0,0 +1,26 @@ +{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "meilisearch.fullname" . }} + namespace: {{ template "meilisearch.namespace" . }} + labels: + {{- include "meilisearch.labels" . | nindent 4 }} + {{- if .Values.metrics.serviceMonitor.selector }} + {{- toYaml .Values.metrics.serviceMonitor.selector | nindent 4 }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.labels }} + {{- toYaml .Values.metrics.serviceMonitor.labels | nindent 4 }} + {{- end }} +spec: + endpoints: + - interval: {{ .Values.metrics.serviceMonitor.interval }} + port: metrics + scheme: {{ .Values.metrics.serviceMonitor.scheme }} + namespaceSelector: + matchNames: + - {{ template "meilisearch.namespace" . }} + selector: + matchLabels: + {{- include "meilisearch.selectorLabels" . | nindent 6 }} +{{- end }} \ No newline at end of file diff --git a/charts/meilisearch/templates/statefulset.yaml b/charts/meilisearch/templates/statefulset.yaml index 238148a..6aa199a 100644 --- a/charts/meilisearch/templates/statefulset.yaml +++ b/charts/meilisearch/templates/statefulset.yaml @@ -66,8 +66,10 @@ spec: failureThreshold: {{ .Values.readinessProbe.failureThreshold }} resources: {{- toYaml .Values.resources | nindent 12 }} - {{- if .Values.persistence.enabled }} volumeMounts: + - name: tmp + mountPath: /tmp + {{- if .Values.persistence.enabled }} - name: data # mountPath: /meili_data/data.ms mountPath: {{.Values.persistence.mountPath }} @@ -85,6 +87,8 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} volumes: + - name: tmp + emptyDir: {} {{- if and .Values.persistence.enabled .Values.persistence.existingClaim }} - name: data persistentVolumeClaim: diff --git a/charts/meilisearch/values.yaml b/charts/meilisearch/values.yaml index 28b03ed..f993fe0 100644 --- a/charts/meilisearch/values.yaml +++ b/charts/meilisearch/values.yaml @@ -150,6 +150,29 @@ livenessProbe: failureThreshold: 5 periodSeconds: 10 +metrics: + enabled: false + + service: + type: ClusterIP + port: 8081 + portName: metrics + annotations: {} + labels: {} + + serviceMonitor: + enabled: false + selector: + # prometheus: kube-prometheus + release: monitoring + labels: {} + annotations: {} + interval: 30s + + scheme: http + tlsConfig: {} + scrapeTimeout: 30s + nodeSelector: {} tolerations: []