diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/templates/configMap.yaml b/kubernetes/helm_charts/core/nginx-public-ingress/templates/configMap.yaml index 87f6b57168454794b0542931a98ae4235ad0223f..0f7f0dcc168f43eb11525d24104945c0eeec18cb 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/templates/configMap.yaml +++ b/kubernetes/helm_charts/core/nginx-public-ingress/templates/configMap.yaml @@ -30,3 +30,15 @@ data: keycloak.conf: | {{ .Values.keycloakconf | indent 4 }} {{- end }} + +--- +{{- if .Values.apple_universal_links }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: apple-universal-links + namespace: {{ .Values.namespace }} +data: + apple-app-site-association.json: | +{{ .Values.apple_universal_links | indent 4 }} +{{- end }} \ No newline at end of file diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/templates/daemonset.yaml b/kubernetes/helm_charts/core/nginx-public-ingress/templates/daemonset.yaml index 9fc5ce4cf1da424b8206894ac631922d70d4b814..01bfd608d4040ea19ef57c28bab0ec56ddf8e5e5 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/templates/daemonset.yaml +++ b/kubernetes/helm_charts/core/nginx-public-ingress/templates/daemonset.yaml @@ -35,6 +35,11 @@ spec: - name: nginx-config configMap: name: nginx-conf +{{- if .Values.apple_universal_links }} + - name: apple-site-association + configMap: + name: apple-universal-links +{{- end }} {{- if .Values.volumes }} {{ toYaml .Values.volumes | indent 8 }} {{- end }} @@ -52,6 +57,10 @@ spec: - name: nginx-config mountPath: /etc/nginx/nginx.conf subPath: nginx.conf +{{- if .Values.apple_universal_links }} + - name: apple-site-association + mountPath: /var/www/html +{{- end }} {{- if .Values.volumeMounts }} {{ toYaml .Values.volumeMounts | indent 10 }} {{- end }} diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index e6ac52f0bdf662afe7aefe269b3ed7ce5ebb5e30..c1331e76a55c51bbd691a7fabb409f8cbfa17cdd 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -973,6 +973,12 @@ proxyconfig: |- proxy_set_header X-Request-ID $sb_request_id; proxy_pass http://$dial_upstream_host; } +{% if apple_app_site_association is defined %} + location /apple-app-site-association { + alias /var/www/html/; + index apple-app-site-association.json; + } +{% endif %} {# Including custom configuration #} {{ proxy_custom_config }}} @@ -1256,3 +1262,7 @@ serviceMonitor: labels: # labels with which the prometheus choose the serviceMonitor app: prometheus-operator release: prometheus-operator + +{# Add the apple site association json contents in a single line within single quotes as shown below in Core/common.yml #} +{# apple_app_site_association: '{"applinks":{"apps":[],"details":[{"appID":"123456.dev.sunbird.app","paths":["/explore","/dial/*","/get/dial","/play/content","/play/collection","/learn/course","/explore-course/course","/explore-course","/search","/search/Library","/faq","/profile","/play/quiz","/explore","/learn","/resources"]}]}}' #} +apple_universal_links: '{{ apple_app_site_association | default("") }}' \ No newline at end of file