An open API service indexing awesome lists of open source software.

https://github.com/jbellerb/dhall-rook

Type definitions for working with Rook from Dhall
https://github.com/jbellerb/dhall-rook

dhall kubernetes rook yaml

Last synced: 5 months ago
JSON representation

Type definitions for working with Rook from Dhall

Awesome Lists containing this project

README

          

# dhall-rook

This package provides [Dhall](https://dhall-lang.org/) bindings for [Rook](https://rook.io/). For why this may be useful to you, check out [dhall-kubernetes](https://github.com/dhall-lang/dhall-kubernetes).

## Usage

To better support various clusters, dhall-rook does not prescribe a specific version of dhall-kubernetes. Instead, all expressions in dhall-rook are functions which take the types provided by dhall-kubernetes as a parameter. It's recommended to call the main package function from a central import file, like a `rook.dhall`, similar to this:

```dhall
let rook =
https://raw.githubusercontent.com/jbellerb/dhall-rook//1.9/package.dhall

in rook
( https://raw.githubusercontent.com/dhall-lang/dhall-kubernetes//1.22/types.dhall
).(https://raw.githubusercontent.com/jbellerb/dhall-rook//1.9/kubernetes.dhall)
```

Imports should probably use a commit hash to avoid breaking with upstream changes. It's also a good idea to `dhall freeze` this file, which allows caching and prevents execution if the contents change. With this import file, rook objects can be created:

```dhall
let kubernetes = ./kubernetes.dhall

let rook = ./rook.dhall

let store =
rook.CephObjectStore::{
, metadata = kubernetes.ObjectMeta::{
, name = Some "my-store"
, namespace = Some "rook-ceph"
}
, spec = rook.ObjectStoreSpec::{
, metadataPool = Some rook.PoolSpec::{
, failureDomain = Some "host"
, replicated = Some rook.ReplicatedSpec::{ size = 3 }
}
, dataPool = Some rook.PoolSpec::{
, failureDomain = Some "host"
, erasureCoded = Some rook.ErasureCodedSpec::{
, dataChunks = 2
, codingChunks = 1
}
}
, preservePoolsOnDelete = Some True
, gateway = Some rook.GatewaySpec::{
, sslCertificateRef = None Text
, port = Some 80
-- , securePort = Some 443
, instances = Some 1
}
, healthCheck = Some rook.BucketHealthCheckSpec::{
, bucket = Some rook.HealthCheckSpec::{
, disabled = Some False
, interval = Some "60s"
}
}
}
}

in store
```


#### License


Copyright (C) jae beller, 2022.




Released under the Apache License, Version 2.0.