Overboard 0.0.2

dotnet add package Overboard --version 0.0.2
NuGet\Install-Package Overboard -Version 0.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Overboard" Version="0.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Overboard --version 0.0.2
#r "nuget: Overboard, 0.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Overboard as a Cake Addin
#addin nuget:?package=Overboard&version=0.0.2

// Install Overboard as a Cake Tool
#tool nuget:?package=Overboard&version=0.0.2

Overboard

Tests Nuget

Overboard is a library providing strongly typed builders over kubernetes configuration. It allows you to retain a declarative style to your configuration while putting the full power of the F# programming language in your hands.

Overboard outputs plain Kubernetes YAML or JSON resource config files, so no need to change what you already have.

Why?

Defining infrastructure as code can get complicated. Infrastructure code can run up to thousands of lines of configuration files. We then add layer upon layer of tools on top of this to manage the complexity while trying to keep our structured text correct and understandable.

The problems being solved by layers of tooling on top of mountains of yaml are the following:

  • control flow
  • sharing
  • templating
  • packaging

These are all problems that mature languages have solved decades ago. Instead of layering new tools on top of YAML files, what if we instead used a declarative programming language to define our configuration? Overboard enables this approach for Kubernetes.

Feature summary

  • A familiar declarative style
  • The full power of a proper programming language (it's just F#, no magic)
  • Built-in validations for quick feedback
  • Outputs to Kubernetes YAML or JSON config
  • Strongly typed for reduced mistakes
  • Supported by your favourite IDE (it's just F# after all)
  • Sane defaults for authentication and resource constraints

Getting started

Show me the code!

Of course. Say we have a file called infra.fsx.

// infra.fsx
// include the Overboard package from Nuget
#r "nuget:Overboard"

// open  the namespaces for the resources you need
open Overboard.Common
open Overboard.Workloads

// define the deployment Kubernetes resource
let theDeployment = k8s {
    deployment {
        "my-overboard-deployment"
        replicas 2
        add_matchLabel ("app", "nginx")
        pod {
            _labels [("app", "nginx")]
            container {
                name "nginx"
                image "nginx:latest"
            }
        }
    }
}

// write your YAML file to disk
KubeCtlWriter.toYamlFile theDeployment "deployment.yaml"

That's it! You now have a kubernetes config file for a deployment.

dotnet fsi infra.fsx
kubectl apply -f deployment.yaml

Ready to try it yourself? Try the hello-world tutorial. To explore more examples, check out the How-to or Tutorials section.

Example use-cases

  1. Template out repeat config as a function.
  2. Fetch data from databases, APIs, environment variables, git, or wherever else to generate Kubernetes config.
  3. Package up common infrastructure patterns and ship them to teams as Nuget packages.
  4. Easily build CLI tools to output collections of Kubernetes config for development teams.
  5. Let your imagination ship out.
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.2 322 11/20/2022
0.0.1 316 11/13/2022