winglang / wing

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

Crossplane Support #6268

Open Cliftonz opened 5 months ago

Cliftonz commented 5 months ago

Use Case

As infrastructure as code (IaC) continues to transform how organizations deploy and manage their infrastructure, there is a significant push towards more integrated and developer-friendly environments. Currently, developers managing Kubernetes infrastructure, especially those constructing entire control planes with Crossplane, must often work with multiple tools and languages, including YAML, Go, JSON, Helm, ytt, kustomize, thema, and cuelang. This can be cumbersome and detracts from the development experience, particularly for those who are not familiar with these formats or who prefer more concise and expressive programming languages.

By enabling Winglang to compile directly to Crossplane-compatible code, developers can leverage a single, more comfortable language to define entire control planes on Kubernetes. This capability dramatically simplifies the management of complex cloud resources and multi-cloud environments by abstracting the underlying implementation details and allowing developers to focus more on the business logic and less on the intricacies of Kubernetes resource definitions.

Winglang's expressive syntax and type-safe characteristics make it an ideal candidate for this role. It enables developers to:

This enhancement not only makes Winglang a more versatile tool within the Kubernetes ecosystem but also promotes its adoption among developers who prefer its user-friendly syntax and robust features. The ability to define full control planes without leaving a comfortable and familiar programming environment is a powerful incentive for adopting Winglang in cloud-native development projects.

Proposed Solution

The proposed solution involves the following key steps:

Type Conversion:

Compiler Extension:

Integration Testing:

Documentation and Examples:

Implementation Notes

Implementation Notes:

Component

Compiler

Community Notes

eladb commented 5 months ago

@Cliftonz I ❤️ this idea! It came up a few times in the past and we really appreciate the write up!

Curious if this is something you'd be interested to help out with? We don't have much experience with Crossplane and we would love to help out get this off the ground, especially if there's a concrete use case in mind.

Technically, I think this won't be too difficult to support and might not require as much heavy lifting as you might think. I think Wing can simply synthesize K8S YAML that includes Crossplane resources, and we should be able to reuse the logic we have in our cloud library to produce AWS/GCP/Azure resources for the cloud APIs.

So basically adding a new platform for cp-aws, cp-gcp and cp-azure! Exciting times!

Cliftonz commented 5 months ago

I can help with getting you guys getting off of the ground and giving advise but I do not have the space to actually implement anything.

I would recommend reaching out to upbound.io they should be able to help and may be willing to help further and provide better resources.

github-actions[bot] commented 1 month ago

Hi,

This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

Cliftonz commented 1 month ago

Keep open