winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
5.04k stars 196 forks source link

Kubernetes support #3549

Closed Chriscbr closed 12 months ago

Chriscbr commented 1 year ago

Feature Spec

Provide ways to define Kubernetes services in Wing applications.

Here's a sketch based on our conversations yesterday (all is subject to change):

bring cloud;
bring k8s; // <-- cdk8s-plus behind the scenes?

class MyMicroService extends cloud.Kubernetes {
  init() {
    let d = new k8s.Deployment(replicas: 2);

    d.addContainer(
      image: "paulbouwer/hello-kubernetes:1",
      portNumber: 8080
    );

    let s = d.exposeViaService();

    let ingress = new k8s.Ingress();
    ingress.addRule("/my_service", k8s.IngressBackend.fromService(s));
  }
}

new MyMicroService();

Use Cases

Build Kubernetes based applications: define the resources within the cluster.

Out of scope: define the cluster infrastructure itself.

Component

SDK

Community Notes

staycoolcall911 commented 1 year ago

Needs an RFC

eladb commented 1 year ago

I am repurposing this to as "Kubernetes support"

eladb commented 1 year ago

@iliapolo you might want to subscribe to this issue 🙉

staycoolcall911 commented 12 months ago

Following #4804 we can close this issue for now