Skip to content

Commit

Permalink
foo
Browse files Browse the repository at this point in the history
  • Loading branch information
dadav committed Jul 1, 2024
1 parent 7ae21f8 commit 78cbc09
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 399 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ nfpms:
contents:
- src: gorge.service
dst: /usr/lib/systemd/system/gorge.service
- src: gorge.yaml
- src: defaults.yaml
dst: /etc/gorge.yaml
type: "config|noreplace"

Expand Down
12 changes: 12 additions & 0 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,18 @@ You can also enable the caching functionality to speed things up.`,

r.Mount("/", apiRouter)

r.Get("/readyz", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(200)
w.Write([]byte(`{"message": "ok"}`))
})

r.Get("/livez", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(200)
w.Write([]byte(`{"message": "ok"}`))
})

bindPort := fmt.Sprintf("%s:%d", config.Bind, config.Port)
log.Log.Infof("Listen on %s", bindPort)

Expand Down
File renamed without changes.
22 changes: 0 additions & 22 deletions helm/gorge/templates/NOTES.txt

This file was deleted.

62 changes: 0 additions & 62 deletions helm/gorge/templates/_helpers.tpl

This file was deleted.

42 changes: 20 additions & 22 deletions helm/gorge/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,59 +1,57 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "gorge.fullname" . }}
labels:
{{- include "gorge.labels" . | nindent 4 }}
name: gorge
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "gorge.selectorLabels" . | nindent 6 }}
app: gorge
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "gorge.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
app: gorge
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "gorge.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: GORGE_MODULESDIR
value: /modules
ports:
- name: http
containerPort: {{ .Values.service.port }}
containerPort: 8080
protocol: TCP
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
httpGet:
path: /livez
port: http
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
httpGet:
path: /readyz
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumes }}
- mountPath: /modules
name: modules
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
- name: modules
persistentVolumeClaim:
claimName: gorge
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
32 changes: 0 additions & 32 deletions helm/gorge/templates/hpa.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions helm/gorge/templates/ingress.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions helm/gorge/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gorge
spec:
storageClassName: {{ .Values.storageClass }}
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
10 changes: 4 additions & 6 deletions helm/gorge/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "gorge.fullname" . }}
labels:
{{- include "gorge.labels" . | nindent 4 }}
name: gorge
spec:
type: {{ .Values.service.type }}
type: ClusterIP
ports:
- port: {{ .Values.service.port }}
- port: http
targetPort: http
protocol: TCP
name: http
selector:
{{- include "gorge.selectorLabels" . | nindent 4 }}
app: gorge
2 changes: 0 additions & 2 deletions helm/gorge/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "gorge.serviceAccountName" . }}
labels:
{{- include "gorge.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
15 changes: 0 additions & 15 deletions helm/gorge/templates/tests/test-connection.yaml

This file was deleted.

Loading

0 comments on commit 78cbc09

Please sign in to comment.