FOSDEM 2022 - A practical guide to CUE: patterns for everyday use

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 มี.ค. 2022
  • CUE (cuelang.org/) solves a previously unsolved technical problem in the configuration space. It does so by taking a compositional approach that reduces the complexity of managing configuration from a combinatorial problem to a linear problem. CUE is based on 20 years of experience in the field of configuration. Its declarative, aspect-oriented approach is powerful yet simple, making it possible to manage large amounts of configuration data and policies in multiple formats (JSON, YAML, Protocol Buffers, OpenAPI, etc.) with relative ease. It also makes CUE well suited to a wide range of applications.
    This all sounds great! But for someone new to CUE, it may not be obvious how to get started.
    In this talk, Marcel van Lohuizen and Paul Jolly start with a quick overview of CUE the language, then move on to present practical examples of CUE in action, including common patterns for validation, policy, integration with existing non-CUE configuration and more. Because CUE is new, established patterns are still in the making, but at the very least it will be a reflection of the current thinking.
    No previous experience of CUE required, although familiarity with an existing configuration and data languages will help provide some context to the examples.
    This is a TH-cam upload of the official talk recording: fosdem.org/2022/schedule/even...
  • บันเทิง

ความคิดเห็น • 10

  • @joebowbeer
    @joebowbeer 10 หลายเดือนก่อน +3

    00:00 A practical guide to CUE
    01:50 What is CUE?
    07:45 Demo time
    11:10 Adding Validation
    14:40 File organization
    21:01 Using the Tooling Layer
    25:53 Importing schema
    28:40 Going CUE native
    31:20 Sharimg validation logic
    34:06 Conclusions

  • @TheFocusedCoder
    @TheFocusedCoder ปีที่แล้ว +3

    This is fantastic!

  • @bryamalfaro
    @bryamalfaro ปีที่แล้ว +1

    Great tool, it seem very powerfull

  • @renaud72
    @renaud72 8 หลายเดือนก่อน

    Configurations mean different values per environment, which is often solved with overlays in order to avoid repetition.How does CUE tackle the problem then ?

  • @TrevorSullivan
    @TrevorSullivan ปีที่แล้ว

    Why not just contribute to existing linting tools, like Kube-Linter? Or contribute more rules to Kyverno? Or put your support behind the Conftest/ Gatekeeper community? What does Cue do that other tools don't already do?

    • @VincentFree
      @VincentFree ปีที่แล้ว +4

      Kubernetes is an example but cue isn't specific to kubernetes or even cloud native application stacks etc. It's a tool focusing on making our lives better by adding great validation and real types to our configuration files. Also it has a package manager so it's also easy to share definitions etc.
      I'm just reading into it and to me it sounds like a great way to manage a lot of repetition and add good (data) validation.

    • @TrevorSullivan
      @TrevorSullivan ปีที่แล้ว

      @@VincentFree my understanding is that Conftest is the exact same type of genetic validation tool. Conftest uses Rego, and can validate any kind of configuration file.

    • @decoyslois
      @decoyslois ปีที่แล้ว +2

      The lattice is a different way to compose configuration entirely. There isn’t really a mature comparison case out there. You can type ‘as you go’, you don’t have to add a totally separate tool just to validate. It allows you to unify configuration (or any data really) without inheritance. If that doesn’t ring some bells then maybe it’s not for you.

    • @decoyslois
      @decoyslois ปีที่แล้ว +1

      @@TrevorSullivan Conftest now natively supports CUE.

    • @soubinan
      @soubinan ปีที่แล้ว +2

      And is a bit like you say "why do we have rust/golang when we already have c++ and java and why not contributing to them rather than create a new one". Yeah maybe yo are this kind of persons 😅..
      Kube-linter and Kyverno uses yaml, and Conftest/Gatekeeper, rego
      1. It is not a secret yaml is not disigned for logic but for data only, and this is a real limitation when enter real life complex use cases
      2. Rego is a niche and designed for validation logic, not data/configuration description (and not very dev friendly lets be honnest)
      3. Cue is not bringing something new. It propose a facility for something already existing (and used by everything), JSON. yep because a the end of the day (almost) all is json
      4. Consider cue as the best of two worlds (as a Yaml + Rego but directly based on json)
      5. There are plenty of use cases where we need a powerfull configuration langage that is safe, "easy"and extensible (not only in kube and cloud world) and solutions as CUE (or JSONNET) are trying to help on that
      If you still feel it is unnecessary, it simply means you do not have yet the need, but I can ensure you you will (except if you like to fight against rego/yaml limitations), at least if you are working on any complex configuration setup