diff --git a/deploy/charts/burrito/templates/hermitcrab.yaml b/deploy/charts/burrito/templates/hermitcrab.yaml new file mode 100644 index 00000000..fa05944e --- /dev/null +++ b/deploy/charts/burrito/templates/hermitcrab.yaml @@ -0,0 +1,83 @@ +{{- if .Values.hermitcrab.enabled }} +{{- with mergeOverwrite (deepCopy .Values.global) .Values.hermitcrab }} +{{- if .persistence.enabled }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: burrito-hermitcrab + annotations: + {{- toYaml .metadata.annotations | nindent 4 }} + labels: + {{- toYaml .metadata.labels | nindent 4 }} +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .persistence.size }} + {{- if .persistence.storageClassName }} + storageClassName: {{ .persistence.storageClassName }} + {{- end }} +{{- end }} +--- +apiVersion: v1 +kind: Service +metadata: + name: burrito-hermitcrab +spec: + selector: + {{- toYaml .metadata.labels | nindent 4 }} + ports: + - name: http + port: 80 + targetPort: http + - name: https + port: 443 + targetPort: https +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: burrito-hermitcrab + labels: + {{- toYaml .metadata.labels | nindent 4 }} +spec: + replicas: 1 + selector: + matchLabels: + {{- toYaml .metadata.labels | nindent 6 }} + template: + metadata: + labels: + {{- toYaml .metadata.labels | nindent 6 }} + spec: + automountServiceAccountToken: false + containers: + - name: hermitcrab + image: "{{ .deployment.image.repository }}:{{ .deployment.image.tag }}" + imagePullPolicy: {{ .deployment.image.pullPolicy }} + resources: + {{- toYaml .deployment.resources | nindent 12 }} + env: + {{- toYaml .deployment.env | nindent 12 }} + envFrom: + {{- toYaml .deployment.envFrom | nindent 12 }} + ports: + {{- toYaml .deployment.ports | nindent 12 }} + livenessProbe: + {{- toYaml .deployment.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .deployment.readinessProbe | nindent 12 }} + {{- if .persistence.enabled }} + volumeMounts: + - name: data + mountPath: /var/run/hermitcrab + {{- end }} + {{- if .persistence.enabled }} + volumes: + - name: data + persistentVolumeClaim: + claimName: burrito-hermitcrab + {{- end }} +{{- end }} +{{- end }} diff --git a/deploy/charts/burrito/values.yaml b/deploy/charts/burrito/values.yaml index 510ad124..82cb33dd 100644 --- a/deploy/charts/burrito/values.yaml +++ b/deploy/charts/burrito/values.yaml @@ -90,6 +90,56 @@ redis: port: 6379 targetPort: 6379 +hermitcrab: + enabled: false + metadata: + labels: + app.kubernetes.io/component: hermitcrab + app.kubernetes.io/name: burrito-hermitcrab + persistence: + enabled: true + size: 1Gi + deployment: + image: + pullPolicy: Always + repository: sealio/hermitcrab + tag: main + resources: + limits: + cpu: '2' + memory: '4Gi' + requests: + cpu: '500m' + memory: '512Mi' + ports: + - name: http + containerPort: 80 + - name: https + containerPort: 443 + startupProbe: + failureThreshold: 10 + periodSeconds: 5 + httpGet: + port: 80 + path: /readyz + readinessProbe: + failureThreshold: 3 + timeoutSeconds: 5 + periodSeconds: 5 + httpGet: + port: 80 + path: /readyz + livenessProbe: + failureThreshold: 10 + timeoutSeconds: 5 + periodSeconds: 10 + httpGet: + httpHeaders: + - name: "User-Agent" + value: "" + port: 80 + path: /livez + global: metadata: labels: