Commit Graph

20 Commits

Author SHA1 Message Date
Gabriella Gonzalez
afb6a25771
Upgrade dhall-haskell (#192)
Fixes https://github.com/dhall-lang/dhall-kubernetes/issues/191

… by no longer mistakenly preferring `v1` or `v2beta{1,2}` over all
other versions
2023-12-28 20:58:28 +01:00
Gabriella Gonzalez
78e9df229b
Add support for kubernetes 1.26 (#189)
… and also update a few other things along the way
2023-06-21 03:00:18 +02:00
Gabriella Gonzalez
753c7d04fb
Add support for Kubernetes versions 1.{23,24,25} and change default (#186) 2022-08-25 08:58:00 -07:00
Gabriella Gonzalez
299351e9df
Upgrade dhall-haskell reference (#182)
… to pick up the `NatOrString` changes from:

71a8374c2a
2022-03-09 07:42:32 -08:00
arobertn
bc7719ecdb
Pass natural/integer preference args to openapi-to-dhall (#178) 2022-01-13 17:10:10 -08:00
Gabriella Gonzalez
49d1d68d2c
Fix handling of additional properties (#180)
… by pulling in the fix from https://github.com/dhall-lang/dhall-haskell/pull/2343
2021-12-03 09:19:20 -08:00
Gabriel Gonzalez
058e24fb5f
Update top-level README and examples (#164)
Currently CI does not enforce that they stay
in sync with the `1.17/` package, so I had to
explicitly run the `generate.sh` script to update
them.  I will follow up with another change to
automate this check.
2021-03-18 11:25:57 -07:00
Will Sewell
079178f537
Update dhall-openapi (#158)
* Fetch latest versions of kubernetes

* Update dhall-openapi and regenerate
2021-01-15 09:10:08 -08:00
Gabriel Gonzalez
ad3369f9f9
Fix PersistentVolumeClaim (#144)
Fixes https://github.com/dhall-lang/dhall-kubernetes/issues/136
2020-09-07 21:30:28 -07:00
Gabriel Gonzalez
170c6e86fc
Fix top-level examples (#129) 2020-07-14 07:51:57 -07:00
Gabriel Gonzalez
fc275e649b
Make ObjectMeta's name field optional (#115)
Supersedes https://github.com/dhall-lang/dhall-kubernetes/pull/85
2020-04-24 12:46:00 -07:00
Gabriel Gonzalez
381306bcc3
Go back to using --omitNull instead of --omitEmpty (#110)
Fixes https://github.com/dhall-lang/dhall-kubernetes/issues/86

The motivation of this is to more accurately model the Kubernetes
API semantics by not auto-omitting empty fields.  This is because
a field set to `Some ([] : List T)` is not necessarily the same
as `None (List T)`.

This makes the typical case a bit more verbose (more `Some`s), but
the difference to the `./examples` shows that it's not too bad.
2020-01-31 06:52:20 -08:00
Gabriel Gonzalez
3e160f4a27
Upgrade to dhall-1.29.0 (#109)
The main motivation for the upgrade is to take advantage of the
improved formatting for example code
2020-01-30 07:23:13 -08:00
Gabriel Gonzalez
a8ffffc4cb
Generate Dhall schemas for multiple Kubernetes versions (#104)
Fixes https://github.com/dhall-lang/dhall-kubernetes/issues/75

This also changes the default version to the latest version to 1.17 since now
users can access older versions
2020-01-12 15:00:56 -08:00
Gabriel Gonzalez
eb001e6683
Groundwork for supporting multiple releases (#103)
Related to https://github.com/dhall-lang/dhall-kubernetes/issues/75

This generalizes the machinery for fetching the Kubernetes OpenAPI spec to
support fetching multiple versions.  In particular, the Kubernetes version
is no longer tied to the version of Nixpkgs that we use.
2020-01-10 21:40:36 -08:00
Gabriel Gonzalez
ddc42e6109
Change algorithm for prioritizing duplicate resources (#101)
Now we place a higher priority on production/beta/alpha than we do on v2/v1

... as requested by @amarrella
2020-01-08 07:52:07 -08:00
Gabriel Gonzalez
89e7c8ed0b
Automate exclusion of duplicate resources (#99)
Related to https://github.com/dhall-lang/dhall-kubernetes/issues/75

In order to support multiple versions of the Kubernetes API we need to begin
automating the process of excluding duplicate resources (otherwise the
maintenance burden would be far too high).  This change adds new support
for automatically preferring Kubernetes resources by version where:

* v2 is prioritized over v1
* production is prioritized over beta, which is prioritized over alpha

Note that even when prioritizing by version there are still a few cases of
duplicates.  For now we use the default behavior of `Data.List.maximumBy`
to select the last resource if there are still conflicts.  This leads to
a few differences in which resources are preferred when such a conflict
arises (where previously we were just guessing manually which one to pick).
2020-01-03 08:51:05 -08:00
Greg Ziegan
4ab28225a1 Update Kubernetes API and expose TypesUnion in package.dhall 2019-12-14 08:10:02 -08:00
Ari Becker
bbfec3d854 Add package.dhall (#95)
* Add a `package.dhall` file, which re-exports `schemas.dhall` and adds
`IntOrString`. The expected hash of `package.dhall` is currently:
sha256:3ea8628b704704de295261dfc7626c15247c589c10a266f970cade262543fdda

* Update documentation and examples to clarify that expected usage is
through the `package.dhall` file.

* README.md cleanup: Update tutorial reference URL to the latest `1.28`
release of `dhall-haskell`, and change code language hints from
`haskell` to `dhall`.
2019-12-07 13:41:54 -08:00
Gabriel Gonzalez
fee24c0993
Add dhall-kubernetes support for "schemas" (#84)
For lack of a better term, I'm calling the `{ Type = …, default = … }`
record that the record completion operator expects a "schema".  This
change adds `dhall-kubernetes` support for auto-generating these schemas
for ease of use with the new `::` operator.

See the included example for how this would be used
2019-11-18 08:22:19 -08:00