Skip to content

Commit

Permalink
[NEW] Kubernetes Operational View (helm#398)
Browse files Browse the repository at this point in the history
* initial setup of Kubernetes Operational View Chart

* fix service port

* remove trailing newline

* update name truncation to 63 chars
  • Loading branch information
hjacobs authored and lachie83 committed Jan 20, 2017
1 parent 7a2f100 commit 20990f6
Show file tree
Hide file tree
Showing 8 changed files with 153 additions and 0 deletions.
21 changes: 21 additions & 0 deletions incubator/kube-ops-view/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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
13 changes: 13 additions & 0 deletions incubator/kube-ops-view/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: kube-ops-view
version: 0.1.0
description: Kubernetes Operational View - read-only system dashboard for multiple K8s clusters
keywords:
- kubernetes
- dashboard
- operations
home: https://github.com/hjacobs/kube-ops-view
sources:
- https://github.com/hjacobs/kube-ops-view
maintainers:
- name: Henning Jacobs
email: henning@jacobs1.de
31 changes: 31 additions & 0 deletions incubator/kube-ops-view/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Kubernetes Operational View Helm Chart

[Kubernetes Operational View](https://github.com/hjacobs/kube-ops-view) provides a read-only system dashboard for multiple K8s clusters

## Installing the Chart

To install the chart with the release name my-release:

```console
$ helm install --name=my-release incubator/kube-ops-view
```

The command deploys Kubernetes Operational View on the Kubernetes cluster in the default configuration.

## Accessing the UI

```console
$ kubectl proxy
```

Assuming you used `my-release` for installation, you can now access the UI in your browser by opening http://localhost:8001/api/v1/proxy/namespaces/default/services/my-release-kube-ops-view/

## Uninstalling the Chart

To uninstall/delete the my-release deployment:

```console
$ helm delete my-release
```

The command removes all the Kubernetes components associated with the chart and deletes the release.
11 changes: 11 additions & 0 deletions incubator/kube-ops-view/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
To access the Kubernetes Operational View UI:

1. First start the kubectl proxy:

kubectl proxy

2. Now open the following URL in your browser:

http://localhost:8001/api/v1/proxy/namespaces/{{ .Release.Namespace }}/services/{{ template "fullname" . }}/

Please try reloading the page if you see "ServiceUnavailable / no endpoints available for service", pod creation might take a moment.
16 changes: 16 additions & 0 deletions incubator/kube-ops-view/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "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).
*/}}
{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
29 changes: 29 additions & 0 deletions incubator/kube-ops-view/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
replicas: {{ .Values.replicaCount }}
template:
metadata:
labels:
app: {{ template "fullname" . }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.service.internalPort }}
livenessProbe:
httpGet:
path: /health
port: {{ .Values.service.internalPort }}
readinessProbe:
httpGet:
path: /health
port: {{ .Values.service.internalPort }}
resources:
{{ toYaml .Values.resources | indent 12 }}
14 changes: 14 additions & 0 deletions incubator/kube-ops-view/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
protocol: TCP
selector:
app: {{ template "fullname" . }}
18 changes: 18 additions & 0 deletions incubator/kube-ops-view/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: hjacobs/kube-ops-view
tag: latest
pullPolicy: IfNotPresent
service:
type: ClusterIP
externalPort: 80
internalPort: 8080
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 80m
memory: 64Mi

0 comments on commit 20990f6

Please sign in to comment.