Skip to content

Commit

Permalink
Pyrometer (#351)
Browse files Browse the repository at this point in the history
* add basic (working) pyrometer chart

* add yaml config

* change port to 80

* service nodeport

* add README

* add helmignore

* bounce pod when configmap changes (fix teztnets dailynet deployment)
  • Loading branch information
nicolasochem authored Jan 20, 2022
1 parent 8c0b449 commit 777f471
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/pyrometer/.helmignore
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/
7 changes: 7 additions & 0 deletions charts/pyrometer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v2
name: pyrometer
description: Deploys pyrometer Tezos monitoring solution

type: application
version: 0.1.0
appVersion: "1.16.0"
3 changes: 3 additions & 0 deletions charts/pyrometer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Pyrometer chart

A chart to deploy the [pyrometer](https://gitlab.com/tezos-kiln/pyrometer) Tezos monitoring tool.
8 changes: 8 additions & 0 deletions charts/pyrometer/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
data:
config.json: |
{{ .Values.config | mustToPrettyJson | indent 4 }}
kind: ConfigMap
metadata:
name: pyrometer-config
namespace: {{ .Release.Namespace }}
36 changes: 36 additions & 0 deletions charts/pyrometer/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: pyrometer
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
app: pyrometer
template:
metadata:
labels:
app: pyrometer
annotations:
# ensure that the pod bounces each time configmap changes
# https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
spec:
containers:
- name: pyrometer
image: {{ .Values.images.pyrometer }}
args:
- run
- -c
- '/config/config.json'
ports:
- name: http
containerPort: 80
protocol: TCP
volumeMounts:
- name: config-volume
mountPath: /config/
volumes:
- name: config-volume
configMap:
name: pyrometer-config
14 changes: 14 additions & 0 deletions charts/pyrometer/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: pyrometer
namespace: {{ .Release.Namespace }}
spec:
type: NodePort
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app: pyrometer
4 changes: 4 additions & 0 deletions charts/pyrometer/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Pass below the pyrometer config, in yaml format (will be converted to toml)
config: {}
images:
pyrometer: registry.gitlab.com/tezos-kiln/pyrometer:latest

0 comments on commit 777f471

Please sign in to comment.