* Refactor microk8s playbook to follow structure with shared roles - Integrates with btrix/deploy role for deploying - Seperated RedHat and Debian into seperate roles - Created Common role - allow running remotely by default - use 'browsertrix_cloud_home' for charts path - add additional customizable options to btrix_values.j2 (todo: unify all the templates) - docs: update to new playbook path --------- Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
		
			
				
	
	
		
			106 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			106 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| {{- if .Values.ingress.host }}
 | |
| 
 | |
| ---
 | |
| apiVersion: networking.k8s.io/v1
 | |
| kind: Ingress
 | |
| metadata:
 | |
|   name: ingress-main
 | |
|   namespace: {{ .Release.Namespace }}
 | |
|   annotations:
 | |
|     nginx.ingress.kubernetes.io/ssl-redirect: "true"
 | |
|     nginx.ingress.kubernetes.io/proxy-body-size: "0"
 | |
|     nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
 | |
|     nginx.ingress.kubernetes.io/proxy-buffering: "off"
 | |
|     {{- if .Values.ingress.tls }}
 | |
|     cert-manager.io/cluster-issuer: "cert-main"
 | |
|     {{- end }}
 | |
|     nginx.ingress.kubernetes.io/upstream-vhost: "{{ .Values.ingress.host }}"
 | |
|     nginx.ingress.kubernetes.io/configuration-snippet: |
 | |
|       proxy_set_header X-Forwarded-Proto {{ .Values.ingress.tls | ternary "https" "http" }};      
 | |
| 
 | |
| spec:
 | |
|   ingressClassName: {{ .Values.ingress_class | default "nginx" }}
 | |
|   {{- if .Values.ingress.tls }}
 | |
|   tls:
 | |
|     - hosts:
 | |
|       - {{ .Values.ingress.host }}
 | |
|       secretName: cert-main
 | |
|   {{- end }}
 | |
| 
 | |
|   rules:
 | |
|   - host: {{ .Values.ingress.host }}
 | |
|     http:
 | |
|       paths:
 | |
|       - path: /api/
 | |
|         pathType: Prefix
 | |
|         backend:
 | |
|           service:
 | |
|             name: browsertrix-cloud-backend
 | |
|             port:
 | |
|               number: 8000
 | |
| 
 | |
|       - path: /
 | |
|         pathType: Prefix
 | |
|         backend:
 | |
|           service:
 | |
|             name: browsertrix-cloud-frontend
 | |
|             port:
 | |
|               number: 80
 | |
| 
 | |
| {{ if .Values.signer.enabled }}
 | |
| {{ if .Values.signer.host }}
 | |
| ---
 | |
| apiVersion: networking.k8s.io/v1
 | |
| kind: Ingress
 | |
| metadata:
 | |
|   name: ingress-authsign
 | |
|   namespace: {{ .Release.Namespace }}
 | |
|   annotations:
 | |
|     nginx.ingress.kubernetes.io/ssl-redirect: "false"
 | |
|     nginx.ingress.kubernetes.io/upstream-vhost: "{{ .Values.signer.host }}"
 | |
| 
 | |
| spec:
 | |
|   ingressClassName: {{ .Values.ingress_class | default "nginx" }}
 | |
|   rules:
 | |
|   - host: {{ .Values.signer.host }}
 | |
|     http:
 | |
|       paths:
 | |
|       - path: /
 | |
|         pathType: Prefix
 | |
|         backend:
 | |
|           service:
 | |
|             name: auth-signer
 | |
|             port:
 | |
|               number: 80
 | |
| 
 | |
| {{ end }}
 | |
| {{ end }}
 | |
| 
 | |
| 
 | |
| {{ if .Values.ingress.tls }}
 | |
| ---
 | |
| 
 | |
| apiVersion: cert-manager.io/v1
 | |
| kind: ClusterIssuer
 | |
| metadata:
 | |
|   name: cert-main
 | |
|   namespace: cert-manager
 | |
| spec:
 | |
|   acme:
 | |
|     # The ACME server URL
 | |
|     server: https://acme-v02.api.letsencrypt.org/directory
 | |
|     # Email address used for ACME registration
 | |
|     email: {{ .Values.ingress.cert_email }}
 | |
|     # Name of a secret used to store the ACME account private key
 | |
|     privateKeySecretRef:
 | |
|       name: cert-main
 | |
|     # Enable the HTTP-01 challenge provider
 | |
|     solvers:
 | |
|     - http01:
 | |
|         ingress:
 | |
|           ingressClassName: {{ .Values.ingress_class | default "nginx" }}
 | |
|           class: {{ .Values.ingress_class | default "nginx" }}
 | |
| 
 | |
| {{ end }}
 | |
| {{ end }}
 |