overwhelm

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

README

overwhelm

test

Overwhelm is an operator that facilitates application deployment on Kubernetes.

Traditionally, deploying an application on Kubernetes consists of creating multiple resources. Rather than having to create multiple resources and monitor them separately, Overwhelm aims to instead define an entire "application" in a single Kubernetes object, and expose all status information through that same object, effectively making it possible to manage and monitor an entire application by using a single resource.

Development

This repository uses operator-sdk.

To create a new CRD with the corresponding Go files:

operator-sdk create api --group core --version v1alpha1 --kind Application --resource=true --controller=true --namespaced=true

Running Overwhelm on Kind

⚠ Make sure you have the required binaries installed. If you don't have them, execute make kind-install-deps

  • Create the Kind cluster by executing make kind-create-cluster
  • Deploy overwhelm by executing make kind-deploy
  • (optional) Install a dummy Application by executing make kind-install-dummy-app

To clean the Kind cluster, execute make kind-clean.

Helm Charts

  • The .charts folder contains the overwhelm helm chart.
  • make helmManifests will update the chart templates if any changes are made to the helm resources.
  • To debug using helm install of the resources execute make kind-helm-debug once you create a Kind cluster.

Prerequisite

This project is based on golang 1.17. Make sure your GoRoot is configured to 1.17. If any other version then you may face issues.

Debugging

Since this project is a Kubernetes operator triggered by resource creation, debugging can be done using a remote debugger.

Steps to achieve remote debugging:
  • Make sure you install kind
  • Create a kind cluster with the command in your terminal, kind create cluster --name overwhelm
  • Use this cluster for all your debugging needs
  • To build and deploy your operator run, make deploy
  • Once the operator resources are deployed and running successfully in the cluster, run the make run-delve command
  • In GoLand use remote debugger by selecting the GO Remote configuration. Within the configuration, host is localhost and port is 2345
  • Now you can debug your code. To test the operator logic, deploy whatever resources you need from the config/samples folder.
  • Run make undeploy to remove your kubernetes resources once you are done

Testing

  • Kubebuilder uses @Ginkgo and @Gomega test suites which are configured in controllers/suite_test.go
  • Run make test to test your changes.
  • Reference materials: Gomega and Ginkgo

Documentation

Overview

Copyright 2022 Expedia Group

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
api
v1alpha2
Package v1alpha2 contains API Schema definitions for the core v1alpha2 API group +kubebuilder:object:generate=true +groupName=core.expediagroup.com +versionName:=v1alpha2
Package v1alpha2 contains API Schema definitions for the core v1alpha2 API group +kubebuilder:object:generate=true +groupName=core.expediagroup.com +versionName:=v1alpha2
scripts
helm-charts command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL