Skip to content

Commit

Permalink
simple-app: 0.11.8
Browse files Browse the repository at this point in the history
  • Loading branch information
elephantum committed Jul 8, 2024
1 parent be081a5 commit 6cadadb
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 2 deletions.
4 changes: 4 additions & 0 deletions charts/simple-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.11.8

* Fix for PVC creation in case of volumes `secret` and `configMap` types

# 0.11.7

* Fix HPA for `autoscaling/v2` syntax
Expand Down
2 changes: 1 addition & 1 deletion charts/simple-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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.11.7"
version: "0.11.8"

# 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
Expand Down
2 changes: 1 addition & 1 deletion charts/simple-app/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{- $labels := include "simple-app.labels" . | nindent 4 -}}

{{ range .Values.volumes }}
{{- if not .emptyDir }}
{{- if and (not .emptyDir) (and (not .secret) (not .configMap)) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand Down
69 changes: 69 additions & 0 deletions charts/simple-app/tests/volumes_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
suite: simple-app volume mounts test

release:
name: simple
namespace: default

chart:
version: 0.0.0

tests:

- it: PVC - Create PVC if size is set
templates:
- pvc.yaml
set:
volumes:
- name: data
size: 1Gi
mountPath: /data
asserts:
- isKind:
of: PersistentVolumeClaim
- equal:
path: spec
value:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

- it: PVC - Do not create PVC if emptyDir is set
templates:
- pvc.yaml
set:
volumes:
- name: cache
emptyDir: true
size: 1Gi
mountPath: /cache
asserts:
- hasDocuments:
count: 0

- it: PVC - Use secret if secret is set
templates:
- pvc.yaml
set:
volumes:
- name: secret
secret:
secretName: secret
mountPath: /secret
asserts:
- hasDocuments:
count: 0

- it: PVC - Use configMap if configMap is set
templates:
- pvc.yaml
set:
volumes:
- name: config
configMap:
name: config
mountPath: /config
asserts:
- hasDocuments:
count: 0

0 comments on commit 6cadadb

Please sign in to comment.