Deploys our manifests from GitHub to Kubernetes.
Development Status Currently, kubernetes-deployment is only intended for internal use, so expect bigger changes at anytime.
There is a complete built-in help, which is probably more up to date, than this README:
kubernetes-deployment help
There are different sources of retrieving parameter. They are loaded in the following order. Each item overwrites the previous one:
- Hardcoded default values
- Values in
~/.rebuy/kubernetes-deployment/default.[yaml|toml|json|hcl](egkubeconfig) - Environment variables (eg
KUBECONFIG) - Command line flags (eg
--kubeconfig)
The key names in the configuration files always equals the long command line flags. You can generate a complete config with kubectl dump-config.
Example
# ~/.rebuy/kubernetes-deployment/default.yaml
filename: github.com/rebuy-de/cloud-infrastructure/deployments.yaml
github-token: aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434dAll Kubernetes manifests will be rendered with the Golang template engine.
The following functions are provided:
ToLower- converts the string to lowercase charsToUpper- converts the string to uppercase charsIdentifier- converts the string to a valid Kubernetes identifier (eg for themeta.name` field)
kubernetes-deployment uses variables which are inherited in a specific order. Each item overwrites the previous one:
- generated values
- hardcoded default values
- default variables from project config, ie
default.variables. - variables from service, ie
services[i].variables.
These are the generated values:
gitBranchName- The branch name from GitHub, egmaster.gitCommitID- The full git commit hash, egafad13cf1941af4ad3101bdf30f087f7dfe27c99. Useful for image tags.
go get k8s.io/[email protected]
go get k8s.io/[email protected]