Skip to content

Commit 3f07f11

Browse files
authored
Add Grafana Dashboards (#218)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 4dd8553 commit 3f07f11

25 files changed

+3540
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ _testmain.go
3535
/.go
3636
/.crds
3737
/charts/stash/charts
38+
/charts/stash-opscenter/charts

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ ct: $(BUILD_DIRS)
376376
-v $$(pwd)/.go/bin/$(OS)_$(ARCH):/go/bin \
377377
-v $$(pwd)/.go/bin/$(OS)_$(ARCH):/go/bin/$(OS)_$(ARCH) \
378378
-v $$(pwd)/.go/cache:/.cache \
379+
-v $$(which helm):/usr/local/bin/helm \
379380
--env HTTP_PROXY=$(HTTP_PROXY) \
380381
--env HTTPS_PROXY=$(HTTPS_PROXY) \
381382
--env KUBECONFIG=$(subst $(HOME),,$(KUBECONFIG)) \
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v2
2+
name: stash-grafana-dashboards
3+
description: A Helm chart for stash-grafana-dashboards by AppsCode
4+
type: application
5+
version: v2021.11.24
6+
appVersion: v2021.11.24
7+
home: https://github.com/stashed
8+
icon: https://cdn.appscode.com/images/products/stash/stash-icon.png
9+
sources:
10+
- https://github.com/stashed/installer
11+
maintainers:
12+
- name: appscode
13+
email: support@appscode.com
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Stash Grafana Dashboards
2+
3+
[Stash Grafana Dashboards by AppsCode](https://github.com/stashed/installer) - Stash Grafana Dashboards for ByteBuilders
4+
5+
## TL;DR;
6+
7+
```console
8+
$ helm repo add appscode https://charts.appscode.com/stable/
9+
$ helm repo update
10+
$ helm install stash-grafana-dashboards appscode/stash-grafana-dashboards -n kubeops
11+
```
12+
13+
## Introduction
14+
15+
This chart deploys a Stash Grafana Dashboards on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
16+
17+
## Prerequisites
18+
19+
- Kubernetes 1.16+
20+
21+
## Installing the Chart
22+
23+
To install the chart with the release name `stash-grafana-dashboards`:
24+
25+
```console
26+
$ helm install stash-grafana-dashboards appscode/stash-grafana-dashboards -n kubeops
27+
```
28+
29+
The command deploys a Stash Grafana Dashboards on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
30+
31+
> **Tip**: List all releases using `helm list`
32+
33+
## Uninstalling the Chart
34+
35+
To uninstall/delete the `stash-grafana-dashboards`:
36+
37+
```console
38+
$ helm delete stash-grafana-dashboards -n kubeops
39+
```
40+
41+
The command removes all the Kubernetes components associated with the chart and deletes the release.
42+
43+
## Configuration
44+
45+
The following table lists the configurable parameters of the `stash-grafana-dashboards` chart and their default values.
46+
47+
| Parameter | Description | Default |
48+
|---------------------------------|---------------------------------------------------------------|-------------|
49+
| nameOverride | Overrides name template | `""` |
50+
| fullnameOverride | Overrides fullname template | `""` |
51+
| resources | List of resources for which dashboards will be applied | `["stash"]` |
52+
| dashboard.folderID | ID of Grafana folder where these dashboards will be applied | `0` |
53+
| dashboard.overwrite | If true, dashboard with matching uid will be overwritten | `true` |
54+
| dashboard.templatize.title | If true, datasource will be prefixed to dashboard name | `false` |
55+
| dashboard.templatize.datasource | If true, datasource will be hardcoded in the dashboard | `true` |
56+
| grafana.name | Name of Grafana Appbinding where these dashboards are applied | `""` |
57+
58+
59+
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:
60+
61+
```console
62+
$ helm install stash-grafana-dashboards appscode/stash-grafana-dashboards -n kubeops --set resources=["stash"]
63+
```
64+
65+
Alternatively, a YAML file that specifies the values for the parameters can be provided while
66+
installing the chart. For example:
67+
68+
```console
69+
$ helm install stash-grafana-dashboards appscode/stash-grafana-dashboards -n kubeops --values values.yaml
70+
```
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
grafana:
2+
name: "grafana-appbinding"
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
creationTimestamp: null
5+
labels:
6+
app.kubernetes.io/name: openviz
7+
name: grafanadashboards.openviz.dev
8+
spec:
9+
group: openviz.dev
10+
names:
11+
categories:
12+
- grafana
13+
- openviz
14+
- appscode
15+
kind: GrafanaDashboard
16+
listKind: GrafanaDashboardList
17+
plural: grafanadashboards
18+
singular: grafanadashboard
19+
scope: Namespaced
20+
versions:
21+
- additionalPrinterColumns:
22+
- jsonPath: .status.phase
23+
name: Status
24+
type: string
25+
- jsonPath: .metadata.creationTimestamp
26+
name: Age
27+
type: date
28+
name: v1alpha1
29+
schema:
30+
openAPIV3Schema:
31+
properties:
32+
apiVersion:
33+
description: 'APIVersion defines the versioned schema of this representation
34+
of an object. Servers should convert recognized schemas to the latest
35+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
36+
type: string
37+
kind:
38+
description: 'Kind is a string value representing the REST resource this
39+
object represents. Servers may infer this from the endpoint the client
40+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
41+
type: string
42+
metadata:
43+
properties:
44+
name:
45+
maxLength: 63
46+
pattern: ^[a-z]([-a-z0-9]*[a-z0-9])?$
47+
type: string
48+
type: object
49+
spec:
50+
properties:
51+
folderID:
52+
description: FolderID defines the Grafana folderID
53+
format: int64
54+
type: integer
55+
grafana:
56+
description: Grafana defines the grafana app binding name for the
57+
GrafanaDashboard
58+
properties:
59+
apiGroup:
60+
type: string
61+
kind:
62+
type: string
63+
name:
64+
type: string
65+
type: object
66+
model:
67+
type: object
68+
x-kubernetes-preserve-unknown-fields: true
69+
overwrite:
70+
description: Overwrite defines the existing grafanadashboard with
71+
the same name(if any) should be overwritten or not
72+
type: boolean
73+
templatize:
74+
description: Templatize defines the fields which supports templating
75+
in Grafana GrafanaDashboard Model json
76+
properties:
77+
datasource:
78+
type: boolean
79+
title:
80+
type: boolean
81+
type: object
82+
type: object
83+
status:
84+
properties:
85+
conditions:
86+
description: Represents the latest available observations of a GrafanaDashboard
87+
current state.
88+
items:
89+
properties:
90+
lastTransitionTime:
91+
description: Last time the condition transitioned from one status
92+
to another. This should be when the underlying condition changed. If
93+
that is not known, then using the time when the API field
94+
changed is acceptable.
95+
format: date-time
96+
type: string
97+
message:
98+
description: A human readable message indicating details about
99+
the transition. This field may be empty.
100+
type: string
101+
observedGeneration:
102+
description: If set, this represents the .metadata.generation
103+
that the condition was set based upon. For instance, if .metadata.generation
104+
is currently 12, but the .status.condition[x].observedGeneration
105+
is 9, the condition is out of date with respect to the current
106+
state of the instance.
107+
format: int64
108+
type: integer
109+
reason:
110+
description: The reason for the condition's last transition
111+
in CamelCase. The specific API may choose whether or not this
112+
field is considered a guaranteed API. This field may not be
113+
empty.
114+
type: string
115+
status:
116+
description: Status of the condition, one of True, False, Unknown.
117+
type: string
118+
type:
119+
description: Type of condition in CamelCase or in foo.example.com/CamelCase.
120+
Many .condition.type values are consistent across resources
121+
like Available, but because arbitrary conditions can be useful
122+
(see .node.status.conditions), the ability to deconflict is
123+
important.
124+
type: string
125+
required:
126+
- lastTransitionTime
127+
- message
128+
- reason
129+
- status
130+
- type
131+
type: object
132+
type: array
133+
dashboard:
134+
description: Dashboard indicates the updated grafanadashboard database
135+
properties:
136+
id:
137+
format: int64
138+
type: integer
139+
orgID:
140+
format: int64
141+
type: integer
142+
slug:
143+
type: string
144+
uid:
145+
type: string
146+
url:
147+
type: string
148+
version:
149+
format: int64
150+
type: integer
151+
type: object
152+
observedGeneration:
153+
description: ObservedGeneration is the most recent generation observed
154+
for this resource. It corresponds to the resource's generation,
155+
which is updated on mutation by the API Server.
156+
format: int64
157+
type: integer
158+
phase:
159+
description: Phase indicates the state this Vault cluster jumps in.
160+
type: string
161+
reason:
162+
description: The reason for the current phase
163+
type: string
164+
type: object
165+
type: object
166+
served: true
167+
storage: true
168+
subresources:
169+
status: {}

0 commit comments

Comments
 (0)