-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(chart): package hermitcrab with chart (optional)
- Loading branch information
1 parent
4372310
commit 8a4bfd5
Showing
2 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{{- 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 }} | ||
storageClassName: {{ .persistence.storageClassName }} | ||
{{- 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters