-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2493 from NCEAS/feature-2492-k8s-nginx-cfg
Feature 2492 k8s nginx cfg
- Loading branch information
Showing
4 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## This file contains custom configuration for nginx | ||
## See https://nginx.org/en/docs/http/request_processing.html | ||
## It will override any existing, matching config in /etc/nginx/nginx.conf | ||
## | ||
server { | ||
listen 80 default_server; | ||
listen [::]:80; | ||
server_name _; | ||
|
||
location {{ include "metacatui.clean.root" . }}/ { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
|
||
# See https://nceas.github.io/metacatui/install/apache | ||
# | ||
# | ||
# 1. Serve index.html instead of a 404 error in the MetacatUI directory. | ||
# Equivalent to Apache directive: FallbackResource /metacatui/index.html | ||
# | ||
try_files $uri $uri/ {{ include "metacatui.clean.root" . }}/index.html; | ||
|
||
# 2. Allow encoded slashes in URLs so encoded identifiers can be sent in MetacatUI URLs. | ||
# Equivalent to Apache directive: AllowEncodedSlashes On | ||
# (Apache allows encoded slashes to be used, and automatically decodes them) | ||
# ** No config required; This is how NGINX behaves by default ** | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{- if .Values.appConfig.enabled }} | ||
# Load only the "config/config.js" file into a ConfigMap | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Release.Name }}-metacatui-config-js | ||
labels: | ||
{{- include "metacatui.labels" . | nindent 4 }} | ||
data: | ||
{{- (tpl (.Files.Glob "config/config.js").AsConfig . ) | nindent 2 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
{{- if .Values.appConfig.enabled }} | ||
# Load all files in the "config" directory into a ConfigMap | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Release.Name }}-metacatui-config-js | ||
name: {{ .Release.Name }}-metacatui-config-all | ||
labels: | ||
{{- include "metacatui.labels" . | nindent 4 }} | ||
data: | ||
{{- (tpl (.Files.Glob "config/config.js").AsConfig . ) | nindent 2 }} | ||
{{- end }} | ||
{{- (tpl (.Files.Glob "config/*").AsConfig . ) | nindent 2 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters