added repo

This commit is contained in:
Your Name
2026-08-26 03:39:42 +05:30
parent 45c25a95af
commit b8575bb8b9
6889 changed files with 1217125 additions and 0 deletions
@@ -0,0 +1,42 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
OWNERS
ci/
_templates_old/
@@ -0,0 +1,15 @@
dependencies:
- name: ingress-nginx
repository: https://kubernetes.github.io/ingress-nginx
version: 4.10.1
- name: cert-manager
repository: https://charts.jetstack.io
version: v1.14.5
- name: metrics-server
repository: https://kubernetes-sigs.github.io/metrics-server/
version: 3.12.1
- name: kong
repository: https://charts.konghq.com
version: 2.38.0
digest: sha256:ef535931f6d08b3b4b242cba567d0c02a072cf7cf68431f58a0d8d283b3b72b5
generated: "2024-06-04T11:32:45.155515532+02:00"
@@ -0,0 +1,49 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v2
name: kubernetes-dashboard
version: 7.10.0
description: General-purpose web UI for Kubernetes clusters
keywords:
- kubernetes
- dashboard
home: https://github.com/kubernetes/dashboard
sources:
- https://github.com/kubernetes/dashboard
maintainers:
- name: desaintmartin
email: cdesaintmartin@wiremind.fr
- name: floreks
email: s.florek91@gmail.com
icon: https://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.svg
kubeVersion: ">=1.21.0-0"
dependencies:
- name: ingress-nginx
alias: nginx
version: 4.10.1
repository: https://kubernetes.github.io/ingress-nginx
condition: nginx.enabled
- name: cert-manager
version: v1.14.5
repository: https://charts.jetstack.io
condition: cert-manager.enabled
- name: metrics-server
version: 3.12.1
repository: https://kubernetes-sigs.github.io/metrics-server/
condition: metrics-server.enabled
- name: kong
version: 2.38.0
repository: https://charts.konghq.com
condition: kong.enabled
@@ -0,0 +1,4 @@
approvers:
- desaintmartin
reviewers:
- desaintmartin
@@ -0,0 +1,162 @@
# Kubernetes Dashboard
[![Go Report Card](https://goreportcard.com/badge/github.com/kubernetes/dashboard)](https://goreportcard.com/report/github.com/kubernetes/dashboard)
[![Coverage Status](https://codecov.io/github/kubernetes/dashboard/coverage.svg?branch=master)](https://codecov.io/github/kubernetes/dashboard?branch=master)
[![GitHub release](https://img.shields.io/github/release/kubernetes/dashboard.svg)](https://github.com/kubernetes/dashboard/releases/latest)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/kubernetes/dashboard/blob/master/LICENSE)
## TL;DR
```console
# Add kubernetes-dashboard repository
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
# Deploy a Helm Release named "kubernetes-dashboard" using the kubernetes-dashboard chart
helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
```
# Introduction
This chart bootstraps a [Kubernetes Dashboard](https://github.com/kubernetes/dashboard) deployment on
a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Installing the Chart
To install the [Chart](https://helm.sh/docs/intro/using_helm/#three-big-concepts) with
the [Release](https://helm.sh/docs/intro/using_helm/#three-big-concepts) name `kubernetes-dashboard`:
```console
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
```
The command deploys kubernetes-dashboard on the Kubernetes cluster in the `kubernetes-dashboard` namespace with default
configuration.
The [configuration](#configuration) section lists the parameters that can be configured during installation.
## Uninstalling the Chart
To uninstall/delete the `kubernetes-dashboard` deployment:
```console
helm delete kubernetes-dashboard --namespace kubernetes-dashboard
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Access control
It is critical for the Kubernetes cluster to correctly setup access control of Kubernetes Dashboard.
See this [guide](https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/README.md) for details.
It is highly recommended to use RBAC with minimal privileges needed for Dashboard to run.
### NetworkPolicy
You can enable a networkPolicy for this application via the `networkPolicy.enabled` boolean. By default it permits
ingress only to the HTTP or HTTPS port (see `protocolHttp` from values.yaml).
If you wish to disable all ingress to this application you may set the `networkPolicy.ingressDenyAll` boolean to `true`.
If ingress is disabled you must use direct port-forwarding to access this application.
## Configuration
Please refer
to [values.yaml](https://github.com/kubernetes/dashboard/blob/master/charts/kubernetes-dashboard/values.yaml)
for valid values and their defaults.
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install/upgrade`. For example,
```console
helm install kubernetes-dashboard/kubernetes-dashboard --name kubernetes-dashboard \
--set=api.containers.resources.limits.cpu=200m
```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the
chart. For example,
```console
helm install kubernetes-dashboard/kubernetes-dashboard --name kubernetes-dashboard -f values.yaml
```
> **Tip**: You can use the default [values.yaml](values.yaml), which is used by default, as reference
### Pod security policy and admission
The chart supports enabling ``PodSecurityPolicy`` for kubernetes 1.24 and prior via a flag in `values.yaml`.
Please be aware `PodSecurityPolicy` is now deprecated and removed from kubernetes 1.25+ onwards. An alternative is to
enable ``PodSecurityAdmission`` for the namespace that kubernetes dashboard will be deployed in. To do this
add [labels to the namespace](https://kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-namespace-labels).
Example below:
```console
kubectl label --overwrite ns kubernetes-dashboard pod-security.kubernetes.io/enforce=baseline
```
## Upgrading an existing Release to a new major version
A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an
incompatible breaking change needing manual actions.
### Update from 7.x.x-alphaX to 7.x.x
Due to further architecture changes do a clean installation of Kubernetes Dashboard when upgrading from alpha chart version.
Default dependency on both `ingress-nginx-controller` and `cert-manager` have been removed in favor of using a single-container, DBless
`kong` installation as a gateway that connects all our containers and exposes the UI. Users can then use any ingress controller or proxy
in front of kong gateway.
### Upgrade from 6.x.x to 7.x.x
We recommend doing a clean installation. Kubernetes Dashboard `v3` introduced a big architecture changes and now uses `cert-manager`,
and [ingress-nginx-controller](https://kubernetes.github.io/ingress-nginx/) by default to work properly. In case those are already installed in your cluster, simply set `--set=nginx.enabled=false`
and `--set=cert-manager.enabled=false` when upgrading. If you want to use different software in addition to disabling `nginx` and `cert-manager` you also
need to set `--set=app.ingress.enabled=false` to make sure our default `Ingress` resource will not be installed.
### Upgrade from 5.x.x to 6.x.x
- Switch `PodDisruptionBudget` from `policy/v1beta1` to `policy/v1`. Requires kubernetes >= 1.21.0
if `podDisruptionBudget.enabled` is set to true (false by default).
### Upgrade from 4.x.x to 5.x.x
- Switch Ingress from networking.k8s.io/v1beta1 to networking.k8s.io/v1. Requires kubernetes >= 1.19.0.
### Upgrade from 2.x.x to 3.x.x
- Switch Ingress from extensions/v1beta1 to networking.k8s.io/v1beta1. Requires kubernetes >= 1.14.0.
### Upgrade from 1.x.x to 2.x.x
Version 2.0.0 of this chart is the first version hosted in the kubernetes/dashboard.git repository. v1.x.x until 1.10.1
is hosted on https://github.com/helm/charts.
- This version upgrades to kubernetes-dashboard v2.0.0 along with changes in RBAC management: all secrets are
explicitly created and ServiceAccount do not have permission to create any secret. On top of that, it completely
removes the `clusterAdminRole` parameter, being too dangerous. In order to upgrade, please update your configuration
to remove `clusterAdminRole` parameter and uninstall/reinstall the chart.
- It enables by default values for `podAnnotations` and `securityContext`, please disable them if you don't supoprt them
- It removes `enableSkipLogin` and `enableInsecureLogin` parameters. Please use `extraArgs` instead.
- It adds a `ProtocolHttp` parameter, allowing you to switch the backend to plain HTTP and replaces the
old `enableSkipLogin` for the network part.
- If `protocolHttp` is not set, it will automatically add to the `Ingress`, if enabled, annotations to support HTTPS
backends for nginx-ingress and GKE Ingresses.
- It updates all the labels to the
new [recommended labels](https://github.com/helm/charts/blob/master/REVIEW_GUIDELINES.md#names-and-labels), most of
them being immutable.
- dashboardContainerSecurityContext has been renamed to containerSecurityContext.
In order to upgrade, please update your configuration to remove `clusterAdminRole` parameter and
adapt `enableSkipLogin`, `enableInsecureLogin`, `podAnnotations` and `securityContext` parameters, and
uninstall/reinstall the chart.
### Version 4.x.x
Starting from version 4.0.0 of this chart, it will only support Helm 3 and remove the support for Helm 2.
If you still use Helm 2 you will need first to migrate the deployment to Helm 3 and then you can upgrade your chart.
To do that you can follow the [guide](https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/)
## Access
For information about how to access, please read
the [kubernetes-dashboard manual](https://github.com/kubernetes/dashboard)
@@ -0,0 +1,20 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
app:
ingress:
enabled: false
nginx:
enabled: false
@@ -0,0 +1,40 @@
*************************************************************************************************
*** PLEASE BE PATIENT: Kubernetes Dashboard may need a few minutes to get up and become ready ***
*************************************************************************************************
Congratulations! You have just installed Kubernetes Dashboard in your cluster.
{{ if not (.Values.nginx.enabled) }}
To access Dashboard run:
kubectl -n {{ .Release.Namespace }} port-forward svc/{{ .Release.Name }}-kong-proxy 8443:443
NOTE: In case port-forward command does not work, make sure that kong service name is correct.
Check the services in Kubernetes Dashboard namespace using:
kubectl -n {{ .Release.Namespace }} get svc
Dashboard will be available at:
https://localhost:8443
{{- end }}
{{ if and (has "localhost" .Values.app.ingress.hosts) (eq .Values.app.ingress.ingressClassName "internal-nginx") (.Values.nginx.enabled) }}
To access Dashboard run:
kubectl -n {{ .Release.Namespace }} port-forward svc/{{ .Release.Name }}-nginx-controller 8443:443
NOTE: In case port-forward command does not work, make sure that nginx service name is correct.
Check the services in Kubernetes Dashboard namespace using:
kubectl -n {{ .Release.Namespace }} get svc
Dashboard will be available at:
https://localhost:8443
{{- end }}
{{- if or (not (has "localhost" .Values.app.ingress.hosts)) (gt (len .Values.app.ingress.hosts) 1) }}
Looks like you are deploying Kubernetes Dashboard on a custom domain(s).
Please make sure that the ingress configuration is valid.
Dashboard should be accessible on your configured domain(s) soon:
{{- range .Values.app.ingress.hosts }}
{{- if not (eq . "localhost") }}
- https://{{ . }}
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,120 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "kubernetes-dashboard.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "kubernetes-dashboard.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "kubernetes-dashboard.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "kubernetes-dashboard.labels" -}}
helm.sh/chart: {{ include "kubernetes-dashboard.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/part-of: {{ include "kubernetes-dashboard.name" . }}
{{- with .Values.app.labels }}
{{ toYaml . }}
{{- end }}
{{- end -}}
{{/*
Common label selectors
*/}}
{{- define "kubernetes-dashboard.matchLabels" -}}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ include "kubernetes-dashboard.name" . }}
{{- end -}}
{{/*
Common annotations
*/}}
{{- define "kubernetes-dashboard.annotations" -}}
{{- with .Values.app.annotations }}
{{- toYaml . }}
{{- end }}
{{- end -}}
{{- define "kubernetes-dashboard.app.csrf.secret.name" -}}
{{- printf "%s-%s" ( include "kubernetes-dashboard.fullname" . ) "csrf"}}
{{- end -}}
{{- define "kubernetes-dashboard.app.ingress.secret.name" -}}
{{- printf "%s-%s" ( include "kubernetes-dashboard.fullname" . ) "certs"}}
{{- end -}}
{{- define "kubernetes-dashboard.app.csrf.secret.key" -}}
{{- printf "private.key" }}
{{- end -}}
{{- define "kubernetes-dashboard.app.csrf.secret.value" -}}
{{- $secretName := (include "kubernetes-dashboard.app.csrf.secret.name" .) -}}
{{- $secret := lookup "v1" "Secret" .Release.Namespace $secretName -}}
{{- if .Values.app.security.csrfKey -}}
private.key: {{ .Values.app.security.csrfKey | b64enc | quote }}
{{- else if and $secret (hasKey $secret "data") (hasKey $secret.data "private.key") (index $secret.data "private.key") -}}
private.key: {{ index $secret.data "private.key" }}
{{- else -}}
private.key: {{ randBytes 256 | b64enc | quote }}
{{- end -}}
{{- end -}}
{{- define "kubernetes-dashboard.metrics-scraper.name" -}}
{{- printf "%s-%s" ( include "kubernetes-dashboard.fullname" . ) ( .Values.metricsScraper.role )}}
{{- end -}}
{{- define "kubernetes-dashboard.web.configMap.settings.name" -}}
{{- printf "%s-%s-%s" ( include "kubernetes-dashboard.fullname" . ) ( .Values.web.role ) "settings" }}
{{- end -}}
{{- define "kubernetes-dashboard.validate.mode" -}}
{{- if not (or (eq .Values.app.mode "dashboard") (eq .Values.app.mode "api")) -}}
{{- fail "value of .Values.app.mode must be one of [dashboard, api]"}}
{{- end -}}
{{- end -}}
{{- define "kubernetes-dashboard.validate.ingressIssuerScope" -}}
{{- if not (or (eq .Values.app.ingress.issuer.scope "disabled") (eq .Values.app.ingress.issuer.scope "default") (eq .Values.app.ingress.issuer.scope "cluster")) }}
{{- fail "value of .Values.app.ingress.issuer.scope must be one of [default, cluster, disabled]"}}
{{- end -}}
{{- end -}}
@@ -0,0 +1,69 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if and (eq .Values.app.mode "dashboard") (.Values.kong.enabled) }}
apiVersion: v1
kind: ConfigMap
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
name: {{ .Values.kong.dblessConfig.configMap }}
data:
kong.yml: |
_format_version: "3.0"
services:
- name: auth
host: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.auth.role }}
port: 8000
protocol: http
routes:
- name: authLogin
paths:
- /api/v1/login
strip_path: false
- name: authCsrf
paths:
- /api/v1/csrftoken/login
strip_path: false
- name: authMe
paths:
- /api/v1/me
strip_path: false
- name: api
host: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
port: 8000
protocol: http
routes:
- name: api
paths:
- /api
strip_path: false
- name: metrics
paths:
- /metrics
strip_path: false
- name: web
host: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
port: 8000
protocol: http
routes:
- name: root
paths:
- /
strip_path: false
{{- end -}}
@@ -0,0 +1,33 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if eq .Values.app.mode "dashboard" }}
apiVersion: v1
kind: ConfigMap
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
name: {{ template "kubernetes-dashboard.web.configMap.settings.name" . }}
data:
{{- with .Values.app.settings.global }}
settings: {{ toJson . | quote }}
{{- end }}
{{- with .Values.app.settings.pinnedResources }}
pinnedResources: {{ toJson . | quote }}
{{- end }}
{{- end -}}
@@ -0,0 +1,157 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.api.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }}
app.kubernetes.io/version: {{ .Values.api.image.tag }}
app.kubernetes.io/component: {{ .Values.api.role }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.api.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
spec:
replicas: {{ .Values.api.scaling.replicas }}
revisionHistoryLimit: {{ .Values.api.scaling.revisionHistoryLimit }}
selector:
matchLabels:
{{- include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }}
template:
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 8 }}
{{- with .Values.api.labels }}
{{ toYaml . | nindent 8 }}
{{- end }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }}
app.kubernetes.io/version: {{ .Values.api.image.tag }}
app.kubernetes.io/component: {{ .Values.api.role }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/secrets/csrf.yaml") . | sha256sum }}
{{- with .Values.api.annotations }}
{{ toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }}
image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag }}"
imagePullPolicy: {{ .Values.app.image.pullPolicy }}
args:
- --namespace={{ .Release.Namespace }}
- --metrics-scraper-service-name={{ template "kubernetes-dashboard.metrics-scraper.name" . }}
{{- with .Values.api.containers.args }}
{{ toYaml . | nindent 12 }}
{{- end }}
env:
- name: CSRF_KEY
valueFrom:
secretKeyRef:
name: {{ template "kubernetes-dashboard.app.csrf.secret.name" . }}
key: {{ template "kubernetes-dashboard.app.csrf.secret.key" . }}
{{- if .Values.api.containers.resources.limits.cpu }}
- name: GOMAXPROCS
valueFrom:
resourceFieldRef:
resource: limits.cpu
divisor: "1"
{{- end }}
{{- if .Values.api.containers.resources.limits.memory }}
- name: GOMEMLIMIT
valueFrom:
resourceFieldRef:
resource: limits.memory
divisor: "1"
{{- end }}
{{- with .Values.api.containers.env }}
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.api.containers.ports }}
ports:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.api.containers.volumeMounts }}
volumeMounts:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.app.security.containerSecurityContext }}
securityContext:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.api.containers.resources }}
resources:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.app.image.pullSecrets }}
imagePullSecrets:
{{- range . }}
- name: {{ . }}
{{- end }}
{{- end }}
automountServiceAccountToken: {{ .Values.api.automountServiceAccountToken }}
{{- with .Values.app.security.securityContext }}
securityContext:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.api.volumes }}
volumes:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.app.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- if or .Values.api.nodeSelector .Values.app.scheduling.nodeSelector }}
nodeSelector:
{{- with .Values.api.nodeSelector }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.app.scheduling.nodeSelector }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.app.tolerations }}
tolerations:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.app.affinity }}
affinity:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- if eq .Values.app.mode "dashboard" }}
serviceAccountName: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
{{- end -}}
@@ -0,0 +1,156 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- include "kubernetes-dashboard.validate.mode" $ -}}
{{- if eq .Values.app.mode "dashboard" }}
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.auth.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }}
app.kubernetes.io/version: {{ .Values.api.image.tag }}
app.kubernetes.io/component: {{ .Values.auth.role }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.auth.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.auth.role }}
spec:
replicas: {{ .Values.auth.scaling.replicas }}
revisionHistoryLimit: {{ .Values.auth.scaling.revisionHistoryLimit }}
selector:
matchLabels:
{{- include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }}
template:
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 8 }}
{{- with .Values.auth.labels }}
{{ toYaml . | nindent 8 }}
{{- end }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }}
app.kubernetes.io/version: {{ .Values.auth.image.tag }}
app.kubernetes.io/component: {{ .Values.auth.role }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/secrets/csrf.yaml") . | sha256sum }}
{{- with .Values.auth.annotations }}
{{ toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }}
image: "{{ .Values.auth.image.repository }}:{{ .Values.auth.image.tag }}"
imagePullPolicy: {{ .Values.app.image.pullPolicy }}
args:
{{- with .Values.auth.containers.args }}
{{ toYaml . | nindent 12 }}
{{- end }}
env:
- name: CSRF_KEY
valueFrom:
secretKeyRef:
name: {{ template "kubernetes-dashboard.app.csrf.secret.name" . }}
key: {{ template "kubernetes-dashboard.app.csrf.secret.key" . }}
{{- if .Values.auth.containers.resources.limits.cpu }}
- name: GOMAXPROCS
valueFrom:
resourceFieldRef:
resource: limits.cpu
divisor: "1"
{{- end }}
{{- if .Values.auth.containers.resources.limits.memory }}
- name: GOMEMLIMIT
valueFrom:
resourceFieldRef:
resource: limits.memory
divisor: "1"
{{- end }}
{{- with .Values.auth.containers.env }}
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.auth.containers.ports }}
ports:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.auth.containers.volumeMounts }}
volumeMounts:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.app.security.containerSecurityContext }}
securityContext:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.auth.containers.resources }}
resources:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.app.image.pullSecrets }}
imagePullSecrets:
{{- range . }}
- name: {{ . }}
{{- end }}
{{- end }}
automountServiceAccountToken: {{ .Values.auth.automountServiceAccountToken }}
{{- with .Values.app.security.securityContext }}
securityContext:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.auth.volumes }}
volumes:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.app.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- if or .Values.auth.nodeSelector .Values.app.scheduling.nodeSelector }}
nodeSelector:
{{- with .Values.auth.nodeSelector }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.app.scheduling.nodeSelector }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.app.tolerations }}
tolerations:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.app.affinity }}
affinity:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
@@ -0,0 +1,154 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if and .Values.metricsScraper.enabled (eq .Values.app.mode "dashboard") }}
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.metricsScraper.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }}
app.kubernetes.io/version: {{ .Values.metricsScraper.image.tag }}
app.kubernetes.io/component: {{ .Values.metricsScraper.role }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.metricsScraper.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.metrics-scraper.name" . }}
spec:
replicas: {{ .Values.metricsScraper.scaling.replicas }}
revisionHistoryLimit: {{ .Values.metricsScraper.scaling.revisionHistoryLimit }}
selector:
matchLabels:
{{- include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }}
template:
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 8 }}
{{- with .Values.metricsScraper.labels }}
{{ toYaml . | nindent 8 }}
{{- end }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }}
app.kubernetes.io/version: {{ .Values.metricsScraper.image.tag }}
app.kubernetes.io/component: {{ .Values.metricsScraper.role }}
annotations:
{{- with .Values.metricsScraper.annotations }}
{{ toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }}
image: "{{ .Values.metricsScraper.image.repository }}:{{ .Values.metricsScraper.image.tag }}"
imagePullPolicy: {{ .Values.app.image.pullPolicy }}
{{- with .Values.metricsScraper.containers.args }}
args:
{{ toYaml . | nindent 12 }}
{{- end }}
env:
{{- if .Values.metricsScraper.containers.resources.limits.cpu }}
- name: GOMAXPROCS
valueFrom:
resourceFieldRef:
resource: limits.cpu
divisor: "1"
{{- end }}
{{- if .Values.metricsScraper.containers.resources.limits.memory }}
- name: GOMEMLIMIT
valueFrom:
resourceFieldRef:
resource: limits.memory
divisor: "1"
{{- end }}
{{- with .Values.metricsScraper.containers.env }}
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.metricsScraper.containers.ports }}
ports:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.metricsScraper.containers.volumeMounts }}
volumeMounts:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.app.security.containerSecurityContext }}
securityContext:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.metricsScraper.containers.resources }}
resources:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.metricsScraper.containers.livenessProbe }}
livenessProbe:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.app.image.pullSecrets }}
imagePullSecrets:
{{- range . }}
- name: {{ . }}
{{- end }}
{{- end }}
automountServiceAccountToken: {{ .Values.metricsScraper.automountServiceAccountToken }}
{{- with .Values.app.security.securityContext }}
securityContext:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.metricsScraper.volumes }}
volumes:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.app.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- if or .Values.metricsScraper.nodeSelector .Values.app.scheduling.nodeSelector }}
nodeSelector:
{{- with .Values.metricsScraper.nodeSelector }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.app.scheduling.nodeSelector }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.app.tolerations }}
tolerations:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.app.affinity }}
affinity:
{{ toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }}
{{ end }}
@@ -0,0 +1,151 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if eq .Values.app.mode "dashboard" }}
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.web.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }}
app.kubernetes.io/version: {{ .Values.web.image.tag }}
app.kubernetes.io/component: {{ .Values.web.role }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.web.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
spec:
replicas: {{ .Values.web.scaling.replicas }}
revisionHistoryLimit: {{ .Values.web.scaling.revisionHistoryLimit }}
selector:
matchLabels:
{{- include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }}
template:
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 8 }}
{{- with .Values.web.labels }}
{{ toYaml . | nindent 8 }}
{{- end }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }}
app.kubernetes.io/version: {{ .Values.web.image.tag }}
app.kubernetes.io/component: {{ .Values.web.role }}
annotations:
{{- with .Values.web.annotations }}
{{ toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }}
image: "{{ .Values.web.image.repository }}:{{ .Values.web.image.tag }}"
imagePullPolicy: {{ .Values.app.image.pullPolicy }}
args:
- --namespace={{ .Release.Namespace }}
- --settings-config-map-name={{ template "kubernetes-dashboard.web.configMap.settings.name" . }}
{{- with .Values.web.containers.args }}
{{ toYaml . | nindent 12 }}
{{- end }}
env:
{{- if .Values.web.containers.resources.limits.cpu }}
- name: GOMAXPROCS
valueFrom:
resourceFieldRef:
resource: limits.cpu
divisor: "1"
{{- end }}
{{- if .Values.web.containers.resources.limits.memory }}
- name: GOMEMLIMIT
valueFrom:
resourceFieldRef:
resource: limits.memory
divisor: "1"
{{- end }}
{{- with .Values.web.containers.env }}
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.web.containers.ports }}
ports:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.web.containers.volumeMounts }}
volumeMounts:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.app.security.containerSecurityContext }}
securityContext:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.web.containers.resources }}
resources:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.app.image.pullSecrets }}
imagePullSecrets:
{{- range . }}
- name: {{ . }}
{{- end }}
{{- end }}
automountServiceAccountToken: {{ .Values.web.automountServiceAccountToken }}
{{- with .Values.app.security.securityContext }}
securityContext:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.volumes }}
volumes:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.app.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- if or .Values.web.nodeSelector .Values.app.scheduling.nodeSelector }}
nodeSelector:
{{- with .Values.web.nodeSelector }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.app.scheduling.nodeSelector }}
{{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.app.tolerations }}
tolerations:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.app.affinity }}
affinity:
{{ toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
{{- end -}}
@@ -0,0 +1,18 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{ range .Values.extras.manifests }}
---
{{ tpl (toYaml .) $ }}
{{ end }}
@@ -0,0 +1,52 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{ if .Values.extras.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "kubernetes-dashboard.fullname" . }}
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.extras.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.extras.serviceMonitor.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: https
{{- with .Values.extras.serviceMonitor.scheme }}
scheme: {{ . }}
{{- end }}
{{- with .Values.extras.serviceMonitor.tlsConfig }}
tlsConfig:
{{- toYaml . | nindent 8 }}
{{- end }}
path: /metrics
{{- with .Values.extras.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.extras.serviceMonitor.relabelings }}
relabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
selector:
matchLabels:
{{ include "kubernetes-dashboard.labels" . | nindent 6 }}
{{ end }}
@@ -0,0 +1,89 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if and .Values.app.ingress.enabled (eq .Values.app.mode "dashboard")}}
{{- include "kubernetes-dashboard.validate.ingressIssuerScope" $ }}
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.app.ingress.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- if eq .Values.app.ingress.issuer.scope "default" }}
cert-manager.io/issuer: {{ .Values.app.ingress.issuer.name }}
{{- end }}
{{- if eq .Values.app.ingress.issuer.scope "cluster" }}
cert-manager.io/cluster-issuer: {{ .Values.app.ingress.issuer.name }}
{{- end }}
{{- if .Values.app.ingress.useDefaultAnnotations }}
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
{{- end }}
{{- if not (eq .Values.app.ingress.path "/") }}
nginx.ingress.kubernetes.io/rewrite-target: /$2
{{- end }}
{{- with .Values.app.ingress.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.name" . }}
spec:
{{- if not .Values.app.ingress.useDefaultIngressClass }}
ingressClassName: {{ .Values.app.ingress.ingressClassName }}
{{- end }}
{{- if and .Values.app.ingress.hosts .Values.app.ingress.tls.enabled }}
tls:
- hosts:
{{- toYaml .Values.app.ingress.hosts | nindent 6 }}
{{- if .Values.app.ingress.tls.secretName }}
secretName: {{ .Values.app.ingress.tls.secretName }}
{{- else }}
secretName: {{ template "kubernetes-dashboard.app.ingress.secret.name" . }}
{{- end }}
{{- end }}
rules:
{{- if .Values.app.ingress.hosts }}
{{- range $host := .Values.app.ingress.hosts }}
- host: {{ $host }}
http:
paths:
{{- if not (eq $.Values.app.ingress.path "/") }}
- path: {{ $.Values.app.ingress.path }}(/|$)(.*)
{{- else }}
- path: {{ $.Values.app.ingress.path }}
{{- end }}
pathType: {{ $.Values.app.ingress.pathType }}
backend:
service:
name: {{ template "kong.fullname" (index $.Subcharts "kong") }}-proxy
port:
number: {{ $.Values.kong.proxy.tls.servicePort }}
{{- end }}
{{- else }}
- http:
paths:
- path: {{ .Values.app.ingress.path }}
pathType: {{ .Values.app.ingress.pathType }}
backend:
service:
name: {{ template "kong.fullname" (index $.Subcharts "kong") }}-proxy
port:
number: {{ $.Values.kong.proxy.tls.servicePort }}
{{- end }}
{{- end }}
@@ -0,0 +1,38 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if eq .Values.app.mode "dashboard" }}
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.api.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.api.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
rules:
# Allow Dashboard API to get metrics from metrics-scraper.
- apiGroups: [ "" ]
resources: [ "services/proxy" ]
resourceNames: [ "{{ template "kubernetes-dashboard.metrics-scraper.name" . }}", "http:{{ template "kubernetes-dashboard.metrics-scraper.name" . }}" ]
verbs: [ "get" ]
{{- end -}}
@@ -0,0 +1,39 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if eq .Values.app.mode "dashboard" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.api.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.api.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
subjects:
- kind: ServiceAccount
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
{{- end -}}
@@ -0,0 +1,32 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if eq .Values.app.mode "dashboard" }}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.api.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.api.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
{{- end -}}
@@ -0,0 +1,37 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if and .Values.metricsScraper.enabled (eq .Values.app.mode "dashboard") }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.metricsScraper.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.metricsScraper.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }}
rules:
# Allow Metrics Scraper to get metrics from the Metrics server
- apiGroups: [ "metrics.k8s.io" ]
resources: [ "pods", "nodes" ]
verbs: [ "get", "list", "watch" ]
{{- end -}}
@@ -0,0 +1,40 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if and .Values.metricsScraper.enabled (eq .Values.app.mode "dashboard") }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.metricsScraper.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.metricsScraper.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }}
subjects:
- kind: ServiceAccount
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }}
namespace: {{ .Release.Namespace }}
{{- end -}}
@@ -0,0 +1,32 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if and .Values.metricsScraper.enabled (eq .Values.app.mode "dashboard") }}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.metricsScraper.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.metricsScraper.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }}
{{- end -}}
@@ -0,0 +1,32 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if eq .Values.app.mode "dashboard" }}
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
rules:
# Allow Dashboard Web to get and update 'kubernetes-dashboard-settings' config map.
- apiGroups: [ "" ]
resources: [ "configmaps" ]
resourceNames: [ "{{ template "kubernetes-dashboard.web.configMap.settings.name" . }}" ]
verbs: [ "get", "update" ]
{{- end -}}
@@ -0,0 +1,33 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if eq .Values.app.mode "dashboard" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
subjects:
- kind: ServiceAccount
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
{{- end -}}
@@ -0,0 +1,26 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if eq .Values.app.mode "dashboard" }}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
{{- end -}}
@@ -0,0 +1,24 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: Secret
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
name: {{ template "kubernetes-dashboard.app.csrf.secret.name" . }}
data:
{{ (include "kubernetes-dashboard.app.csrf.secret.value" . ) -}}
@@ -0,0 +1,44 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.app.security.networkPolicy.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
name: {{ template "kubernetes-dashboard.fullname" . }}
spec:
podSelector:
matchLabels:
{{- include "kubernetes-dashboard.matchLabels" . | nindent 6 -}}
{{- if .Values.app.security.networkPolicy.spec }}
{{- with .Values.app.security.networkPolicy.spec }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{ else }}
{{- if .Values.app.security.networkPolicy.ingressDenyAll }}
ingress: [ ]
{{ else }}
ingress:
- ports:
- port: {{ $.Values.web.role }}
protocol: TCP
- port: {{ $.Values.api.role }}
protocol: TCP
{{ end }}
{{ end }}
{{ end }}
@@ -0,0 +1,36 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.app.security.podDisruptionBudget.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
name: {{ template "kubernetes-dashboard.fullname" . }}
spec:
selector:
matchLabels:
{{ include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
{{- if .Values.app.security.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.app.security.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.app.security.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.app.security.podDisruptionBudget.maxUnavailable }}
{{- end }}
{{- end -}}
@@ -0,0 +1,40 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
kind: Service
apiVersion: v1
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.api.serviceLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }}
app.kubernetes.io/version: {{ .Values.api.image.tag }}
app.kubernetes.io/component: {{ .Values.api.role }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.api.serviceAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
spec:
ports:
- name: {{ .Values.api.role }}
{{- with (index .Values.api.containers.ports 0) }}
port: {{ .containerPort }}
{{- end }}
selector:
{{- include "kubernetes-dashboard.matchLabels" . | nindent 4 }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }}
@@ -0,0 +1,44 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if eq .Values.app.mode "dashboard" }}
kind: Service
apiVersion: v1
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.auth.serviceLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }}
app.kubernetes.io/version: {{ .Values.auth.image.tag }}
app.kubernetes.io/component: {{ .Values.auth.role }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.auth.serviceAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.auth.role }}
spec:
ports:
- name: {{ .Values.auth.role }}
{{- with (index .Values.auth.containers.ports 0) }}
port: {{ .containerPort }}
{{- end }}
selector:
{{- include "kubernetes-dashboard.matchLabels" . | nindent 4 }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }}
{{- end -}}
@@ -0,0 +1,43 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if and .Values.metricsScraper.enabled (eq .Values.app.mode "dashboard") }}
kind: Service
apiVersion: v1
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.metricsScraper.serviceLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }}
app.kubernetes.io/version: {{ .Values.metricsScraper.image.tag }}
app.kubernetes.io/component: {{ .Values.metricsScraper.role }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.metricsScraper.serviceAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.metrics-scraper.name" . }}
spec:
ports:
{{- with (index .Values.metricsScraper.containers.ports 0) }}
- port: {{ .containerPort }}
{{- end }}
selector:
{{- include "kubernetes-dashboard.matchLabels" . | nindent 4 }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }}
{{- end -}}
@@ -0,0 +1,44 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if eq .Values.app.mode "dashboard" }}
kind: Service
apiVersion: v1
metadata:
labels:
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
{{- with .Values.web.serviceLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }}
app.kubernetes.io/version: {{ .Values.web.image.tag }}
app.kubernetes.io/component: {{ .Values.web.role }}
annotations:
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
{{- with .Values.web.serviceAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
spec:
ports:
- name: {{ .Values.web.role }}
{{- with (index .Values.web.containers.ports 0) }}
port: {{ .containerPort }}
{{- end }}
selector:
{{- include "kubernetes-dashboard.matchLabels" . | nindent 4 }}
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }}
{{- end -}}
@@ -0,0 +1,439 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# General configuration shared across resources
app:
# Mode determines if chart should deploy a full Dashboard with all containers or just the API.
# - dashboard - deploys all the containers
# - api - deploys just the API
mode: 'dashboard'
image:
pullPolicy: IfNotPresent
pullSecrets: []
scheduling:
# Node labels for pod assignment
# Ref: https://kubernetes.io/docs/user-guide/node-selection/
nodeSelector: {}
security:
# Allow overriding csrfKey used by API/Auth containers.
# It has to be base64 encoded random 256 bytes string.
# If empty, it will be autogenerated.
csrfKey: ~
# SecurityContext to be added to pods
# To disable set the following configuration to null:
# securityContext: null
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
# ContainerSecurityContext to be added to containers
# To disable set the following configuration to null:
# containerSecurityContext: null
containerSecurityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsUser: 1001
runAsGroup: 2001
capabilities:
drop: ["ALL"]
# Pod Disruption Budget configuration
# Ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
podDisruptionBudget:
enabled: false
minAvailable: 0
maxUnavailable: 0
networkPolicy:
enabled: false
ingressDenyAll: false
# Raw network policy spec that overrides predefined spec
# Example:
# spec:
# egress:
# - ports:
# - port: 123
spec: {}
# Common labels & annotations shared across all deployed resources
labels: {}
annotations: {}
# Common priority class used for all deployed resources
priorityClassName: null
settings:
## Global dashboard settings
global:
# # Cluster name that appears in the browser window title if it is set
# clusterName: ""
# # Max number of items that can be displayed on each list page
# itemsPerPage: 10
# # Max number of labels that are displayed by default on most views.
# labelsLimit: 3
# # Number of seconds between every auto-refresh of logs
# logsAutoRefreshTimeInterval: 5
# # Number of seconds between every auto-refresh of every resource. Set 0 to disable
# resourceAutoRefreshTimeInterval: 10
# # Hide all access denied warnings in the notification panel
# disableAccessDeniedNotifications: false
# # Hide all namespaces option in namespace selection dropdown to avoid accidental selection in large clusters thus preventing OOM errors
# hideAllNamespaces: false
# # Namespace that should be selected by default after logging in.
# defaultNamespace: default
# # List of namespaces that should be presented to user without namespace list privileges.
# namespaceFallbackList:
# - default
## Pinned resources that will be displayed in dashboard's menu
pinnedResources: []
# - kind: customresourcedefinition
# # Fully qualified name of a CRD
# name: prometheus.monitoring.coreos.com
# # Display name
# displayName: Prometheus
# # Is this CRD namespaced?
# namespaced: true
ingress:
enabled: false
hosts:
# Keep 'localhost' host only if you want to access Dashboard using 'kubectl port-forward ...' on:
# https://localhost:8443
- localhost
# - kubernetes.dashboard.domain.com
ingressClassName: internal-nginx
# Use only if your ingress controllers support default ingress classes.
# If set to true ingressClassName will be ignored and not added to the Ingress resources.
# It should fall back to using IngressClass marked as the default.
useDefaultIngressClass: false
# This will append our Ingress with annotations required by our default configuration.
# nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
# nginx.ingress.kubernetes.io/ssl-passthrough: "true"
# nginx.ingress.kubernetes.io/ssl-redirect: "true"
useDefaultAnnotations: true
pathType: ImplementationSpecific
# If path is not the default (/), rewrite-target annotation will be added to the Ingress.
# It allows serving Kubernetes Dashboard on a sub-path. Make sure that the configured path
# does not conflict with gateway route configuration.
path: /
issuer:
name: selfsigned
# Scope determines what kind of issuer annotation will be used on ingress resource
# - default - adds 'cert-manager.io/issuer'
# - cluster - adds 'cert-manager.io/cluster-issuer'
# - disabled - disables cert-manager annotations
scope: default
tls:
enabled: true
# If provided it will override autogenerated secret name
secretName: ""
labels: {}
annotations: {}
# Use the following toleration if Dashboard can be deployed on a tainted control-plane nodes
# - key: node-role.kubernetes.io/control-plane
# effect: NoSchedule
tolerations: []
affinity: {}
auth:
role: auth
image:
repository: docker.io/kubernetesui/dashboard-auth
tag: 1.2.2
scaling:
replicas: 1
revisionHistoryLimit: 10
containers:
ports:
- name: auth
containerPort: 8000
protocol: TCP
args: []
env: []
volumeMounts:
- mountPath: /tmp
name: tmp-volume
# TODO: Validate configuration
resources:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 250m
memory: 400Mi
automountServiceAccountToken: true
volumes:
# Create on-disk volume to store exec logs (required)
- name: tmp-volume
emptyDir: {}
nodeSelector: {}
# Labels & annotations for Auth related resources
labels: {}
annotations: {}
serviceLabels: {}
serviceAnnotations: {}
# API deployment configuration
api:
role: api
image:
repository: docker.io/kubernetesui/dashboard-api
tag: 1.10.1
scaling:
replicas: 1
revisionHistoryLimit: 10
containers:
ports:
- name: api
containerPort: 8000
protocol: TCP
# Additional container arguments
# Full list of arguments: https://github.com/kubernetes/dashboard/blob/master/docs/common/arguments.md
# args:
# - --system-banner="Welcome to the Kubernetes Dashboard"
args: []
# Additional container environment variables
# env:
# - name: SOME_VAR
# value: 'some value'
env: []
# Additional volume mounts
# - mountPath: /kubeconfig
# name: dashboard-kubeconfig
# readOnly: true
volumeMounts:
# Create volume mount to store exec logs (required)
- mountPath: /tmp
name: tmp-volume
# TODO: Validate configuration
resources:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 250m
memory: 400Mi
automountServiceAccountToken: true
# Additional volumes
# - name: dashboard-kubeconfig
# secret:
# defaultMode: 420
# secretName: dashboard-kubeconfig
volumes:
# Create on-disk volume to store exec logs (required)
- name: tmp-volume
emptyDir: {}
nodeSelector: {}
# Labels & annotations for API related resources
labels: {}
annotations: {}
serviceLabels: {}
serviceAnnotations: {}
# WEB UI deployment configuration
web:
role: web
image:
repository: docker.io/kubernetesui/dashboard-web
tag: 1.6.0
scaling:
replicas: 1
revisionHistoryLimit: 10
containers:
ports:
- name: web
containerPort: 8000
protocol: TCP
# Additional container arguments
# Full list of arguments: https://github.com/kubernetes/dashboard/blob/master/docs/common/arguments.md
# args:
# - --system-banner="Welcome to the Kubernetes Dashboard"
args: []
# Additional container environment variables
# env:
# - name: SOME_VAR
# value: 'some value'
env: []
# Additional volume mounts
# - mountPath: /kubeconfig
# name: dashboard-kubeconfig
# readOnly: true
volumeMounts:
# Create volume mount to store logs (required)
- mountPath: /tmp
name: tmp-volume
# TODO: Validate configuration
resources:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 250m
memory: 400Mi
automountServiceAccountToken: true
# Additional volumes
# - name: dashboard-kubeconfig
# secret:
# defaultMode: 420
# secretName: dashboard-kubeconfig
volumes:
# Create on-disk volume to store exec logs (required)
- name: tmp-volume
emptyDir: {}
nodeSelector: {}
# Labels & annotations for WEB UI related resources
labels: {}
annotations: {}
serviceLabels: {}
serviceAnnotations: {}
### Metrics Scraper
### Container to scrape, store, and retrieve a window of time from the Metrics Server.
### refs: https://github.com/kubernetes/dashboard/tree/master/modules/metrics-scraper
metricsScraper:
enabled: true
role: metrics-scraper
image:
repository: docker.io/kubernetesui/dashboard-metrics-scraper
tag: 1.2.1
scaling:
replicas: 1
revisionHistoryLimit: 10
containers:
ports:
- containerPort: 8000
protocol: TCP
args: []
# Additional container environment variables
# env:
# - name: SOME_VAR
# value: 'some value'
env: []
# Additional volume mounts
# - mountPath: /kubeconfig
# name: dashboard-kubeconfig
# readOnly: true
volumeMounts:
# Create volume mount to store logs (required)
- mountPath: /tmp
name: tmp-volume
# TODO: Validate configuration
resources:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 250m
memory: 400Mi
livenessProbe:
httpGet:
scheme: HTTP
path: /
port: 8000
initialDelaySeconds: 30
timeoutSeconds: 30
automountServiceAccountToken: true
# Additional volumes
# - name: dashboard-kubeconfig
# secret:
# defaultMode: 420
# secretName: dashboard-kubeconfig
volumes:
- name: tmp-volume
emptyDir: {}
nodeSelector: {}
# Labels & annotations for Metrics Scraper related resources
labels: {}
annotations: {}
serviceLabels: {}
serviceAnnotations: {}
## Optional Metrics Server sub-chart configuration
## Enable this if you don't already have metrics-server enabled on your cluster and
## want to use it with dashboard metrics-scraper
## refs:
## - https://github.com/kubernetes-sigs/metrics-server
## - https://github.com/kubernetes-sigs/metrics-server/tree/master/charts/metrics-server
metrics-server:
enabled: false
args:
- --kubelet-preferred-address-types=InternalIP
- --kubelet-insecure-tls
## Required Kong sub-chart with DBless configuration to act as a gateway
## for our all containers.
kong:
enabled: true
## Configuration reference: https://docs.konghq.com/gateway/3.6.x/reference/configuration
env:
dns_order: LAST,A,CNAME,AAAA,SRV
plugins: 'off'
nginx_worker_processes: 1
ingressController:
enabled: false
manager:
enabled: false
dblessConfig:
configMap: kong-dbless-config
proxy:
type: ClusterIP
http:
enabled: false
## Optional Cert Manager sub-chart configuration
## Enable this if you don't already have cert-manager enabled on your cluster.
cert-manager:
enabled: false
installCRDs: true
## Optional Nginx Ingress sub-chart configuration
## Enable this if you don't already have nginx-ingress enabled on your cluster.
nginx:
enabled: false
controller:
electionID: ingress-controller-leader
ingressClassResource:
name: internal-nginx
default: false
controllerValue: k8s.io/internal-ingress-nginx
service:
type: ClusterIP
## Extra configurations:
## - manifests
## - predefined roles
## - prometheus
## - etc...
extras:
# Extra Kubernetes manifests to be deployed
# manifests:
# - apiVersion: v1
# kind: ConfigMap
# metadata:
# name: additional-configmap
# data:
# mykey: myvalue
manifests: []
serviceMonitor:
# Whether to create a Prometheus Operator service monitor.
enabled: false
# Here labels can be added to the serviceMonitor
labels: {}
# Here annotations can be added to the serviceMonitor
annotations: {}
# metrics.serviceMonitor.metricRelabelings Specify Metric Relabelings to add to the scrape endpoint
# ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
metricRelabelings: []
# metrics.serviceMonitor.relabelings [array] Prometheus relabeling rules
relabelings: []
# ServiceMonitor connection scheme. Defaults to HTTPS.
scheme: https
# ServiceMonitor connection tlsConfig. Defaults to {insecureSkipVerify:true}.
tlsConfig:
insecureSkipVerify: true