Skip to content

Commit

Permalink
ADD pincer anubis deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
wabscale committed Mar 18, 2024
1 parent d3b2907 commit 3355091
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 0 deletions.
28 changes: 28 additions & 0 deletions k8s/chart/templates/ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,34 @@ spec:
{{- end }}
---

# pincer Ingress Route /*
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: ingress.route.anubis.pincer-web
labels:
{{- include "chart.labels" . | nindent 4 }}
component: pincer-web
spec:
{{- if .Values.debug }}
entryPoints:
- web
{{- else }}
entryPoints:
- websecure
{{- end }}
routes:
- kind: Rule
match: Host(`{{ .Values.pincer.domain }}`)
services:
- name: {{ include "chart.fullname" . }}-pincer-web
port: 8000
{{- if not .Values.debug }}
tls:
certResolver: le
{{- end }}
---

# Public Ingress Route /*
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
Expand Down
88 changes: 88 additions & 0 deletions k8s/chart/templates/pincer-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{{- if .Values.pincer.enable }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "chart.fullname" . }}-pincer-web
labels:
{{- include "chart.labels" . | nindent 4 }}
component: pincer-web
spec:
selector:
matchLabels:
{{- include "chart.selectorLabels" . | nindent 6 }}
component: pincer-web
replicas: {{- if not .Values.offSemester }} {{ .Values.pincer.replicas }}{{- else }} 1{{- end }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- if .Values.rollingUpdates }}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
{{- end }}
template:
metadata:
labels:
{{- include "chart.selectorLabels" . | nindent 8 }}
component: pincer-web
spec:
{{- if and .Values.nodeSelector (not .Values.debug) }}
nodeSelector:
{{ .Values.nodeSelector | toYaml }}
{{- end }}
dnsPolicy: ClusterFirst
containers:
- name: web
image: "{{ .Values.pincer.image }}:latest"
imagePullPolicy: {{ .Values.imagePullPolicy }}
resources:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 2000m
memory: 500Mi
ports:
- name: web
containerPort: 3000
{{- if .Values.healthChecks }}
startupProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 1
periodSeconds: 1
failureThreshold: 60
livenessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 60
failureThreshold: 10
periodSeconds: 60
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 3
periodSeconds: 3
failureThreshold: 1
{{- end }}

---
apiVersion: v1
kind: Service
metadata:
name: {{ include "chart.fullname" . }}-pincer-web
labels:
{{- include "chart.labels" . | nindent 4 }}
component: pincer-web
spec:
selector:
{{- include "chart.selectorLabels" . | nindent 4 }}
component: pincer-web
ports:
- name: web
port: 8000
targetPort: 8000
{{- end }}
7 changes: 7 additions & 0 deletions k8s/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ marketing:
tag: "latest"
replicas: 1

pincer:
enable: true
domain: "pincer.anubis-lms.io"
image: "registry.digitalocean.com/anubis/pincer"
tag: "latest"
replicas: 1

cli_docs:
enable: true
image: "registry.digitalocean.com/anubis/docs"
Expand Down

0 comments on commit 3355091

Please sign in to comment.