mirror of https://github.com/h44z/wg-portal.git
				
				
				
			[chart] Fix default configurations (#350)
This commit is contained in:
		
							parent
							
								
									2cf2341e4c
								
							
						
					
					
						commit
						0b18b5efd6
					
				|  | @ -16,7 +16,7 @@ annotations: | ||||||
| # This is the chart version. This version number should be incremented each time you make changes | # This is the chart version. This version number should be incremented each time you make changes | ||||||
| # to the chart and its templates, including the app version. | # to the chart and its templates, including the app version. | ||||||
| # Versions are expected to follow Semantic Versioning (https://semver.org/) | # Versions are expected to follow Semantic Versioning (https://semver.org/) | ||||||
| version: 0.6.0 | version: 0.7.0 | ||||||
| 
 | 
 | ||||||
| # This is the version number of the application being deployed. This version number should be | # This is the version number of the application being deployed. This version number should be | ||||||
| # incremented each time you make changes to the application. Versions are not expected to | # incremented each time you make changes to the application. Versions are not expected to | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| # wg-portal | # wg-portal | ||||||
| 
 | 
 | ||||||
|    |    | ||||||
| 
 | 
 | ||||||
| WireGuard Configuration Portal with LDAP, OAuth, OIDC authentication | WireGuard Configuration Portal with LDAP, OAuth, OIDC authentication | ||||||
| 
 | 
 | ||||||
|  | @ -34,7 +34,7 @@ The [Values](#values) section lists the parameters that can be configured during | ||||||
| | extraDeploy | list | `[]` | Array of extra objects to deploy with the release | | | extraDeploy | list | `[]` | Array of extra objects to deploy with the release | | ||||||
| | config.advanced | tpl/object | `{}` | [Advanced configuration](https://wgportal.org/latest/documentation/configuration/overview/#advanced) options. | | | config.advanced | tpl/object | `{}` | [Advanced configuration](https://wgportal.org/latest/documentation/configuration/overview/#advanced) options. | | ||||||
| | config.auth | tpl/object | `{}` | [Auth configuration](https://wgportal.org/latest/documentation/configuration/overview/#auth) options. | | | config.auth | tpl/object | `{}` | [Auth configuration](https://wgportal.org/latest/documentation/configuration/overview/#auth) options. | | ||||||
| | config.core | tpl/object | `{}` | [Core configuration](https://wgportal.org/latest/documentation/configuration/overview/#core) options.<br> If external admins in `auth` are not defined and there are no `admin_user` and `admin_password` defined here, the default credentials will be generated. | | | config.core | tpl/object | `{}` | [Core configuration](https://wgportal.org/latest/documentation/configuration/overview/#core) options.<br> If external admins in `auth` are defined and there are no `admin_user` and `admin_password` defined here, the default admin account will be disabled. | | ||||||
| | config.database | tpl/object | `{}` | [Database configuration](https://wgportal.org/latest/documentation/configuration/overview/#database) options | | | config.database | tpl/object | `{}` | [Database configuration](https://wgportal.org/latest/documentation/configuration/overview/#database) options | | ||||||
| | config.mail | tpl/object | `{}` | [Mail configuration](https://wgportal.org/latest/documentation/configuration/overview/#mail) options | | | config.mail | tpl/object | `{}` | [Mail configuration](https://wgportal.org/latest/documentation/configuration/overview/#mail) options | | ||||||
| | config.statistics | tpl/object | `{}` | [Statistics configuration](https://wgportal.org/latest/documentation/configuration/overview/#statistics) options | | | config.statistics | tpl/object | `{}` | [Statistics configuration](https://wgportal.org/latest/documentation/configuration/overview/#statistics) options | | ||||||
|  | @ -82,7 +82,7 @@ The [Values](#values) section lists the parameters that can be configured during | ||||||
| | ingress.className | string | `""` | Ingress class name | | | ingress.className | string | `""` | Ingress class name | | ||||||
| | ingress.annotations | object | `{}` | Ingress annotations | | | ingress.annotations | object | `{}` | Ingress annotations | | ||||||
| | ingress.tls | bool | `false` | Ingress TLS configuration. Enable certificate resource or add ingress annotation to create required secret | | | ingress.tls | bool | `false` | Ingress TLS configuration. Enable certificate resource or add ingress annotation to create required secret | | ||||||
| | certificate.enabled | bool | `false` | Specifies whether a certificate resource should be created | | | certificate.enabled | bool | `false` | Specifies whether a certificate resource should be created. If enabled, certificate will be used for the web. | | ||||||
| | certificate.issuer.name | string | `""` | Certificate issuer name | | | certificate.issuer.name | string | `""` | Certificate issuer name | | ||||||
| | certificate.issuer.kind | string | `""` | Certificate issuer kind (ClusterIssuer or Issuer) | | | certificate.issuer.kind | string | `""` | Certificate issuer kind (ClusterIssuer or Issuer) | | ||||||
| | certificate.issuer.group | string | `"cert-manager.io"` | Certificate issuer group | | | certificate.issuer.group | string | `"cert-manager.io"` | Certificate issuer group | | ||||||
|  |  | ||||||
|  | @ -62,9 +62,9 @@ Create the name of the service account to use | ||||||
| {{- end }} | {{- end }} | ||||||
| 
 | 
 | ||||||
| {{/* | {{/* | ||||||
| Define default admin credentials | Disables default admin credentials | ||||||
| If external auth is enabled and has admin group mappings, | If external auth is enabled and has admin group mappings, | ||||||
| the admin_user and admin_password values are not used. | the admin_user will be set to blank (disabled). | ||||||
| */}} | */}} | ||||||
| {{- define "wg-portal.admin" -}} | {{- define "wg-portal.admin" -}} | ||||||
| {{- $externalAdmin := false -}} | {{- $externalAdmin := false -}} | ||||||
|  | @ -80,9 +80,8 @@ the admin_user and admin_password values are not used. | ||||||
|     {{- end -}} |     {{- end -}} | ||||||
|   {{- end -}} |   {{- end -}} | ||||||
| {{- end -}} | {{- end -}} | ||||||
| {{- if not $externalAdmin -}} | {{- if $externalAdmin -}} | ||||||
| admin_user: admin@wgportal.local | admin_user: "" | ||||||
| admin_password: {{ printf "%s/%s" .Release.Name .Release.Namespace | b64enc }} |  | ||||||
| {{- end -}} | {{- end -}} | ||||||
| {{- end -}} | {{- end -}} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,3 +1,11 @@ | ||||||
|  | {{- $advanced := dict "start_listen_port" (.Values.service.wireguard.ports | sortAlpha | first | int) -}} | ||||||
|  | {{- $statistics := dict "listening_address" (printf ":%v" .Values.service.metrics.port) -}} | ||||||
|  | {{- $web:= dict "listening_address" (printf ":%v" .Values.service.web.port) -}} | ||||||
|  | {{- if and .Values.certificate.enabled (include "wg-portal.hostname" .) }} | ||||||
|  |   {{- $_ := set $web "cert_file" "/app/certs/tls.crt" }} | ||||||
|  |   {{- $_ := set $web "key_file" "/app/certs/tls.key" }} | ||||||
|  | {{- end }} | ||||||
|  | 
 | ||||||
| apiVersion: v1 | apiVersion: v1 | ||||||
| kind: Secret | kind: Secret | ||||||
| metadata: | metadata: | ||||||
|  | @ -5,11 +13,9 @@ metadata: | ||||||
|   labels: {{- include "wg-portal.labels" . | nindent 4 }} |   labels: {{- include "wg-portal.labels" . | nindent 4 }} | ||||||
| stringData: | stringData: | ||||||
|   config.yml: | |   config.yml: | | ||||||
|     advanced: |     {{- with mustMerge $advanced .Values.config.advanced }} | ||||||
|       start_listen_port: {{ .Values.service.wireguard.ports | sortAlpha | first }} |     advanced: {{- tpl (toYaml .) $ | nindent 6 }} | ||||||
|       {{- with .Values.config.advanced }} |     {{- end }} | ||||||
|       {{- tpl (toYaml (omit . "start_listen_port")) $ | nindent 6 }} |  | ||||||
|       {{- end }} |  | ||||||
| 
 | 
 | ||||||
|     {{- with .Values.config.auth }} |     {{- with .Values.config.auth }} | ||||||
|     auth: {{- tpl (toYaml .) $ | nindent 6 }} |     auth: {{- tpl (toYaml .) $ | nindent 6 }} | ||||||
|  | @ -27,14 +33,10 @@ stringData: | ||||||
|     mail: {{- tpl (toYaml .) $ | nindent 6 }} |     mail: {{- tpl (toYaml .) $ | nindent 6 }} | ||||||
|     {{- end }} |     {{- end }} | ||||||
| 
 | 
 | ||||||
|     statistics: |     {{- with mustMerge $statistics .Values.config.statistics }} | ||||||
|       listening_address: :{{ .Values.service.metrics.port }} |     statistics: {{- tpl (toYaml .) $ | nindent 6 }} | ||||||
|       {{- with .Values.config.statistics }} |     {{- end }} | ||||||
|       {{- tpl (toYaml (omit . "listening_address")) $ | nindent 6 }} |  | ||||||
|       {{- end }} |  | ||||||
| 
 | 
 | ||||||
|     web: |     {{- with mustMerge $web .Values.config.web }} | ||||||
|       listening_address: :{{ .Values.service.web.port }} |     web: {{- tpl (toYaml .) $ | nindent 6 }} | ||||||
|       {{- with .Values.config.web }} |     {{- end }} | ||||||
|       {{- tpl (toYaml (omit . "listening_address")) $ | nindent 6 }} |  | ||||||
|       {{- end }} |  | ||||||
|  |  | ||||||
|  | @ -15,9 +15,9 @@ config: | ||||||
|   # -- (tpl/object) [Auth configuration](https://wgportal.org/latest/documentation/configuration/overview/#auth) options. |   # -- (tpl/object) [Auth configuration](https://wgportal.org/latest/documentation/configuration/overview/#auth) options. | ||||||
|   auth: {} |   auth: {} | ||||||
|   # -- (tpl/object) [Core configuration](https://wgportal.org/latest/documentation/configuration/overview/#core) options.<br> |   # -- (tpl/object) [Core configuration](https://wgportal.org/latest/documentation/configuration/overview/#core) options.<br> | ||||||
|   # If external admins in `auth` are not defined and |   # If external admins in `auth` are defined and | ||||||
|   # there are no `admin_user` and `admin_password` defined here, |   # there are no `admin_user` and `admin_password` defined here, | ||||||
|   # the default credentials will be generated. |   # the default admin account will be disabled. | ||||||
|   core: {} |   core: {} | ||||||
|   # -- (tpl/object) [Database configuration](https://wgportal.org/latest/documentation/configuration/overview/#database) options |   # -- (tpl/object) [Database configuration](https://wgportal.org/latest/documentation/configuration/overview/#database) options | ||||||
|   database: {} |   database: {} | ||||||
|  | @ -150,7 +150,8 @@ ingress: | ||||||
|   tls: false |   tls: false | ||||||
| 
 | 
 | ||||||
| certificate: | certificate: | ||||||
|   # -- Specifies whether a certificate resource should be created |   # -- Specifies whether a certificate resource should be created. | ||||||
|  |   # If enabled, certificate will be used for the web. | ||||||
|   enabled: false |   enabled: false | ||||||
|   issuer: |   issuer: | ||||||
|     # -- Certificate issuer name |     # -- Certificate issuer name | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue