shore
shore copied to clipboard
Added packages to support render/save/apply kubernetes manifests
Overview
Github Issue: {LINK TO ISSUE}
As part of the Hackathon in Autodesk team, I have updated the existing shore render,save and exec functions to be able to generate the k8smanifests. This is a PoC only and still needs to be developed
Summary (required always)
shore render -k k
- This function will be able to generate the kubernetes manifests based on
main.pipeline.jsonnetin a json format which will be again converted to yaml file
**shore save -e d **
- This function will be generate the kubernetes manifests in a yaml format and save them to folder called
generatedin the current directory. - All the different manifests(iampolicy, iam role) will be saved as separate yaml files, so we can apply them separately if requried
shore exec -e d
- This function will fetch all the manifests in generated folder and apply them into kubernetes cluster using native k8sclient.
- I am checking if the format generated is as expected and applying to the cluster
- If a context is not defined, you will get an error and it will do an apply
- Also added the capability to delete the manfiests both from the
generatedfolder as well from the kubernetes cluster
shore delete -e d
- This function will delete all the manifests from generated folder
- This will also delete the manifests from the kubernetes cluster and returns an error if cluster config is not present
Tested the above scenarios from local using the unit tests which are present using a local kubernetes cluster and some sample files
kind: Namespace
metadata:
name: example-namespace
labels:
environment: development
team: devops
Test Results
shore render
Shore save
shore exec
shore delete
Notes
Checklist
- [ ] My pull request title follows the format
<username>/<gh-issue-#number>:<short-description> - [ ] My code passes existing unit tests
- [ ] My code follows the code style set for the project
- [ ] I have added at least one reviewer for this PR
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅
I have read the CLA Document and I hereby sign the CLA