Skip to content

Commit

Permalink
added typesensecluster in docusaurus helm templates #40
Browse files Browse the repository at this point in the history
  • Loading branch information
akyriako committed Dec 12, 2024
1 parent 57cd018 commit aab76e9
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 1 deletion.
30 changes: 30 additions & 0 deletions charts/docusaurus/templates/deployment-docusaurus.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "docusaurus.fullname" . }}-typesense-api-key
type: Opaque
data:
typesense-api-key: SXdpVG9CcnFYTHZYeTJNMG1TS1hPaGt0dlFUY3VWUloxc1M5REtsRUNtMFFwQU93R1hoanVIVWJLQnE2ejdlSQ==
---
apiVersion: ts.opentelekomcloud.com/v1alpha1
kind: TypesenseCluster
metadata:
name: {{ include "docusaurus.fullname" . }}-typesense
spec:
image: typesense/typesense:27.1
replicas: 3
storage:
size: {{ required "typesense.storage.size is required" .Values.typesense.storage.size }}
storageClassName: {{ required "typesense.storage.storageClassName is required" .Values.typesense.storage.storageClassName }}
ingress:
host: {{ required "typesense.ingress.host is required" .Values.typesense.ingress.host }}
ingressClassName: nginx
clusterIssuer: {{ required "typesense.ingress.clusterIssuer is required" .Values.typesense.ingress.clusterIssuer }}
adminApiKey:
name: {{ include "docusaurus.fullname" . }}-typesense-api-key
scrapers:
- name: {{ include "docusaurus.fullname" . }}-scraper
image: typesense/docsearch-scraper:0.11.0
config: "{\"index_name\":\"docs-next\",\"start_urls\":[\"https://{{ required "ingress.host is required" .Values.ingress.host }}/\"],\"sitemap_urls\":[\"https://{{ required "ingress.host is required" .Values.ingress.host }}/sitemap.xml\"],\"sitemap_alternate_links\":true,\"stop_urls\":[\"/tests\"],\"selectors\":{\"lvl0\":{\"selector\":\"(//ul[contains(@class,'menu__list')]//a[contains(@class, 'menu__link menu__link--sublist menu__link--active')]/text() | //nav[contains(@class, 'navbar')]//a[contains(@class, 'navbar__link--active')]/text())[last()]\",\"type\":\"xpath\",\"global\":true,\"default_value\":\"Documentation\"},\"lvl1\":\"header h1\",\"lvl2\":\"article h2\",\"lvl3\":\"article h3\",\"lvl4\":\"article h4\",\"lvl5\":\"article h5, article td:first-child\",\"lvl6\":\"article h6\",\"text\":\"article p, article li, article td:last-child\"},\"strip_chars\":\" .,;:#\",\"custom_settings\":{\"separatorsToIndex\":\"_\",\"attributesForFaceting\":[\"language\",\"version\",\"type\",\"docusaurus_tag\"],\"attributesToRetrieve\":[\"hierarchy\",\"content\",\"anchor\",\"url\",\"url_without_anchor\",\"type\"]},\"conversation_id\":[\"833762294\"],\"nb_hits\":46250}"
schedule: {{ required "typesense.scraper.schedule is required" .Values.typesense.scraper.schedule }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
10 changes: 10 additions & 0 deletions charts/docusaurus/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,13 @@ tag: v0.0.4
ingress:
host:
clusterIssuer: letsencrypt-prod
typesense:
api-key:
storage:
size: 40Gi
storageClassName: csi-disk
ingress:
host:
clusterIssuer: letsencrypt-prod
scraper:
schedule: '*/5 * * * *'
10 changes: 10 additions & 0 deletions charts/docusaurus/values-stg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,13 @@ tag: 20241205.14.0-932a3d4
ingress:
host:
clusterIssuer: letsencrypt-prod
typesense:
api-key:
storage:
size: 40Gi
storageClassName: csi-disk
ingress:
host:
clusterIssuer: letsencrypt-prod
scraper:
schedule: '*/5 * * * *'
12 changes: 11 additions & 1 deletion charts/docusaurus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@ image: quay.io/opentelekomcloud/docs-next
tag: v0.0.1
ingress:
host:
clusterIssuer: letsencrypt-prod
clusterIssuer: opentelekomcloud-letsencrypt
typesense:
api-key:
storage:
size: 1Gi
storageClassName: csi-disk
ingress:
host:
clusterIssuer: opentelekomcloud-letsencrypt
scraper:
schedule: '*/2 * * * *'

0 comments on commit aab76e9

Please sign in to comment.