This commit is contained in:
ducoterra
2020-07-17 23:10:37 -04:00
parent 0138309f93
commit b07d544b8c
7 changed files with 61 additions and 13 deletions

23
helm/.helmignore Normal file
View File

@@ -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/

23
helm/Chart.yaml Normal file
View File

@@ -0,0 +1,23 @@
apiVersion: v2
name: helm
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 1.16.0

View File

@@ -6,14 +6,14 @@ spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
app: grafana app: {{ .Release.Name }}
template: template:
metadata: metadata:
labels: labels:
app: grafana app: {{ .Release.Name }}
spec: spec:
containers: containers:
- name: grafana - name: {{ .Release.Name }}
image: grafana/grafana:7.0.1 image: grafana/grafana:7.0.1
resources: resources:
requests: requests:
@@ -26,8 +26,8 @@ spec:
- containerPort: 3000 - containerPort: 3000
volumeMounts: volumeMounts:
- mountPath: /var/lib/grafana - mountPath: /var/lib/grafana
name: grafana-data name: data
volumes: volumes:
- name: grafana-data - name: data
persistentVolumeClaim: persistentVolumeClaim:
claimName: grafana-data claimName: {{ .Release.Name }}

View File

@@ -1,7 +1,7 @@
apiVersion: traefik.containo.us/v1alpha1 apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute kind: IngressRoute
metadata: metadata:
name: grafana-internal-tls name: {{ .Release.Name }}-internal-tls
annotations: annotations:
kubernetes.io/ingress.class: traefik-internal kubernetes.io/ingress.class: traefik-internal
spec: spec:
@@ -15,7 +15,7 @@ spec:
- match: Host(`grafana.ducoterra.net`) - match: Host(`grafana.ducoterra.net`)
kind: Rule kind: Rule
services: services:
- name: grafana-web - name: {{ .Release.Name }}
port: 3000 port: 3000
--- ---
@@ -23,7 +23,7 @@ spec:
apiVersion: traefik.containo.us/v1alpha1 apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute kind: IngressRoute
metadata: metadata:
name: grafana-internal-web name: {{ .Release.Name }}-internal-web
annotations: annotations:
kubernetes.io/ingress.class: traefik-internal kubernetes.io/ingress.class: traefik-internal
spec: spec:
@@ -33,7 +33,7 @@ spec:
- match: Host(`grafana.ducoterra.net`) - match: Host(`grafana.ducoterra.net`)
kind: Rule kind: Rule
services: services:
- name: grafana-web - name: {{ .Release.Name }}
port: 3000 port: 3000
middlewares: middlewares:
- name: httpsredirect - name: httpsredirect

View File

@@ -1,7 +1,9 @@
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: grafana-data name: {{ .Release.Name }}
annotations:
"helm.sh/resource-policy": keep
spec: spec:
storageClassName: hdd storageClassName: hdd
accessModes: accessModes:

View File

@@ -1,10 +1,10 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: grafana-web name: {{ .Release.Name }}
spec: spec:
selector: selector:
app: grafana app: {{ .Release.Name }}
ports: ports:
- port: 3000 - port: 3000
targetPort: 3000 targetPort: 3000

0
helm/values.yaml Normal file
View File