From 3027f19eeed3566c03f6932a19b8984d2d33e62f Mon Sep 17 00:00:00 2001 From: Andrew Kostka Date: Fri, 13 Oct 2023 10:34:22 +0000 Subject: [PATCH 1/2] feat(elasticsearch): use 7.10.2 cluster for local and staging --- k8s/helmfile/env/local/api.values.yaml.gotmpl | 1 + k8s/helmfile/env/local/mediawiki-139.values.yaml.gotmpl | 4 ++++ .../env/production/elasticsearch-1.values.yaml.gotmpl | 2 +- k8s/helmfile/env/staging/mediawiki-139.values.yaml.gotmpl | 4 ++++ k8s/helmfile/helmfile.yaml | 1 + 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/k8s/helmfile/env/local/api.values.yaml.gotmpl b/k8s/helmfile/env/local/api.values.yaml.gotmpl index 83d5e2a72..62193112a 100644 --- a/k8s/helmfile/env/local/api.values.yaml.gotmpl +++ b/k8s/helmfile/env/local/api.values.yaml.gotmpl @@ -43,6 +43,7 @@ app: serviceAccountSecret: null stackdriver: enabled: false + elasticSearchHost: elasticsearch-1-master-hl.default.svc.cluster.local:9200 replicaCount: web: 1 diff --git a/k8s/helmfile/env/local/mediawiki-139.values.yaml.gotmpl b/k8s/helmfile/env/local/mediawiki-139.values.yaml.gotmpl index 3179a85b3..0237e8306 100644 --- a/k8s/helmfile/env/local/mediawiki-139.values.yaml.gotmpl +++ b/k8s/helmfile/env/local/mediawiki-139.values.yaml.gotmpl @@ -21,6 +21,10 @@ mw: sitekeySecretKey: site_key secretkeySecretName: {{ .Values.external.recaptcha2.secretName }} secretkeySecretKey: secret_key + elasticsearch: + host: elasticsearch-1-master-hl.default.svc.cluster.local + port: 9200 + es6: false replicaCount: backend: 1 diff --git a/k8s/helmfile/env/production/elasticsearch-1.values.yaml.gotmpl b/k8s/helmfile/env/production/elasticsearch-1.values.yaml.gotmpl index 336dbefca..e1b38bb54 100644 --- a/k8s/helmfile/env/production/elasticsearch-1.values.yaml.gotmpl +++ b/k8s/helmfile/env/production/elasticsearch-1.values.yaml.gotmpl @@ -1,7 +1,7 @@ image: registry: ghcr.io repository: wbstack/elasticsearch - tag: 7.10.2-20230628-0 + tag: 7.10.2-20231013-0 labels: sidecar.istio.io/inject: "false" diff --git a/k8s/helmfile/env/staging/mediawiki-139.values.yaml.gotmpl b/k8s/helmfile/env/staging/mediawiki-139.values.yaml.gotmpl index 730dcd6fb..23a8c51e6 100644 --- a/k8s/helmfile/env/staging/mediawiki-139.values.yaml.gotmpl +++ b/k8s/helmfile/env/staging/mediawiki-139.values.yaml.gotmpl @@ -6,6 +6,10 @@ mw: allowedProxyCidr: "10.112.0.0/14" mail: domain: "wikibase.dev" + writeOnlyElasticsearch: + host: elasticsearch-1-master-hl.default.svc.cluster.local + port: 9200 + es6: false resources: web: diff --git a/k8s/helmfile/helmfile.yaml b/k8s/helmfile/helmfile.yaml index 593f5d643..83568f9cd 100644 --- a/k8s/helmfile/helmfile.yaml +++ b/k8s/helmfile/helmfile.yaml @@ -117,6 +117,7 @@ releases: namespace: default chart: wbstack/elasticsearch-legacy version: 6.8.22-wmde2 + installed: {{ ne .Environment.Name "local" | toYaml }} <<: *default_release - name: elasticsearch-1 From 203c3d3992338b2443714d7a64091c3ab8a5f36a Mon Sep 17 00:00:00 2001 From: Andrew Kostka Date: Mon, 16 Oct 2023 08:32:36 +0000 Subject: [PATCH 2/2] chore(elasticsearch): access cluster via generic endpoint --- k8s/helmfile/env/local/api.values.yaml.gotmpl | 2 +- k8s/helmfile/env/local/mediawiki-139.values.yaml.gotmpl | 2 +- k8s/helmfile/env/staging/mediawiki-139.values.yaml.gotmpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s/helmfile/env/local/api.values.yaml.gotmpl b/k8s/helmfile/env/local/api.values.yaml.gotmpl index 62193112a..30528adc6 100644 --- a/k8s/helmfile/env/local/api.values.yaml.gotmpl +++ b/k8s/helmfile/env/local/api.values.yaml.gotmpl @@ -43,7 +43,7 @@ app: serviceAccountSecret: null stackdriver: enabled: false - elasticSearchHost: elasticsearch-1-master-hl.default.svc.cluster.local:9200 + elasticSearchHost: elasticsearch-1.default.svc.cluster.local:9200 replicaCount: web: 1 diff --git a/k8s/helmfile/env/local/mediawiki-139.values.yaml.gotmpl b/k8s/helmfile/env/local/mediawiki-139.values.yaml.gotmpl index 0237e8306..f27219e73 100644 --- a/k8s/helmfile/env/local/mediawiki-139.values.yaml.gotmpl +++ b/k8s/helmfile/env/local/mediawiki-139.values.yaml.gotmpl @@ -22,7 +22,7 @@ mw: secretkeySecretName: {{ .Values.external.recaptcha2.secretName }} secretkeySecretKey: secret_key elasticsearch: - host: elasticsearch-1-master-hl.default.svc.cluster.local + host: elasticsearch-1.default.svc.cluster.local port: 9200 es6: false diff --git a/k8s/helmfile/env/staging/mediawiki-139.values.yaml.gotmpl b/k8s/helmfile/env/staging/mediawiki-139.values.yaml.gotmpl index 23a8c51e6..74c6abae7 100644 --- a/k8s/helmfile/env/staging/mediawiki-139.values.yaml.gotmpl +++ b/k8s/helmfile/env/staging/mediawiki-139.values.yaml.gotmpl @@ -7,7 +7,7 @@ mw: mail: domain: "wikibase.dev" writeOnlyElasticsearch: - host: elasticsearch-1-master-hl.default.svc.cluster.local + host: elasticsearch-1.default.svc.cluster.local port: 9200 es6: false