Documentation ¶
Index ¶
Constants ¶
const ( ResourceClusterRole = "clusterroles" ResourceClusterRoleBinding = "clusterrolebindings" ResourceConfigMap = "configmaps" ResourceCronJob = "cronjobs" ResourceDaemonSet = "daemonsets" ResourceDeployment = "deployments" ResourceIngress = "ingresses" ResourceIngressClass = "ingressclasses" ResourceJob = "jobs" ResourceNamespace = "namespaces" ResourceNetworkPolicy = "networkpolicies" ResourceNode = "nodes" ResourcePersistentVolume = "persistentvolumes" ResourcePersistentVolumeClaim = "persistentvolumeclaims" ResourcePod = "pods" ResourceReplicaSet = "replicasets" ResourceReplicationController = "replicationcontrollers" ResourceRole = "roles" ResourceRoleBinding = "rolebindings" ResourceSecret = "secrets" ResourceService = "services" ResourceServiceAccount = "serviceaccounts" ResourceStatefulSet = "statefulsets" ResourceStorageClass = "storageclasses" )
k8s resource name
const ( KindClusterRole = "ClusterRole" KindClusterRoleBinding = "ClusterRoleBinding" KindConfigMap = "ConfigMap" KindCronJob = "CronJob" KindDaemonSet = "DaemonSet" KindDeployment = "Deployment" KindIngress = "Ingress" KindIngressClass = "IngressClass" KindJob = "Job" KindNamespace = "Namespace" KindNetworkPolicy = "NetworkPolicy" KindNode = "Node" KindPersistentVolume = "PersistentVolume" KindPersistentVolumeClaim = "PersistentVolumeClaim" KindPod = "Pod" KindReplicaSet = "ReplicaSet" KindReplicationController = "ReplicationController" KindRole = "Role" KindRoleBinding = "RoleBinding" KindSecret = "Secret" KindService = "Service" KindServiceAccount = "ServiceAccount" KindStatefulSet = "StatefulSet" KindStorageClass = "StorageClass" )
k8s resource kind
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerInterface ¶ added in v0.7.0
type HandlerOptions ¶
type HandlerOptions struct { ListOptions metav1.ListOptions GetOptions metav1.GetOptions CreateOptions metav1.CreateOptions DeleteOptions metav1.DeleteOptions ApplyOptions metav1.ApplyOptions UpdateOptions metav1.UpdateOptions PatchOptions metav1.PatchOptions }
type Object ¶ added in v0.6.1
Object is a Kubernetes object, allows functions to work indistinctly with any resource that implements both Object interfaces.
Semantically, these are objects which are both serializable (runtime.Object) and identifiable (metav1.Object) -- think any object which you could write as YAML or JSON, and then `kubectl create`.
Code-wise, this means that any object which embeds both ObjectMeta (which provides metav1.Object) and TypeMeta (which provides half of runtime.Object) and has a `DeepCopyObject` implementation (the other half of runtime.Object) will implement this by default.
For example, nearly all the built-in types are Objects, as well as all KubeBuilder-generated CRDs (unless you do something real funky to them).
By and large, most things that implement runtime.Object also implement Object -- it's very rare to have *just* a runtime.Object implementation (the cases tend to be funky built-in types like Webhook payloads that don't have a `metadata` field).
Notice that XYZList types are distinct: they implement ObjectList instead.
type ObjectList ¶ added in v0.6.1
type ObjectList interface { metav1.ListInterface runtime.Object }
ObjectList is a Kubernetes object list, allows functions to work indistinctly with any resource that implements both runtime.Object and metav1.ListInterface interfaces.
Semantically, this is any object which may be serialized (ObjectMeta), and is a kubernetes list wrapper (has items, pagination fields, etc) -- think the wrapper used in a response from a `kubectl list --output yaml` call.
Code-wise, this means that any object which embedds both ListMeta (which provides metav1.ListInterface) and TypeMeta (which provides half of runtime.Object) and has a `DeepCopyObject` implementation (the other half of runtime.Object) will implement this by default.
For example, nearly all the built-in XYZList types are ObjectLists, as well as the XYZList types for all KubeBuilder-generated CRDs (unless you do something real funky to them).
By and large, most things that are XYZList and implement runtime.Object also implement ObjectList -- it's very rare to have *just* a runtime.Object implementation (the cases tend to be funky built-in types like Webhook payloads that don't have a `metadata` field).
This is similar to Object, which is almost always implemented by the items in the list themselves.