Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create 004-manifests.md #4

Open
wants to merge 1 commit into
base: workloads
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions accepted/004-manifests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Manifests

One of the main gripes about Kubernetes, is the management of YAML and the need to making the YAML turing complete with templates, logic, wrappers, and management utilities.

The YAML merely represents the specific values of an instance of a struct in Go.

We can easily adopt the "define your application in a manifest" paradigm, without actually using any of the native aurae functions to mutate a system.

### Simple Manifest

This manifest can be sourced from higher level applications, or even other aurae scripts.
Application teams will be able to define their applications directly as valid aurae code.

Notice how the application can be defined without connecting to an Aurae system, or accessing any of the subsystems at runtime.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would that work under the hood? Is Aurae API expecting manifest like k8s would? Will there be "and now serialize it all to json and send" step in aurae DSL?


```typescript
// ingress.aurae

let nginx = container("nginx-container-001");
nginx.image("nginx:latest");
nginx.expose(80);
nginx.env("key", "val");

let ingress = pod("ingress-001");
ingress.add(nginx);

```

### Turing Complete Logic

Application teams can easily use turing complete logical syntax for their manifests.

If statements, conditions, loops, and more are all possible in their application definition.

```typescript
// ingress.aurae

// Define a flag to expose the pod or not.
let production = false;

let nginx = container("nginx-container-001");
nginx.image("nginx:latest");
nginx.expose(80);
nginx.env("key", "val");

let ingress = pod("ingress-001");

if production {
ingress.expose(80); // Only expose in production
}

ingress.add(nginx);

```