Skip to content

Commit

Permalink
initial chart for statping (some bugs)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurt108 committed Jul 24, 2021
1 parent cfb362f commit e3ddeed
Show file tree
Hide file tree
Showing 11 changed files with 272 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/statping/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts/.*
21 changes: 21 additions & 0 deletions charts/statping/.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
12 changes: 12 additions & 0 deletions charts/statping/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
name: statping
icon: https://camo.githubusercontent.com/adc90af589fd69235a49fc1e71eb55d6a9a9890c786ebcd578d1ac04fe8a884f/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f676974696d67732f7374617470696e672e706e67
version: 0.0.1
appVersion: "v.0.90.74"
description: A chart containing statping
home: https://github.com/statping/statping
sources:
- https://github.com/statping/statping
maintainers:
- name: kurt108
deprecated: false
37 changes: 37 additions & 0 deletions charts/statping/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kurt108)](https://artifacthub.io/packages/search?repo=kurt108)

# statping

A chart containing statping

0.0.1

Installing the Chart

```console
$ helm repo add kurt108 https://kurt108.github.io/helm-charts
"kurt108" has been added to your repositories
$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "kurt108" chart repository
...
Update Complete. ⎈ Happy Helming!⎈
$ helm install my-release kurt108/statping
NAME: my-release
...
```

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"statping/statping"` | |
| image.tag | string | `"v0.90.74"` | |
| ingress.annotations | object | `{}` | |
| ingress.hosts[0] | string | `"statping.domain"` | |
| ingress.path | string | `"/"` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| service.name | string | `"statping"` | |
| service.type | string | `"ClusterIP"` | |
29 changes: 29 additions & 0 deletions charts/statping/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kurt108)](https://artifacthub.io/packages/search?repo=kurt108)


{{ template "chart.header" . }}
{{ template "chart.description" . }}


{{ template "chart.version" . }}



Installing the Chart

```console
$ helm repo add kurt108 https://kurt108.github.io/helm-charts
"kurt108" has been added to your repositories
$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "kurt108" chart repository
...
Update Complete. ⎈ Happy Helming!⎈
$ helm install my-release kurt108/statping
NAME: my-release
...
```

{{ template "chart.requirementsSection" . }}

{{- template "chart.valuesSection" . -}}
Empty file.
32 changes: 32 additions & 0 deletions charts/statping/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "statping.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "statping.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "statping.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

38 changes: 38 additions & 0 deletions charts/statping/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "statping.fullname" . }}
labels:
chart: {{ template "statping.name" . }}
app: {{ template "statping.name" . }}
chart: {{ template "statping.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "statping.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "statping.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8080
env:
{{- range $name, $value := .Values.env.open }}
{{- if not (empty $value) }}
- name: {{ $name | quote }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
49 changes: 49 additions & 0 deletions charts/statping/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{{- $fullName := include "statping.fullname" . -}}
{{- $servicePath := .Values.ingress.path -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" }}
apiVersion: networking.k8s.io/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
{{- if .Values.ingress.annotations }}
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
{{- end }}
labels:
app: {{ template "statping.name" . }}
chart: {{ template "statping.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- if .labels }}
{{ toYaml .labels | indent 4 }}
{{- end }}
spec:
rules:
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
{{- range $host := .Values.ingress.hosts }}
- host: {{ $host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ $fullName }}
port:
number: 8080
{{- end }}
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" }}
{{- range $host := .Values.ingress.hosts }}
- host: {{ $host }}
http:
paths:
- path: /
backend:
serviceName: {{ $fullName }}
servicePort: 8080
{{- end }}
{{- end }}

18 changes: 18 additions & 0 deletions charts/statping/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "statping.fullname" . }}
labels:
app: {{ template "statping.name" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: 8080
targetPort: 8080
protocol: TCP
name: {{ .Values.service.name }}
selector:
app: {{ template "statping.name" . }}
release: {{ .Release.Name }}
35 changes: 35 additions & 0 deletions charts/statping/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
replicaCount: 1

env:
open:
VIRTUAL_HOST: localhost
VIRTUAL_PORT: 8080
DB_HOST: postgres
DB_USER: statup
DB_PASS: password123
DB_DATABASE: statup
NAME: STATPING
DESCRIPTION: This is a Statping instance

ingress:
enabled: true
hosts:
- "statping.domain"
# Use this if you are using Traefik as your ingress-router
# path: "/scale"
# Use this if you are using nginx as your ingress-router
path: "/"
annotations: {}

image:
repository: statping/statping
tag: v0.90.74
pullPolicy: IfNotPresent

service:
name: statping
type: ClusterIP


resources: {}

0 comments on commit e3ddeed

Please sign in to comment.