[stable/kube-ops-view] #1785 namespace defined templates with chart name (#2134)

This commit is contained in:
Kevin Schumacher
2017-09-19 15:30:35 +05:30
committed by Dhilip
parent 7b1a63a1c1
commit 007bd2d139
9 changed files with 28 additions and 27 deletions
+9 -8
View File
@@ -1,14 +1,15 @@
name: kube-ops-view
version: 0.3.1
description: Kubernetes Operational View - read-only system dashboard for multiple K8s clusters
version: 0.4.0
description: Kubernetes Operational View - read-only system dashboard for multiple
K8s clusters
keywords:
- kubernetes
- dashboard
- operations
- kubernetes
- dashboard
- operations
home: https://github.com/hjacobs/kube-ops-view
icon: https://raw.githubusercontent.com/hjacobs/kube-ops-view/master/kube-ops-view-logo.png
sources:
- https://github.com/hjacobs/kube-ops-view
- https://github.com/hjacobs/kube-ops-view
maintainers:
- name: Henning Jacobs
email: henning@jacobs1.de
- name: Henning Jacobs
email: henning@jacobs1.de
+1 -1
View File
@@ -6,6 +6,6 @@ To access the Kubernetes Operational View UI:
2. Now open the following URL in your browser:
http://localhost:8001/api/v1/proxy/namespaces/{{ .Release.Namespace }}/services/{{ template "fullname" . }}/
http://localhost:8001/api/v1/proxy/namespaces/{{ .Release.Namespace }}/services/{{ template "kube-ops-view.fullname" . }}/
Please try reloading the page if you see "ServiceUnavailable / no endpoints available for service", pod creation might take a moment.
+2 -2
View File
@@ -2,7 +2,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- define "kube-ops-view.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
@@ -10,7 +10,7 @@ Expand the name of the chart.
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).
*/}}
{{- define "fullname" -}}
{{- define "kube-ops-view.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
@@ -3,11 +3,11 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
labels:
app: {{ template "name" . }}
app: {{ template "kube-ops-view.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "fullname" . }}
name: {{ template "kube-ops-view.fullname" . }}
rules:
- apiGroups: [""]
resources: ["nodes", "pods"]
@@ -3,17 +3,17 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
labels:
app: {{ template "name" . }}
app: {{ template "kube-ops-view.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "fullname" . }}
name: {{ template "kube-ops-view.fullname" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "fullname" . }}
name: {{ template "kube-ops-view.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "fullname" . }}
name: {{ template "kube-ops-view.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- end -}}
@@ -1,7 +1,7 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
name: {{ template "kube-ops-view.fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
@@ -9,9 +9,9 @@ spec:
template:
metadata:
labels:
app: {{ template "fullname" . }}
app: {{ template "kube-ops-view.fullname" . }}
spec:
serviceAccountName: {{ if .Values.rbac.create }}{{ template "fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }}
serviceAccountName: {{ if .Values.rbac.create }}{{ template "kube-ops-view.fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+3 -3
View File
@@ -2,9 +2,9 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "fullname" . }}
name: {{ template "kube-ops-view.fullname" . }}
labels:
app: {{ template "fullname" . }}
app: {{ template "kube-ops-view.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
@@ -19,7 +19,7 @@ spec:
paths:
- path: /
backend:
serviceName: {{ template "fullname" . }}
serviceName: {{ template "kube-ops-view.fullname" . }}
servicePort: {{ .Values.service.externalPort }}
{{- if .Values.ingress.tls }}
tls:
+2 -2
View File
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "fullname" . }}
name: {{ template "kube-ops-view.fullname" . }}
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
@@ -18,4 +18,4 @@ spec:
targetPort: {{ .Values.service.internalPort }}
protocol: TCP
selector:
app: {{ template "fullname" . }}
app: {{ template "kube-ops-view.fullname" . }}
@@ -3,9 +3,9 @@ apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: {{ template "name" . }}
app: {{ template "kube-ops-view.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "fullname" . }}
name: {{ template "kube-ops-view.fullname" . }}
{{- end -}}