Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add useHelm3 flag #1349

Merged
merged 4 commits into from Dec 8, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions chart/kubeapps/templates/kubeapps-frontend-config.yaml
Expand Up @@ -62,7 +62,11 @@ data:
proxy_set_header Authorization "Bearer $http_x_forwarded_access_token";
{{- end }}

{{- if .Values.useHelm3 }}
# TODO proxy_pass for Helm 3
{{- else }}
proxy_pass http://{{ template "kubeapps.tiller-proxy.fullname" . }}:{{ .Values.tillerProxy.service.port }};
{{- end }}
}

location ~* /api/tiller-deploy {
Expand All @@ -71,7 +75,11 @@ data:
proxy_read_timeout 10m;
rewrite /api/tiller-deploy/(.*) /$1 break;
rewrite /api/tiller-deploy / break;
{{- if .Values.useHelm3 }}
# TODO proxy_pass for Helm 3
{{- else }}
proxy_pass http://{{ template "kubeapps.tiller-proxy.fullname" . }}:{{ .Values.tillerProxy.service.port }};
{{- end }}

{{- if .Values.frontend.proxypassAccessTokenAsBearer }}
# Google Kubernetes Engine requires the access_token as the Bearer when talking to the k8s api server.
Expand Down
2 changes: 2 additions & 0 deletions chart/kubeapps/templates/tiller-proxy-deployment.yaml
@@ -1,3 +1,4 @@
{{- if not .Values.useHelm3 -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -86,3 +87,4 @@ spec:
secret:
secretName: {{ template "kubeapps.tiller-proxy.fullname" . }}
{{- end }}
{{- end }}{{/* matches useHelm3 */}}
2 changes: 2 additions & 0 deletions chart/kubeapps/templates/tiller-proxy-rbac.yaml
@@ -1,3 +1,4 @@
{{- if not .Values.useHelm3 -}}
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
Expand Down Expand Up @@ -40,3 +41,4 @@ subjects:
name: {{ template "kubeapps.tiller-proxy.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- end -}}
{{- end }}{{/* matches useHelm3 */}}
2 changes: 2 additions & 0 deletions chart/kubeapps/templates/tiller-proxy-secret.yaml
@@ -1,3 +1,4 @@
{{- if not .Values.useHelm3 -}}
# The tls ca certificate is only required when tls.verify is set to true, we fail otherwise.
{{- if .Values.tillerProxy.tls -}}
{{- if and (.Values.tillerProxy.tls.verify) (not (.Values.tillerProxy.tls.ca)) -}}
Expand All @@ -22,3 +23,4 @@ data:
tls.key: |-
{{ .Values.tillerProxy.tls.key | b64enc | indent 4 }}
{{- end -}}
{{- end }}{{/* matches useHelm3 */}}
2 changes: 2 additions & 0 deletions chart/kubeapps/templates/tiller-proxy-service.yaml
@@ -1,3 +1,4 @@
{{- if not .Values.useHelm3 -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -17,3 +18,4 @@ spec:
selector:
app: {{ template "kubeapps.tiller-proxy.fullname" . }}
release: {{ .Release.Name }}
{{- end }}{{/* matches useHelm3 */}}
2 changes: 2 additions & 0 deletions chart/kubeapps/templates/tiller-proxy-serviceaccount.yaml
@@ -1,3 +1,4 @@
{{- if not .Values.useHelm3 -}}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -7,3 +8,4 @@ metadata:
chart: {{ template "kubeapps.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- end }}{{/* matches useHelm3 */}}
3 changes: 3 additions & 0 deletions chart/kubeapps/values.yaml
Expand Up @@ -8,6 +8,9 @@
# - myRegistryKeySecretName
# storageClass: myStorageClass

# true for Helm 3; false for Helm 2:
useHelm3: false # DOES NOT WORK YET; will act as a feature flag later on when we have Helm 3 support.

## The frontend service is the main reverse proxy used to access the Kubeapps UI
## To expose Kubeapps externally either configure the ingress object below or
## set frontend.service.type=LoadBalancer in the frontend configuration.
Expand Down