All Projects → takama → K8sapp

takama / K8sapp

Licence: mit
Application template that satisfies the Kubernetes requirements (Golang)

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to K8sapp

Flasksaas
A great starting point to build your SaaS in Flask & Python, with Stripe subscription billing 🚀
Stars: ✭ 412 (+28.35%)
Mutual labels:  service, template
Graphql Starter
💥 Monorepo template (seed project) pre-configured with GraphQL API, PostgreSQL, React, Relay, and Material UI.
Stars: ✭ 3,377 (+952.02%)
Mutual labels:  template
Readme Template
📜 Modelos readme para qualquer pessoa copiar e usar em seu GitHub.
Stars: ✭ 287 (-10.59%)
Mutual labels:  template
Terraform Ecs Fargate
A Terraform template used for provisioning web application stacks on AWS ECS Fargate
Stars: ✭ 293 (-8.72%)
Mutual labels:  template
Magnum
Container Infrastructure Management Service for OpenStack. Mirror of code maintained at opendev.org.
Stars: ✭ 289 (-9.97%)
Mutual labels:  service
Email Templates
📫 Create, preview, and send custom email templates for Node.js. Highly configurable and supports automatic inline CSS, stylesheets, embedded images and fonts, and much more!
Stars: ✭ 3,291 (+925.23%)
Mutual labels:  template
Kube Charts Mirror
kubernetes helm 国内镜像,每三天更新一次
Stars: ✭ 282 (-12.15%)
Mutual labels:  helm-charts
Androidcomponentplugin
Android上简单实现四大组件的插件化,供学习使用
Stars: ✭ 316 (-1.56%)
Mutual labels:  service
Ingressmonitorcontroller
A Kubernetes controller to watch ingresses and create liveness alerts for your apps/microservices in UptimeRobot, StatusCake, Pingdom, etc. – [✩Star] if you're using it!
Stars: ✭ 306 (-4.67%)
Mutual labels:  helm-charts
Azure Service Operator
Azure Service Operator allows you to create Azure resources using kubectl
Stars: ✭ 291 (-9.35%)
Mutual labels:  service
Django Jet
Modern responsive template for the Django admin interface with improved functionality. We are proud to announce completely new Jet. Please check out Live Demo
Stars: ✭ 3,207 (+899.07%)
Mutual labels:  template
Artifactory Docker Examples
Examples for using Artifactory Docker distribution in various environments
Stars: ✭ 292 (-9.03%)
Mutual labels:  helm-charts
Codrops Scribbler
A responsive HTML template for coding projects with a clean, user friendly design. Crafted with the latest web technologies, the template is suitable for landing pages and documentations.
Stars: ✭ 302 (-5.92%)
Mutual labels:  template
Django Service Objects
Service objects for Django
Stars: ✭ 289 (-9.97%)
Mutual labels:  service
Nuxt Material Admin
Vue-CLI Boilerplate based on Nuxt and vue-material-admin template.
Stars: ✭ 310 (-3.43%)
Mutual labels:  template
Grunt Email Workflow
A Grunt workflow for designing and testing responsive HTML email templates with SCSS.
Stars: ✭ 3,010 (+837.69%)
Mutual labels:  template
Handlebars
Fullest Handlebars.js templating support for Atom and Sublime Text 2 / 3. Also drives syntax colouring on Github and in Visual Studio Code. Install from: https://atom.io/packages/Handlebars and https://packagecontrol.io/packages/Handlebars.
Stars: ✭ 292 (-9.03%)
Mutual labels:  template
Landy React Template
Landy is a free React landing page template designed for developers and startups, who want to create a quick and professional landing page for their business or project.
Stars: ✭ 282 (-12.15%)
Mutual labels:  template
Viperhtml
Isomorphic hyperHTML
Stars: ✭ 318 (-0.93%)
Mutual labels:  template
Jni.hpp
A modern, type-safe, header-only, C++14 wrapper for JNI
Stars: ✭ 313 (-2.49%)
Mutual labels:  template

Kubernetes application

Build Status Contributions Welcome Go Report Card codecov

A sample application that meets the requirements for successful execution in Kubernetes.

Deploy

Main application criteria

  • Implementation of health checks
  • Configuring the application through environment variables
  • Standard logging Interface
  • Processing of system interrupt signals and graceful shutdown
  • Continuous build of the application and whole CI/CD process
  • Helm charts for deploying an application in Kubernetes
  • SSL support in a secure connection, certificate integration
  • Integration of the official package manager dep
  • Versioning automation

Health checks

Kubernetes application must have two health checks for successful execution of the application. Integrated methods help correctly responding to Kubernetes queries.

Configuring

The twelve-factor app stores config in environment variables. The application has a built-in library for automatic recognition and placement the environment variables in struct with different types.

Logging

Provides a standard interface for a multi level logging. There is ability of choice of a logging library that supports a common interface.

type Logger interface {
    Debug(v ...interface{})
    Debugf(format string, v ...interface{})
    Info(v ...interface{})
    Infof(format string, v ...interface{})
    Warn(v ...interface{})
    Warnf(format string, v ...interface{})
    Error(v ...interface{})
    Errorf(format string, v ...interface{})
    Fatal(v ...interface{})
    Fatalf(format string, v ...interface{})
}

Just make your choice

func Run() (err error) {
    // log := xlog.New()
    // log := logrus.New()
    log := stdlog.New(&logger.Config{
        Level: logger.LevelDebug,
        Time:  true,
        UTC:   true,
    })
    ...
}

System signals

The application includes the ability to intercept system signals and transfer control to special methods for graceful shutdown.

type Signals struct {
    shutdown    []os.Signal
    reload      []os.Signal
    maintenance []os.Signal
}

Build automation

A series of commands for static cross-compilation of the application for any OS. Building the Docker image and loading it into the remote public/private repository. Optimal and compact docker image FROM SCRATCH

Testing

The command make test is running set of checks and tests:

  • run go tool fmt on package sources
  • run go linter on package sources
  • run go tool vet on packages
  • run tests on package sources excluding vendor
  • compile and check of Helm charts

Helm charts and Continuous Delivery

Prepared set of basic templates for application deployment in Kubernetes. Only one command make deploy is loading the application into Kubernetes. Just wait for the successful result and the application is ready to go.

Deploy

SSL support

Generating certificates to create a secure SSL connection in the Go client. Attaching the certificate to the Docker image.

FROM scratch

ENV K8SAPP_LOCAL_HOST 0.0.0.0
ENV K8SAPP_LOCAL_PORT 8080
ENV K8SAPP_LOG_LEVEL 0

EXPOSE $K8SAPP_LOCAL_PORT

COPY certs /etc/ssl/certs/
COPY bin/linux/k8sapp /

CMD ["/k8sapp"]

Package manager

To work correctly with the dependencies we should choose the package manager. dep is a prototype dependency management tool for Go.

Versioning automation

Using a special script to increase the release version

./bumper.sh
Current version 0.4.0.
Please enter bumped version [0.4.1]:

Contributing to the project

See the contribution guidelines for information on how to participate in the Kubernetes application project by submitting pull requests or issues.

License

MIT Public License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].