mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-11-03 21:05:47 +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
13 lines
675 B
Plaintext
13 lines
675 B
Plaintext
\(_params : {metadata : (../types/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta.dhall), provisioner : (Text)}) ->
|
|
{ allowVolumeExpansion = ([] : Optional (Bool))
|
|
, allowedTopologies = ([] : Optional (List ../types/io.k8s.api.core.v1.TopologySelectorTerm.dhall))
|
|
, apiVersion = ("storage.k8s.io/v1beta1" : Text)
|
|
, kind = ("StorageClass" : Text)
|
|
, metadata = _params.metadata
|
|
, mountOptions = ([] : Optional (List Text))
|
|
, parameters = ([] : Optional ((List {mapKey : Text, mapValue : Text})))
|
|
, provisioner = _params.provisioner
|
|
, reclaimPolicy = ([] : Optional (Text))
|
|
, volumeBindingMode = ([] : Optional (Text))
|
|
} : ../types/io.k8s.api.storage.v1beta1.StorageClass.dhall
|