Skip to content

Commit d751443

Browse files
committed
fix: add meilisearch and notes ingress
Both services expose a public API and should come with an ingress by default. Previously you would have use the `DRYDOCK_INGRESS_EXTRA_HOSTS` setting in order to create the additional ingress objects.
1 parent 58272bf commit d751443

File tree

4 files changed

+71
-0
lines changed

4 files changed

+71
-0
lines changed

.github/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
tutor~=19.0
22
tutor-mfe~=19.0
3+
tutor-forum~=19.0
34
tutor-minio~=19.0
45
setuptools
56
git+https://github.com/edunext/tutor-contrib-s3@sumac

drydock/patches/kustomization-resources

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
- plugins/drydock/k8s/ingress/lms.yml
99
- plugins/drydock/k8s/ingress/cms.yml
1010
- plugins/drydock/k8s/ingress/mfe.yml
11+
- plugins/drydock/k8s/ingress/meilisearch.yml
12+
- plugins/drydock/k8s/ingress/notes.yml
1113
- plugins/drydock/k8s/ingress/extra-hosts.yml
1214
- plugins/drydock/k8s/ingress/static-cache.yml
1315
{%- endif %}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{%- if RUN_MEILISEARCH %}
2+
apiVersion: networking.k8s.io/v1
3+
kind: Ingress
4+
metadata:
5+
name: meilisearch
6+
namespace: {{ K8S_NAMESPACE }}
7+
{%- if DRYDOCK_AUTO_TLS and not DRYDOCK_CUSTOM_CERTS %}
8+
annotations:
9+
cert-manager.io/issuer: letsencrypt
10+
{%- endif %}
11+
spec:
12+
ingressClassName: nginx
13+
rules:
14+
- host: {{ MEILISEARCH_HOST }}
15+
http:
16+
paths:
17+
- pathType: Prefix
18+
path: "/"
19+
backend:
20+
service:
21+
name: {% if DRYDOCK_BYPASS_CADDY -%}meilisearch{% else -%}caddy{% endif %}
22+
port:
23+
number: {% if DRYDOCK_BYPASS_CADDY -%}7700{% else -%}80{% endif %}
24+
{%- if DRYDOCK_AUTO_TLS or DRYDOCK_CUSTOM_CERTS %}
25+
tls:
26+
- hosts:
27+
- {{ MEILISEARCH_HOST }}
28+
{%- if DRYDOCK_CUSTOM_CERTS %}
29+
secretName: {{ DRYDOCK_CUSTOM_CERTS["secret_name"]|default("custom-tls-certs") }}
30+
{%- else %}
31+
secretName: meilisearch-host-tls
32+
{%- endif %}
33+
{%- endif %}
34+
{%- endif %}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{%- if 'notes' in PLUGINS %}
2+
apiVersion: networking.k8s.io/v1
3+
kind: Ingress
4+
metadata:
5+
name: notes
6+
namespace: {{ K8S_NAMESPACE }}
7+
{%- if DRYDOCK_AUTO_TLS and not DRYDOCK_CUSTOM_CERTS %}
8+
annotations:
9+
cert-manager.io/issuer: letsencrypt
10+
{%- endif %}
11+
spec:
12+
ingressClassName: nginx
13+
rules:
14+
- host: {{ NOTES_HOST }}
15+
http:
16+
paths:
17+
- pathType: Prefix
18+
path: "/"
19+
backend:
20+
service:
21+
name: {% if DRYDOCK_BYPASS_CADDY -%}notes{% else -%}caddy{% endif %}
22+
port:
23+
number: {% if DRYDOCK_BYPASS_CADDY -%}7700{% else -%}80{% endif %}
24+
{%- if DRYDOCK_AUTO_TLS or DRYDOCK_CUSTOM_CERTS %}
25+
tls:
26+
- hosts:
27+
- {{ NOTES_HOST }}
28+
{%- if DRYDOCK_CUSTOM_CERTS %}
29+
secretName: {{ DRYDOCK_CUSTOM_CERTS["secret_name"]|default("custom-tls-certs") }}
30+
{%- else %}
31+
secretName: notes-host-tls
32+
{%- endif %}
33+
{%- endif %}
34+
{%- endif %}

0 commit comments

Comments
 (0)