Skip to content

Commit

Permalink
Merge pull request #26 from dasmeta/fixes
Browse files Browse the repository at this point in the history
Added pvc template and startProbe config to the deployment.
  • Loading branch information
viktoryathegreat authored Jun 21, 2022
2 parents 1674d3c + 80b5b87 commit 5c18d72
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 8 deletions.
4 changes: 2 additions & 2 deletions charts/base/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.27
version: 0.1.28

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.27"
appVersion: "0.1.28"
12 changes: 6 additions & 6 deletions charts/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
```
dependencies:
- name: base
version: 0.1.27
version: 0.1.28
repository: https://dasmeta.github.io/helm
```

Expand Down Expand Up @@ -95,9 +95,9 @@ Here are 2 examples about this:
**Alias is not specified, name, version and appVersion are not overridden by parent chart**
In this case, labels will be like this:**

- `helm.sh/chart: base-0.1.27`
- `helm.sh/chart: base-0.1.28`
- `app.kubernetes.io/name: base`
- `app.kubernetes.io/version: 0.1.27`
- `app.kubernetes.io/version: 0.1.28`

Chart.yaml
```
Expand All @@ -110,7 +110,7 @@ appVersion: "0.1.0"
dependencies:
- name: base
version: 0.1.27
version: 0.1.28
repository: https://dasmeta.github.io/helm
```

Expand Down Expand Up @@ -146,7 +146,7 @@ appVersion: "0.1.0"
dependencies:
- name: base
version: 0.1.27
version: 0.1.28
repository: https://dasmeta.github.io/helm
alias: my-app-base
```
Expand Down Expand Up @@ -174,7 +174,7 @@ appVersion: "0.1.0"
dependencies:
- name: base
version: 0.1.27
version: 0.1.28
repository: https://dasmeta.github.io/helm
```

Expand Down
4 changes: 4 additions & 0 deletions charts/base/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ spec:
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- end }}
{{- if .Values.startupProbe }}
startupProbe:
{{- toYaml .Values.startupProbe | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
envFrom:
Expand Down
24 changes: 24 additions & 0 deletions charts/base/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- if .Values.storage -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "base.fullname" . }}
labels:
{{- include "base.labels" . | nindent 4 }}
{{- if .Values.storage.keepPvc }}
annotations:
"helm.sh/resource-policy": keep
{{- end }}
spec:
{{- with .Values.storage }}
accessModes:
{{- toYaml .accessModes | nindent 4 }}
volumeMode: {{ .volumeMode | default "Filesystem" }}
resources:
requests:
storage: {{ .requestedSize }}
{{- if .className }}
storageClassName: {{ .className }}
{{- end }}
{{- end }}
{{- end }}
13 changes: 13 additions & 0 deletions charts/base/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,19 @@ readinessProbe: {}
# initialDelaySeconds: 60
# periodSeconds: 5

startupProbe: {}
# httpGet:
# path: /
# port: http

storage: {}
# persistentVolumeClaimName: pvc-docs
# requestedSize: 1G
# className: gp2
# accessModes:
# - ReadWriteOnce
# keepPvc: false

deployment: {}

env: dev
Expand Down

0 comments on commit 5c18d72

Please sign in to comment.