Skip to content

Commit

Permalink
Let oryx support config namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
suzp1984 committed Jul 20, 2024
1 parent 4bab3fb commit d3d77fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions oryx-nginx-hls/charts/nginx-cache/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
namespace: default
data:
nginx.edge.http.conf.template: |
proxy_cache_path /data/nginx-cache levels=1:2 keys_zone=srs_cache:8m max_size=1000m inactive=600m;
Expand All @@ -20,7 +19,7 @@ data:
location ~ /.+/.*\.(m3u8)$ {
proxy_set_header Host $host;
proxy_pass http://${ORYX_SERVER}.default.svc.cluster.local:${ORYX_SERVER_PORT}$request_uri;
proxy_pass http://${ORYX_SERVER}.${K8S_NAMESPACE}.svc.cluster.local:${ORYX_SERVER_PORT}$request_uri;
proxy_cache srs_cache;
proxy_cache_key $scheme$proxy_host$uri$args;
Expand All @@ -32,7 +31,7 @@ data:
location ~ /.+/.*\.(ts)$ {
proxy_set_header Host $host;
proxy_pass http://${ORYX_SERVER}.default.svc.cluster.local:${ORYX_SERVER_PORT}$request_uri;
proxy_pass http://${ORYX_SERVER}.${K8S_NAMESPACE}.svc.cluster.local:${ORYX_SERVER_PORT}$request_uri;
proxy_cache srs_cache;
proxy_cache_key $scheme$proxy_host$uri;
Expand Down
2 changes: 2 additions & 0 deletions oryx-nginx-hls/charts/nginx-cache/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ spec:
- name: ORYX_SERVER_PORT
value: {{ .Values.global.oryxHostPort | quote }}
{{- end }}
- name: K8S_NAMESPACE
value: {{ .Release.Namespace }}
volumes:
{{- with .Values.volumes }}
{{- toYaml . | nindent 8 }}
Expand Down

0 comments on commit d3d77fd

Please sign in to comment.