added repo
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
*************************************************************************************************
|
||||
*** PLEASE BE PATIENT: Kubernetes Dashboard may need a few minutes to get up and become ready ***
|
||||
*************************************************************************************************
|
||||
|
||||
Congratulations! You have just installed Kubernetes Dashboard in your cluster.
|
||||
{{ if not (.Values.nginx.enabled) }}
|
||||
To access Dashboard run:
|
||||
kubectl -n {{ .Release.Namespace }} port-forward svc/{{ .Release.Name }}-kong-proxy 8443:443
|
||||
|
||||
NOTE: In case port-forward command does not work, make sure that kong service name is correct.
|
||||
Check the services in Kubernetes Dashboard namespace using:
|
||||
kubectl -n {{ .Release.Namespace }} get svc
|
||||
|
||||
Dashboard will be available at:
|
||||
https://localhost:8443
|
||||
{{- end }}
|
||||
|
||||
{{ if and (has "localhost" .Values.app.ingress.hosts) (eq .Values.app.ingress.ingressClassName "internal-nginx") (.Values.nginx.enabled) }}
|
||||
To access Dashboard run:
|
||||
kubectl -n {{ .Release.Namespace }} port-forward svc/{{ .Release.Name }}-nginx-controller 8443:443
|
||||
|
||||
NOTE: In case port-forward command does not work, make sure that nginx service name is correct.
|
||||
Check the services in Kubernetes Dashboard namespace using:
|
||||
kubectl -n {{ .Release.Namespace }} get svc
|
||||
|
||||
Dashboard will be available at:
|
||||
https://localhost:8443
|
||||
{{- end }}
|
||||
|
||||
{{- if or (not (has "localhost" .Values.app.ingress.hosts)) (gt (len .Values.app.ingress.hosts) 1) }}
|
||||
|
||||
Looks like you are deploying Kubernetes Dashboard on a custom domain(s).
|
||||
Please make sure that the ingress configuration is valid.
|
||||
Dashboard should be accessible on your configured domain(s) soon:
|
||||
{{- range .Values.app.ingress.hosts }}
|
||||
{{- if not (eq . "localhost") }}
|
||||
- https://{{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,120 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "kubernetes-dashboard.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "kubernetes-dashboard.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "kubernetes-dashboard.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "kubernetes-dashboard.labels" -}}
|
||||
helm.sh/chart: {{ include "kubernetes-dashboard.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/part-of: {{ include "kubernetes-dashboard.name" . }}
|
||||
{{- with .Values.app.labels }}
|
||||
{{ toYaml . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common label selectors
|
||||
*/}}
|
||||
{{- define "kubernetes-dashboard.matchLabels" -}}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/part-of: {{ include "kubernetes-dashboard.name" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common annotations
|
||||
*/}}
|
||||
{{- define "kubernetes-dashboard.annotations" -}}
|
||||
{{- with .Values.app.annotations }}
|
||||
{{- toYaml . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "kubernetes-dashboard.app.csrf.secret.name" -}}
|
||||
{{- printf "%s-%s" ( include "kubernetes-dashboard.fullname" . ) "csrf"}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "kubernetes-dashboard.app.ingress.secret.name" -}}
|
||||
{{- printf "%s-%s" ( include "kubernetes-dashboard.fullname" . ) "certs"}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "kubernetes-dashboard.app.csrf.secret.key" -}}
|
||||
{{- printf "private.key" }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "kubernetes-dashboard.app.csrf.secret.value" -}}
|
||||
{{- $secretName := (include "kubernetes-dashboard.app.csrf.secret.name" .) -}}
|
||||
{{- $secret := lookup "v1" "Secret" .Release.Namespace $secretName -}}
|
||||
{{- if .Values.app.security.csrfKey -}}
|
||||
private.key: {{ .Values.app.security.csrfKey | b64enc | quote }}
|
||||
{{- else if and $secret (hasKey $secret "data") (hasKey $secret.data "private.key") (index $secret.data "private.key") -}}
|
||||
private.key: {{ index $secret.data "private.key" }}
|
||||
{{- else -}}
|
||||
private.key: {{ randBytes 256 | b64enc | quote }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "kubernetes-dashboard.metrics-scraper.name" -}}
|
||||
{{- printf "%s-%s" ( include "kubernetes-dashboard.fullname" . ) ( .Values.metricsScraper.role )}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "kubernetes-dashboard.web.configMap.settings.name" -}}
|
||||
{{- printf "%s-%s-%s" ( include "kubernetes-dashboard.fullname" . ) ( .Values.web.role ) "settings" }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "kubernetes-dashboard.validate.mode" -}}
|
||||
{{- if not (or (eq .Values.app.mode "dashboard") (eq .Values.app.mode "api")) -}}
|
||||
{{- fail "value of .Values.app.mode must be one of [dashboard, api]"}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "kubernetes-dashboard.validate.ingressIssuerScope" -}}
|
||||
{{- if not (or (eq .Values.app.ingress.issuer.scope "disabled") (eq .Values.app.ingress.issuer.scope "default") (eq .Values.app.ingress.issuer.scope "cluster")) }}
|
||||
{{- fail "value of .Values.app.ingress.issuer.scope must be one of [default, cluster, disabled]"}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,69 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if and (eq .Values.app.mode "dashboard") (.Values.kong.enabled) }}
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
name: {{ .Values.kong.dblessConfig.configMap }}
|
||||
data:
|
||||
kong.yml: |
|
||||
_format_version: "3.0"
|
||||
services:
|
||||
- name: auth
|
||||
host: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.auth.role }}
|
||||
port: 8000
|
||||
protocol: http
|
||||
routes:
|
||||
- name: authLogin
|
||||
paths:
|
||||
- /api/v1/login
|
||||
strip_path: false
|
||||
- name: authCsrf
|
||||
paths:
|
||||
- /api/v1/csrftoken/login
|
||||
strip_path: false
|
||||
- name: authMe
|
||||
paths:
|
||||
- /api/v1/me
|
||||
strip_path: false
|
||||
- name: api
|
||||
host: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
|
||||
port: 8000
|
||||
protocol: http
|
||||
routes:
|
||||
- name: api
|
||||
paths:
|
||||
- /api
|
||||
strip_path: false
|
||||
- name: metrics
|
||||
paths:
|
||||
- /metrics
|
||||
strip_path: false
|
||||
- name: web
|
||||
host: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
|
||||
port: 8000
|
||||
protocol: http
|
||||
routes:
|
||||
- name: root
|
||||
paths:
|
||||
- /
|
||||
strip_path: false
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,33 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if eq .Values.app.mode "dashboard" }}
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
name: {{ template "kubernetes-dashboard.web.configMap.settings.name" . }}
|
||||
data:
|
||||
{{- with .Values.app.settings.global }}
|
||||
settings: {{ toJson . | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.app.settings.pinnedResources }}
|
||||
pinnedResources: {{ toJson . | quote }}
|
||||
{{- end }}
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,157 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.api.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }}
|
||||
app.kubernetes.io/version: {{ .Values.api.image.tag }}
|
||||
app.kubernetes.io/component: {{ .Values.api.role }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.api.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
|
||||
spec:
|
||||
replicas: {{ .Values.api.scaling.replicas }}
|
||||
revisionHistoryLimit: {{ .Values.api.scaling.revisionHistoryLimit }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 8 }}
|
||||
{{- with .Values.api.labels }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }}
|
||||
app.kubernetes.io/version: {{ .Values.api.image.tag }}
|
||||
app.kubernetes.io/component: {{ .Values.api.role }}
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/secrets/csrf.yaml") . | sha256sum }}
|
||||
{{- with .Values.api.annotations }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }}
|
||||
image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.app.image.pullPolicy }}
|
||||
args:
|
||||
- --namespace={{ .Release.Namespace }}
|
||||
- --metrics-scraper-service-name={{ template "kubernetes-dashboard.metrics-scraper.name" . }}
|
||||
{{- with .Values.api.containers.args }}
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
env:
|
||||
- name: CSRF_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "kubernetes-dashboard.app.csrf.secret.name" . }}
|
||||
key: {{ template "kubernetes-dashboard.app.csrf.secret.key" . }}
|
||||
|
||||
{{- if .Values.api.containers.resources.limits.cpu }}
|
||||
- name: GOMAXPROCS
|
||||
valueFrom:
|
||||
resourceFieldRef:
|
||||
resource: limits.cpu
|
||||
divisor: "1"
|
||||
{{- end }}
|
||||
{{- if .Values.api.containers.resources.limits.memory }}
|
||||
- name: GOMEMLIMIT
|
||||
valueFrom:
|
||||
resourceFieldRef:
|
||||
resource: limits.memory
|
||||
divisor: "1"
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.api.containers.env }}
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.api.containers.ports }}
|
||||
ports:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.api.containers.volumeMounts }}
|
||||
volumeMounts:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.security.containerSecurityContext }}
|
||||
securityContext:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.api.containers.resources }}
|
||||
resources:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range . }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
automountServiceAccountToken: {{ .Values.api.automountServiceAccountToken }}
|
||||
|
||||
{{- with .Values.app.security.securityContext }}
|
||||
securityContext:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.api.volumes }}
|
||||
volumes:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.priorityClassName }}
|
||||
priorityClassName: {{ . }}
|
||||
{{- end }}
|
||||
|
||||
{{- if or .Values.api.nodeSelector .Values.app.scheduling.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- with .Values.api.nodeSelector }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.app.scheduling.nodeSelector }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if eq .Values.app.mode "dashboard" }}
|
||||
serviceAccountName: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,156 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- include "kubernetes-dashboard.validate.mode" $ -}}
|
||||
{{- if eq .Values.app.mode "dashboard" }}
|
||||
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.auth.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }}
|
||||
app.kubernetes.io/version: {{ .Values.api.image.tag }}
|
||||
app.kubernetes.io/component: {{ .Values.auth.role }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.auth.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.auth.role }}
|
||||
spec:
|
||||
replicas: {{ .Values.auth.scaling.replicas }}
|
||||
revisionHistoryLimit: {{ .Values.auth.scaling.revisionHistoryLimit }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 8 }}
|
||||
{{- with .Values.auth.labels }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }}
|
||||
app.kubernetes.io/version: {{ .Values.auth.image.tag }}
|
||||
app.kubernetes.io/component: {{ .Values.auth.role }}
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/secrets/csrf.yaml") . | sha256sum }}
|
||||
{{- with .Values.auth.annotations }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }}
|
||||
image: "{{ .Values.auth.image.repository }}:{{ .Values.auth.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.app.image.pullPolicy }}
|
||||
args:
|
||||
{{- with .Values.auth.containers.args }}
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
env:
|
||||
- name: CSRF_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "kubernetes-dashboard.app.csrf.secret.name" . }}
|
||||
key: {{ template "kubernetes-dashboard.app.csrf.secret.key" . }}
|
||||
|
||||
{{- if .Values.auth.containers.resources.limits.cpu }}
|
||||
- name: GOMAXPROCS
|
||||
valueFrom:
|
||||
resourceFieldRef:
|
||||
resource: limits.cpu
|
||||
divisor: "1"
|
||||
{{- end }}
|
||||
{{- if .Values.auth.containers.resources.limits.memory }}
|
||||
- name: GOMEMLIMIT
|
||||
valueFrom:
|
||||
resourceFieldRef:
|
||||
resource: limits.memory
|
||||
divisor: "1"
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.auth.containers.env }}
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.auth.containers.ports }}
|
||||
ports:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.auth.containers.volumeMounts }}
|
||||
volumeMounts:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.security.containerSecurityContext }}
|
||||
securityContext:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.auth.containers.resources }}
|
||||
resources:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range . }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
automountServiceAccountToken: {{ .Values.auth.automountServiceAccountToken }}
|
||||
|
||||
{{- with .Values.app.security.securityContext }}
|
||||
securityContext:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.auth.volumes }}
|
||||
volumes:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.priorityClassName }}
|
||||
priorityClassName: {{ . }}
|
||||
{{- end }}
|
||||
|
||||
{{- if or .Values.auth.nodeSelector .Values.app.scheduling.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- with .Values.auth.nodeSelector }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.app.scheduling.nodeSelector }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
@@ -0,0 +1,154 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if and .Values.metricsScraper.enabled (eq .Values.app.mode "dashboard") }}
|
||||
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.metricsScraper.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }}
|
||||
app.kubernetes.io/version: {{ .Values.metricsScraper.image.tag }}
|
||||
app.kubernetes.io/component: {{ .Values.metricsScraper.role }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.metricsScraper.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.metrics-scraper.name" . }}
|
||||
spec:
|
||||
replicas: {{ .Values.metricsScraper.scaling.replicas }}
|
||||
revisionHistoryLimit: {{ .Values.metricsScraper.scaling.revisionHistoryLimit }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 8 }}
|
||||
{{- with .Values.metricsScraper.labels }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }}
|
||||
app.kubernetes.io/version: {{ .Values.metricsScraper.image.tag }}
|
||||
app.kubernetes.io/component: {{ .Values.metricsScraper.role }}
|
||||
annotations:
|
||||
{{- with .Values.metricsScraper.annotations }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }}
|
||||
image: "{{ .Values.metricsScraper.image.repository }}:{{ .Values.metricsScraper.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.app.image.pullPolicy }}
|
||||
{{- with .Values.metricsScraper.containers.args }}
|
||||
args:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
env:
|
||||
{{- if .Values.metricsScraper.containers.resources.limits.cpu }}
|
||||
- name: GOMAXPROCS
|
||||
valueFrom:
|
||||
resourceFieldRef:
|
||||
resource: limits.cpu
|
||||
divisor: "1"
|
||||
{{- end }}
|
||||
{{- if .Values.metricsScraper.containers.resources.limits.memory }}
|
||||
- name: GOMEMLIMIT
|
||||
valueFrom:
|
||||
resourceFieldRef:
|
||||
resource: limits.memory
|
||||
divisor: "1"
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.metricsScraper.containers.env }}
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.metricsScraper.containers.ports }}
|
||||
ports:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.metricsScraper.containers.volumeMounts }}
|
||||
volumeMounts:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.security.containerSecurityContext }}
|
||||
securityContext:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.metricsScraper.containers.resources }}
|
||||
resources:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.metricsScraper.containers.livenessProbe }}
|
||||
livenessProbe:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range . }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
automountServiceAccountToken: {{ .Values.metricsScraper.automountServiceAccountToken }}
|
||||
|
||||
{{- with .Values.app.security.securityContext }}
|
||||
securityContext:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.metricsScraper.volumes }}
|
||||
volumes:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.priorityClassName }}
|
||||
priorityClassName: {{ . }}
|
||||
{{- end }}
|
||||
|
||||
{{- if or .Values.metricsScraper.nodeSelector .Values.app.scheduling.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- with .Values.metricsScraper.nodeSelector }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.app.scheduling.nodeSelector }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
serviceAccountName: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,151 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if eq .Values.app.mode "dashboard" }}
|
||||
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.web.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }}
|
||||
app.kubernetes.io/version: {{ .Values.web.image.tag }}
|
||||
app.kubernetes.io/component: {{ .Values.web.role }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.web.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
|
||||
spec:
|
||||
replicas: {{ .Values.web.scaling.replicas }}
|
||||
revisionHistoryLimit: {{ .Values.web.scaling.revisionHistoryLimit }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 8 }}
|
||||
{{- with .Values.web.labels }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }}
|
||||
app.kubernetes.io/version: {{ .Values.web.image.tag }}
|
||||
app.kubernetes.io/component: {{ .Values.web.role }}
|
||||
annotations:
|
||||
{{- with .Values.web.annotations }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }}
|
||||
image: "{{ .Values.web.image.repository }}:{{ .Values.web.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.app.image.pullPolicy }}
|
||||
args:
|
||||
- --namespace={{ .Release.Namespace }}
|
||||
- --settings-config-map-name={{ template "kubernetes-dashboard.web.configMap.settings.name" . }}
|
||||
{{- with .Values.web.containers.args }}
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
env:
|
||||
{{- if .Values.web.containers.resources.limits.cpu }}
|
||||
- name: GOMAXPROCS
|
||||
valueFrom:
|
||||
resourceFieldRef:
|
||||
resource: limits.cpu
|
||||
divisor: "1"
|
||||
{{- end }}
|
||||
{{- if .Values.web.containers.resources.limits.memory }}
|
||||
- name: GOMEMLIMIT
|
||||
valueFrom:
|
||||
resourceFieldRef:
|
||||
resource: limits.memory
|
||||
divisor: "1"
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.web.containers.env }}
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.web.containers.ports }}
|
||||
ports:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.web.containers.volumeMounts }}
|
||||
volumeMounts:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.security.containerSecurityContext }}
|
||||
securityContext:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.web.containers.resources }}
|
||||
resources:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range . }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
automountServiceAccountToken: {{ .Values.web.automountServiceAccountToken }}
|
||||
|
||||
{{- with .Values.app.security.securityContext }}
|
||||
securityContext:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.web.volumes }}
|
||||
volumes:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.priorityClassName }}
|
||||
priorityClassName: {{ . }}
|
||||
{{- end }}
|
||||
|
||||
{{- if or .Values.web.nodeSelector .Values.app.scheduling.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- with .Values.web.nodeSelector }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.app.scheduling.nodeSelector }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.app.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
serviceAccountName: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{ range .Values.extras.manifests }}
|
||||
---
|
||||
{{ tpl (toYaml .) $ }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,52 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{ if .Values.extras.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.extras.serviceMonitor.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.extras.serviceMonitor.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
endpoints:
|
||||
- port: https
|
||||
{{- with .Values.extras.serviceMonitor.scheme }}
|
||||
scheme: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.extras.serviceMonitor.tlsConfig }}
|
||||
tlsConfig:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
path: /metrics
|
||||
{{- with .Values.extras.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.extras.serviceMonitor.relabelings }}
|
||||
relabelings:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{ include "kubernetes-dashboard.labels" . | nindent 6 }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,89 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if and .Values.app.ingress.enabled (eq .Values.app.mode "dashboard")}}
|
||||
{{- include "kubernetes-dashboard.validate.ingressIssuerScope" $ }}
|
||||
|
||||
kind: Ingress
|
||||
apiVersion: networking.k8s.io/v1
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.app.ingress.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- if eq .Values.app.ingress.issuer.scope "default" }}
|
||||
cert-manager.io/issuer: {{ .Values.app.ingress.issuer.name }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.app.ingress.issuer.scope "cluster" }}
|
||||
cert-manager.io/cluster-issuer: {{ .Values.app.ingress.issuer.name }}
|
||||
{{- end }}
|
||||
{{- if .Values.app.ingress.useDefaultAnnotations }}
|
||||
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
|
||||
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
{{- end }}
|
||||
{{- if not (eq .Values.app.ingress.path "/") }}
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
{{- end }}
|
||||
{{- with .Values.app.ingress.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.name" . }}
|
||||
spec:
|
||||
{{- if not .Values.app.ingress.useDefaultIngressClass }}
|
||||
ingressClassName: {{ .Values.app.ingress.ingressClassName }}
|
||||
{{- end }}
|
||||
{{- if and .Values.app.ingress.hosts .Values.app.ingress.tls.enabled }}
|
||||
tls:
|
||||
- hosts:
|
||||
{{- toYaml .Values.app.ingress.hosts | nindent 6 }}
|
||||
{{- if .Values.app.ingress.tls.secretName }}
|
||||
secretName: {{ .Values.app.ingress.tls.secretName }}
|
||||
{{- else }}
|
||||
secretName: {{ template "kubernetes-dashboard.app.ingress.secret.name" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if .Values.app.ingress.hosts }}
|
||||
{{- range $host := .Values.app.ingress.hosts }}
|
||||
- host: {{ $host }}
|
||||
http:
|
||||
paths:
|
||||
{{- if not (eq $.Values.app.ingress.path "/") }}
|
||||
- path: {{ $.Values.app.ingress.path }}(/|$)(.*)
|
||||
{{- else }}
|
||||
- path: {{ $.Values.app.ingress.path }}
|
||||
{{- end }}
|
||||
pathType: {{ $.Values.app.ingress.pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ template "kong.fullname" (index $.Subcharts "kong") }}-proxy
|
||||
port:
|
||||
number: {{ $.Values.kong.proxy.tls.servicePort }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
- http:
|
||||
paths:
|
||||
- path: {{ .Values.app.ingress.path }}
|
||||
pathType: {{ .Values.app.ingress.pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ template "kong.fullname" (index $.Subcharts "kong") }}-proxy
|
||||
port:
|
||||
number: {{ $.Values.kong.proxy.tls.servicePort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,38 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if eq .Values.app.mode "dashboard" }}
|
||||
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.api.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.api.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
|
||||
rules:
|
||||
# Allow Dashboard API to get metrics from metrics-scraper.
|
||||
- apiGroups: [ "" ]
|
||||
resources: [ "services/proxy" ]
|
||||
resourceNames: [ "{{ template "kubernetes-dashboard.metrics-scraper.name" . }}", "http:{{ template "kubernetes-dashboard.metrics-scraper.name" . }}" ]
|
||||
verbs: [ "get" ]
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,39 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if eq .Values.app.mode "dashboard" }}
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.api.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.api.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,32 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if eq .Values.app.mode "dashboard" }}
|
||||
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.api.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.api.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,37 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if and .Values.metricsScraper.enabled (eq .Values.app.mode "dashboard") }}
|
||||
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.metricsScraper.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.metricsScraper.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }}
|
||||
rules:
|
||||
# Allow Metrics Scraper to get metrics from the Metrics server
|
||||
- apiGroups: [ "metrics.k8s.io" ]
|
||||
resources: [ "pods", "nodes" ]
|
||||
verbs: [ "get", "list", "watch" ]
|
||||
|
||||
{{- end -}}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if and .Values.metricsScraper.enabled (eq .Values.app.mode "dashboard") }}
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.metricsScraper.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.metricsScraper.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
|
||||
{{- end -}}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if and .Values.metricsScraper.enabled (eq .Values.app.mode "dashboard") }}
|
||||
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.metricsScraper.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.metricsScraper.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }}
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,32 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if eq .Values.app.mode "dashboard" }}
|
||||
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
|
||||
rules:
|
||||
# Allow Dashboard Web to get and update 'kubernetes-dashboard-settings' config map.
|
||||
- apiGroups: [ "" ]
|
||||
resources: [ "configmaps" ]
|
||||
resourceNames: [ "{{ template "kubernetes-dashboard.web.configMap.settings.name" . }}" ]
|
||||
verbs: [ "get", "update" ]
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,33 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if eq .Values.app.mode "dashboard" }}
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,26 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if eq .Values.app.mode "dashboard" }}
|
||||
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,24 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
name: {{ template "kubernetes-dashboard.app.csrf.secret.name" . }}
|
||||
data:
|
||||
{{ (include "kubernetes-dashboard.app.csrf.secret.value" . ) -}}
|
||||
@@ -0,0 +1,44 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if .Values.app.security.networkPolicy.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
{{- include "kubernetes-dashboard.matchLabels" . | nindent 6 -}}
|
||||
{{- if .Values.app.security.networkPolicy.spec }}
|
||||
{{- with .Values.app.security.networkPolicy.spec }}
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{ else }}
|
||||
{{- if .Values.app.security.networkPolicy.ingressDenyAll }}
|
||||
ingress: [ ]
|
||||
{{ else }}
|
||||
ingress:
|
||||
- ports:
|
||||
- port: {{ $.Values.web.role }}
|
||||
protocol: TCP
|
||||
- port: {{ $.Values.api.role }}
|
||||
protocol: TCP
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,36 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if .Values.app.security.podDisruptionBudget.enabled }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{ include "kubernetes-dashboard.matchLabels" . | nindent 6 }}
|
||||
|
||||
{{- if .Values.app.security.podDisruptionBudget.minAvailable }}
|
||||
minAvailable: {{ .Values.app.security.podDisruptionBudget.minAvailable }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.app.security.podDisruptionBudget.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.app.security.podDisruptionBudget.maxUnavailable }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,40 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.api.serviceLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }}
|
||||
app.kubernetes.io/version: {{ .Values.api.image.tag }}
|
||||
app.kubernetes.io/component: {{ .Values.api.role }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.api.serviceAnnotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }}
|
||||
spec:
|
||||
ports:
|
||||
- name: {{ .Values.api.role }}
|
||||
{{- with (index .Values.api.containers.ports 0) }}
|
||||
port: {{ .containerPort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "kubernetes-dashboard.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }}
|
||||
@@ -0,0 +1,44 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if eq .Values.app.mode "dashboard" }}
|
||||
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.auth.serviceLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }}
|
||||
app.kubernetes.io/version: {{ .Values.auth.image.tag }}
|
||||
app.kubernetes.io/component: {{ .Values.auth.role }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.auth.serviceAnnotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.auth.role }}
|
||||
spec:
|
||||
ports:
|
||||
- name: {{ .Values.auth.role }}
|
||||
{{- with (index .Values.auth.containers.ports 0) }}
|
||||
port: {{ .containerPort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "kubernetes-dashboard.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }}
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,43 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if and .Values.metricsScraper.enabled (eq .Values.app.mode "dashboard") }}
|
||||
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.metricsScraper.serviceLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }}
|
||||
app.kubernetes.io/version: {{ .Values.metricsScraper.image.tag }}
|
||||
app.kubernetes.io/component: {{ .Values.metricsScraper.role }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.metricsScraper.serviceAnnotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.metrics-scraper.name" . }}
|
||||
spec:
|
||||
ports:
|
||||
{{- with (index .Values.metricsScraper.containers.ports 0) }}
|
||||
- port: {{ .containerPort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "kubernetes-dashboard.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }}
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,44 @@
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if eq .Values.app.mode "dashboard" }}
|
||||
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubernetes-dashboard.labels" . | nindent 4 }}
|
||||
{{- with .Values.web.serviceLabels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }}
|
||||
app.kubernetes.io/version: {{ .Values.web.image.tag }}
|
||||
app.kubernetes.io/component: {{ .Values.web.role }}
|
||||
annotations:
|
||||
{{- include "kubernetes-dashboard.annotations" . | nindent 4 }}
|
||||
{{- with .Values.web.serviceAnnotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }}
|
||||
spec:
|
||||
ports:
|
||||
- name: {{ .Values.web.role }}
|
||||
{{- with (index .Values.web.containers.ports 0) }}
|
||||
port: {{ .containerPort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "kubernetes-dashboard.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }}
|
||||
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user