mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-09-17 10:27:08 +03:00
1feeeac87a
The `kind` and `apiVersion` properties of a Kubernetes resource are already implicitly determined by the resource. We adjust the default functions so that they do not require the `kind` and `apiVersion` parameters for resources. We obtain the implied values by inspecting the `x-kubernetes-group-version-kind` key from the OpenAPI schema for that resource. The [Kubernetes OpenAPI Spec Readme][1] explains how these values determine the resource values. [1]: https://github.com/kubernetes/kubernetes/blob/master/api/openapi-spec/README.md#x-kubernetes-group-version-kind
9 lines
551 B
Plaintext
9 lines
551 B
Plaintext
\(_params : {name : (Text), versions : (List ../types/io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery.dhall)}) ->
|
|
{ apiVersion = ("v1" : Text)
|
|
, kind = ("APIGroup" : Text)
|
|
, name = _params.name
|
|
, preferredVersion = ([] : Optional (../types/io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery.dhall))
|
|
, serverAddressByClientCIDRs = ([] : Optional (List ../types/io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR.dhall))
|
|
, versions = _params.versions
|
|
} : ../types/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup.dhall
|