Verified Commit bc4daf86 authored by Hugo's avatar Hugo
Browse files

Fix config template & Add mergeOnEmail option

Merge branch 'develop'
parents c37427e6 f303d152
......@@ -15,7 +15,7 @@ type: application
# 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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.9
version: 0.1.11
# 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
......
......@@ -34,7 +34,7 @@ config.json: |-
{{- end }}
{{- define "hedgedoc.config" -}}
{{- if .Values.oauth.enabled }}
{{ if .Values.oauth.enabled -}}
CMD_OAUTH2_USER_PROFILE_URL: {{ tpl .Values.oauth.url.userProfile . }}
CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR: {{ .Values.oauth.attribute.username }}
CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR: {{ .Values.oauth.attribute.displayName }}
......@@ -42,10 +42,13 @@ CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR: {{ .Values.oauth.attribute.email }}
CMD_OAUTH2_TOKEN_URL: {{ tpl .Values.oauth.url.token . }}
CMD_OAUTH2_AUTHORIZATION_URL: {{ tpl .Values.oauth.url.authorization . }}
CMD_OAUTH2_PROVIDERNAME: {{ .Values.oauth.providerName }}
{{- if .Values.oauth.disableEmail }}
{{ if .Values.oauth.disableEmail -}}
CMD_EMAIL: "false"
{{- end -}}
{{- end -}}
{{ end -}}
{{ if .Values.oauth.mergeOnEmail -}}
CMD_MERGE_ON_EMAIL: "true"
{{ end -}}
{{ end -}}
CMD_IMAGE_UPLOAD_TYPE: minio
CMD_S3_REGION: default
CMD_S3_BUCKET: {{ tpl .Values.fqdn . }}
......
{
"$schema": "https://json-schema.org/draft-07/schema#",
"properties": {
"image": {
"description": "Container Image",
"properties": {
"repo": {
"type": "string"
},
"tag": {
"type": "string"
}
},
"type": "object"
},
"fqdn": {
"description": "Fully Qualified Domain Name separated by -",
"type": "string"
},
"domain": {
"description": "Domain",
"type": "string"
},
"oauth": {
"description": "OAuth config",
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"providerName": {
"type": "string"
},
"disableEmail": {
"type": "boolean"
},
"mergeOnEmail": {
"type": "boolean"
},
"url": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"authorization": {
"type": "string"
},
"userProfile": {
"type": "string"
}
}
},
"attribute": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"displayName": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
}
},
"pg": {
"description": "Postgres config",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"credentialsSuffix": {
"type": "string"
}
}
},
"autoMigrateDomain": {
"description": "Auto migrate when domain change",
"type": "boolean"
},
"ingress": {
"description": "Ingress config",
"type": "object",
"properties": {
"redirects": {
"type": "array",
"items": {
"type": "object",
"properties": {
"domain": {
"type": "string"
},
"permanent": {
"type": "boolean"
}
}
}
}
}
}
},
"required": ["fqdn", "domain"],
"title": "Values",
"type": "object"
}
......@@ -10,6 +10,7 @@ oauth:
enabled: true
providerName: Liiibre
disableEmail: true
mergeOnEmail: false
url:
token: "https://id.indie.host/auth/realms/{{ .Release.Namespace }}/protocol/openid-connect/token"
authorization: "https://id.indie.host/auth/realms/{{ .Release.Namespace }}/protocol/openid-connect/auth"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment