Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(hermitcrab): update chart with sharding options #290

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 23 additions & 27 deletions deploy/charts/burrito/templates/hermitcrab.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
{{- if .Values.config.burrito.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:
Expand All @@ -42,7 +22,7 @@ metadata:
labels:
{{- toYaml .metadata.labels | nindent 4 }}
spec:
replicas: 1
replicas: {{ .deployment.replicas }}
selector:
matchLabels:
{{- toYaml .metadata.labels | nindent 6 }}
Expand All @@ -68,9 +48,10 @@ spec:
{{- toYaml .deployment.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .deployment.readinessProbe | nindent 12 }}
{{- if or .storage.emptyDir.enabled .storage.ephemeral.enabled .tls.certManager.use .deployment.extraVolumeMounts }}
volumeMounts:
{{- if .persistence.enabled }}
- name: data
{{- if or .storage.emptyDir.enabled .storage.ephemeral.enabled }}
- name: provider-cache
mountPath: /var/run/hermitcrab
{{- end }}
{{- if .tls.certManager.use }}
Expand All @@ -80,11 +61,25 @@ spec:
{{- if .deployment.extraVolumeMounts }}
{{- toYaml .deployment.extraVolumeMounts | nindent 12 }}
{{- end }}
{{- end }}
{{- if or .storage.emptyDir.enabled .storage.ephemeral.enabled .tls.certManager.use .deployment.extraVolumes }}
volumes:
{{- if .persistence.enabled }}
- name: data
persistentVolumeClaim:
claimName: burrito-hermitcrab
{{- if or .storage.emptyDir.enabled .storage.ephemeral.enabled }}
- name: provider-cache
{{- if .storage.emptyDir.enabled }}
emptyDir:
medium: {{ .storage.emptyDir.medium }}
sizeLimit: {{ .storage.emptyDir.sizeLimit }}
{{- else if .storage.ephemeral.enabled }}
ephemeral:
volumeClaimTemplate:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .storage.ephemeral.storageClassName }}
resources:
requests:
storage: {{ .storage.ephemeral.size }}
{{- end }}
{{- end }}
{{- if .tls.certManager.use }}
- name: burrito-hermitcrab-tls
Expand All @@ -94,6 +89,7 @@ spec:
{{- if .deployment.extraVolumes }}
{{- toYaml .deployment.extraVolumes | nindent 8 }}
{{- end }}
{{- end }}
---
{{- if .tls.certManager.use }}
apiVersion: cert-manager.io/v1
Expand Down
21 changes: 14 additions & 7 deletions deploy/charts/burrito/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,15 @@ hermitcrab:
labels:
app.kubernetes.io/component: hermitcrab
app.kubernetes.io/name: burrito-hermitcrab
persistence:
enabled: true
size: 1Gi
storage:
emptyDir:
enabled: true
medium: ""
sizeLimit: "2Gi"
ephemeral:
enabled: false
size: "2Gi"
storageClassName: ""
tls:
certManager:
use: true
Expand All @@ -88,6 +94,7 @@ hermitcrab:
kind: Issuer

deployment:
replicas: 1
image:
pullPolicy: Always
repository: sealio/hermitcrab
Expand All @@ -99,11 +106,11 @@ hermitcrab:
value: /etc/hermitcrab/tls/tls.key
resources:
limits:
cpu: '2'
memory: '4Gi'
cpu: '1'
memory: '2Gi'
requests:
cpu: '500m'
memory: '512Mi'
cpu: '300m'
memory: '256Mi'
ports:
- name: http
containerPort: 80
Expand Down
Loading