A custom ingress controller to route failed requests between Kubernetes clusters. A custom CLI for the deployment of Helm, Istio, Jaeger, Prometheus, and Grafana.
Explore the docs »
Report Bug
·
Request Feature
- Create a CLI tool that functions similar to helm create, which creates an empty Helm chart scaffold set up with the following dependencies fully configured
- Istio
- Jaeger
- Grafana
- Implement a custom Kubernetes resource Cluster, which represents necessary details of some Revature Kubernetes Cluster, Cluster B
- Create a Custom Ingress Controller that can be deployed in some Kubernetes Cluster Cluster A such that
- If a request is made to Cluster A and fails for any reason, the request will be retried against the same Service in Cluster B
- If the retried request is made to Cluster B, then returning a failed response is acceptable
This repository contains the source code for the Kreate CLI, Custom Ingress controller, and Custom Resource Definition [CRD] (Portal).
-
Kubernetes
cluster must be already active for Kreate and Custom Ingress to function. -
Uses
Helm 2.10+
and not Helm 3, currently installs newest version of Helm 2 during initialization.
- Build Kreate, navagate to project root and run build command below
go build ./cmd/kreate
- Initilize Kreate
kreate init
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
kreate <sub-command> [PROFILE_NAME]
To create a new profile use the following command.
kreate profile [PROFILE_NAME]
This command creates a new folder named /kreate
under /etc/
directory and places a new .yaml
file with the provided named.
Example:
kreate profile myprofile
Output:
/etc
└── /kreate
└── myprofile.yaml
kreate chart [PROFILE_NAME]
kreate chart
is a function that generates a values.yaml
, Chart.yaml
, yaml templates for use with helm, and already-templated yamls ready for deployment in a Kubernetes
cluster.
When this command is used, a charts folder will be added to your current working directory with the following structure.
.
└── charts
└── example
├── Chart.yaml
├── deploy
│ ├── deployment.yaml
│ ├── ingress.yaml
│ └── service.yaml
├── templates
│ ├── deployment.yaml
│ ├── ingress.yaml
│ └── service.yaml
└── values.yaml
The charts
directory is where all charts generated using kreate chart
will be located. Each folder underneath charts
, will be a separate chart based on a unique kreate
profile. If the program is run multiple times without editing the name
value in Chart.yaml
, the new deployment will overwrite any existing chart with the same name.
Within each unique chart folder, the deploy
folder will hold already-templated yaml files ready for deployment using kubectl apply.
The templates
folder will hold a copy of the templates stored in /var/local/kreate
that are used to generate the templated yaml files in the deploy
folder. These templates are for use with Go text templating, and can be used directly with Helm or expanded with more templated values.
kreate run [PROFILE_NAME]
kreate run
is a function which utilizes Helm
to deploy a profile directly to the Kubernetes
cluster. Given a profile name, kreate run
will do the following:
- Determine if
Helm
is properly initialized. Thetiller
must be installed to the cluster prior to running a profile - Build a custom
Helm chart
for the specified profile usingkreate chart
- Create the custom ingress configmap and install the portal custom resource to the cluster
- Install the custom
Helm chart
, or if the profile was previously deployed, Upgrade the existing installation.
kreate run
anticipates that kreate init
has been completed successfully. Thus, the user is required to run kreate Init
prior to kreate run
.
kreate remove [PROFILE_NAME | --all | -a]
The remove command removes a specified profile from /etc/kreate/ directory. When using --all
(or the shorthand -a
) in place of a profile name, all profiles will be removed.
kreate edit [PROFILE_NAME] [flags...]
kreate edit
allows changes by setting values to each flag, each flag is checked to see if the value is different from the default flag values and if so, an instance of a Profile will be created and its values will be set to reflect the values set in the flags. After all values have been set, the profile instance will be used to write to a new file with the same file name and delete the old instance of the Profile.
To view all the configuration flags for edit will be located in:
kreate usage
Note that the name
flag must be set to an existing app's name within the Profile , otherwise the function will not change any values corresponding to that app, and a message will be logged to the user that a name was not correctly specified.
This section below list all the configuration flags for cluster related settings.
name
- Sets the name of the portalclustername
- Sets the clustername of the profileclusterip
- Sets the clusterip of the profileclusterport
- Append a clusterport to the profile
This section below list all configuration flags for app specific setting.
NameOfApp
- Specifies the name of the app which will be modified by the app-related input flagsimageurl
- An App-related flag. Sets the imageurl of the App specified by the NameOfApp flagservicename
- An App-related flag. Sets the servicename of the App specified by the NameOfApp flagserviceport
- An App-related flag. Sets the serviceport of the App specified by the NameOfApp flagport
- An App-related flag. Appends a port to the App specified by the NameOfApp flagendpoint
- An App-related flag. Appends an endpoint to the App specified by the NameOfApp flag
kreate edit
anticipates that kreate init
and kreate profile
have been completed successfully. Thus, the user is required to run kreate Init
and kreate profile
prior to kreate edit
.
A profile defaultName
has already been created using
kreate profile defaultName`
We can edit one of two was:
kreate edit defaultName`
Note Without passing any flag values nano text editor will open the yaml file and allow manual edits from that program.
Otherwise after defining the filename, flags can be passed to this function in the form of -flag FlagValue.
kreate edit defaultName -name newName
kreate help
This sub-command will display a brief help text to familiarize the user with various commands associated with the tool.
- Allow the creation of multiple profiles
- Add a command to reset the cluster to a pre-init configuration
- Add a command to uninstall a profile chart from the cluster
- Add portals that query additional times
- Remove helm dependencies
- Configure metrics applications outside of Istio profile
- Add a command to add a Prometheus exporter to the cluster
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
See also the list of contributors who participated in this project.
-Last Name | First Name | Responsibilities | Github User |
---|---|---|---|
-Ackard | Matt | CRD,CLI | mattackard |
-Bland | Jessey | CLI | JesseyBland |
-Campbell | Nehemiah | CLI | NehemiahG7 |
-Estrada | Dania | Ingress | danish287 |
-Feliciano | Emilio | CLI | FelicianoEJ |
-Kim | Aaron | CLI | ajkim19 |
-Locker | Brandon | CLI | Gamemastertwig |
-McDole | Ken | CRD,CLI | ken343 |
-Moreno | Hector | CLI | higgyhiggy |
-Nguyen | Josh | CLI | CodeZipline |
-Oh | Jaeik | CLI,Visuals | flyerjayden |
-Theiss | Joseph | Ingress | jtheiss19 |
-Thomas | Zach | Ingress | zachthomas823 |
-Zoeller | Joseph | CLI | JosephZoeller |