Skip to content

Commit

Permalink
Merge pull request #197 from macropin/main
Browse files Browse the repository at this point in the history
Fix hard coded meilisearch-master-key ref in serviceMonitor
  • Loading branch information
brunoocasali authored Nov 1, 2023
2 parents d9d9d77 + b3253c3 commit ad52661
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/meilisearch/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "v1.4.0"
description: A Helm chart for the Meilisearch search engine
name: meilisearch
version: 0.2.7
version: 0.2.8
icon: https://res.cloudinary.com/meilisearch/image/upload/v1597822872/Logo/logo_img.svg
home: https://github.com/meilisearch/meilisearch-kubernetes/tree/main/charts/meilisearch
maintainers:
Expand Down
7 changes: 3 additions & 4 deletions charts/meilisearch/templates/master-key-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{{- if eq (include "isProductionWithoutMasterKey" .) "true" }}
{{- $secretName := printf "%s-%s" (include "meilisearch.fullname" . ) "master-key" }}
{{- $secret := (lookup "v1" "Secret" .Release.Namespace $secretName) -}}
{{- $secret := (lookup "v1" "Secret" .Release.Namespace (include "secretMasterKeyName" .)) -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
name: {{ template "secretMasterKeyName" . }}
labels:
{{- include "meilisearch.labels" . | nindent 4 }}
data:
{{- if $secret }}
MEILI_MASTER_KEY: {{ $secret.data.MEILI_MASTER_KEY }}
MEILI_MASTER_KEY: {{ $secret.data.MEILI_MASTER_KEY }}
{{ else }}
MEILI_MASTER_KEY: {{ randAlphaNum 20 | b64enc }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/meilisearch/templates/serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
{{- end }}
{{- if or (.Values.environment.MEILI_MASTER_KEY) (.Values.auth.existingMasterKeySecret) (eq .Values.environment.MEILI_ENV "production") }}
bearerTokenSecret:
name: meilisearch-master-key
name: {{ template "secretMasterKeyName" . }}
key: MEILI_MASTER_KEY
{{- end }}
{{- if .Values.serviceMonitor.targetLabels }}
Expand Down
2 changes: 1 addition & 1 deletion ct.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
remote: origin
chart-dirs:
- charts
helm-extra-args: --timeout 600s
# helm-extra-args: --timeout 600s
target-branch: main
2 changes: 1 addition & 1 deletion manifests/meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ spec:
app.kubernetes.io/component: search-engine
app.kubernetes.io/part-of: meilisearch
annotations:
checksum/config: fe89006beb14ca937e98a51d6dadf00eb3a1cc0263ad03d23a531be38b4eaf15
checksum/config: 136a06ce32226c3ca55823dbc13dcbcea97ee3b44a9a459a0ec866a641eb92c0
spec:
serviceAccountName: meilisearch
securityContext:
Expand Down

0 comments on commit ad52661

Please sign in to comment.