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

Pvc pipeline fixes #98

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ jobs:
helm repo add kedacore https://kedacore.github.io/charts
helm repo update
helm install keda kedacore/keda
kubectl apply -f ci/pv.yaml
ct install --config ct.yaml
if: steps.list-changed.outputs.changed == 'true'
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ $ helm repo add codecademy https://codecademy-engineering.github.io/helm-charts

You can then run `helm search repo codecademy` to see the charts.

## Tests
You can test the charts locally using a [Kind](https://kind.sigs.k8s.io/) cluster and [chart testing](https://github.com/helm/chart-testing).

Once you've installed both you can run the following commands to test:
```
kind create cluster
kubectl apply -f charts/service/ci/pv.yaml

helm repo add kedacore https://kedacore.github.io/charts
helm repo update
helm install keda kedacore/keda

ct install --config ct.yaml
```

## Contribution Guidelines

We'd love to have you contribute! Please refer to our [contribution guidelines](CONTRIBUTING.md) for details.
2 changes: 1 addition & 1 deletion charts/service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: service
description: A generic k8s service chart
type: application
version: 1.7.5
version: 1.7.6
maintainers:
- email: [email protected]
name: devops
17 changes: 13 additions & 4 deletions charts/service/ci/custom-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,19 @@ hostAliases:
- anotherhost.com
- anotherhost2.com

persistentVolumeClaim:
- claimName: test-efs
volumeMounts:
- name: test-pv
mountPath: /tmp/

volumes:
- name: test-pv
persistentVolumeClaim:
claimName: test-pvc

persistentVolumeClaims:
- claimName: test-pvc
storageClass:
accessModes:
- ReadWriteMany
name: efs
- ReadWriteOnce
name: standard
storage: 1Gi
2 changes: 1 addition & 1 deletion charts/service/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .persistentVolumeClaim.claimName }}
name: {{ .claimName }}
spec:
accessModes: {{ .storageClass.accessModes }}
storageClassName: {{ .storageClass.name }}
Expand Down
15 changes: 15 additions & 0 deletions ci/pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Create a persistent volume to test PVCs in CI
apiVersion: v1
kind: PersistentVolume
metadata:
name: test-pv
labels:
type: standard
spec:
storageClassName: standard
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/tmp/"