Skip to content

Commit

Permalink
bring dev changes back
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
  • Loading branch information
antgamdia committed Oct 29, 2022
1 parent 4b8853a commit 5328e6a
Show file tree
Hide file tree
Showing 10 changed files with 212 additions and 49 deletions.
2 changes: 1 addition & 1 deletion chart/kubeapps/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ maintainers:
name: kubeapps
sources:
- https://github.com/vmware-tanzu/kubeapps
version: 12.0.0
version: 12.1.0-dev0
58 changes: 37 additions & 21 deletions chart/kubeapps/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
<!--- app-name: Kubeapps -->

# Kubeapps packaged by Bitnami

Kubeapps is a web-based UI for launching and managing applications on Kubernetes. It allows users to deploy trusted applications and operators to control users access to the cluster.

[Overview of Kubeapps](https://github.com/vmware-tanzu/kubeapps)


## TL;DR

```bash
Expand Down Expand Up @@ -202,6 +198,7 @@ Once you have installed Kubeapps follow the [Getting Started Guide](https://gith

| Name | Description | Value |
| ------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -------------------- |
| `dashboard.enabled` | Specifies whether Kubeapps Dashboard should be deployed or not | `true` |
| `dashboard.image.registry` | Dashboard image registry | `docker.io` |
| `dashboard.image.repository` | Dashboard image repository | `kubeapps/dashboard` |
| `dashboard.image.tag` | Dashboard image tag (immutable tags are recommended) | `latest` |
Expand Down Expand Up @@ -256,8 +253,8 @@ Once you have installed Kubeapps follow the [Getting Started Guide](https://gith
| `dashboard.lifecycleHooks` | Custom lifecycle hooks for Dashboard containers | `{}` |
| `dashboard.command` | Override default container command (useful when using custom images) | `[]` |
| `dashboard.args` | Override default container args (useful when using custom images) | `[]` |
| `dashboard.podLabels` | Extra labels for Dasbhoard pods | `{}` |
| `dashboard.podAnnotations` | Annotations for Dasbhoard pods | `{}` |
| `dashboard.podLabels` | Extra labels for Dashboard pods | `{}` |
| `dashboard.podAnnotations` | Annotations for Dashboard pods | `{}` |
| `dashboard.podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `dashboard.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `dashboard.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
Expand All @@ -270,12 +267,12 @@ Once you have installed Kubeapps follow the [Getting Started Guide](https://gith
| `dashboard.schedulerName` | Name of the k8s scheduler (other than default) | `""` |
| `dashboard.topologySpreadConstraints` | Topology Spread Constraints for pod assignment | `[]` |
| `dashboard.hostAliases` | Custom host aliases for Dashboard pods | `[]` |
| `dashboard.extraVolumes` | Optionally specify extra list of additional volumes for Dasbhoard pods | `[]` |
| `dashboard.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for Dasbhoard container(s) | `[]` |
| `dashboard.sidecars` | Add additional sidecar containers to the Dasbhoard pod | `[]` |
| `dashboard.initContainers` | Add additional init containers to the Dasbhoard pods | `[]` |
| `dashboard.service.ports.http` | Dasbhoard service HTTP port | `8080` |
| `dashboard.service.annotations` | Additional custom annotations for Dasbhoard service | `{}` |
| `dashboard.extraVolumes` | Optionally specify extra list of additional volumes for Dashboard pods | `[]` |
| `dashboard.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for Dashboard container(s) | `[]` |
| `dashboard.sidecars` | Add additional sidecar containers to the Dashboard pod | `[]` |
| `dashboard.initContainers` | Add additional init containers to the Dashboard pods | `[]` |
| `dashboard.service.ports.http` | Dashboard service HTTP port | `8080` |
| `dashboard.service.annotations` | Additional custom annotations for Dashboard service | `{}` |


### AppRepository Controller parameters
Expand Down Expand Up @@ -424,12 +421,20 @@ Once you have installed Kubeapps follow the [Getting Started Guide](https://gith

### Other Parameters

| Name | Description | Value |
| ------------------------- | ----------------------------------------------------------------------------- | ------- |
| `allowNamespaceDiscovery` | Allow users to discover available namespaces (only the ones they have access) | `true` |
| `clusters` | List of clusters that Kubeapps can target for deployments | `[]` |
| `featureFlags.operators` | Enable ingress record generation for Kubeapps | `false` |
| `rbac.create` | Specifies whether RBAC resources should be created | `true` |
| Name | Description | Value |
| ------------- | --------------------------------------------------------- | ------ |
| `clusters` | List of clusters that Kubeapps can target for deployments | `[]` |
| `rbac.create` | Specifies whether RBAC resources should be created | `true` |


### Feature flags

| Name | Description | Value |
| --------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------- |
| `featureFlags.apiOnly.enabled` | Enable ingress for API operations only. Access to "/" will not be possible, so Dashboard will be unusable. | `false` |
| `featureFlags.apiOnly.grpc.annotations` | Specific annotations for the GRPC ingress in API-only mode | `{}` |
| `featureFlags.operators` | Enable support for Operators in Kubeapps | `false` |
| `featureFlags.schemaEditor.enabled` | Enable a visual editor for customizing the package schemas | `false` |


### Database Parameters
Expand All @@ -443,9 +448,9 @@ Once you have installed Kubeapps follow the [Getting Started Guide](https://gith
| `postgresql.primary.persistence.enabled` | Enable PostgreSQL Primary data persistence using PVC | `false` |
| `postgresql.architecture` | PostgreSQL architecture (`standalone` or `replication`) | `standalone` |
| `postgresql.securityContext.enabled` | Enabled PostgreSQL replicas pods' Security Context | `false` |
| `postgresql.resources.limits` | The resources limits for the PostreSQL container | `{}` |
| `postgresql.resources.requests.cpu` | The requested CPU for the PostreSQL container | `250m` |
| `postgresql.resources.requests.memory` | The requested memory for the PostreSQL container | `256Mi` |
| `postgresql.resources.limits` | The resources limits for the PostgreSQL container | `{}` |
| `postgresql.resources.requests.cpu` | The requested CPU for the PostgreSQL container | `250m` |
| `postgresql.resources.requests.memory` | The requested memory for the PostgreSQL container | `256Mi` |


### kubeappsapis parameters
Expand Down Expand Up @@ -559,6 +564,7 @@ Once you have installed Kubeapps follow the [Getting Started Guide](https://gith
| `redis.replica.persistence.enabled` | Enable Redis&reg; replica data persistence using PVC | `false` |



```bash
helm install kubeapps --namespace kubeapps \
--set ingress.enabled=true \
Expand Down Expand Up @@ -732,6 +738,16 @@ helm install kubeapps my-repo/kubeapps \
--set ingress.annotations."kubernetes\.io/ingress\.class"=nginx # or your preferred ingress controller
```

If you are using LDAP via Dex with OIDC or you are getting an error message like `upstream sent too big header while reading response header from upstream` it means the cookie size is too big and can't be processed by the Ingress Controller.
You can work around this problem by setting the following Nginx ingress annotations (look for similar annotations in your preferred Ingress Controller):

```bash
# rest of the helm install ... command
--set ingress.annotations."nginx\.ingress\.kubernetes\.io/proxy-read-timeout"=600
--set ingress.annotations."nginx\.ingress\.kubernetes\.io/proxy-buffer-size"=8k
--set ingress.annotations."nginx\.ingress\.kubernetes\.io/proxy-buffers"=4
```

#### Serving Kubeapps in a subpath

You may want to serve Kubeapps with a subpath, for instance `http://example.com/subpath`, you have to set the proper Ingress configuration. If you are using the ingress configuration provided by the Kubeapps chart, you will have to set the `ingress.hostname` and `path` parameters:
Expand Down
2 changes: 2 additions & 0 deletions chart/kubeapps/templates/dashboard/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.dashboard.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -84,3 +85,4 @@ data:
"skipAvailablePackageDetails": {{ .Values.dashboard.skipAvailablePackageDetails }},
"createNamespaceLabels": {{ .Values.dashboard.createNamespaceLabels | toJson }}
}
{{- end -}}
2 changes: 2 additions & 0 deletions chart/kubeapps/templates/dashboard/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.dashboard.enabled -}}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
Expand Down Expand Up @@ -183,3 +184,4 @@ spec:
{{- if .Values.dashboard.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.dashboard.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- end -}}
2 changes: 2 additions & 0 deletions chart/kubeapps/templates/dashboard/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.dashboard.enabled -}}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -26,3 +27,4 @@ spec:
name: http
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: dashboard
{{- end -}}
3 changes: 2 additions & 1 deletion chart/kubeapps/templates/frontend/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ data:
proxy_pass {{ include "kubeapps.kubeappsapis.proxy_pass" . -}};
}
{{- if .Values.dashboard.enabled }}
location / {
# Add the Authorization header if exists
add_header Authorization $http_authorization;
proxy_pass {{ printf "http://%s:%d" (include "kubeapps.dashboard.fullname" .) (int .Values.dashboard.service.ports.http) }};
}
{{- end }}
}
125 changes: 125 additions & 0 deletions chart/kubeapps/templates/ingress-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{{- if and .Values.featureFlags.apiOnly.enabled (not .Values.ingress.enabled) -}}
{{ fail "Ingress must be enabled for the API mode to work. Please set \"ingress.enabled\" to true." }}
{{- end -}}
{{- if and .Values.ingress.enabled .Values.featureFlags.apiOnly.enabled -}}
{{- if and .Values.dashboard.enabled -}}
{{ fail "Dashboard is enabled but will NOT work with Ingress in API mode. Please set \"dashboard.enabled\" to false." }}
{{- end -}}
---
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ template "common.names.fullname" . }}-http-api
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" . ) | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.ingress.annotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" . ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" . ) | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- end }}
rules:
{{- if .Values.ingress.hostname }}
- host: {{ .Values.ingress.hostname }}
http:
paths:
{{- if .Values.ingress.extraPaths }}
{{- toYaml .Values.ingress.extraPaths | nindent 10 }}
{{- end }}
- path: /apis
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ $.Values.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" "http" "context" $) | nindent 14 }}
{{- if and .Values.ingress.path (ne (quote (trim .Values.ingress.path)) (quote "/")) }}
- path: {{ .Values.ingress.path }}
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ $.Values.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" "http" "context" $) | nindent 14 }}
{{- end -}}
{{- end }}
{{- range .Values.ingress.extraHosts }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ $.Values.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" "http" "context" $) | nindent 14 }}
{{- end }}
{{- if .Values.ingress.extraRules }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}
{{- end }}
{{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned)) .Values.ingress.extraTls }}
tls:
{{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned) }}
- hosts:
- {{ .Values.ingress.hostname | quote }}
secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
{{- end }}
{{- if .Values.ingress.extraTls }}
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.extraTls "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
---
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" . ) | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.featureFlags.apiOnly.grpc.annotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.featureFlags.apiOnly.grpc.annotations "context" . ) | nindent 4 }}
{{- end }}
{{- if .Values.ingress.annotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" . ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" . ) | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- end }}
rules:
{{- if .Values.ingress.hostname }}
- host: {{ .Values.ingress.hostname }}
http:
paths:
- path: /
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ $.Values.ingress.pathType }}
{{- end }}
backend:
service:
name: {{ template "kubeapps.kubeappsapis.fullname" . }}
port:
name: grpc-http
{{- end }}
{{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned)) .Values.ingress.extraTls }}
tls:
{{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned) }}
- hosts:
- {{ .Values.ingress.hostname | quote }}
secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
{{- end }}
{{- if .Values.ingress.extraTls }}
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.extraTls "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
---
{{- end }}
2 changes: 1 addition & 1 deletion chart/kubeapps/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.ingress.enabled -}}
{{- if and .Values.ingress.enabled (not .Values.featureFlags.apiOnly.enabled) -}}
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
Expand Down
Loading

0 comments on commit 5328e6a

Please sign in to comment.