summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-03-26 18:26:55 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-27 18:09:12 +0000
commitaf64e10400f8533a0c48ecdf5ab9b7fbf329e14e (patch)
tree59160e3841b440dd35189c724bbb4375a7be173b /vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go
parent26d7e3c7b85e28c4e42998c90fdcc14079f13eef (diff)
downloadpodman-af64e10400f8533a0c48ecdf5ab9b7fbf329e14e.tar.gz
podman-af64e10400f8533a0c48ecdf5ab9b7fbf329e14e.tar.bz2
podman-af64e10400f8533a0c48ecdf5ab9b7fbf329e14e.zip
Vendor in lots of kubernetes stuff to shrink image size
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #554 Approved by: mheon
Diffstat (limited to 'vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go')
-rw-r--r--vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go76
1 files changed, 38 insertions, 38 deletions
diff --git a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go
index 5648750ea..3825a1cc7 100644
--- a/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go
+++ b/vendor/k8s.io/client-go/kubernetes/typed/core/v1/pod.go
@@ -1,5 +1,5 @@
/*
-Copyright 2017 The Kubernetes Authors.
+Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -17,11 +17,11 @@ limitations under the License.
package v1
import (
+ v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
- v1 "k8s.io/client-go/pkg/api/v1"
rest "k8s.io/client-go/rest"
)
@@ -59,6 +59,41 @@ func newPods(c *CoreV1Client, namespace string) *pods {
}
}
+// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any.
+func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err error) {
+ result = &v1.Pod{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("pods").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Pods that match those selectors.
+func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) {
+ result = &v1.PodList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("pods").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Do().
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested pods.
+func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("pods").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Watch()
+}
+
// Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any.
func (c *pods) Create(pod *v1.Pod) (result *v1.Pod, err error) {
result = &v1.Pod{}
@@ -85,7 +120,7 @@ func (c *pods) Update(pod *v1.Pod) (result *v1.Pod, err error) {
}
// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
+// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *pods) UpdateStatus(pod *v1.Pod) (result *v1.Pod, err error) {
result = &v1.Pod{}
@@ -122,41 +157,6 @@ func (c *pods) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta
Error()
}
-// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any.
-func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err error) {
- result = &v1.Pod{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("pods").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Pods that match those selectors.
-func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) {
- result = &v1.PodList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("pods").
- VersionedParams(&opts, scheme.ParameterCodec).
- Do().
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested pods.
-func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("pods").
- VersionedParams(&opts, scheme.ParameterCodec).
- Watch()
-}
-
// Patch applies the patch and returns the patched pod.
func (c *pods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) {
result = &v1.Pod{}