Skip to content

Commit

Permalink
Added Kiali chart. (istio#5869)
Browse files Browse the repository at this point in the history
* Added Kiali chart.

* Updated replicas.

* Updated service account name.

* Fix lint.

* Address costinm and linsun's comments.
  • Loading branch information
gyliu513 authored and linsun committed May 31, 2018
1 parent ba5a07e commit 369bf50
Show file tree
Hide file tree
Showing 10 changed files with 245 additions and 0 deletions.
4 changes: 4 additions & 0 deletions install/kubernetes/helm/istio/charts/kiali/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
description: Kiali is an open source project for service mesh observability, refer to https://github.com/kiali/kiali for detail.
name: kiali
version: 0.3.0.Alpha
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{{- if .Values.global.rbacEnabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kiali
labels:
app: kiali
version: master
rules:
- apiGroups: ["","apps", "autoscaling"]
attributeRestrictions: null
resources:
- configmaps
- namespaces
- nodes
- pods
- projects
- services
- endpoints
- deployments
- horizontalpodautoscalers
verbs:
- get
- list
- watch
- apiGroups: ["config.istio.io"]
attributeRestrictions: null
resources:
- routerules
- destinationpolicies
- rules
- circonuses
- deniers
- fluentds
- kubernetesenvs
- listcheckers
- memquotas
- opas
- prometheuses
- rbacs
- servicecontrols
- solarwindses
- stackdrivers
- statsds
- stdios
- apikeys
- authorizations
- checknothings
- kuberneteses
- listentries
- logentries
- metrics
- quotas
- reportnothings
- servicecontrolreports
verbs:
- get
- list
- watch
- apiGroups: ["networking.istio.io"]
attributeRestrictions: null
resources:
- virtualservices
- destinationrules
- gateways
verbs:
- get
- list
- watch
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.global.rbacEnabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: istio-kiali-admin-role-binding-{{ .Release.Namespace }}
labels:
app: kiali
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kiali
subjects:
- kind: ServiceAccount
name: kiali-service-account
namespace: {{ .Release.Namespace }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: kiali
namespace: {{ .Release.Namespace }}
labels:
app: kiali
data:
config.yaml: |
server:
port: 20001
static_content_root_directory: /opt/kiali/console
credentials:
username: {{ .Values.dashboard.username }}
password: {{ .Values.dashboard.password }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kiali
namespace: {{ .Release.Namespace }}
labels:
app: kiali
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: kiali
template:
metadata:
name: kiali
labels:
app: kiali
spec:
{{- if .Values.global.rbacEnabled }}
serviceAccountName: kiali-service-account
{{ end }}
containers:
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
name: kiali
command:
- "/opt/kiali/kiali"
- "-config"
- "/kiali-configuration/config.yaml"
- "-v"
- "4"
env:
- name: ACTIVE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
volumeMounts:
- name: kiali-configuration
mountPath: "/kiali-configuration"
volumes:
- name: kiali-configuration
configMap:
name: kiali
28 changes: 28 additions & 0 deletions install/kubernetes/helm/istio/charts/kiali/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- if .Values.ingress.enabled -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kiali
namespace: {{ .Release.Namespace }}
labels:
app: kiali
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
{{- range $host := .Values.ingress.hosts }}
- host: {{ $host }}
http:
paths:
- path: /
backend:
serviceName: kiali
servicePort: 20001
{{- end -}}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}
15 changes: 15 additions & 0 deletions install/kubernetes/helm/istio/charts/kiali/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: kiali
namespace: {{ .Release.Namespace }}
labels:
app: kiali
spec:
ports:
- name: tcp
protocol: TCP
port: 20001
name: http-kiali
selector:
app: kiali
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.global.rbacEnabled }}
apiVersion: v1
kind: ServiceAccount
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.global.imagePullSecrets | indent 2 }}
{{- end }}
metadata:
name: kiali-service-account
namespace: {{ .Release.Namespace }}
labels:
app: kiali
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- end }}
3 changes: 3 additions & 0 deletions install/kubernetes/helm/istio/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ dependencies:
version: 0.8.0
# repository: file://../galley
condition: galley.enabled
- name: kiali
version: 0.3.0.Alpha
condition: kiali.enabled
30 changes: 30 additions & 0 deletions install/kubernetes/helm/istio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -425,3 +425,33 @@ tracing:
# requests:
# cpu: 100m
# memory: 128Mi

kiali:
enabled: false
replicaCount: 1
image:
repository: kiali/kiali
tag: 0.3.0.Alpha
ingress:
enabled: false
## Used to create an Ingress record.
# hosts:
# - kiali.local
annotations:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
tls:
# Secrets must be manually created in the namespace.
# - secretName: kiali-tls
# hosts:
# - kiali.local
resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
dashboard:
username: admin
password: admin

0 comments on commit 369bf50

Please sign in to comment.