项目重构
This commit is contained in:
41
0-部署应用/Oracle-Cloud/kubernetes-dashboard-6.0.0/.helmignore
Normal file
41
0-部署应用/Oracle-Cloud/kubernetes-dashboard-6.0.0/.helmignore
Normal file
@@ -0,0 +1,41 @@
|
||||
# Copyright 2020 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/
|
||||
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: metrics-server
|
||||
repository: https://kubernetes-sigs.github.io/metrics-server/
|
||||
version: 3.5.0
|
||||
digest: sha256:5e472fb28387489d7ff5946178ecfa44d5fd414364906f3b5a0312ddfaabb8fd
|
||||
generated: "2021-10-05T12:13:00.705224804+02:00"
|
||||
21
0-部署应用/Oracle-Cloud/kubernetes-dashboard-6.0.0/Chart.yaml
Normal file
21
0-部署应用/Oracle-Cloud/kubernetes-dashboard-6.0.0/Chart.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
apiVersion: v2
|
||||
appVersion: 2.7.0
|
||||
dependencies:
|
||||
- condition: metrics-server.enabled
|
||||
name: metrics-server
|
||||
repository: https://kubernetes-sigs.github.io/metrics-server/
|
||||
version: 3.5.0
|
||||
description: General-purpose web UI for Kubernetes clusters
|
||||
home: https://github.com/kubernetes/dashboard
|
||||
icon: https://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.svg
|
||||
keywords:
|
||||
- kubernetes
|
||||
- dashboard
|
||||
kubeVersion: '>=1.19.0-0'
|
||||
maintainers:
|
||||
- email: cdesaintmartin@wiremind.fr
|
||||
name: desaintmartin
|
||||
name: kubernetes-dashboard
|
||||
sources:
|
||||
- https://github.com/kubernetes/dashboard
|
||||
version: 6.0.0
|
||||
121
0-部署应用/Oracle-Cloud/kubernetes-dashboard-6.0.0/README.md
Normal file
121
0-部署应用/Oracle-Cloud/kubernetes-dashboard-6.0.0/README.md
Normal file
@@ -0,0 +1,121 @@
|
||||
# kubernetes-dashboard
|
||||
|
||||
[Kubernetes Dashboard](https://github.com/kubernetes/dashboard) is a general purpose, web-based UI for Kubernetes clusters.
|
||||
It allows users to manage applications running in the cluster and troubleshoot them, as well as manage the cluster itself.
|
||||
|
||||
## 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 install kubernetes-dashboard kubernetes-dashboard/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 install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard
|
||||
```
|
||||
|
||||
The command deploys kubernetes-dashboard on the Kubernetes cluster in the 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
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
## Configuration
|
||||
|
||||
Please refer to [values.yaml](https://github.com/kubernetes/dashboard/blob/master/charts/helm-chart/kubernetes-dashboard/values.yaml)
|
||||
for valid values and their defaults.
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
helm install kubernetes-dashboard/kubernetes-dashboard --name kubernetes-dashboard \
|
||||
--set=service.externalPort=8080,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
|
||||
|
||||
## 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.
|
||||
|
||||
### 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 explicitely 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)
|
||||
|
||||
### Using the dashboard with 'kubectl proxy'
|
||||
|
||||
When running 'kubectl proxy', the address `localhost:8001/ui` automatically expands to:
|
||||
|
||||
- `http://localhost:8001/api/v1/namespaces/my-namespace/services/https:kubernetes-dashboard:https/proxy/`
|
||||
|
||||
For this to reach the dashboard, the name of the service must be 'kubernetes-dashboard', not any other value as set by Helm.
|
||||
You can manually specify this using the value 'fullnameOverride':
|
||||
|
||||
```yaml
|
||||
fullnameOverride: 'kubernetes-dashboard'
|
||||
```
|
||||
@@ -0,0 +1,27 @@
|
||||
## https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md
|
||||
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: admin-user
|
||||
namespace: k8s-dashboard
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: admin-user
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: cluster-admin
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: admin-user
|
||||
namespace: k8s-dashboard
|
||||
---
|
||||
|
||||
# kubectl -n k8s-dashboard create token admin-user
|
||||
|
||||
|
||||
kubectl -n k8s-dashboard describe secret $(kubectl -n k8s-dashboard get secret | grep admin-user | awk '{print $1}')
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# 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
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -0,0 +1,26 @@
|
||||
annotations:
|
||||
artifacthub.io/changes: |
|
||||
- kind: added
|
||||
description: "Initial release from official repo."
|
||||
apiVersion: v2
|
||||
appVersion: 0.5.0
|
||||
description: Metrics Server is a scalable, efficient source of container resource
|
||||
metrics for Kubernetes built-in autoscaling pipelines.
|
||||
home: https://github.com/kubernetes-sigs/metrics-server
|
||||
icon: https://avatars.githubusercontent.com/u/36015203?s=400&v=4
|
||||
keywords:
|
||||
- kubernetes
|
||||
- metrics-server
|
||||
- metrics
|
||||
maintainers:
|
||||
- name: stevehipwell
|
||||
url: https://github.com/stevehipwell
|
||||
- name: krmichel
|
||||
url: https://github.com/krmichel
|
||||
- name: endrec
|
||||
url: https://github.com/endrec
|
||||
name: metrics-server
|
||||
sources:
|
||||
- https://github.com/kubernetes-sigs/metrics-server
|
||||
type: application
|
||||
version: 3.5.0
|
||||
@@ -0,0 +1,63 @@
|
||||
# Kubernetes Metrics Server
|
||||
|
||||
[Metrics Server](https://github.com/kubernetes-sigs/metrics-server/) is a scalable, efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.
|
||||
|
||||
<!-- Trigger release -->
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
Before you can install the chart you will need to add the `metrics-server` repo to [Helm](https://helm.sh/).
|
||||
|
||||
```shell
|
||||
helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/
|
||||
```
|
||||
|
||||
After you've installed the repo you can install the chart.
|
||||
|
||||
```shell
|
||||
helm upgrade --install metrics-server/metrics-server
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the _Metrics Server_ chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
|
||||
| `image.repository` | Image repository. | `k8s.gcr.io/metrics-server/metrics-server` |
|
||||
| `image.tag` | Image tag, will override the default tag derived from the chart app version. | `""` |
|
||||
| `image.pullPolicy` | Image pull policy. | `IfNotPresent` |
|
||||
| `imagePullSecrets` | Image pull secrets. | `[]` |
|
||||
| `nameOverride` | Override the `name` of the chart. | `nil` |
|
||||
| `fullnameOverride` | Override the `fullname` of the chart. | `nil` |
|
||||
| `serviceAccount.create` | If `true`, create a new service account. | `true` |
|
||||
| `serviceAccount.annotations` | Annotations to add to the service account. | `{}` |
|
||||
| `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the full name template. | `nil` |
|
||||
| `rbac.create` | If `true`, create the RBAC resources. | `true` |
|
||||
| `rbac.pspEnabled` | If `true`, create a pod security policy resource. | `false` |
|
||||
| `apiService.create` | If `true`, create the `v1beta1.metrics.k8s.io` API service. You typically want this enabled! If you disable API service creation you have to manage it outside of this chart for e.g horizontal pod autoscaling to work with this release. | `true` |
|
||||
| `podLabels` | Labels to add to the pod. | `{}` |
|
||||
| `podAnnotations` | Annotations to add to the pod. | `{}` |
|
||||
| `podSecurityContext` | Security context for the pod. | `{}` |
|
||||
| `securityContext` | Security context for the _metrics-server_ container. | _See values.yaml_ |
|
||||
| `priorityClassName` | Priority class name to use. | `system-cluster-critical` |
|
||||
| `containerPort` | port for the _metrics-server_ container. | `4443` |
|
||||
| `hostNetwork.enabled` | If `true`, start _metric-server_ in hostNetwork mode. You would require this enabled if you use alternate overlay networking for pods and API server unable to communicate with metrics-server. As an example, this is required if you use Weave network on EKS. | `false` |
|
||||
| `replicas` | Number of replicas to run. | `1` |
|
||||
| `updateStrategy` | Customise the default update strategy. | `{}` |
|
||||
| `podDisruptionBudget.enabled` | If `true`, create `PodDisruptionBudget` resource. | `{}` |
|
||||
| `podDisruptionBudget.minAvailable` | Set the `PodDisruptionBugdet` minimum available pods. | `nil` |
|
||||
| `podDisruptionBudget.maxUnavailable` | Set the `PodDisruptionBugdet` maximum unavailable pods. | `nil` |
|
||||
| `args` | Additional arguments to pass to the _metrics-server_ command. | `[]` |
|
||||
| `livenessProbe` | Liveness probe. | See _values.yaml_ |
|
||||
| `readinessProbe` | Readiness probe. | See _values.yaml_ |
|
||||
| `service.type` | Service type. | `ClusterIP` |
|
||||
| `service.port` | Service port. | `443` |
|
||||
| `service.annotations` | Annotations to add to the service. | `{}` |
|
||||
| `service.labels` | Labels to add to the service. | `{}` |
|
||||
| `resources` | Resource requests and limits for the _metrics-server_ container. | `{}` |
|
||||
| `extraVolumeMounts` | Additional volume mounts for the _metrics-server_ container. | `[]` |
|
||||
| `extraVolumes` | Additional volumes for the pod. | `[]` |
|
||||
| `nodeSelector` | Node labels for pod assignment. | `{}` |
|
||||
| `tolerations` | Tolerations for pod assignment. | `[]` |
|
||||
| `affinity` | Affinity for pod assignment. | `{}` |
|
||||
@@ -0,0 +1,2 @@
|
||||
args:
|
||||
- --kubelet-insecure-tls
|
||||
@@ -0,0 +1,7 @@
|
||||
***********************************************************************
|
||||
* Metrics Server *
|
||||
***********************************************************************
|
||||
Chart version: {{ .Chart.Version }}
|
||||
App version: {{ .Chart.AppVersion }}
|
||||
Image tag: {{ include "metrics-server.image" . }}
|
||||
***********************************************************************
|
||||
@@ -0,0 +1,78 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "metrics-server.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 "metrics-server.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 "metrics-server.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "metrics-server.labels" -}}
|
||||
helm.sh/chart: {{ include "metrics-server.chart" . }}
|
||||
{{ include "metrics-server.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "metrics-server.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "metrics-server.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "metrics-server.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "metrics-server.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
The image to use
|
||||
*/}}
|
||||
{{- define "metrics-server.image" -}}
|
||||
{{- printf "%s:%s" .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Get PodDisruptionBudget API Version */}}
|
||||
{{- define "metrics-server.pdb.apiVersion" -}}
|
||||
{{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">= 1.21-0" .Capabilities.KubeVersion.Version) -}}
|
||||
{{- print "policy/v1" -}}
|
||||
{{- else -}}
|
||||
{{- print "policy/v1beta1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{- if .Values.apiService.create -}}
|
||||
apiVersion: apiregistration.k8s.io/v1
|
||||
kind: APIService
|
||||
metadata:
|
||||
name: v1beta1.metrics.k8s.io
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
spec:
|
||||
group: metrics.k8s.io
|
||||
groupPriorityMinimum: 100
|
||||
insecureSkipTLSVerify: true
|
||||
service:
|
||||
name: {{ include "metrics-server.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
version: v1beta1
|
||||
versionPriority: 100
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,21 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ printf "system:%s-aggregated-reader" (include "metrics-server.name" .) }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
rbac.authorization.k8s.io/aggregate-to-admin: "true"
|
||||
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
||||
rbac.authorization.k8s.io/aggregate-to-view: "true"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- metrics.k8s.io
|
||||
resources:
|
||||
- pods
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,32 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ printf "system:%s" (include "metrics-server.fullname" .) }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- nodes
|
||||
- nodes/stats
|
||||
- namespaces
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
{{- if .Values.rbac.pspEnabled }}
|
||||
- apiGroups:
|
||||
- extensions
|
||||
- policy
|
||||
resources:
|
||||
- podsecuritypolicies
|
||||
resourceNames:
|
||||
- {{ printf "privileged-%s" (include "metrics-server.fullname" .) }}
|
||||
verbs:
|
||||
- use
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ printf "%s:system:auth-delegator" (include "metrics-server.fullname" .) }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: system:auth-delegator
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "metrics-server.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ printf "system:%s" (include "metrics-server.fullname" .) }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: system:{{ template "metrics-server.fullname" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "metrics-server.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,94 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "metrics-server.fullname" . }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicas }}
|
||||
{{- with .Values.updateStrategy }}
|
||||
strategy:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "metrics-server.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "metrics-server.selectorLabels" . | nindent 8 }}
|
||||
{{- with .Values.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "metrics-server.serviceAccountName" . }}
|
||||
{{- with .Values.podSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.priorityClassName }}
|
||||
priorityClassName: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.hostNetwork.enabled }}
|
||||
hostNetwork: true
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: metrics-server
|
||||
{{- with .Values.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
image: {{ include "metrics-server.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
args:
|
||||
- --cert-dir=/tmp
|
||||
- {{ printf "--secure-port=%d" (int .Values.containerPort) }}
|
||||
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
|
||||
- --kubelet-use-node-status-port
|
||||
{{- range .Values.args }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: https
|
||||
protocol: TCP
|
||||
containerPort: {{ .Values.containerPort }}
|
||||
livenessProbe:
|
||||
{{- toYaml .Values.livenessProbe | nindent 12 }}
|
||||
readinessProbe:
|
||||
{{- toYaml .Values.readinessProbe | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
{{- with .Values.extraVolumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir: {}
|
||||
{{- with .Values.extraVolumes }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,18 @@
|
||||
{{- if .Values.podDisruptionBudget.enabled -}}
|
||||
apiVersion: {{ include "metrics-server.pdb.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "metrics-server.fullname" . }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Values.podDisruptionBudget.minAvailable }}
|
||||
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.podDisruptionBudget.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "metrics-server.selectorLabels" . | nindent 6 }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- if .Values.rbac.pspEnabled }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
name: {{ printf "privileged-%s" (include "metrics-server.fullname" .) }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
spec:
|
||||
allowedCapabilities:
|
||||
- '*'
|
||||
fsGroup:
|
||||
rule: RunAsAny
|
||||
privileged: true
|
||||
runAsUser:
|
||||
rule: RunAsAny
|
||||
seLinux:
|
||||
rule: RunAsAny
|
||||
supplementalGroups:
|
||||
rule: RunAsAny
|
||||
volumes:
|
||||
- '*'
|
||||
hostPID: true
|
||||
hostIPC: true
|
||||
hostNetwork: true
|
||||
hostPorts:
|
||||
- min: 1
|
||||
max: 65536
|
||||
{{- end }}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ printf "%s-auth-reader" (include "metrics-server.fullname" .) }}
|
||||
namespace: kube-system
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: extension-apiserver-authentication-reader
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "metrics-server.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "metrics-server.fullname" . }}
|
||||
{{- with .Values.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
{{- with .Values.service.labels -}}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- name: https
|
||||
port: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
targetPort: https
|
||||
selector:
|
||||
{{- include "metrics-server.selectorLabels" . | nindent 4 }}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "metrics-server.serviceAccountName" . }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,116 @@
|
||||
# Default values for metrics-server.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
image:
|
||||
repository: k8s.gcr.io/metrics-server/metrics-server
|
||||
# Overrides the image tag whose default is v{{ .Chart.AppVersion }}
|
||||
tag: ""
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
imagePullSecrets: []
|
||||
# - registrySecretName
|
||||
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
rbac:
|
||||
# Specifies whether RBAC resources should be created
|
||||
create: true
|
||||
pspEnabled: false
|
||||
|
||||
apiService:
|
||||
# Specifies if the v1beta1.metrics.k8s.io API service should be created.
|
||||
#
|
||||
# You typically want this enabled! If you disable API service creation you have to
|
||||
# manage it outside of this chart for e.g horizontal pod autoscaling to
|
||||
# work with this release.
|
||||
create: true
|
||||
|
||||
podLabels: {}
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
allowPrivilegeEscalation: false
|
||||
|
||||
priorityClassName: system-cluster-critical
|
||||
|
||||
containerPort: 4443
|
||||
|
||||
hostNetwork:
|
||||
# Specifies if metrics-server should be started in hostNetwork mode.
|
||||
#
|
||||
# You would require this enabled if you use alternate overlay networking for pods and
|
||||
# API server unable to communicate with metrics-server. As an example, this is required
|
||||
# if you use Weave network on EKS
|
||||
enabled: false
|
||||
|
||||
replicas: 1
|
||||
|
||||
updateStrategy: {}
|
||||
# type: RollingUpdate
|
||||
# rollingUpdate:
|
||||
# maxSurge: 0
|
||||
# maxUnavailable: 1
|
||||
|
||||
podDisruptionBudget:
|
||||
# https://kubernetes.io/docs/tasks/run-application/configure-pdb/
|
||||
enabled: false
|
||||
minAvailable:
|
||||
maxUnavailable:
|
||||
|
||||
args:
|
||||
- --metric-resolution=15s
|
||||
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /livez
|
||||
port: https
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
failureThreshold: 3
|
||||
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: https
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
failureThreshold: 3
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 443
|
||||
annotations: {}
|
||||
labels: {}
|
||||
# Add these labels to have metrics-server show up in `kubectl cluster-info`
|
||||
# kubernetes.io/cluster-service: "true"
|
||||
# kubernetes.io/name: "Metrics-server"
|
||||
|
||||
resources: {}
|
||||
|
||||
extraVolumeMounts: []
|
||||
|
||||
extraVolumes: []
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
@@ -0,0 +1,49 @@
|
||||
*********************************************************************************
|
||||
*** PLEASE BE PATIENT: kubernetes-dashboard may take a few minutes to install ***
|
||||
*********************************************************************************
|
||||
|
||||
{{- if .Values.ingress.enabled }}
|
||||
From outside the cluster, the server URL(s) are:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
{{- if $.Values.protocolHttp }}
|
||||
http://{{ . }}
|
||||
{{- else }}
|
||||
https://{{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
|
||||
Get the Kubernetes Dashboard URL by running:
|
||||
export NODE_PORT=$(kubectl get -n {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "kubernetes-dashboard.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
{{- if .Values.protocolHttp }}
|
||||
echo http://$NODE_IP:$NODE_PORT/
|
||||
{{- else }}
|
||||
echo https://$NODE_IP:$NODE_PORT/
|
||||
{{- end }}
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
Watch the status with: 'kubectl get svc -n {{ .Release.Namespace }} -w {{ template "kubernetes-dashboard.fullname" . }}'
|
||||
|
||||
Get the Kubernetes Dashboard URL by running:
|
||||
export SERVICE_IP=$(kubectl get svc -n {{ .Release.Namespace }} {{ template "kubernetes-dashboard.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
{{- if .Values.protocolHttp }}
|
||||
echo http://$SERVICE_IP/
|
||||
{{- else }}
|
||||
echo https://$SERVICE_IP/
|
||||
{{- end }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
|
||||
Get the Kubernetes Dashboard URL by running:
|
||||
export POD_NAME=$(kubectl get pods -n {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ template "kubernetes-dashboard.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
{{- if .Values.protocolHttp }}
|
||||
echo http://127.0.0.1:9090/
|
||||
kubectl -n {{ .Release.Namespace }} port-forward $POD_NAME 9090:9090
|
||||
{{- else }}
|
||||
echo https://127.0.0.1:8443/
|
||||
kubectl -n {{ .Release.Namespace }} port-forward $POD_NAME 8443:8443
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,78 @@
|
||||
# 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" -}}
|
||||
app.kubernetes.io/name: {{ include "kubernetes-dashboard.name" . }}
|
||||
helm.sh/chart: {{ include "kubernetes-dashboard.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common label selectors
|
||||
*/}}
|
||||
{{- define "kubernetes-dashboard.matchLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "kubernetes-dashboard.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Name of the service account to use
|
||||
*/}}
|
||||
{{- define "kubernetes-dashboard.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "kubernetes-dashboard.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,27 @@
|
||||
# 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: */}}
|
||||
{{/*
|
||||
Renders a value that contains template.
|
||||
Usage:
|
||||
{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
|
||||
*/}}
|
||||
{{- define "common.tplvalues.render" -}}
|
||||
{{- if typeIs "string" .value }}
|
||||
{{- tpl .value .context }}
|
||||
{{- else }}
|
||||
{{- tpl (.value | toYaml) .context }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,34 @@
|
||||
# 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.rbac.clusterRoleMetrics -}}
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: "{{ template "kubernetes-dashboard.fullname" . }}-metrics"
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
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,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.
|
||||
|
||||
{{ if .Values.rbac.clusterReadOnlyRole -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: "{{ template "kubernetes-dashboard.fullname" . }}-readonly"
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
- endpoints
|
||||
- persistentvolumeclaims
|
||||
- pods
|
||||
- replicationcontrollers
|
||||
- replicationcontrollers/scale
|
||||
- serviceaccounts
|
||||
- services
|
||||
- nodes
|
||||
- persistentvolumeclaims
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- bindings
|
||||
- events
|
||||
- limitranges
|
||||
- namespaces/status
|
||||
- pods/log
|
||||
- pods/status
|
||||
- replicationcontrollers/status
|
||||
- resourcequotas
|
||||
- resourcequotas/status
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- daemonsets
|
||||
- deployments
|
||||
- deployments/scale
|
||||
- replicasets
|
||||
- replicasets/scale
|
||||
- statefulsets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- autoscaling
|
||||
resources:
|
||||
- horizontalpodautoscalers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- batch
|
||||
resources:
|
||||
- cronjobs
|
||||
- jobs
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- extensions
|
||||
resources:
|
||||
- daemonsets
|
||||
- deployments
|
||||
- deployments/scale
|
||||
- ingresses
|
||||
- networkpolicies
|
||||
- replicasets
|
||||
- replicasets/scale
|
||||
- replicationcontrollers/scale
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- policy
|
||||
resources:
|
||||
- poddisruptionbudgets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- networkpolicies
|
||||
- ingresses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- storage.k8s.io
|
||||
resources:
|
||||
- storageclasses
|
||||
- volumeattachments
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- rbac.authorization.k8s.io
|
||||
resources:
|
||||
- clusterrolebindings
|
||||
- clusterroles
|
||||
- roles
|
||||
- rolebindings
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
{{- with .Values.rbac.clusterReadOnlyRoleAdditionalRules -}}
|
||||
{{ toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- 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 .Values.rbac.clusterRoleMetrics -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: "{{ template "kubernetes-dashboard.fullname" . }}-metrics"
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-metrics
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "kubernetes-dashboard.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- 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 .Values.rbac.clusterReadOnlyRole -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-readonly
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-readonly
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "kubernetes-dashboard.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,34 @@
|
||||
# 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: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
name: kubernetes-dashboard-settings
|
||||
data:
|
||||
{{- with .Values.settings }}
|
||||
_global: {{ toJson . | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.pinnedCRDs }}
|
||||
_pinnedCRD: {{ toJson . | quote }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,188 @@
|
||||
# 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: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.annotations }}
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: kubernetes-dashboard
|
||||
{{- with .Values.labels }}
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 0
|
||||
maxUnavailable: 1
|
||||
type: RollingUpdate
|
||||
selector:
|
||||
matchLabels:
|
||||
{{ include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: kubernetes-dashboard
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: kubernetes-dashboard
|
||||
{{- if .Values.podLabels }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.securityContext }}
|
||||
securityContext:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "kubernetes-dashboard.serviceAccountName" . }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
args:
|
||||
- --namespace={{ .Release.Namespace }}
|
||||
{{- if not .Values.protocolHttp }}
|
||||
- --auto-generate-certificates
|
||||
{{- end }}
|
||||
{{- if .Values.metricsScraper.enabled }}
|
||||
- --sidecar-host=http://127.0.0.1:8000
|
||||
{{- else }}
|
||||
- --metrics-provider=none
|
||||
{{- end }}
|
||||
{{- with .Values.extraArgs }}
|
||||
{{ toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.extraEnv }}
|
||||
env:
|
||||
{{ toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
{{- if .Values.protocolHttp }}
|
||||
- name: http
|
||||
containerPort: 9090
|
||||
protocol: TCP
|
||||
{{- else }}
|
||||
- name: https
|
||||
containerPort: 8443
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: kubernetes-dashboard-certs
|
||||
mountPath: /certs
|
||||
# Create on-disk volume to store exec logs
|
||||
- mountPath: /tmp
|
||||
name: tmp-volume
|
||||
{{- with .Values.extraVolumeMounts }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
{{- if .Values.protocolHttp }}
|
||||
scheme: HTTP
|
||||
path: /
|
||||
port: 9090
|
||||
{{- else }}
|
||||
scheme: HTTPS
|
||||
path: /
|
||||
port: 8443
|
||||
{{- end }}
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
{{- with .Values.resources }}
|
||||
resources:
|
||||
{{ toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.containerSecurityContext }}
|
||||
securityContext:
|
||||
{{ toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metricsScraper.enabled }}
|
||||
- name: dashboard-metrics-scraper
|
||||
image: "{{ .Values.metricsScraper.image.repository }}:{{ .Values.metricsScraper.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- with .Values.metricsScraper.args }}
|
||||
args:
|
||||
{{ toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
scheme: HTTP
|
||||
path: /
|
||||
port: 8000
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
||||
volumeMounts:
|
||||
- mountPath: /tmp
|
||||
name: tmp-volume
|
||||
|
||||
{{- if .Values.metricsScraper.containerSecurityContext }}
|
||||
securityContext:
|
||||
{{ toYaml .Values.metricsScraper.containerSecurityContext | nindent 10 }}
|
||||
{{- else if .Values.containerSecurityContext}}
|
||||
securityContext:
|
||||
{{ toYaml .Values.containerSecurityContext | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.metricsScraper.resources }}
|
||||
resources:
|
||||
{{ toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range . }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.priorityClassName }}
|
||||
priorityClassName: "{{ . }}"
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: kubernetes-dashboard-certs
|
||||
secret:
|
||||
secretName: {{ template "kubernetes-dashboard.fullname" . }}-certs
|
||||
- name: tmp-volume
|
||||
emptyDir: {}
|
||||
{{- with .Values.extraVolumes }}
|
||||
{{ toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- 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.extraManifests }}
|
||||
---
|
||||
{{ tpl (toYaml .) $ }}
|
||||
{{ 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 .Values.ingress.enabled -}}
|
||||
{{- $serviceName := include "kubernetes-dashboard.fullname" . -}}
|
||||
{{- $servicePort := .Values.service.externalPort -}}
|
||||
{{- $paths := .Values.ingress.paths -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- range $key, $value := .Values.ingress.labels }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.protocolHttp }}
|
||||
# Add https backend protocol support for ingress-nginx
|
||||
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
|
||||
# Add https backend protocol support for GKE
|
||||
service.alpha.kubernetes.io/app-protocols: '{"https":"HTTPS"}'
|
||||
{{- end }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.ingress.className }}
|
||||
ingressClassName: {{ . | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if .Values.ingress.hosts }}
|
||||
{{- range $host := .Values.ingress.hosts }}
|
||||
- host: {{ $host }}
|
||||
http:
|
||||
paths:
|
||||
{{- if len ($.Values.ingress.customPaths) }}
|
||||
{{- "\n" }}{{ tpl (toYaml $.Values.ingress.customPaths | nindent 10) $ }}
|
||||
{{- else }}
|
||||
{{- range $p := $paths }}
|
||||
- path: {{ $p }}
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: {{ $serviceName }}
|
||||
port:
|
||||
number: {{ $servicePort }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else }}
|
||||
- http:
|
||||
paths:
|
||||
{{- if len ($.Values.ingress.customPaths) }}
|
||||
{{- "\n" }}{{ tpl (toYaml $.Values.ingress.customPaths | nindent 10) $ }}
|
||||
{{- else }}
|
||||
{{- range $p := $paths }}
|
||||
- path: {{ $p }}
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: {{ $serviceName }}
|
||||
port:
|
||||
number: {{ $servicePort }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{ toYaml .Values.ingress.tls | nindent 4 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,45 @@
|
||||
# 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.networkPolicy.enabled -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "kubernetes-dashboard.name" . }}
|
||||
chart: {{ template "kubernetes-dashboard.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
{{ include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
|
||||
ingress:
|
||||
- ports:
|
||||
{{- if .Values.protocolHttp }}
|
||||
- port: http
|
||||
protocol: TCP
|
||||
{{- else }}
|
||||
- port: https
|
||||
protocol: TCP
|
||||
{{- end -}}
|
||||
{{- 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 .Values.podDisruptionBudget.enabled -}}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}
|
||||
spec:
|
||||
{{- if .Values.podDisruptionBudget.minAvailable }}
|
||||
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.podDisruptionBudget.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{ include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,82 @@
|
||||
# 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.podSecurityPolicy.enabled -}}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-psp
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
privileged: false
|
||||
fsGroup:
|
||||
rule: RunAsAny
|
||||
runAsUser:
|
||||
rule: RunAsAny
|
||||
runAsGroup:
|
||||
rule: RunAsAny
|
||||
seLinux:
|
||||
rule: RunAsAny
|
||||
supplementalGroups:
|
||||
rule: RunAsAny
|
||||
volumes:
|
||||
- 'configMap'
|
||||
- 'secret'
|
||||
- 'emptyDir'
|
||||
allowPrivilegeEscalation: false
|
||||
hostNetwork: false
|
||||
hostIPC: false
|
||||
hostPID: false
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-psp
|
||||
labels:
|
||||
{{ include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-psp
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "kubernetes-dashboard.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-psp
|
||||
labels:
|
||||
{{ include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- extensions
|
||||
- policy/v1beta1
|
||||
resources:
|
||||
- podsecuritypolicies
|
||||
verbs:
|
||||
- use
|
||||
resourceNames:
|
||||
- {{ template "kubernetes-dashboard.fullname" . }}-psp
|
||||
{{- 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.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
# Allow Dashboard to get, update and delete Dashboard exclusive secrets.
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
resourceNames: ["kubernetes-dashboard-key-holder", "kubernetes-dashboard-certs", "kubernetes-dashboard-csrf"]
|
||||
verbs: ["get", "update", "delete"]
|
||||
# Allow Dashboard to get and update 'kubernetes-dashboard-settings' config map.
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps"]
|
||||
resourceNames: ["kubernetes-dashboard-settings"]
|
||||
verbs: ["get", "update"]
|
||||
# Allow Dashboard to get metrics.
|
||||
- apiGroups: [""]
|
||||
resources: ["services"]
|
||||
resourceNames: ["heapster", "dashboard-metrics-scraper"]
|
||||
verbs: ["proxy"]
|
||||
- apiGroups: [""]
|
||||
resources: ["services/proxy"]
|
||||
resourceNames: ["heapster", "http:heapster:", "https:heapster:", "dashboard-metrics-scraper", "http:dashboard-metrics-scraper"]
|
||||
verbs: ["get"]
|
||||
{{- with .Values.rbac.roleAdditionalRules -}}
|
||||
{{ toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- 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 .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "kubernetes-dashboard.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,47 @@
|
||||
# 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.
|
||||
|
||||
# kubernetes-dashboard-certs
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-certs
|
||||
type: Opaque
|
||||
---
|
||||
# kubernetes-dashboard-csrf
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
{{ include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
name: kubernetes-dashboard-csrf
|
||||
type: Opaque
|
||||
---
|
||||
# kubernetes-dashboard-key-holder
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
{{ include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
name: kubernetes-dashboard-key-holder
|
||||
type: Opaque
|
||||
@@ -0,0 +1,62 @@
|
||||
# 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: Service
|
||||
metadata:
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}
|
||||
labels:
|
||||
{{ include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: kubernetes-dashboard
|
||||
{{ .Values.service.clusterServiceLabel.key | nindent 4}}: {{ .Values.service.clusterServiceLabel.enabled | quote }}
|
||||
{{- if .Values.service.labels }}
|
||||
{{ toYaml .Values.service.labels | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.annotations }}
|
||||
{{ toYaml .Values.service.annotations | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if hasKey .Values.service "clusterIP" }}
|
||||
clusterIP: {{ .Values.service.clusterIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- port: {{ .Values.service.externalPort }}
|
||||
{{- if .Values.protocolHttp }}
|
||||
targetPort: http
|
||||
name: http
|
||||
{{- else }}
|
||||
targetPort: https
|
||||
name: https
|
||||
{{- end }}
|
||||
{{- if hasKey .Values.service "nodePort" }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ toYaml .Values.service.loadBalancerSourceRanges | nindent 4 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{ include "kubernetes-dashboard.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: kubernetes-dashboard
|
||||
{{- if .Values.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,29 @@
|
||||
# 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.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.serviceAccountName" . }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,50 @@
|
||||
# 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.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}
|
||||
labels:
|
||||
{{ include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: kubernetes-dashboard
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceMonitor.labels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.serviceMonitor.labels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceMonitor.annotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.serviceMonitor.annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
endpoints:
|
||||
{{- if .Values.protocolHttp }}
|
||||
- port: http
|
||||
{{- else }}
|
||||
- port: https
|
||||
scheme: https
|
||||
tlsConfig:
|
||||
insecureSkipVerify: true
|
||||
{{- end }}
|
||||
path: /metrics
|
||||
selector:
|
||||
matchLabels:
|
||||
{{ include "kubernetes-dashboard.labels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
359
0-部署应用/Oracle-Cloud/kubernetes-dashboard-6.0.0/values.yaml
Normal file
359
0-部署应用/Oracle-Cloud/kubernetes-dashboard-6.0.0/values.yaml
Normal file
@@ -0,0 +1,359 @@
|
||||
# Copyright 2020 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.
|
||||
|
||||
# Default values for kubernetes-dashboard
|
||||
# This is a YAML-formatted file.
|
||||
# Declare name/value pairs to be passed into your templates.
|
||||
# name: value
|
||||
|
||||
image:
|
||||
## Repository for container
|
||||
repository: kubernetesui/dashboard
|
||||
tag: v2.7.0
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecrets: []
|
||||
|
||||
## Number of replicas
|
||||
replicaCount: 1
|
||||
|
||||
## @param commonLabels Labels to add to all deployed objects
|
||||
##
|
||||
commonLabels: {}
|
||||
## @param commonAnnotations Annotations to add to all deployed objects
|
||||
##
|
||||
commonAnnotations: {}
|
||||
|
||||
## Here annotations can be added to the kubernetes dashboard deployment
|
||||
annotations: {}
|
||||
## Here labels can be added to the kubernetes dashboard deployment
|
||||
labels: {}
|
||||
|
||||
## Additional container arguments
|
||||
##
|
||||
extraArgs:
|
||||
- --enable-skip-login
|
||||
- --enable-insecure-login
|
||||
# - --system-banner="Welcome to Kubernetes"
|
||||
|
||||
## Additional container environment variables
|
||||
##
|
||||
extraEnv: []
|
||||
# - name: SOME_VAR
|
||||
# value: 'some value'
|
||||
|
||||
## Additional volumes to be added to kubernetes dashboard pods
|
||||
##
|
||||
extraVolumes: []
|
||||
# - name: dashboard-kubeconfig
|
||||
# secret:
|
||||
# defaultMode: 420
|
||||
# secretName: dashboard-kubeconfig
|
||||
|
||||
## Additional volumeMounts to be added to kubernetes dashboard container
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
# - mountPath: /kubeconfig
|
||||
# name: dashboard-kubeconfig
|
||||
# readOnly: true
|
||||
|
||||
## Array of extra K8s manifests to deploy
|
||||
##
|
||||
extraManifests: []
|
||||
# - apiVersion: v1
|
||||
# kind: ConfigMap
|
||||
# metadata:
|
||||
# name: additional-configmap
|
||||
# data:
|
||||
# mykey: myvalue
|
||||
|
||||
## Annotations to be added to kubernetes dashboard pods
|
||||
# podAnnotations:
|
||||
|
||||
## SecurityContext to be added to kubernetes dashboard pods
|
||||
## To disable set the following configuration to null:
|
||||
# securityContext: null
|
||||
securityContext:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
|
||||
## SecurityContext defaults for the kubernetes dashboard container and metrics scraper container
|
||||
## To disable set the following configuration to null:
|
||||
# containerSecurityContext: null
|
||||
containerSecurityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsUser: 1001
|
||||
runAsGroup: 2001
|
||||
|
||||
## @param podLabels Extra labels for OAuth2 Proxy pods
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
##
|
||||
podLabels: {}
|
||||
## @param podAnnotations Annotations for OAuth2 Proxy pods
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
## Node labels for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## List of node taints to tolerate (requires Kubernetes >= 1.6)
|
||||
tolerations: []
|
||||
# - key: "key"
|
||||
# operator: "Equal|Exists"
|
||||
# value: "value"
|
||||
# effect: "NoSchedule|PreferNoSchedule|NoExecute"
|
||||
|
||||
## Affinity for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
affinity: {}
|
||||
|
||||
## Name of Priority Class of pods
|
||||
# priorityClassName: ""
|
||||
|
||||
## Pod resource requests & limits
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 200Mi
|
||||
limits:
|
||||
cpu: 2
|
||||
memory: 200Mi
|
||||
|
||||
## Serve application over HTTP without TLS
|
||||
##
|
||||
## Note: If set to true, you may want to add --enable-insecure-login to extraArgs
|
||||
protocolHttp: true
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
# Dashboard service port
|
||||
# 443 is not complatiable with traefik
|
||||
externalPort: 9090
|
||||
|
||||
## LoadBalancerSourcesRange is a list of allowed CIDR values, which are combined with ServicePort to
|
||||
## set allowed inbound rules on the security group assigned to the master load balancer
|
||||
# loadBalancerSourceRanges: []
|
||||
|
||||
# clusterIP: ""
|
||||
|
||||
## A user-specified IP address for load balancer to use as External IP (if supported)
|
||||
# loadBalancerIP:
|
||||
|
||||
## Additional Kubernetes Dashboard Service annotations
|
||||
annotations: {}
|
||||
|
||||
## Here labels can be added to the Kubernetes Dashboard service
|
||||
labels: {}
|
||||
|
||||
## Enable or disable the kubernetes.io/cluster-service label. Should be disabled for GKE clusters >=1.15.
|
||||
## Otherwise, the addon manager will presume ownership of the service and try to delete it.
|
||||
clusterServiceLabel:
|
||||
enabled: true
|
||||
key: "kubernetes.io/cluster-service"
|
||||
|
||||
ingress:
|
||||
## If true, Kubernetes Dashboard Ingress will be created.
|
||||
##
|
||||
enabled: true
|
||||
|
||||
## Kubernetes Dashboard Ingress labels
|
||||
# labels:
|
||||
# key: value
|
||||
|
||||
## Kubernetes Dashboard Ingress annotations
|
||||
annotations:
|
||||
#kubernetes.io/ingress.class: traefik
|
||||
cert-manager.io/cluster-issuer: cm-cloudflare-7421
|
||||
#cert-manager.io/issuer-kind: ClusterIssuer
|
||||
|
||||
## If you plan to use TLS backend with enableInsecureLogin set to false
|
||||
## (default), you need to uncomment the below.
|
||||
## If you use ingress-nginx < 0.21.0
|
||||
# nginx.ingress.kubernetes.io/secure-backends: "true"
|
||||
## if you use ingress-nginx >= 0.21.0
|
||||
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
||||
|
||||
## Kubernetes Dashboard Ingress Class
|
||||
className: "traefik"
|
||||
|
||||
## Kubernetes Dashboard Ingress paths
|
||||
## Both `/` and `/*` are required to work on gce ingress.
|
||||
paths:
|
||||
- /
|
||||
# - /*
|
||||
|
||||
## Custom Kubernetes Dashboard Ingress paths. Will override default paths.
|
||||
##
|
||||
customPaths: []
|
||||
# - pathType: ImplementationSpecific
|
||||
# backend:
|
||||
# service:
|
||||
# name: ssl-redirect
|
||||
# port:
|
||||
# name: use-annotation
|
||||
# - pathType: ImplementationSpecific
|
||||
# backend:
|
||||
# service:
|
||||
# name: >-
|
||||
# {{ include "kubernetes-dashboard.fullname" . }}
|
||||
# port:
|
||||
# # Don't use string here, use only integer value!
|
||||
# number: 443
|
||||
## Kubernetes Dashboard Ingress hostnames
|
||||
## Must be provided if Ingress is enabled
|
||||
##
|
||||
hosts:
|
||||
- k8s.107421.xyz
|
||||
## Kubernetes Dashboard Ingress TLS configuration
|
||||
## Secrets must be manually created in the namespace
|
||||
##
|
||||
tls:
|
||||
- secretName: k8s.107421.xyz-tls
|
||||
hosts:
|
||||
- k8s.107421.xyz
|
||||
|
||||
# Global dashboard settings
|
||||
settings:
|
||||
{}
|
||||
## 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
|
||||
## 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: 5
|
||||
## Hide all access denied warnings in the notification panel
|
||||
# disableAccessDeniedNotifications: false
|
||||
|
||||
## Pinned CRDs that will be displayed in dashboard's menu
|
||||
pinnedCRDs:
|
||||
[]
|
||||
# - kind: customresourcedefinition
|
||||
## Fully qualified name of a CRD
|
||||
# name: prometheuses.monitoring.coreos.com
|
||||
## Display name
|
||||
# displayName: Prometheus
|
||||
## Is this CRD namespaced?
|
||||
# namespaced: true
|
||||
|
||||
## Metrics Scraper
|
||||
## Container to scrape, store, and retrieve a window of time from the Metrics Server.
|
||||
## refs: https://github.com/kubernetes-sigs/dashboard-metrics-scraper
|
||||
metricsScraper:
|
||||
## Wether to enable dashboard-metrics-scraper
|
||||
enabled: true
|
||||
image:
|
||||
repository: kubernetesui/metrics-scraper
|
||||
tag: v1.0.8
|
||||
resources: {}
|
||||
## SecurityContext especially for the kubernetes dashboard metrics scraper container
|
||||
## If not set, the global containterSecurityContext values will define these values
|
||||
# containerSecurityContext:
|
||||
# allowPrivilegeEscalation: false
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsUser: 1001
|
||||
# runAsGroup: 2001
|
||||
# args:
|
||||
# - --log-level=info
|
||||
# - --logtostderr=true
|
||||
|
||||
## Optional Metrics Server sub-chart
|
||||
## 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: true
|
||||
## Example for additional args
|
||||
# args:
|
||||
# - --kubelet-preferred-address-types=InternalIP
|
||||
# - --kubelet-insecure-tls
|
||||
|
||||
rbac:
|
||||
# Specifies whether namespaced RBAC resources (Role, Rolebinding) should be created
|
||||
create: true
|
||||
|
||||
# Specifies whether cluster-wide RBAC resources (ClusterRole, ClusterRolebinding) to access metrics should be created
|
||||
# Independent from rbac.create parameter.
|
||||
clusterRoleMetrics: true
|
||||
|
||||
# Start in ReadOnly mode.
|
||||
# Specifies whether cluster-wide RBAC resources (ClusterRole, ClusterRolebinding) with read only permissions to all resources listed inside the cluster should be created
|
||||
# Only dashboard-related Secrets and ConfigMaps will still be available for writing.
|
||||
#
|
||||
# The basic idea of the clusterReadOnlyRole
|
||||
# is not to hide all the secrets and sensitive data but more
|
||||
# to avoid accidental changes in the cluster outside the standard CI/CD.
|
||||
#
|
||||
# It is NOT RECOMMENDED to use this version in production.
|
||||
# Instead you should review the role and remove all potentially sensitive parts such as
|
||||
# access to persistentvolumes, pods/log etc.
|
||||
#
|
||||
# Independent from rbac.create parameter.
|
||||
clusterReadOnlyRole: false
|
||||
# It is possible to add additional rules if read only role is enabled.
|
||||
# This can be useful, for example, to show CRD resources.
|
||||
# clusterReadOnlyRoleAdditionalRules: []
|
||||
|
||||
# If the default role permissions are not enough, it is possible to add additional permissions.
|
||||
# roleAdditionalRules: []
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name:
|
||||
|
||||
livenessProbe:
|
||||
# Number of seconds to wait before sending first probe
|
||||
initialDelaySeconds: 30
|
||||
# Number of seconds to wait for probe response
|
||||
timeoutSeconds: 30
|
||||
|
||||
## podDisruptionBudget
|
||||
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
|
||||
podDisruptionBudget:
|
||||
enabled: false
|
||||
## Minimum available instances; ignored if there is no PodDisruptionBudget
|
||||
minAvailable:
|
||||
## Maximum unavailable instances; ignored if there is no PodDisruptionBudget
|
||||
maxUnavailable:
|
||||
|
||||
## PodSecurityContext for pod level securityContext
|
||||
# securityContext:
|
||||
# runAsUser: 1001
|
||||
# runAsGroup: 2001
|
||||
|
||||
networkPolicy:
|
||||
# Whether to create a network policy that allows/restricts access to the service
|
||||
enabled: false
|
||||
|
||||
## podSecurityPolicy for fine-grained authorization of pod creation and updates
|
||||
podSecurityPolicy:
|
||||
# Specifies whether a pod security policy should be created
|
||||
enabled: false
|
||||
|
||||
serviceMonitor:
|
||||
# Whether or not 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: {}
|
||||
Reference in New Issue
Block a user