mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-11-03 21:05:47 +03:00
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.
This commit is contained in:
parent
50dac0e944
commit
eb001e6683
20
README.md
20
README.md
@ -53,7 +53,7 @@ In the following example, we:
|
|||||||
-- examples/deploymentSimple.dhall
|
-- examples/deploymentSimple.dhall
|
||||||
|
|
||||||
let kubernetes =
|
let kubernetes =
|
||||||
../package.dhall sha256:63eb2e2bb9a50632801b673e67e666740c09c89deb0a0d0592d165178b5eba53
|
../package.dhall sha256:ab1c971ddeb178c1cfc5e749b211b4fe6fdb6fa1b68b10de62aeb543efcd60b3
|
||||||
|
|
||||||
let deployment =
|
let deployment =
|
||||||
kubernetes.Deployment::{
|
kubernetes.Deployment::{
|
||||||
@ -152,7 +152,7 @@ let map = Prelude.List.map
|
|||||||
let kv = Prelude.JSON.keyText
|
let kv = Prelude.JSON.keyText
|
||||||
|
|
||||||
let kubernetes =
|
let kubernetes =
|
||||||
../package.dhall sha256:63eb2e2bb9a50632801b673e67e666740c09c89deb0a0d0592d165178b5eba53
|
../package.dhall sha256:ab1c971ddeb178c1cfc5e749b211b4fe6fdb6fa1b68b10de62aeb543efcd60b3
|
||||||
|
|
||||||
let Service = { name : Text, host : Text, version : Text }
|
let Service = { name : Text, host : Text, version : Text }
|
||||||
|
|
||||||
@ -305,14 +305,20 @@ in
|
|||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
### Updating the nixpkgs snapshot (and kubernetes version)
|
### Adding a new Kubernetes releases
|
||||||
|
|
||||||
|
To add a new supported release, run:
|
||||||
|
|
||||||
Run
|
|
||||||
```bash
|
```bash
|
||||||
./scripts/update-nixpkgs.sh
|
./scripts/add-kubernetes-release.sh "${VERSION}"
|
||||||
./generate.sh
|
```
|
||||||
|
|
||||||
|
If you want to make a specific release the preferred release, run:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ echo "${VERSION}" > ./nix/preferred.txt
|
||||||
|
$ ./scripts/generate.sh
|
||||||
```
|
```
|
||||||
If the tests fail, rollback. If they don't then you have sucessfully upgraded!
|
|
||||||
|
|
||||||
### Tests
|
### Tests
|
||||||
|
|
||||||
|
@ -735,31 +735,31 @@
|
|||||||
, CustomResourceConversion =
|
, CustomResourceConversion =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion.dhall sha256:bdffed4de47429d51c58edc4bcaf4c65a02a942c5a91d2c10b04bb00f8829b0b
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion.dhall sha256:bdffed4de47429d51c58edc4bcaf4c65a02a942c5a91d2c10b04bb00f8829b0b
|
||||||
, CustomResourceDefinition =
|
, CustomResourceDefinition =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition.dhall sha256:336b72958ef16de1522a4df63369ed958cd0dce56ef5d30e58647fa450943a7a
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition.dhall sha256:2a51ba49b6bb3a550cb786e6b2ee2366866bad889601cdba3af3addecb10a332
|
||||||
, CustomResourceDefinitionCondition =
|
, CustomResourceDefinitionCondition =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition.dhall sha256:fef63958bc998f900417bd68974df7936535249af83edf1183721637fa3e7257
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition.dhall sha256:fef63958bc998f900417bd68974df7936535249af83edf1183721637fa3e7257
|
||||||
, CustomResourceDefinitionList =
|
, CustomResourceDefinitionList =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList.dhall sha256:652d515d9b0ff855301f78e4f647c23de73c3e5e695fd3bddc102ebba7a7929d
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList.dhall sha256:452a8886d9c8e40d5de75c4c80d121ff79d6cf831be8daeaff63ecfc24a849f5
|
||||||
, CustomResourceDefinitionNames =
|
, CustomResourceDefinitionNames =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames.dhall sha256:73f1528045b5541c009f74e02026661616223dc23bc0df9c0d640fd0184eef0a
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames.dhall sha256:73f1528045b5541c009f74e02026661616223dc23bc0df9c0d640fd0184eef0a
|
||||||
, CustomResourceDefinitionSpec =
|
, CustomResourceDefinitionSpec =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec.dhall sha256:19e995d543bcba13a88b7aea1de4c4d3bad4c620ee437fc3fc47f713ab9ab8a5
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec.dhall sha256:b7c84df71059878b76d75f2a23316169f4854ec3d26341c8d8e2ddde0a7e52fa
|
||||||
, CustomResourceDefinitionStatus =
|
, CustomResourceDefinitionStatus =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus.dhall sha256:318553c0327930257e05495251cafe571a94670e29285b7aa6b834cea63ac849
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus.dhall sha256:318553c0327930257e05495251cafe571a94670e29285b7aa6b834cea63ac849
|
||||||
, CustomResourceDefinitionVersion =
|
, CustomResourceDefinitionVersion =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion.dhall sha256:2db28c6f5c40ad9e27c1f0c039a9afb3bdd8587c609be0ecfeff93b513a7bc79
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion.dhall sha256:0902dcee8c4fbcf739bf02e5aec3380f79c5ab51cc1ac2b75e8c075835be411c
|
||||||
, CustomResourceSubresourceScale =
|
, CustomResourceSubresourceScale =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale.dhall sha256:265a09b4bd7a8452253edec4c5a15e1d9f8c4805350ac7b19fac74eca23b266e
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale.dhall sha256:265a09b4bd7a8452253edec4c5a15e1d9f8c4805350ac7b19fac74eca23b266e
|
||||||
, CustomResourceSubresources =
|
, CustomResourceSubresources =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources.dhall sha256:9ae05caacec1bcc4f030d8eef9b82d5416b9f22134b108c7db6b56c859d86ba3
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources.dhall sha256:9ae05caacec1bcc4f030d8eef9b82d5416b9f22134b108c7db6b56c859d86ba3
|
||||||
, CustomResourceValidation =
|
, CustomResourceValidation =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation.dhall sha256:3038e3161e96beabd1d70e9d0ebfda501fe8a7cce778df7f7964fad87f5b4537
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation.dhall sha256:a442aa0bd3be3cf8dbdda4f209af4732b12e8ab8c263535bc55e92f075db922b
|
||||||
, ExternalDocumentation =
|
, ExternalDocumentation =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation.dhall sha256:ef72045716c5bc714c4a81aa7218ade9eec702588c9a2650fe5b7d6331445032
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation.dhall sha256:ef72045716c5bc714c4a81aa7218ade9eec702588c9a2650fe5b7d6331445032
|
||||||
, JSON =
|
, JSON =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall sha256:9bb9dcb5bf6f795291686f59383bcd01c8e79b87fc3fb63351d46dea100ac51b
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall sha256:9bb9dcb5bf6f795291686f59383bcd01c8e79b87fc3fb63351d46dea100ac51b
|
||||||
, JSONSchemaProps =
|
, JSONSchemaProps =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.dhall sha256:63d200dfe11f927576fa3a694fc9d8e6fd9ba317d5a8c65ace4c4117c804b65e
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.dhall sha256:7f257b567eed8ba4d53b2553413c48b5aec2f18479b1924b873fc150ce0c86c9
|
||||||
, JSONSchemaPropsOrArray =
|
, JSONSchemaPropsOrArray =
|
||||||
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray.dhall sha256:9bb9dcb5bf6f795291686f59383bcd01c8e79b87fc3fb63351d46dea100ac51b
|
./defaults/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray.dhall sha256:9bb9dcb5bf6f795291686f59383bcd01c8e79b87fc3fb63351d46dea100ac51b
|
||||||
, JSONSchemaPropsOrBool =
|
, JSONSchemaPropsOrBool =
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
{ additionalItems =
|
{ default =
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool.dhall
|
|
||||||
, additionalProperties =
|
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool.dhall
|
|
||||||
, default =
|
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall
|
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall
|
||||||
, definitions = [] : List { mapKey : Text, mapValue : Text }
|
, definitions = [] : List { mapKey : Text, mapValue : Text }
|
||||||
, dependencies = [] : List { mapKey : Text, mapValue : Text }
|
, dependencies = [] : List { mapKey : Text, mapValue : Text }
|
||||||
@ -13,8 +9,6 @@
|
|||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall
|
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall
|
||||||
, externalDocs =
|
, externalDocs =
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation.dhall
|
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation.dhall
|
||||||
, items =
|
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray.dhall
|
|
||||||
, patternProperties = [] : List { mapKey : Text, mapValue : Text }
|
, patternProperties = [] : List { mapKey : Text, mapValue : Text }
|
||||||
, properties = [] : List { mapKey : Text, mapValue : Text }
|
, properties = [] : List { mapKey : Text, mapValue : Text }
|
||||||
, required = [] : List Text
|
, required = [] : List Text
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
{ additionalItems =
|
{ default =
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool.dhall
|
|
||||||
, additionalProperties =
|
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool.dhall
|
|
||||||
, default =
|
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON.dhall
|
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON.dhall
|
||||||
, definitions = [] : List { mapKey : Text, mapValue : Text }
|
, definitions = [] : List { mapKey : Text, mapValue : Text }
|
||||||
, dependencies = [] : List { mapKey : Text, mapValue : Text }
|
, dependencies = [] : List { mapKey : Text, mapValue : Text }
|
||||||
@ -13,8 +9,6 @@
|
|||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON.dhall
|
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON.dhall
|
||||||
, externalDocs =
|
, externalDocs =
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation.dhall
|
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation.dhall
|
||||||
, items =
|
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray.dhall
|
|
||||||
, patternProperties = [] : List { mapKey : Text, mapValue : Text }
|
, patternProperties = [] : List { mapKey : Text, mapValue : Text }
|
||||||
, properties = [] : List { mapKey : Text, mapValue : Text }
|
, properties = [] : List { mapKey : Text, mapValue : Text }
|
||||||
, required = [] : List Text
|
, required = [] : List Text
|
||||||
|
@ -296,6 +296,7 @@ getImportsMap prefixMap duplicateNameHandler objectNames folder toInclude
|
|||||||
|
|
||||||
namespaced = case filter filterFn namespacedNames of
|
namespaced = case filter filterFn namespacedNames of
|
||||||
[name] -> Just name
|
[name] -> Just name
|
||||||
|
[] -> Nothing
|
||||||
names -> duplicateNameHandler (kind, names)
|
names -> duplicateNameHandler (kind, names)
|
||||||
|
|
||||||
stripPrefix :: (Generic a, GFromJSON Zero (Rep a)) => Int -> Value -> Parser a
|
stripPrefix :: (Generic a, GFromJSON Zero (Rep a)) => Int -> Value -> Parser a
|
||||||
|
@ -11,4 +11,15 @@ patchCyclicImports :: Definition -> Definition
|
|||||||
patchCyclicImports Definition{ properties = oldProps, .. } = Definition{..}
|
patchCyclicImports Definition{ properties = oldProps, .. } = Definition{..}
|
||||||
where
|
where
|
||||||
properties = fmap (\propsMap -> Data.Map.withoutKeys propsMap toRemove) oldProps
|
properties = fmap (\propsMap -> Data.Map.withoutKeys propsMap toRemove) oldProps
|
||||||
toRemove = Set.fromList $ ModelName <$> [ "allOf", "anyOf", "not", "oneOf" ]
|
toRemove =
|
||||||
|
Set.fromList $
|
||||||
|
( ModelName
|
||||||
|
<$> [ "allOf"
|
||||||
|
, "anyOf"
|
||||||
|
, "not"
|
||||||
|
, "oneOf"
|
||||||
|
, "additionalItems"
|
||||||
|
, "additionalProperties"
|
||||||
|
, "items"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@ -126,11 +126,11 @@ parseVersion = Megaparsec.try parseSuffix <|> parsePrefix
|
|||||||
|
|
||||||
parseVersion
|
parseVersion
|
||||||
|
|
||||||
getVersion :: ModelName -> Version
|
getVersion :: ModelName -> Maybe Version
|
||||||
getVersion ModelName{..} =
|
getVersion ModelName{..} =
|
||||||
case Megaparsec.parse parseVersion "" unModelName of
|
case Megaparsec.parse parseVersion "" unModelName of
|
||||||
Left errors -> error (show errors)
|
Left errors -> Nothing
|
||||||
Right version -> version
|
Right version -> Just version
|
||||||
|
|
||||||
preferStableResource :: DuplicateHandler
|
preferStableResource :: DuplicateHandler
|
||||||
preferStableResource (_, names) =
|
preferStableResource (_, names) =
|
||||||
|
@ -154,14 +154,20 @@ in
|
|||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
### Updating the nixpkgs snapshot (and kubernetes version)
|
### Adding a new Kubernetes releases
|
||||||
|
|
||||||
|
To add a new supported release, run:
|
||||||
|
|
||||||
Run
|
|
||||||
```bash
|
```bash
|
||||||
./scripts/update-nixpkgs.sh
|
./scripts/add-kubernetes-release.sh "''${VERSION}"
|
||||||
./generate.sh
|
```
|
||||||
|
|
||||||
|
If you want to make a specific release the preferred release, run:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ echo "''${VERSION}" > ./nix/preferred.txt
|
||||||
|
$ ./scripts/generate.sh
|
||||||
```
|
```
|
||||||
If the tests fail, rollback. If they don't then you have sucessfully upgraded!
|
|
||||||
|
|
||||||
### Tests
|
### Tests
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
let kubernetes =
|
let kubernetes =
|
||||||
../package.dhall sha256:63eb2e2bb9a50632801b673e67e666740c09c89deb0a0d0592d165178b5eba53
|
../package.dhall sha256:ab1c971ddeb178c1cfc5e749b211b4fe6fdb6fa1b68b10de62aeb543efcd60b3
|
||||||
|
|
||||||
let release = "wintering-rodent"
|
let release = "wintering-rodent"
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ let Prelude =
|
|||||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||||
|
|
||||||
let kubernetes =
|
let kubernetes =
|
||||||
../package.dhall sha256:63eb2e2bb9a50632801b673e67e666740c09c89deb0a0d0592d165178b5eba53
|
../package.dhall sha256:ab1c971ddeb178c1cfc5e749b211b4fe6fdb6fa1b68b10de62aeb543efcd60b3
|
||||||
|
|
||||||
let kv = Prelude.JSON.keyText
|
let kv = Prelude.JSON.keyText
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
let kubernetes =
|
let kubernetes =
|
||||||
../package.dhall sha256:63eb2e2bb9a50632801b673e67e666740c09c89deb0a0d0592d165178b5eba53
|
../package.dhall sha256:ab1c971ddeb178c1cfc5e749b211b4fe6fdb6fa1b68b10de62aeb543efcd60b3
|
||||||
|
|
||||||
let deployment =
|
let deployment =
|
||||||
kubernetes.Deployment::{
|
kubernetes.Deployment::{
|
||||||
|
@ -6,7 +6,7 @@ let map = Prelude.List.map
|
|||||||
let kv = Prelude.JSON.keyText
|
let kv = Prelude.JSON.keyText
|
||||||
|
|
||||||
let kubernetes =
|
let kubernetes =
|
||||||
../package.dhall sha256:63eb2e2bb9a50632801b673e67e666740c09c89deb0a0d0592d165178b5eba53
|
../package.dhall sha256:ab1c971ddeb178c1cfc5e749b211b4fe6fdb6fa1b68b10de62aeb543efcd60b3
|
||||||
|
|
||||||
let Service = { name : Text, host : Text, version : Text }
|
let Service = { name : Text, host : Text, version : Text }
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ let Prelude =
|
|||||||
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
../Prelude.dhall sha256:771c7131fc87e13eb18f770a27c59f9418879f7e230ba2a50e46f4461f43ec69
|
||||||
|
|
||||||
let kubernetes =
|
let kubernetes =
|
||||||
../package.dhall sha256:63eb2e2bb9a50632801b673e67e666740c09c89deb0a0d0592d165178b5eba53
|
../package.dhall sha256:ab1c971ddeb178c1cfc5e749b211b4fe6fdb6fa1b68b10de62aeb543efcd60b3
|
||||||
|
|
||||||
let kv = Prelude.JSON.keyText
|
let kv = Prelude.JSON.keyText
|
||||||
|
|
||||||
|
@ -1,83 +1,42 @@
|
|||||||
{ coreutils
|
{ fetchurl, make-dhall-kubernetes, lib, stdenv }:
|
||||||
, dhall
|
|
||||||
, dhall-json
|
|
||||||
, dhallPackages
|
|
||||||
, glibcLocales
|
|
||||||
, haskellPackages
|
|
||||||
, kubernetes-openapi-spec
|
|
||||||
, lib
|
|
||||||
, python3
|
|
||||||
, stdenv
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
# Ignore generated files
|
kubernetesDirectory = ./kubernetes;
|
||||||
ignoreOutputs =
|
|
||||||
name: type:
|
kubernetesPaths = builtins.readDir kubernetesDirectory;
|
||||||
!(lib.elem name
|
|
||||||
(map toString
|
toKeyValue =
|
||||||
[ ../README.md
|
file: _:
|
||||||
../types
|
let
|
||||||
../defaults
|
version = builtins.replaceStrings [ ".txt" ] [ "" ] file;
|
||||||
../schemas
|
|
||||||
../defaults.dhall
|
in
|
||||||
../types.dhall
|
{ name = version;
|
||||||
../typesUnion.dhall
|
|
||||||
../schemas.dhall
|
value =
|
||||||
]
|
let
|
||||||
)
|
spec =
|
||||||
);
|
stdenv.mkDerivation {
|
||||||
|
name = "kubernetes-openapi-spec-${version}";
|
||||||
|
|
||||||
|
src =
|
||||||
|
fetchurl {
|
||||||
|
url = "https://github.com/kubernetes/kubernetes/archive/release-${version}.tar.gz";
|
||||||
|
|
||||||
|
sha256 =
|
||||||
|
builtins.replaceStrings [ "\n" ] [ "" ]
|
||||||
|
(builtins.readFile (kubernetesDirectory + "/${file}"));
|
||||||
|
};
|
||||||
|
|
||||||
|
phases = [ "unpackPhase" "installPhase" ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
cp api/openapi-spec/swagger.json $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
make-dhall-kubernetes spec;
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
lib.mapAttrs' toKeyValue kubernetesPaths
|
||||||
name = "dhall-kubernetes";
|
|
||||||
|
|
||||||
DHALL_PRELUDE = "${dhallPackages.prelude}/package.dhall";
|
|
||||||
|
|
||||||
XDG_CACHE_HOME = ".";
|
|
||||||
|
|
||||||
buildInputs =
|
|
||||||
[ dhall
|
|
||||||
dhall-json
|
|
||||||
python3
|
|
||||||
glibcLocales
|
|
||||||
];
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
patchShebangs ./scripts/build-readme.sh
|
|
||||||
|
|
||||||
./scripts/build-readme.sh
|
|
||||||
|
|
||||||
${coreutils}/bin/mkdir -p types defaults
|
|
||||||
|
|
||||||
${haskellPackages.dhall-kubernetes-generator}/bin/dhall-kubernetes-generator '${kubernetes-openapi-spec}'
|
|
||||||
|
|
||||||
for file in ./types.dhall ./typesUnion.dhall ./defaults.dhall ./schemas.dhall ./package.dhall ./examples/*.dhall; do
|
|
||||||
echo "Freezing file '$file'"
|
|
||||||
|
|
||||||
${dhall}/bin/dhall freeze --all --inplace "$file"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
patchShebangs ./scripts/build-examples.py
|
|
||||||
|
|
||||||
patchShebangs ./scripts/check-source.py
|
|
||||||
|
|
||||||
LC_ALL=en_US.UTF-8 ./scripts/check-source.py
|
|
||||||
|
|
||||||
mkdir -p tmp
|
|
||||||
|
|
||||||
LC_ALL=en_US.UTF-8 ./scripts/build-examples.py tmp
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
${coreutils}/bin/mkdir --parents "$out"
|
|
||||||
|
|
||||||
cp -r types defaults schemas examples types.dhall defaults.dhall typesUnion.dhall schemas.dhall package.dhall README.md "$out"
|
|
||||||
'';
|
|
||||||
|
|
||||||
src =
|
|
||||||
lib.cleanSourceWith
|
|
||||||
{ filter = ignoreOutputs; src = lib.cleanSource ./..; };
|
|
||||||
}
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
{stdenv, kubernetes}:
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "kubernetes-openapi-spec";
|
|
||||||
src = kubernetes.src;
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
|
||||||
installPhase = ''
|
|
||||||
cp api/openapi-spec/swagger.json $out
|
|
||||||
'';
|
|
||||||
}
|
|
1
nix/kubernetes/1.10.txt
Normal file
1
nix/kubernetes/1.10.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
0p6djqdz296r18n0kf2lfq96yynngd3b5qc6d5pcqh2dfs2v9ydm
|
1
nix/kubernetes/1.11.txt
Normal file
1
nix/kubernetes/1.11.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
1hcry5rsa2ngi1wdg8cnwh4s53l9xggl5ynfa8jwdnjq0nhsiryd
|
1
nix/kubernetes/1.12.txt
Normal file
1
nix/kubernetes/1.12.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
18kixk3i9c2vgl5yrnvi7ybchskyvfpzs9cgc8jk9w921ryvwavg
|
1
nix/kubernetes/1.13.txt
Normal file
1
nix/kubernetes/1.13.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
0bp716qd67dc96ibwxjn03njq7g4p0ix82dnm8a264l15rzj8v01
|
1
nix/kubernetes/1.14.txt
Normal file
1
nix/kubernetes/1.14.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
0z2chn8dqinc6cpyl9w1f3rn77qfxbbgzmrcvzal18a8pzd5rkcy
|
1
nix/kubernetes/1.15.txt
Normal file
1
nix/kubernetes/1.15.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
1gwvlflf0yha1qsv6lp1skqpbm22qiyc5bicp6s1w8rxz8wlcv91
|
1
nix/kubernetes/1.16.txt
Normal file
1
nix/kubernetes/1.16.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
01m3pcymbfg7vzdx9z08iilqlfn8w5myw6rlf4mjny76x380d94x
|
1
nix/kubernetes/1.17.txt
Normal file
1
nix/kubernetes/1.17.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
0q84xf16dl15s30awirsg73y9fbd9n6sr6163xvyjq5x8vf9axgj
|
1
nix/kubernetes/1.5.txt
Normal file
1
nix/kubernetes/1.5.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
1838jrzk7xn2m92xj9wl47rrg4ac46qrpcc99c3l06y9hlhhjfg5
|
1
nix/kubernetes/1.6.3.txt
Normal file
1
nix/kubernetes/1.6.3.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
08yzbcigmy35qi7xbpcm3sxbfw2bhvna2m6rqqnzfh64bl13c219
|
1
nix/kubernetes/1.6.txt
Normal file
1
nix/kubernetes/1.6.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
0szzcn0w8gsar2v0fm360abfbpjhakdnqhdxjpvddfwcbyz5f3c7
|
1
nix/kubernetes/1.7.txt
Normal file
1
nix/kubernetes/1.7.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
1icgc4b4jhf2zxvjczmmycn4kbg3k878jvpxzbw5kxbcql431754
|
1
nix/kubernetes/1.8.txt
Normal file
1
nix/kubernetes/1.8.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
02rdcly2vymakc94ivpy7wmmhwmm1j2wb7zk5jd5mynk5jighmij
|
1
nix/kubernetes/1.9.txt
Normal file
1
nix/kubernetes/1.9.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
1k01ww4qc8rsfk919gpyygmhmd31rjkzj20ng4mp5caii8fm821b
|
84
nix/make-dhall-kubernetes.nix
Normal file
84
nix/make-dhall-kubernetes.nix
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
{ coreutils
|
||||||
|
, dhall
|
||||||
|
, dhall-json
|
||||||
|
, dhallPackages
|
||||||
|
, glibcLocales
|
||||||
|
, haskellPackages
|
||||||
|
, lib
|
||||||
|
, python3
|
||||||
|
, stdenv
|
||||||
|
}:
|
||||||
|
|
||||||
|
spec:
|
||||||
|
|
||||||
|
let
|
||||||
|
# Ignore generated files
|
||||||
|
ignoreOutputs =
|
||||||
|
name: type:
|
||||||
|
!(lib.elem name
|
||||||
|
(map toString
|
||||||
|
[ ../README.md
|
||||||
|
../types
|
||||||
|
../defaults
|
||||||
|
../schemas
|
||||||
|
../defaults.dhall
|
||||||
|
../types.dhall
|
||||||
|
../typesUnion.dhall
|
||||||
|
../schemas.dhall
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "dhall-kubernetes";
|
||||||
|
|
||||||
|
DHALL_PRELUDE = "${dhallPackages.prelude}/package.dhall";
|
||||||
|
|
||||||
|
XDG_CACHE_HOME = ".";
|
||||||
|
|
||||||
|
buildInputs =
|
||||||
|
[ dhall
|
||||||
|
dhall-json
|
||||||
|
python3
|
||||||
|
glibcLocales
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
patchShebangs ./scripts/build-readme.sh
|
||||||
|
|
||||||
|
./scripts/build-readme.sh
|
||||||
|
|
||||||
|
${coreutils}/bin/mkdir -p types defaults
|
||||||
|
|
||||||
|
${haskellPackages.dhall-kubernetes-generator}/bin/dhall-kubernetes-generator '${spec}'
|
||||||
|
|
||||||
|
for file in ./types.dhall ./typesUnion.dhall ./defaults.dhall ./schemas.dhall ./package.dhall ./examples/*.dhall; do
|
||||||
|
echo "Freezing file '$file'"
|
||||||
|
|
||||||
|
${dhall}/bin/dhall freeze --all --inplace "$file"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
patchShebangs ./scripts/build-examples.py
|
||||||
|
|
||||||
|
patchShebangs ./scripts/check-source.py
|
||||||
|
|
||||||
|
LC_ALL=en_US.UTF-8 ./scripts/check-source.py
|
||||||
|
|
||||||
|
mkdir -p tmp
|
||||||
|
|
||||||
|
LC_ALL=en_US.UTF-8 ./scripts/build-examples.py tmp
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
${coreutils}/bin/mkdir --parents "$out"
|
||||||
|
|
||||||
|
cp -r types defaults schemas examples types.dhall defaults.dhall typesUnion.dhall schemas.dhall package.dhall README.md "$out"
|
||||||
|
'';
|
||||||
|
|
||||||
|
src =
|
||||||
|
lib.cleanSourceWith
|
||||||
|
{ filter = ignoreOutputs; src = lib.cleanSource ./..; };
|
||||||
|
}
|
@ -7,11 +7,10 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
packageOverrides = pkgs: {
|
packageOverrides = pkgs: rec {
|
||||||
dhall-kubernetes = pkgs.callPackage ./dhall-kubernetes.nix {};
|
make-dhall-kubernetes = pkgs.callPackage ./make-dhall-kubernetes.nix {};
|
||||||
|
|
||||||
kubernetes-openapi-spec =
|
dhall-kubernetes = pkgs.callPackage ./dhall-kubernetes.nix {};
|
||||||
pkgs.callPackage ./kubernetes-openapi-spec.nix {};
|
|
||||||
|
|
||||||
haskellPackages = pkgs.haskellPackages.override (old: {
|
haskellPackages = pkgs.haskellPackages.override (old: {
|
||||||
overrides =
|
overrides =
|
||||||
|
1
nix/preferred.txt
Normal file
1
nix/preferred.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
1.16
|
@ -1,7 +1,7 @@
|
|||||||
./schemas.dhall sha256:bd5cfc1abae136959fc13c483d6ebe7ffef906dc23cdd5153cc57da9f6aa6fce
|
./schemas.dhall sha256:f6943c82da5de5d5734d519795a9a0a07fbb88b848e7cbb66fd3b9244b8eee1e
|
||||||
∧ { IntOrString =
|
∧ { IntOrString =
|
||||||
( ./types.dhall sha256:59cfe76addc3e3be9c80a82f47e08aaee3b4ce8df11f57bf1800917ce709babe
|
( ./types.dhall sha256:e62539f41a3b4bf302318f95da6fdea5d28aae856405f7e280627040887a4039
|
||||||
).IntOrString
|
).IntOrString
|
||||||
, Resource =
|
, Resource =
|
||||||
./typesUnion.dhall sha256:c861da8dcaa0d1b0f542fa8bb97536a746d3cc4d3d2e1284012be0596bc08c15
|
./typesUnion.dhall sha256:ba8ebd9c402a007aea9db8c5faf0f5f4f9d9f8d8acc415485f55302462c2f555
|
||||||
}
|
}
|
||||||
|
31
release.nix
31
release.nix
@ -2,17 +2,24 @@
|
|||||||
, src ? { rev = ""; }
|
, src ? { rev = ""; }
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
rec {
|
|
||||||
inherit (pkgs) dhall-kubernetes;
|
let
|
||||||
inherit (pkgs.haskellPackages) dhall-kubernetes-generator;
|
products = {
|
||||||
# Derivation that trivially depends on the input source code revision.
|
inherit (pkgs.haskellPackages) dhall-kubernetes-generator;
|
||||||
# As this is included in the "dhall-lang" aggregate, it forces every
|
|
||||||
# commit to have a corresponding GitHub status check, even if the
|
# Derivation that trivially depends on the input source code revision.
|
||||||
# commit doesn't make any changes (which can happen when merging
|
# As this is included in the "dhall-lang" aggregate, it forces every
|
||||||
# master in).
|
# commit to have a corresponding GitHub status check, even if the
|
||||||
rev = pkgs.runCommand "rev" {} ''echo "${src.rev}" > $out'';
|
# commit doesn't make any changes (which can happen when merging
|
||||||
|
# master in).
|
||||||
|
rev = pkgs.runCommand "rev" {} ''echo "${src.rev}" > $out'';
|
||||||
|
} // builtins.removeAttrs pkgs.dhall-kubernetes
|
||||||
|
[ "override" "overrideDerivation" ];
|
||||||
|
|
||||||
aggregate = pkgs.releaseTools.aggregate {
|
aggregate = pkgs.releaseTools.aggregate {
|
||||||
name = "dhall-kubernetes-agggregate";
|
name = "dhall-kubernetes-aggregate";
|
||||||
constituents = [ dhall-kubernetes dhall-kubernetes-generator rev ];
|
constituents = pkgs.lib.mapAttrsToList (_: v: v) products;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
in
|
||||||
|
products // { inherit aggregate; }
|
||||||
|
@ -735,31 +735,31 @@
|
|||||||
, CustomResourceConversion =
|
, CustomResourceConversion =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion.dhall sha256:84389e86c876d527da8d0a915cd4036f6666ae94486cc2fb58173ce06b23333f
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion.dhall sha256:84389e86c876d527da8d0a915cd4036f6666ae94486cc2fb58173ce06b23333f
|
||||||
, CustomResourceDefinition =
|
, CustomResourceDefinition =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition.dhall sha256:8a1979bbfef150e1e1504d19f844c4b839e1216243e97879d66d507d1060704c
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition.dhall sha256:a84ce984f7f33f0c9d8967b854f55c05e42cb7854491377a5103fcfc027140b8
|
||||||
, CustomResourceDefinitionCondition =
|
, CustomResourceDefinitionCondition =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition.dhall sha256:47ec59edf7c6f9429301ee78bfdfc84bbfdbf494fe3b461db05ae03de8c6817d
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition.dhall sha256:47ec59edf7c6f9429301ee78bfdfc84bbfdbf494fe3b461db05ae03de8c6817d
|
||||||
, CustomResourceDefinitionList =
|
, CustomResourceDefinitionList =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList.dhall sha256:3e833717414b5d3a47dfd5b89d79cf7509e0fcafb3e249796322f8be2f601a75
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList.dhall sha256:991bc92cd163f2c2d86bad3fdf92f2dd167da5ea276b37eb71e264a73c016e57
|
||||||
, CustomResourceDefinitionNames =
|
, CustomResourceDefinitionNames =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames.dhall sha256:e1397c76ee13f2ef8d1c3a4a39d42a3541e26751940d9a92b2dac3443f4b2ef3
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames.dhall sha256:e1397c76ee13f2ef8d1c3a4a39d42a3541e26751940d9a92b2dac3443f4b2ef3
|
||||||
, CustomResourceDefinitionSpec =
|
, CustomResourceDefinitionSpec =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec.dhall sha256:477749de30bad77861bbffe5271ccc4abd239926a91430b10fe131843b2c5de8
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec.dhall sha256:2a3a7c3f6df1b8d519c8158601b2c9b9ef0b9707ddbff69aa89a8c4b18199bc7
|
||||||
, CustomResourceDefinitionStatus =
|
, CustomResourceDefinitionStatus =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus.dhall sha256:4df5a2b66e0f4c0ea728989c7873b634c912b9598296da2c7272a0425b5f351e
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus.dhall sha256:4df5a2b66e0f4c0ea728989c7873b634c912b9598296da2c7272a0425b5f351e
|
||||||
, CustomResourceDefinitionVersion =
|
, CustomResourceDefinitionVersion =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion.dhall sha256:f835db9d839f378ac790bc1f9153a6dc8fb6a2143d4ba7fb08bb663a3592f223
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion.dhall sha256:5b85808062cc90aed738f2230313b9b4a96a2ca7a5fea5a22dd998bb31957ed2
|
||||||
, CustomResourceSubresourceScale =
|
, CustomResourceSubresourceScale =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale.dhall sha256:f88ea71fc0f62e1bdbf5dfa141837e4be12f302248528b61d20c0adf0b5cff63
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale.dhall sha256:f88ea71fc0f62e1bdbf5dfa141837e4be12f302248528b61d20c0adf0b5cff63
|
||||||
, CustomResourceSubresources =
|
, CustomResourceSubresources =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources.dhall sha256:1d0db47454d301f02169fb4d472b3bd1f9331750a00d7d108f67074367ebb483
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources.dhall sha256:1d0db47454d301f02169fb4d472b3bd1f9331750a00d7d108f67074367ebb483
|
||||||
, CustomResourceValidation =
|
, CustomResourceValidation =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation.dhall sha256:17b2ff74aa50cd9cb3f0771edf42bc76199da03bd84dc51ac712538f180ad2f8
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation.dhall sha256:0400fd741482ff4882b6ed717dd950da84f9bcac78756222a7d7a1a965d7b6a2
|
||||||
, ExternalDocumentation =
|
, ExternalDocumentation =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation.dhall sha256:d028dfb12958fddb9658597805976d8e72509c0b058970e7f9be3519c91f37d0
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation.dhall sha256:d028dfb12958fddb9658597805976d8e72509c0b058970e7f9be3519c91f37d0
|
||||||
, JSON =
|
, JSON =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall sha256:81a1bf11fb9dc588941bd83400ed571298585a700a53e858456806f7ea3b8ce2
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall sha256:81a1bf11fb9dc588941bd83400ed571298585a700a53e858456806f7ea3b8ce2
|
||||||
, JSONSchemaProps =
|
, JSONSchemaProps =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.dhall sha256:c362693ae3241b29db963ce04ea41e42c89a8b6f353fbf4a63dfc1f9bfa8d598
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.dhall sha256:92ef0421a9c4cb27b778cfdee336120304cce4dd4920b9dbda844d269c662160
|
||||||
, JSONSchemaPropsOrArray =
|
, JSONSchemaPropsOrArray =
|
||||||
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray.dhall sha256:81a1bf11fb9dc588941bd83400ed571298585a700a53e858456806f7ea3b8ce2
|
./schemas/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray.dhall sha256:81a1bf11fb9dc588941bd83400ed571298585a700a53e858456806f7ea3b8ce2
|
||||||
, JSONSchemaPropsOrBool =
|
, JSONSchemaPropsOrBool =
|
||||||
|
7
scripts/add-kubernetes-release.sh
Executable file
7
scripts/add-kubernetes-release.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
VERSION="$1"
|
||||||
|
|
||||||
|
nix-prefetch-url "https://github.com/kubernetes/kubernetes/archive/release-${VERSION}.tar.gz" > "nix/kubernetes/${VERSION}.txt"
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if dir=$(nix-build release.nix --attr dhall-kubernetes --no-out-link); then
|
if dir=$(nix-build release.nix --attr "\"$(< ./nix/preferred.txt)\"" --no-out-link); then
|
||||||
rm -rf ./defaults ./types
|
rm -rf ./defaults ./types
|
||||||
cp -r "$dir"/defaults .
|
cp -r "$dir"/defaults .
|
||||||
chmod u+w ./defaults
|
chmod u+w ./defaults
|
||||||
|
12
types.dhall
12
types.dhall
@ -735,19 +735,19 @@
|
|||||||
, CustomResourceConversion =
|
, CustomResourceConversion =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion.dhall sha256:52f61f62579efc9b87e5fed9951acc40fddbdd8eecca922f6cc551a5588b3712
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion.dhall sha256:52f61f62579efc9b87e5fed9951acc40fddbdd8eecca922f6cc551a5588b3712
|
||||||
, CustomResourceDefinition =
|
, CustomResourceDefinition =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition.dhall sha256:3bc3280d014370cc259768bf853fb0257db91ab9072de8d87967983970d35758
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition.dhall sha256:cb1a053f9fc10c6f52a5f83c97e64a82352e2f3d7d2b2f73b6a3ec548801eb0e
|
||||||
, CustomResourceDefinitionCondition =
|
, CustomResourceDefinitionCondition =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition.dhall sha256:10de5e5aed3f6e1721f79bd8e2f9ffcecb92658fbe7442e6eaf74c6780b4779d
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition.dhall sha256:10de5e5aed3f6e1721f79bd8e2f9ffcecb92658fbe7442e6eaf74c6780b4779d
|
||||||
, CustomResourceDefinitionList =
|
, CustomResourceDefinitionList =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList.dhall sha256:ac73aa4ab0fb2e9968aeea4d1aa8255d0971c63873a103aadd3bfeef860e0cf1
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList.dhall sha256:adfbed123664ac31d68dda0880a503436d784565958671a4b3e0c27a711aceaa
|
||||||
, CustomResourceDefinitionNames =
|
, CustomResourceDefinitionNames =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames.dhall sha256:0278161a6b3294f036a73cd3c4dc3d0b304f683ba9de276a119c634ff73e9fb1
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames.dhall sha256:0278161a6b3294f036a73cd3c4dc3d0b304f683ba9de276a119c634ff73e9fb1
|
||||||
, CustomResourceDefinitionSpec =
|
, CustomResourceDefinitionSpec =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec.dhall sha256:64f5e17c0be23ef0cc9cebde90d887a4ed50ea724a866596fe5f205269682aa7
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec.dhall sha256:58465ddaeee8ef1d1ffc5105671dd69d5ab6001968627bdc6fce124fd8bc0535
|
||||||
, CustomResourceDefinitionStatus =
|
, CustomResourceDefinitionStatus =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus.dhall sha256:9760548a849877dfd2a7411930d68a4974da897b83937d1e5c4c0e9bdf82d50f
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus.dhall sha256:9760548a849877dfd2a7411930d68a4974da897b83937d1e5c4c0e9bdf82d50f
|
||||||
, CustomResourceDefinitionVersion =
|
, CustomResourceDefinitionVersion =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion.dhall sha256:4397e19113e06dff2dff0aa43dd97d87fc9305611e0e46bde9d2dbc44267ccd0
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion.dhall sha256:0dff46037720814fafe44d019b8b16abf3195e2d7d6c27c89ba4a74f8b819d60
|
||||||
, CustomResourceSubresourceScale =
|
, CustomResourceSubresourceScale =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale.dhall sha256:6733049a96431ae2b72e7d6b17a24204a0ef148aef08725e02f8da00339525a6
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale.dhall sha256:6733049a96431ae2b72e7d6b17a24204a0ef148aef08725e02f8da00339525a6
|
||||||
, CustomResourceSubresourceStatus =
|
, CustomResourceSubresourceStatus =
|
||||||
@ -755,13 +755,13 @@
|
|||||||
, CustomResourceSubresources =
|
, CustomResourceSubresources =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources.dhall sha256:0581868225988fcffb65edf1f9e9c9edd9bb509b8821ffd6941728d00f976640
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources.dhall sha256:0581868225988fcffb65edf1f9e9c9edd9bb509b8821ffd6941728d00f976640
|
||||||
, CustomResourceValidation =
|
, CustomResourceValidation =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation.dhall sha256:44ae4096d58f78fae63b89981954e142788fd7968be4738070b4fbdb8a7767dc
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation.dhall sha256:a7144e84a9a050ebd8768596da8c24b2f69dd30cc2374827025be2508b775136
|
||||||
, ExternalDocumentation =
|
, ExternalDocumentation =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation.dhall sha256:75a79c871f43a432b402f8a5d52f277bb827f5170ecfed101ed356a91ccbce91
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation.dhall sha256:75a79c871f43a432b402f8a5d52f277bb827f5170ecfed101ed356a91ccbce91
|
||||||
, JSON =
|
, JSON =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall sha256:0912602a19e01dcff30f351958d2d9b69519c9be61b57b1b32a2a569bf8bf5f9
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall sha256:0912602a19e01dcff30f351958d2d9b69519c9be61b57b1b32a2a569bf8bf5f9
|
||||||
, JSONSchemaProps =
|
, JSONSchemaProps =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.dhall sha256:32b8c3a4615735cbf9f5d9fe3f99b47a28e9ce4c6d2e11bbeaf1a925c7bdf3b4
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.dhall sha256:712211f2527ee07ca2a1f1dbbfdf7d1822d9844107aa170c37d67b4103d264cd
|
||||||
, JSONSchemaPropsOrArray =
|
, JSONSchemaPropsOrArray =
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray.dhall sha256:0912602a19e01dcff30f351958d2d9b69519c9be61b57b1b32a2a569bf8bf5f9
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray.dhall sha256:0912602a19e01dcff30f351958d2d9b69519c9be61b57b1b32a2a569bf8bf5f9
|
||||||
, JSONSchemaPropsOrBool =
|
, JSONSchemaPropsOrBool =
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
{ additionalItems :
|
{ default :
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool.dhall
|
|
||||||
, additionalProperties :
|
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool.dhall
|
|
||||||
, default :
|
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall
|
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall
|
||||||
, definitions : List { mapKey : Text, mapValue : Text }
|
, definitions : List { mapKey : Text, mapValue : Text }
|
||||||
, dependencies : List { mapKey : Text, mapValue : Text }
|
, dependencies : List { mapKey : Text, mapValue : Text }
|
||||||
@ -12,8 +8,6 @@
|
|||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall
|
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall
|
||||||
, externalDocs :
|
, externalDocs :
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation.dhall
|
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation.dhall
|
||||||
, items :
|
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray.dhall
|
|
||||||
, patternProperties : List { mapKey : Text, mapValue : Text }
|
, patternProperties : List { mapKey : Text, mapValue : Text }
|
||||||
, properties : List { mapKey : Text, mapValue : Text }
|
, properties : List { mapKey : Text, mapValue : Text }
|
||||||
, required : List Text
|
, required : List Text
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
{ additionalItems :
|
{ default :
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool.dhall
|
|
||||||
, additionalProperties :
|
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool.dhall
|
|
||||||
, default :
|
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON.dhall
|
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON.dhall
|
||||||
, definitions : List { mapKey : Text, mapValue : Text }
|
, definitions : List { mapKey : Text, mapValue : Text }
|
||||||
, dependencies : List { mapKey : Text, mapValue : Text }
|
, dependencies : List { mapKey : Text, mapValue : Text }
|
||||||
@ -13,8 +9,6 @@
|
|||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON.dhall
|
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON.dhall
|
||||||
, externalDocs :
|
, externalDocs :
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation.dhall
|
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation.dhall
|
||||||
, items :
|
|
||||||
./io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray.dhall
|
|
||||||
, patternProperties : List { mapKey : Text, mapValue : Text }
|
, patternProperties : List { mapKey : Text, mapValue : Text }
|
||||||
, properties : List { mapKey : Text, mapValue : Text }
|
, properties : List { mapKey : Text, mapValue : Text }
|
||||||
, required : List Text
|
, required : List Text
|
||||||
|
@ -735,19 +735,19 @@
|
|||||||
| CustomResourceConversion :
|
| CustomResourceConversion :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion.dhall sha256:52f61f62579efc9b87e5fed9951acc40fddbdd8eecca922f6cc551a5588b3712
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion.dhall sha256:52f61f62579efc9b87e5fed9951acc40fddbdd8eecca922f6cc551a5588b3712
|
||||||
| CustomResourceDefinition :
|
| CustomResourceDefinition :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition.dhall sha256:3bc3280d014370cc259768bf853fb0257db91ab9072de8d87967983970d35758
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition.dhall sha256:cb1a053f9fc10c6f52a5f83c97e64a82352e2f3d7d2b2f73b6a3ec548801eb0e
|
||||||
| CustomResourceDefinitionCondition :
|
| CustomResourceDefinitionCondition :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition.dhall sha256:10de5e5aed3f6e1721f79bd8e2f9ffcecb92658fbe7442e6eaf74c6780b4779d
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition.dhall sha256:10de5e5aed3f6e1721f79bd8e2f9ffcecb92658fbe7442e6eaf74c6780b4779d
|
||||||
| CustomResourceDefinitionList :
|
| CustomResourceDefinitionList :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList.dhall sha256:ac73aa4ab0fb2e9968aeea4d1aa8255d0971c63873a103aadd3bfeef860e0cf1
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList.dhall sha256:adfbed123664ac31d68dda0880a503436d784565958671a4b3e0c27a711aceaa
|
||||||
| CustomResourceDefinitionNames :
|
| CustomResourceDefinitionNames :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames.dhall sha256:0278161a6b3294f036a73cd3c4dc3d0b304f683ba9de276a119c634ff73e9fb1
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames.dhall sha256:0278161a6b3294f036a73cd3c4dc3d0b304f683ba9de276a119c634ff73e9fb1
|
||||||
| CustomResourceDefinitionSpec :
|
| CustomResourceDefinitionSpec :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec.dhall sha256:64f5e17c0be23ef0cc9cebde90d887a4ed50ea724a866596fe5f205269682aa7
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec.dhall sha256:58465ddaeee8ef1d1ffc5105671dd69d5ab6001968627bdc6fce124fd8bc0535
|
||||||
| CustomResourceDefinitionStatus :
|
| CustomResourceDefinitionStatus :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus.dhall sha256:9760548a849877dfd2a7411930d68a4974da897b83937d1e5c4c0e9bdf82d50f
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus.dhall sha256:9760548a849877dfd2a7411930d68a4974da897b83937d1e5c4c0e9bdf82d50f
|
||||||
| CustomResourceDefinitionVersion :
|
| CustomResourceDefinitionVersion :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion.dhall sha256:4397e19113e06dff2dff0aa43dd97d87fc9305611e0e46bde9d2dbc44267ccd0
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion.dhall sha256:0dff46037720814fafe44d019b8b16abf3195e2d7d6c27c89ba4a74f8b819d60
|
||||||
| CustomResourceSubresourceScale :
|
| CustomResourceSubresourceScale :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale.dhall sha256:6733049a96431ae2b72e7d6b17a24204a0ef148aef08725e02f8da00339525a6
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale.dhall sha256:6733049a96431ae2b72e7d6b17a24204a0ef148aef08725e02f8da00339525a6
|
||||||
| CustomResourceSubresourceStatus :
|
| CustomResourceSubresourceStatus :
|
||||||
@ -755,13 +755,13 @@
|
|||||||
| CustomResourceSubresources :
|
| CustomResourceSubresources :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources.dhall sha256:0581868225988fcffb65edf1f9e9c9edd9bb509b8821ffd6941728d00f976640
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources.dhall sha256:0581868225988fcffb65edf1f9e9c9edd9bb509b8821ffd6941728d00f976640
|
||||||
| CustomResourceValidation :
|
| CustomResourceValidation :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation.dhall sha256:44ae4096d58f78fae63b89981954e142788fd7968be4738070b4fbdb8a7767dc
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation.dhall sha256:a7144e84a9a050ebd8768596da8c24b2f69dd30cc2374827025be2508b775136
|
||||||
| ExternalDocumentation :
|
| ExternalDocumentation :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation.dhall sha256:75a79c871f43a432b402f8a5d52f277bb827f5170ecfed101ed356a91ccbce91
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation.dhall sha256:75a79c871f43a432b402f8a5d52f277bb827f5170ecfed101ed356a91ccbce91
|
||||||
| JSON :
|
| JSON :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall sha256:0912602a19e01dcff30f351958d2d9b69519c9be61b57b1b32a2a569bf8bf5f9
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON.dhall sha256:0912602a19e01dcff30f351958d2d9b69519c9be61b57b1b32a2a569bf8bf5f9
|
||||||
| JSONSchemaProps :
|
| JSONSchemaProps :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.dhall sha256:32b8c3a4615735cbf9f5d9fe3f99b47a28e9ce4c6d2e11bbeaf1a925c7bdf3b4
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.dhall sha256:712211f2527ee07ca2a1f1dbbfdf7d1822d9844107aa170c37d67b4103d264cd
|
||||||
| JSONSchemaPropsOrArray :
|
| JSONSchemaPropsOrArray :
|
||||||
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray.dhall sha256:0912602a19e01dcff30f351958d2d9b69519c9be61b57b1b32a2a569bf8bf5f9
|
./types/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray.dhall sha256:0912602a19e01dcff30f351958d2d9b69519c9be61b57b1b32a2a569bf8bf5f9
|
||||||
| JSONSchemaPropsOrBool :
|
| JSONSchemaPropsOrBool :
|
||||||
|
Loading…
Reference in New Issue
Block a user