Skip to content

Commit

Permalink
Add helmchart
Browse files Browse the repository at this point in the history
  • Loading branch information
sharph committed Jan 21, 2024
1 parent 65a1bb7 commit 544bf41
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
name: solareclipsecountdown
type: application
version: 0.1.0
appVersion: "0.1.0"
23 changes: 23 additions & 0 deletions helm/templates/cert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: solareclipsecountdown-cert
spec:
commonName: "{{ .Values.domain }}"
dnsNames:
- "{{ .Values.domain }}"
issuerRef:
kind: ClusterIssuer
name: letsencrypt-production
privateKey:
algorithm: RSA
encoding: PKCS1
size: 2048
duration: 2160h0m0s
renewBefore: 360h0m0s
secretName: solareclipsecountdown-cert
subject:
organizations:
- sharphall
usages:
- server auth
32 changes: 32 additions & 0 deletions helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: solareclipsecountdown
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`{{ .Values.domain }}`)
services:
- name: solareclipsecountdown
port: 3000
tls:
secretName: solareclipsecountdown-cert
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: solareclipsecountdown-redirect
spec:
entryPoints:
- web
routes:
- kind: Rule
match: Host(`{{ .Values.domain }}`)
middlewares:
- name: https-redirect
namespace: traefik
services:
- kind: TraefikService
name: noop@internal
68 changes: 68 additions & 0 deletions helm/templates/node.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: solareclipsecountdown
spec:
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app: solareclipsecountdown
template:
metadata:
labels:
app: solareclipsecountdown
spec:
imagePullSecrets:
- name: gh-sharph
containers:
- image: 'ghcr.io/sharph/solareclipsecountdown:{{ .Values.image.tag }}'
name: solareclipsecountdown
ports:
- containerPort: 3000
name: http
protocol: TCP
resources:
limits:
memory: 512Mi
cpu: 250m
startupProbe:
httpGet:
path: /api/cities-with-solar-eclipse
port: 3000
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 10
livenessProbe:
httpGet:
path: /api/cities-with-solar-eclipse
port: 3000
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 10
readinessProbe:
httpGet:
path: /api/cities-with-solar-eclipse
port: 3000
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 10
---
apiVersion: v1
kind: Service
metadata:
name: solareclipsecountdown
spec:
ports:
- port: 3000
protocol: TCP
targetPort: 3000
selector:
app: solareclipsecountdown
3 changes: 3 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
image:
tag: latest
domain: eclipsecountdown.solar

0 comments on commit 544bf41

Please sign in to comment.