Fix DOMAIN bug, Prevent the use of NodePort and enforce Reverse Proxy (#342)

This commit is contained in:
Kjeld Schouten-Lebbing
2021-04-14 11:25:46 +02:00
committed by GitHub
parent 5b259ff1bd
commit 30b6f3737a
18 changed files with 86 additions and 83 deletions
+4
View File
@@ -0,0 +1,4 @@
# Installation Notes
* NodePort is not available as an option, as Bitwarden_rs requires HTTPS and a proxy to split webtraffic from https. ( https://github.com/dani-garcia/bitwarden_rs/wiki/Enabling-HTTPS )
* NodePort not being an option, means Ingress is a requirement too.
@@ -1,7 +1,7 @@
apiVersion: v2 apiVersion: v2
kubeVersion: ">=1.16.0-0" kubeVersion: ">=1.16.0-0"
name: bitwarden name: bitwarden
version: 1.0.0 version: 1.0.1
upstream_version: 2.1.5 upstream_version: 2.1.5
appVersion: "auto" appVersion: "auto"
description: Unofficial Bitwarden compatible server written in Rust description: Unofficial Bitwarden compatible server written in Rust
@@ -10,7 +10,7 @@ image:
tag: 1.20.0 tag: 1.20.0
envTpl: envTpl:
DOMAIN: "{{ if .Values.ingress }}{{ if .Values.ingress.main.enabled }}https://{{ ( index .Values.ingress.main.hosts 0 ).host }}{{ end }}{{ end }}" DOMAIN: "https://{{ if .Values.ingress }}{{ if .Values.ingress.main.enabled }}{{ ( index .Values.ingress.main.hosts 0 ).host }}{{ else }}placeholder.com{{ end }}{{ else }}placeholder.com{{ end }}"
envFrom: envFrom:
- configMapRef: - configMapRef:
@@ -429,18 +429,21 @@ questions:
schema: schema:
type: boolean type: boolean
default: false default: false
hidden: true
- variable: services - variable: services
group: "Networking" group: "Networking"
label: "Configure Service" label: "Configure Service"
schema: schema:
type: dict type: dict
hidden: true
attrs: attrs:
- variable: main - variable: main
label: "Main service" label: "Main service"
description: "The Primary service on which the healthcheck runs, often the webUI" description: "The Primary service on which the healthcheck runs, often the webUI"
schema: schema:
type: dict type: dict
hidden: true
attrs: attrs:
- variable: enabled - variable: enabled
label: "Enable the service" label: "Enable the service"
@@ -454,9 +457,8 @@ questions:
schema: schema:
type: string type: string
default: "ClusterIP" default: "ClusterIP"
hidden: true
enum: enum:
- value: "NodePort"
description: "NodePort"
- value: "ClusterIP" - value: "ClusterIP"
description: "ClusterIP" description: "ClusterIP"
- variable: port - variable: port
@@ -469,12 +471,10 @@ questions:
schema: schema:
type: string type: string
default: "HTTP" default: "HTTP"
hidden: false hidden: true
enum: enum:
- value: HTTP - value: HTTP
description: "HTTP" description: "HTTP"
- value: "HTTPS"
description: "HTTPS"
- variable: port - variable: port
label: "container port" label: "container port"
schema: schema:
@@ -499,11 +499,13 @@ questions:
max: 65535 max: 65535
default: 36052 default: 36052
required: true required: true
hidden: true
- variable: ws - variable: ws
label: "Websocket service" label: "Websocket service"
description: "Websocket Service" description: "Websocket Service"
schema: schema:
type: dict type: dict
hidden: true
attrs: attrs:
- variable: enabled - variable: enabled
label: "Enable the service" label: "Enable the service"
@@ -517,9 +519,8 @@ questions:
schema: schema:
type: string type: string
default: "ClusterIP" default: "ClusterIP"
hidden: true
enum: enum:
- value: "NodePort"
description: "NodePort"
- value: "ClusterIP" - value: "ClusterIP"
description: "ClusterIP" description: "ClusterIP"
- variable: port - variable: port
@@ -532,12 +533,10 @@ questions:
schema: schema:
type: string type: string
default: "HTTP" default: "HTTP"
hidden: false hidden: true
enum: enum:
- value: HTTP - value: HTTP
description: "HTTP" description: "HTTP"
- value: "HTTPS"
description: "HTTPS"
- variable: port - variable: port
label: "container port" label: "container port"
schema: schema:
@@ -562,6 +561,7 @@ questions:
max: 65535 max: 65535
default: 36053 default: 36053
required: true required: true
hidden: true
## TrueCharts Specific ## TrueCharts Specific
@@ -813,77 +813,76 @@ questions:
label: "Enable Web Reverse Proxy" label: "Enable Web Reverse Proxy"
schema: schema:
type: boolean type: boolean
default: false default: true
show_subquestions_if: true hidden: true
subquestions: - variable: type
- variable: type label: "Reverse Proxy Type"
label: "Reverse Proxy Type" schema:
type: string
default: "HTTP"
hidden: true
editable: false
required: true
- variable: serviceName
label: "Service name to proxy to"
schema:
hidden: true
editable: false
type: string
default: ""
- variable: entrypoint
label: "Select Entrypoint"
schema:
type: string
default: "websecure"
required: true
enum:
- value: "websecure"
description: "Websecure: HTTPS/TLS port 443"
- variable: hosts
label: "Hosts"
schema:
type: list
default: []
items:
- variable: host
label: "Host"
schema: schema:
type: string type: dict
default: "HTTP" attrs:
hidden: true
editable: false
required: true
- variable: serviceName
label: "Service name to proxy to"
schema:
hidden: true
editable: false
type: string
default: ""
- variable: entrypoint
label: "Select Entrypoint"
schema:
type: string
default: "websecure"
required: true
enum:
- value: "websecure"
description: "Websecure: HTTPS/TLS port 443"
- variable: hosts
label: "Hosts"
schema:
type: list
default: []
items:
- variable: host - variable: host
label: "Host" label: "Domain Name"
required: true
schema: schema:
type: dict type: string
attrs: - variable: path
- variable: host label: "path"
label: "Domain Name" schema:
required: true type: string
schema: required: true
type: string hidden: true
- variable: path default: "/"
label: "path" - variable: certType
schema: label: "Select Certificate Type"
type: string schema:
required: true type: string
hidden: true default: "selfsigned"
default: "/" enum:
- variable: certType - value: ""
label: "Select Certificate Type" description: "No Encryption/TLS/Certificates"
schema: - value: "selfsigned"
type: string description: "Self-Signed Certificate"
default: "selfsigned" - value: "ixcert"
enum: description: "TrueNAS SCALE Certificate"
- value: "" - variable: certificate
description: "No Encryption/TLS/Certificates" label: "Select TrueNAS SCALE Certificate"
- value: "selfsigned" schema:
description: "Self-Signed Certificate" type: int
- value: "ixcert" show_if: [["certType", "=", "ixcert"]]
description: "TrueNAS SCALE Certificate" $ref:
- variable: certificate - "definitions/certificate"
label: "Select TrueNAS SCALE Certificate" - variable: authForwardURL
schema: label: "Forward Authentication URL"
type: int schema:
show_if: [["certType", "=", "ixcert"]] type: string
$ref: default: ""
- "definitions/certificate"
- variable: authForwardURL
label: "Forward Authentication URL"
schema:
type: string
default: ""