Skip to content

Commit

Permalink
updating codebase for 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFarley committed Jan 3, 2022
1 parent b678aa8 commit b4fa34b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ __pycache__
helm-chart/templates/*
values.yaml.upstream
to_be_applied.yaml
index.yaml

30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ $ helm install volume-autoscaler devops-nirvana/volume-autoscaler \
--set "prometheus_url=http://prometheus-server.namespace.svc.cluster.local"
```

Advanced helm usage...
```bash
# To view what changes it will make, if you change things, this requires the helm diff plugin - https://github.com/databus23/helm-diff
helm diff upgrade volume-autoscaler --allow-unreleased devops-nirvana/volume-autoscaler \
--namespace infrastructure \
--set "slack_webhook_url=https://hooks.slack.com/services/123123123/4564564564/789789789789789789" \
--set "slack_channel=my-slack-channel-name" \
--set "prometheus_url=http://prometheus-server.namespace.svc.cluster.local"

# To remove the service, simply run...
helm uninstall volume-autoscaler
```


### Installation with `kubectl`

Expand All @@ -41,28 +54,25 @@ $ helm install volume-autoscaler devops-nirvana/volume-autoscaler \
# the namespace you can run the first few commands below...

# IF YOU USE `infrastructure` AS THE NAMESPACE FOR PROMETHEUS SIMPLY...
$ kubectl --namespace infrastructure apply https://devops-nirvana.s3.amazonaws.com/helm-charts/volume-autoscaler-1.0.0.yaml
# NOTE: Slack notification will not work if you simply use this, you'll need to download this and customize the YAML to add your Slack Webhook
$ kubectl --namespace infrastructure apply https://devops-nirvana.s3.amazonaws.com/helm-charts/volume-autoscaler-1.0.1.yaml

# OR, IF YOU NEED TO CHANGE THE NAMESPACE...
# #1: Download the yaml...
$ wget https://devops-nirvana.s3.amazonaws.com/helm-charts/volume-autoscaler-1.0.0.yaml
$ wget https://devops-nirvana.s3.amazonaws.com/helm-charts/volume-autoscaler-1.0.1.yaml
# #1: Or download with curl
$ curl https://devops-nirvana.s3.amazonaws.com/helm-charts/volume-autoscaler-1.0.0.yaml -o volume-autoscaler-1.0.0.yaml
$ curl https://devops-nirvana.s3.amazonaws.com/helm-charts/volume-autoscaler-1.0.1.yaml -o volume-autoscaler-1.0.1.yaml
# #2: Then replace the namespace in this, replacing
cat volume-autoscaler-1.0.0.yaml | sed 's/"infrastructure"/"PROMETHEUS_NAMESPACE_HERE"/g' > ./to_be_applied.yaml
# #3: Finally, apply it...
cat volume-autoscaler-1.0.1.yaml | sed 's/"infrastructure"/"PROMETHEUS_NAMESPACE_HERE"/g' > ./to_be_applied.yaml
# #3: If you wish to have slack notifications, edit this to_be_applied.yaml and embed your webhook on the value: line for SLACK_WEBHOOK
# #4: Finally, apply it...
$ kubectl --namespace REPLACEME_WITH_PROMETHEUS_NAMESPACE apply ./to_be_applied.yaml
```


# TODO

* Publish helm chart
* Add simple example of how to install this in Kubernetes cluster with Helm
* Add simple example of how to install this in Kubernetes cluster with an simple `kubectl apply`
* Add more documentation / diagramming
* Push to helm repo in a Github Action and push the static yaml as well

* Add tests coverage to ensure the software works as intended moving forward
* Do some load testing to see how well this software deals with scale (100+ PVs, 500+ PVs, etc)
* Figure out what type of Memory/CPU is necessary for 500+ PVs, see above
Expand Down
3 changes: 2 additions & 1 deletion helm-chart/update-templates-from-foundational-template.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash -e
#
######################
# Usage Note: Please use this script before re-publishing a new version of volume-autoscaler, incase there was fixes upstream
# Author: Farley <[email protected]>
######################

# Config
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ initContainers: []
# Additional containers to be added to the pod (eg: add the cloudsql proxy)
extraContainers: []

# Volumes added to the pod eg: for cloudsql
# Volumes added to the pod if needed
volumes: []
volumeMounts: []

Expand Down

0 comments on commit b4fa34b

Please sign in to comment.