File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 11apiVersion : v2
22name : smarter-k3s-edge
3- version : 0.0.9
3+ version : 0.0.10
44type : application
55appVersion : v1.25.3-k3s1
66description : K3s server on kubernetes
Original file line number Diff line number Diff line change 8181 add_header X-Content-Type-Options nosniff;
8282 root /var/www/html;
8383 server_name _;
84- location / {
84+ location {{ .Values.configuration.wwwpath }} {
8585 # First attempt to serve request as file, then
8686 # as directory, then fall back to displaying a 404.
8787 try_files $uri $uri/ =404;
@@ -150,14 +150,14 @@ data:
150150 echo -e "US\n\n\nSmarter\n\n"{{ default .Values.configuration.hostIP .Values.configuration.externalHostIP }}"\n\n" | openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt
151151 openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
152152 {{- end }}
153- mkdir -p /var/www/html
153+ mkdir -p /var/www/html{{ .Values.configuration.wwwpath }}
154154 until [ -f /etc/rancher/k3s/k3s.yaml ]
155155 do
156156 sleep 1
157157 done
158- sed -e "s/127\.0\.0\.1/"{{ default .Values.configuration.hostIP .Values.configuration.externalHostIP }}"/" /etc/rancher/k3s/k3s.yaml > /var/www/html/ k3s.yaml.{{ .Values.configuration.id }}
159- ln -s /var/lib/rancher/k3s/server/token /var/www/html/ token.{{ .Values.configuration.id }}
160- ln -s /etc/nginx/conf.d/k3s-start.sh /var/www/html/ k3s-start.sh.{{ .Values.configuration.id }}
158+ sed -e "s/127\.0\.0\.1/"{{ default .Values.configuration.hostIP .Values.configuration.externalHostIP }}"/" /etc/rancher/k3s/k3s.yaml > /var/www/html{{ .Values.configuration.wwwpath }} k3s.yaml.{{ .Values.configuration.id }}
159+ ln -s /var/lib/rancher/k3s/server/token /var/www/html{{ .Values.configuration.wwwpath }} token.{{ .Values.configuration.id }}
160+ ln -s /etc/nginx/conf.d/k3s-start.sh /var/www/html{{ .Values.configuration.wwwpath }} k3s-start.sh.{{ .Values.configuration.id }}
161161 chmod -R ago+rw /var/www/html
162162 nginx -c /etc/nginx/conf.d/default.conf -g 'daemon off;'
163163 ---
Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ spec:
1111 - host : {{ .Values.configuration.host }}.{{ .Values.configuration.domain }}
1212 http :
1313 paths :
14- - path : /
14+ - path : {{ .Values.configuration.wwwpath }}
1515 pathType : Prefix
1616 backend :
1717 service :
1818 name : {{ .Values.application.appName }}-http
1919 port :
2020 number : {{ .Values.configuration.portHTTP }}
2121 tls :
22- - secretName : {{ .Values.application.appName }}-tls
22+ - secretName : {{ .Values.configuration.certificateID }}
2323 hosts :
2424 - {{ .Values.configuration.host }}.{{ .Values.configuration.domain }}
2525---
Original file line number Diff line number Diff line change @@ -23,3 +23,5 @@ configuration:
2323 # traefik: True
2424 # Uncomment to enable labeling for smarter-demo
2525 # smarter_demo_labels: true
26+ wwwpath : /
27+ certificateID : " {{ .Values.application.appName }}-tls"
You can’t perform that action at this time.
0 commit comments