-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add stash-metrics chart Signed-off-by: Tamal Saha <[email protected]> * Update metricsconfig-backupconfiguration.yaml Signed-off-by: Tamal Saha <[email protected]> Co-authored-by: Emruz Hossain <[email protected]>
- Loading branch information
Showing
17 changed files
with
658 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Get the KubeDB crds by running the following command: | ||
Get the Stash crds by running the following command: | ||
|
||
kubectl get crds --selector=app.kubernetes.io/name=stash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 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 | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v2 | ||
name: stash-metrics | ||
description: Stash State Metrics | ||
type: application | ||
version: v2021.08.02 | ||
appVersion: v2021.08.02 | ||
home: https://stash.run | ||
icon: https://cdn.appscode.com/images/products/stash/stash-community-icon.png | ||
sources: | ||
- https://github.com/stashed | ||
maintainers: | ||
- name: appscode | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Stash Metrics | ||
|
||
[Stash Metrics](https://github.com/stashed) - Stash State Metrics | ||
|
||
## TL;DR; | ||
|
||
```console | ||
$ helm repo add appscode https://charts.appscode.com/stable/ | ||
$ helm repo update | ||
$ helm install stash-metrics appscode/stash-metrics -n kube-system | ||
``` | ||
|
||
## Introduction | ||
|
||
This chart deploys Stash metrics configurations on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.16+ | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `stash-metrics`: | ||
|
||
```console | ||
$ helm install stash-metrics appscode/stash-metrics -n kube-system | ||
``` | ||
|
||
The command deploys Stash metrics configurations on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. | ||
|
||
> **Tip**: List all releases using `helm list` | ||
## Uninstalling the Chart | ||
|
||
To uninstall/delete the `stash-metrics`: | ||
|
||
```console | ||
$ helm delete stash-metrics -n kube-system | ||
``` | ||
|
||
The command removes all the Kubernetes components associated with the chart and deletes the release. | ||
|
||
|
338 changes: 338 additions & 0 deletions
338
charts/stash-metrics/crds/metrics.appscode.com_metricsconfigurations.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
project: | ||
name: Stash Metrics | ||
shortName: Stash Metrics | ||
url: https://github.com/stashed | ||
description: Stash State Metrics | ||
app: Stash metrics configurations | ||
repository: | ||
url: https://charts.appscode.com/stable/ | ||
name: appscode | ||
chart: | ||
name: stash-metrics | ||
values: -- generate from values file -- | ||
valuesExample: -- generate from values file -- | ||
prerequisites: | ||
- Kubernetes 1.16+ | ||
release: | ||
name: stash-metrics | ||
namespace: kube-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Get the Stash crds by running the following command: | ||
|
||
kubectl get crds --selector=app.kubernetes.io/name=stash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: appscode:metrics:edit | ||
labels: | ||
rbac.authorization.k8s.io/aggregate-to-admin: "true" | ||
rbac.authorization.k8s.io/aggregate-to-edit: "true" | ||
annotations: | ||
"helm.sh/hook": pre-install,pre-upgrade | ||
"helm.sh/hook-delete-policy": before-hook-creation | ||
rules: | ||
- apiGroups: | ||
- metrics.appscode.com | ||
resources: | ||
- "*" | ||
verbs: ["*"] | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: appscode:metrics:view | ||
labels: | ||
rbac.authorization.k8s.io/aggregate-to-view: "true" | ||
annotations: | ||
"helm.sh/hook": pre-install,pre-upgrade | ||
"helm.sh/hook-delete-policy": before-hook-creation | ||
rules: | ||
- apiGroups: | ||
- metrics.appscode.com | ||
resources: | ||
- "*" | ||
verbs: ["get", "list", "watch"] |
56 changes: 56 additions & 0 deletions
56
charts/stash-metrics/templates/metricsconfig-backupconfiguration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
apiVersion: metrics.appscode.com/v1alpha1 | ||
kind: MetricsConfiguration | ||
metadata: | ||
name: stash-appscode-com-backupconfiguration | ||
spec: | ||
targetRef: | ||
apiVersion: stash.appscode.com/v1beta1 | ||
kind: BackupConfiguration | ||
metrics: | ||
- name: stash_backupconfiguration_created | ||
help: "Unix creation timestamp of this BackupConfiguration object" | ||
type: gauge | ||
field: | ||
path: .metadata.creationTimestamp | ||
type: DateTime | ||
metricValue: | ||
valueFromPath: .metadata.creationTimestamp | ||
- name: stash_backupconfiguration_info | ||
help: "General information about this BackupConfiguration" | ||
type: gauge | ||
labels: | ||
- key: driver | ||
valuePath: .spec.driver | ||
- key: repository | ||
valuePath: .spec.repository.name | ||
- key: schedule | ||
valuePath: .spec.schedule | ||
- key: target_api_version | ||
valuePath: .spec.target.ref.apiVersion | ||
- key: target_kind | ||
valuePath: .spec.target.ref.kind | ||
- key: target_name | ||
valuePath: .spec.target.ref.name | ||
- key: invoker_kind | ||
value: "BackupConfiguration" | ||
- key: invoker_name | ||
valuePath: .metadata.name | ||
metricValue: | ||
value: 1 | ||
- name: stash_backupconfiguration_conditions | ||
help: "Current conditions of this BackupConfiguration" | ||
type: gauge | ||
field: | ||
path: .status.conditions | ||
type: Array | ||
labels: | ||
- key: invoker_kind | ||
value: "BackupConfiguration" | ||
- key: invoker_name | ||
valuePath: .metadata.name | ||
- key: condition | ||
valuePath: .status.conditions[*].type | ||
- key: status | ||
valuePath: .status.conditions[*].status | ||
metricValue: | ||
value: 1 |
38 changes: 38 additions & 0 deletions
38
charts/stash-metrics/templates/metricsconfig-backupsession.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: metrics.appscode.com/v1alpha1 | ||
kind: MetricsConfiguration | ||
metadata: | ||
name: stash-appscode-com-backupsession | ||
spec: | ||
targetRef: | ||
apiVersion: stash.appscode.com/v1beta1 | ||
kind: BackupSession | ||
metrics: | ||
- name: stash_backupsession_created | ||
help: "Unix creation timestamp of this BackupSession" | ||
type: gauge | ||
field: | ||
path: .metadata.creationTimestamp | ||
type: DateTime | ||
labels: | ||
- key: invoker_api_group | ||
valuePath: .spec.invoker.apiGroup | ||
- key: invoker_kind | ||
valuePath: .spec.invoker.kind | ||
- key: invoker_name | ||
valuePath: .spec.invoker.name | ||
metricValue: | ||
valueFromPath: .metadata.creationTimestamp | ||
- name: stash_backupsession_info | ||
help: "General information about BackupSession" | ||
type: gauge | ||
labels: | ||
- key: invoker_api_group | ||
valuePath: .spec.invoker.apiGroup | ||
- key: invoker_kind | ||
valuePath: .spec.invoker.kind | ||
- key: invoker_name | ||
valuePath: .spec.invoker.name | ||
- key: phase | ||
valuePath: .status.phase | ||
metricValue: | ||
value: 1 |
17 changes: 17 additions & 0 deletions
17
charts/stash-metrics/templates/metricsconfig-repository.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: metrics.appscode.com/v1alpha1 | ||
kind: MetricsConfiguration | ||
metadata: | ||
name: stash-appscode-com-repository | ||
spec: | ||
targetRef: | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metrics: | ||
- name: stash_repository_created | ||
help: "Unix creation timestamp of this Repository" | ||
type: gauge | ||
field: | ||
path: .metadata.creationTimestamp | ||
type: DateTime | ||
metricValue: | ||
valueFromPath: .metadata.creationTimestamp |
44 changes: 44 additions & 0 deletions
44
charts/stash-metrics/templates/metricsconfig-restoresession.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
apiVersion: metrics.appscode.com/v1alpha1 | ||
kind: MetricsConfiguration | ||
metadata: | ||
name: stash-appscode-com-restoresession | ||
spec: | ||
targetRef: | ||
apiVersion: stash.appscode.com/v1beta1 | ||
kind: RestoreSession | ||
metrics: | ||
- name: stash_restoresession_created | ||
help: "Unix creation timestamp of this RestoreSession object" | ||
type: gauge | ||
field: | ||
path: .metadata.creationTimestamp | ||
type: DateTime | ||
labels: | ||
- key: invoker_kind | ||
value: "RestoreSession" | ||
- key: invoker_name | ||
valuePath: .metadata.name | ||
metricValue: | ||
valueFromPath: .metadata.creationTimestamp | ||
- name: stash_restoresession_info | ||
help: "General information about this RestoreSession" | ||
type: gauge | ||
labels: | ||
- key: driver | ||
valuePath: .spec.driver | ||
- key: repository | ||
valuePath: .spec.repository.name | ||
- key: target_api_version | ||
valuePath: .spec.target.ref.apiVersion | ||
- key: target_kind | ||
valuePath: .spec.target.ref.kind | ||
- key: target_name | ||
valuePath: .spec.target.ref.name | ||
- key: invoker_kind | ||
value: "RestoreSession" | ||
- key: invoker_name | ||
valuePath: .metadata.name | ||
- key: phase | ||
valuePath: .status.phase | ||
metricValue: | ||
value: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Default values for stash-metrics. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters