DO IT IN CODE (NOT YAML)! Fedor Korotkov Viktor Gamov @fedor - - PowerPoint PPT Presentation

do it in code not yaml fedor korotkov viktor gamov
SMART_READER_LITE
LIVE PREVIEW

DO IT IN CODE (NOT YAML)! Fedor Korotkov Viktor Gamov @fedor - - PowerPoint PPT Presentation

DO IT IN CODE (NOT YAML)! Fedor Korotkov Viktor Gamov @fedor @gamussa Copenhagen Denmark MEME REVIEW Sarcastic View on Existential Problems with YAML bash ??? YAML A BIT MORE SERIOUS NOW Sarcastic View on the Real Problems with YAML


slide-1
SLIDE 1

Copenhagen Denmark

DO IT IN CODE (NOT YAML)! Fedor Korotkov Viktor Gamov

@fedor @gamussa

slide-2
SLIDE 2

MEME REVIEW

Sarcastic View on Existential Problems with YAML

slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6

bash YAML ???

slide-7
SLIDE 7

A BIT MORE SERIOUS NOW

Sarcastic View on the Real Problems with YAML

slide-8
SLIDE 8
  • Initial Release in 2001
  • Originally Yet Another Markup Language
  • Repurposed as YAML Ain't Markup Language
  • From Wiki: “commonly used for configuration files”
  • End goal is to declare something
  • YAML is not going anywhere any time soon

WHY YAML IN THE FIRST PLACE

slide-9
SLIDE 9

YAML IS TYPELESS

slide-10
SLIDE 10
slide-11
SLIDE 11

json-schema.org

THERE IS A SCHEMA THOUGH

slide-12
SLIDE 12

INTELLIJ SUPPORTS JSON SCHEMAS FOR YAML

slide-13
SLIDE 13

YAML IS GREAT

but for small things

slide-14
SLIDE 14
slide-15
SLIDE 15

EVOLUTION OF YAML IN A COMPANY

SCRIPTS NO YAML ANSIBLE YAML HELM YAML KOTLIN DSL

slide-16
SLIDE 16

Photo caption

KUBERNETES

slide-17
SLIDE 17

image source: Janakiram MSV

KUBERNETES ARCHITECTURE

Actually JSON

slide-18
SLIDE 18
slide-19
SLIDE 19
  • How to avoid copy-pasting?
  • How to provide primitives?
  • How to allow customization for teams?
  • How to test incremental changes?
  • Some tools to analyze current state of clusters

THINGS TO THINK ABOUT YAML FOR K8S AT SCALE

slide-20
SLIDE 20

INGRESS EXAMPLE

slide-21
SLIDE 21

github.com/fkorotkov/k8s-kotlin-dsl

KOTLIN DSL FOR KUBERNETES

slide-22
SLIDE 22

HOW IT WORKS

slide-23
SLIDE 23
  • Generates DSLs from fabric8 types
  • Generates fabric8 types from deployed CRDs 😆

DSL GENERATION

slide-24
SLIDE 24

Confluent Operator Architecture

slide-25
SLIDE 25

KOTLIN POWER: BUILDERS

slide-26
SLIDE 26

KOTLIN POWER: BUILDERS

slide-27
SLIDE 27

KOTLIN POWER: EXTENSION FUNCTIONS

slide-28
SLIDE 28

KOTLIN POWER: EXTENSION FUNCTIONS

slide-29
SLIDE 29

USE CASES

slide-30
SLIDE 30

DEMO

slide-31
SLIDE 31

#KotlinConf

THANK YOU AND REMEMBER TO VOTE

Fedor Korotkov @fedor Viktor Gamov @gamussa