Skip to content

A Kubernetes operator that simplifies deploying web applications. Manages Deployments, Services, and Istio routing via a single WebApp Custom Resource.

Notifications You must be signed in to change notification settings

kleffio/WebApp-operator

WebApp Operator

Overview

The WebApp Operator is a Kubernetes controller designed to simplify and automate the deployment and management of web applications. It provides a declarative, application-centric interface for developers, abstracting away the complexity of underlying Kubernetes resources like Deployments, Services, and Ingresses.

This operator introduces a WebApp Custom Resource Definition (CRD), which represents the desired state of a web application. When a developer creates a WebApp resource, the operator's controller provisions all the necessary backend components to run the application, configure its networking, and ensure the specified number of replicas are running.

Conversely, when a WebApp resource is deleted, the operator is responsible for a complete and clean teardown of all associated resources. This ensures that no orphaned components are left in the cluster, providing a lifecycle management solution for containerized web applications.

Features

  • Automated Application Provisioning: Automatically creates and configures Deployment and Service resources based on the WebApp specification.
  • Declarative Configuration: Allows users to define their application using high-level concepts like image, replicas, port, and host.
  • Simplified Lifecycle Management: Manages the entire lifecycle of the web application, from initial deployment to clean deletion.
  • Status Reporting: Updates the status of the WebApp resource with conditions to provide observability into the state of the deployment.
  • Extensible Foundation: Built to be extended with more advanced features like automated TLS and autoscaling.

Custom Resource Definition (CRD)

The core of the WebApp Operator is the WebApp custom resource. It captures the user's intent for their application in a simple, straightforward manner.

Below is an example of a WebApp resource definition:

apiVersion: kleff.io/v1
kind: WebApp
metadata:
  name: my-nginx-app
spec:
  deploymentID: "prod-nginx-001"
  name: "production-web-server"
  image: "nginx:1.21.6"
  replicas: 3
  port: 80
  host: "my-app.example.com"

Roadmap: Planned Enhancements

This operator is designed to evolve into a comprehensive application management tool. Future versions will introduce more sophisticated automation and integration:

  • Automated Ingress and TLS Management: Automatically create Ingress resources for the specified host and integrate with cert-manager to provision and manage TLS certificates.
  • Health and Readiness Probes: Add fields to the WebApp spec to define custom liveness, readiness, and startup probes, which will be configured on the underlying Deployment.
  • HPA Integration: Introduce autoscaling parameters in the WebApp spec to automatically create and configure HorizontalPodAutoscaler (HPA) resources.
  • Advanced Status Conditions: Enhance the status field with more detailed conditions, such as Available, Progressing, and Degraded, to provide deeper insights into the application's health.

About

A Kubernetes operator that simplifies deploying web applications. Manages Deployments, Services, and Istio routing via a single WebApp Custom Resource.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published