{-# LANGUAGE DeriveGeneric #-}

module Kubernetes.V1.Node
where

import Data.Aeson
import System.IO.Streams()
import GHC.Generics (Generic)

import Kubernetes.V1.Metadata

{-
v1.Node {
kind (string, optional): kind of object, in CamelCase; cannot be updated,
apiVersion (string, optional): version of the schema the object should have,
metadata (v1.ObjectMeta, optional): standard object metadata; see http://docs.k8s.io/api-conventions.md#metadata,
spec (v1.NodeSpec, optional): specification of a node; http://docs.k8s.io/api-conventions.md#spec-and-status,
status (v1.NodeStatus, optional): most recently observed status of the node; populated by the system, read-only; http://docs.k8s.io/api-conventions.md#spec-and-status
}
v1.ObjectMeta {
name (string, optional): string that identifies an object. Must be unique within a namespace; cannot be updated,
generateName (string, optional): an optional prefix to use to generate a unique name; has the same validation rules as name; optional, and is applied only name if is not specified,
namespace (string, optional): namespace of the object; must be a DNS_LABEL; cannot be updated,
selfLink (string, optional): URL for the object; populated by the system, read-only,
uid (string, optional): unique UUID across space and time; populated by the system; read-only,
resourceVersion (string, optional): string that identifies the internal version of this object that can be used by clients to determine when objects have changed; populated by the system, read-only; value must be treated as opaque by clients and passed unmodified back to the server: http://docs.k8s.io/api-conventions.md#concurrency-control-and-consistency,
creationTimestamp (string, optional): RFC 3339 date and time at which the object was created; populated by the system, read-only; null for lists,
deletionTimestamp (string, optional): RFC 3339 date and time at which the object will be deleted; populated by the system when a graceful deletion is requested, read-only; if not set, graceful deletion of the object has not been requested,
labels (any, optional): map of string keys and values that can be used to organize and categorize objects; may match selectors of replication controllers and services,
annotations (any, optional): map of string keys and values that can be used by external tooling to store and retrieve arbitrary metadata about objects
}
v1.NodeSpec {
podCIDR (string, optional): pod IP range assigned to the node,
externalID (string, optional): deprecated. External ID assigned to the node by some machine database (e.g. a cloud provider). Defaults to node name when empty.,
providerID (string, optional): ID of the node assigned by the cloud provider in the format: ://,
unschedulable (boolean, optional): disable pod scheduling on the node
}
v1.NodeStatus {
capacity (any, optional): compute resource capacity of the node; http://docs.k8s.io/resources.md,
phase (string, optional): most recently observed lifecycle phase of the node,
conditions (array[v1.NodeCondition], optional): list of node conditions observed,
addresses (array[v1.NodeAddress], optional): list of addresses reachable to the node,
nodeInfo (v1.NodeSystemInfo, optional): set of ids/uuids to uniquely identify the node
}
v1.NodeCondition {
type (string): type of node condition, currently only Ready,
status (string): status of the condition, one of True, False, Unknown,
lastHeartbeatTime (string, optional): last time we got an update on a given condition,
lastTransitionTime (string, optional): last time the condition transit from one status to another,
reason (string, optional): (brief) reason for the condition's last transition,
message (string, optional): human readable message indicating details about last transition
}
v1.NodeAddress {
type (string): node address type, one of Hostname, ExternalIP or InternalIP,
address (string): the node address
}
v1.NodeSystemInfo {
machineID (string): machine-id reported by the node,
systemUUID (string): system-uuid reported by the node,
bootID (string): boot id is the boot-id reported by the node,
kernelVersion (string): Kernel version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64),
osImage (string): OS image used reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)),
containerRuntimeVersion (string): Container runtime version reported by the node through runtime remote API (e.g. docker://1.5.0),
kubeletVersion (string): Kubelet version reported by the node,
kubeProxyVersion (string): Kube-proxy version reported by the node
}
-}

data Node
  = Node {metadata :: Metadata}
    deriving (Show, Generic)

instance FromJSON Node
