Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/kubebrowser/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: kubebrowser
description: Allow whitelisted people to access your kubeconfigs
type: application
version: 1.3.0
version: 1.3.1
appVersion: "0.10.0"
dependencies:
- name: common
Expand Down
4 changes: 2 additions & 2 deletions charts/kubebrowser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ helm install my-kubebrowser avisto/kubebrowser -f values.yaml
| `server.hostAliases` | kubebrowser server pods host aliases | `[]` |
| `server.hostNetwork` | Specify if host network should be enabled for kubebrowser pod | `false` |
| `server.containerPorts.http` | kubebrowser server container port for http | `8080` |
| `server.hostname` | Hostname for kubebrowser server | `""` |
| `server.hostIPC` | Specify if host IPC should be enabled for kubebrowser pod | `false` |
| `server.labels` | Map of labels to add to the statefulset | `{}` |
| `server.annotations` | Annotations for server pods | `{}` |
Expand Down Expand Up @@ -129,7 +130,7 @@ helm install my-kubebrowser avisto/kubebrowser -f values.yaml
| `ingress.enabled` | Enable ingress controller resource for frontend | `false` |
| `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` |
| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `""` |
| `ingress.hostname` | Default host for the ingress resource | `kubebrowser.local` |
| `ingress.hostname` | (DEPRECATED use server.hostname instead) Default host for the ingress resource | `""` |
| `ingress.pathType` | Ingress path type | `ImplementationSpecific` |
| `ingress.path` | Ingress path | `/` |
| `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
Expand All @@ -144,5 +145,4 @@ helm install my-kubebrowser avisto/kubebrowser -f values.yaml
| `httpRoute.annotations` | Additional HTTPRoute annotations | `{}` |
| `httpRoute.labels` | Additional HTTPRoute labels | `{}` |
| `httpRoute.parentRefs` | Gateway API parentRefs for the HTTPRoute. Must reference an existing Gateway | `[]` |
| `httpRoute.hostnames` | List of hostnames for the HTTPRoute | `[]` |
| `httpRoute.rules` | (Optional) HTTPRoute rules configuration, if overriden, backendRefs is set by default | `undefined` |
6 changes: 3 additions & 3 deletions charts/kubebrowser/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Return the ingress anotation
{{- end -}}

{{/*
Return the ingress hostname
Return the correct hostname
*/}}
{{- define "kubebrowser.ingress.hostname" -}}
{{- tpl .Values.ingress.hostname $ -}}
{{- define "kubebrowser.hostname" -}}
{{- coalesce (tpl .Values.server.hostname $) (tpl .Values.ingress.hostname $) -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/kubebrowser/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
value: "release"
{{- if .Values.ingress.enabled }}
- name: KUBEBROWSER_HOSTNAME
value: {{ printf "%s://%s" (ternary "https" "http" (or .Values.ingress.tls (gt (len .Values.ingress.extraTls) 0))) .Values.ingress.hostname }}
value: {{ printf "%s://%s" (ternary "https" "http" (or .Values.ingress.tls (gt (len .Values.ingress.extraTls) 0) .Values.httpRoute.enabled)) (include "kubebrowser.hostname" $) }}
{{- end }}
- name: KUBEBROWSER_OAUTH2_CLIENT_ID
valueFrom:
Expand Down
2 changes: 1 addition & 1 deletion charts/kubebrowser/templates/httproute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
parentRefs:
{{- tpl (toYaml .Values.httpRoute.parentRefs) $ | nindent 4 }}
hostnames:
{{- tpl (toYaml .Values.httpRoute.hostnames) $ | nindent 4 }}
- {{ include "kubebrowser.hostname" $ }}
rules:
{{- range $ruleIdx, $rule := .Values.httpRoute.rules }}
- matches:
Expand Down
8 changes: 4 additions & 4 deletions charts/kubebrowser/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ spec:
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- end }}
rules:
{{- if (include "kubebrowser.ingress.hostname" .) }}
- host: {{ include "kubebrowser.ingress.hostname" . }}
{{- if (include "kubebrowser.hostname" .) }}
- host: {{ include "kubebrowser.hostname" . }}
http:
paths:
{{- if .Values.ingress.extraPaths }}
Expand Down Expand Up @@ -50,8 +50,8 @@ spec:
tls:
{{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" $annotationsMap )) .Values.ingress.selfSigned) }}
- hosts:
- {{ include "kubebrowser.ingress.hostname" . }}
secretName: {{ printf "%s-tls" (include "kubebrowser.ingress.hostname" .) }}
- {{ include "kubebrowser.hostname" . }}
secretName: {{ printf "%s-tls" (include "kubebrowser.hostname" .) }}
{{- end }}
{{- if .Values.ingress.extraTls }}
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.extraTls "context" $ ) | nindent 4 }}
Expand Down
15 changes: 7 additions & 8 deletions charts/kubebrowser/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,11 @@
}
}
},
"hostname": {
"type": "string",
"description": "Hostname for kubebrowser server",
"default": ""
},
"hostIPC": {
"type": "boolean",
"description": "Specify if host IPC should be enabled for kubebrowser pod",
Expand Down Expand Up @@ -561,8 +566,8 @@
},
"hostname": {
"type": "string",
"description": "Default host for the ingress resource",
"default": "kubebrowser.local"
"description": "(DEPRECATED use server.hostname instead) Default host for the ingress resource",
"default": ""
},
"pathType": {
"type": "string",
Expand Down Expand Up @@ -644,12 +649,6 @@
"description": "Gateway API parentRefs for the HTTPRoute. Must reference an existing Gateway",
"default": [],
"items": {}
},
"hostnames": {
"type": "array",
"description": "List of hostnames for the HTTPRoute",
"default": [],
"items": {}
}
}
}
Expand Down
17 changes: 7 additions & 10 deletions charts/kubebrowser/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,14 @@ server:
hostAliases: []
## @param server.hostNetwork Specify if host network should be enabled for kubebrowser pod
##
hostNetwork: false
## @param server.containerPorts.http kubebrowser server container port for http
##
containerPorts:
http: 8080
hostNetwork: false
## @param server.hostname Hostname for kubebrowser server
##
hostname: ""
## @param server.hostIPC Specify if host IPC should be enabled for kubebrowser pod
##
hostIPC: false
Expand Down Expand Up @@ -350,9 +353,9 @@ ingress:
## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
##
ingressClassName: ""
## @param ingress.hostname Default host for the ingress resource
## @param ingress.hostname (DEPRECATED use server.hostname instead) Default host for the ingress resource
##
hostname: kubebrowser.local
hostname: ""
## @param ingress.pathType Ingress path type
##
pathType: ImplementationSpecific
Expand All @@ -372,7 +375,7 @@ ingress:
##
annotations: {}
## @param ingress.tls Enable TLS configuration for the hostname defined at `ingress.hostname` parameter
## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.ingress.hostname }}`
## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.hostname }}`
## You can:
## - Use the `ingress.secrets` parameter to create this TLS secret
## - Rely on cert-manager to create it by setting the corresponding annotations
Expand Down Expand Up @@ -459,12 +462,6 @@ httpRoute:
## namespace: gateway
##
parentRefs: []
## @param httpRoute.hostnames List of hostnames for the HTTPRoute
## e.g:
## hostnames:
## - kubebrowser.example.com
##
hostnames: []
## @skip httpRoute.rules
## @param httpRoute.rules (Optional) HTTPRoute rules configuration, if overriden, backendRefs is set by default
## e.g:
Expand Down