Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/squaremo/spresm
It's a tool for managing Kubernetes configurations, that supports getting YAMLs from Helm charts and container images.
https://github.com/squaremo/spresm
gitops helm kubernetes yaml
Last synced: 2 months ago
JSON representation
It's a tool for managing Kubernetes configurations, that supports getting YAMLs from Helm charts and container images.
- Host: GitHub
- URL: https://github.com/squaremo/spresm
- Owner: squaremo
- License: apache-2.0
- Created: 2018-09-27T11:57:04.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2021-03-11T10:10:36.000Z (almost 4 years ago)
- Last Synced: 2024-06-19T04:18:28.548Z (6 months ago)
- Topics: gitops, helm, kubernetes, yaml
- Language: Go
- Homepage:
- Size: 121 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spresm, because configuration is code too
Spresm is a tool for managing Kubernetes configurations in git, as
generated by Helm charts and more generally, container images.When you `spresm import` a Helm chart or container image, Spresm runs
it (with input values you provide) to generate YAML files for you to
commit to git. You can make changes to the YAML files and commit them.When you need to update the chart or image, or the input values, you
can run `spresm update` to regenerate the YAMLs and merge with your
local changes.Example:
```bash
$ spresm import helm flux-system/ --chart https://charts.fluxcd.io/flux --version 1.5
# edit the values presented in $EDITOR, save and exit
$ ls flux-system/
Spresmfile deployment.yaml kube.yaml
memcached.yaml rbac.yaml secret.yaml
service.yaml serviceaccount.yaml
$ git add flux-system; git commit -m "Initial flux config"
```Having imported the chart (in this case), you can now edit things to
suit your purposes. Let's remove a redundant volume definition and
mount from the deployment.```
$ $EDITOR flux-system/deployment.yaml
# remove the `kubedir` volume and its mount
$ git diff
index 194c279..c779af5 100644
--- a/flux-system/deployment.yaml
+++ b/flux-system/deployment.yaml
@@ -23,9 +23,6 @@ spec:
spec:
serviceAccountName: flux-system2
volumes:
- - name: kubedir
- configMap:
- name: flux-system2-kube-config
- name: git-key
secret:
secretName: flux-system2-git-deploy
@@ -54,8 +51,6 @@ spec:
initialDelaySeconds: 5
timeoutSeconds: 5
volumeMounts:
- - name: kubedir
- mountPath: /root/.kubectl
- name: git-key
mountPath: /etc/fluxd/ssh
readOnly: true
$ git add flux-system/deployment.yaml; git commit -m "Remove kubedir volume"
```You can now update the values and regenerate the YAMLs. Changes will
be merged with the change you've made.```bash
$ spresm update --edit flux-system/
# edit the values presented in $EDITOR, save and exit
```See [./docs/rfc/0001-spresm.md](./docs/rfc/0001-spresm.md).