Skip to content

Instantly share code, notes, and snippets.

@igstan
Last active June 29, 2024 16:15
Show Gist options
  • Save igstan/92fc3b12156f7f9e2df617a647deb701 to your computer and use it in GitHub Desktop.
Save igstan/92fc3b12156f7f9e2df617a647deb701 to your computer and use it in GitHub Desktop.
object YAML:
apiVersion:
apps/v1
kind:
Deployment
metadata:
name:
"my-app"
namespace:
"my-app"
labels:
app.kubernetes.io/name:
"my-app"
containers:
envFrom:
- configMapRef:
name:
"my-app-config-env-vars"
- secretRef: // the empty line above this one is needed
name:
"my-app-secret-env-vars"
// Some stubs to prove the syntax above.
object Deployment
def apiVersion(k: Unit): Unit = ???
object apps { def / (u: Unit): Unit = ??? }
val v1: Unit = ???
def kind(d: Deployment.type ): Unit = ???
def metadata(k: Unit): Unit = ???
def name(s: String): Unit = ???
def namespace(s: String): Unit = ???
def labels(s: Unit): Unit = ???
object app { object kubernetes { object io { def /(r: Unit): Unit = ??? } } }
def containers(r: Unit): Unit = ???
def envFrom(a: Unit): Unit = ???
class Item { def unary_- : Unit = ??? }
def configMapRef(r: Unit): Item = ???
def secretRef(r: Unit): Item = ???
@cgst
Copy link

cgst commented Jun 26, 2024

Haha! Amazing!

@igstan
Copy link
Author

igstan commented Jun 27, 2024

@cgst or terrifying! Unsure which one yet!

@alexandru
Copy link

you're still up to no good 😜

@coreyoconnor
Copy link

glorious XD

@soc
Copy link

soc commented Jun 28, 2024

"_ is doing too many things, we need to fix that" vs. "let's add more random places that use :" 🤡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment