mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #41901 from soltysh/cronjobs_beta
Automatic merge from submit-queue Promote CronJobs to batch/v1beta1 - just the API This PR promotes CronJobs to beta. @erictune @kubernetes/sig-apps-api-reviews @kubernetes/api-approvers ptal This builds on top of #41890 and needs #40932 as well ```release-note Promote CronJobs to batch/v1beta1. ```
This commit is contained in:
		
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										3667
									
								
								api/swagger-spec/batch_v1beta1.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3667
									
								
								api/swagger-spec/batch_v1beta1.json
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -61,6 +61,10 @@
 | 
				
			|||||||
    "path": "/apis/batch/v1",
 | 
					    "path": "/apis/batch/v1",
 | 
				
			||||||
    "description": "API at /apis/batch/v1"
 | 
					    "description": "API at /apis/batch/v1"
 | 
				
			||||||
   },
 | 
					   },
 | 
				
			||||||
 | 
					   {
 | 
				
			||||||
 | 
					    "path": "/apis/batch/v1beta1",
 | 
				
			||||||
 | 
					    "description": "API at /apis/batch/v1beta1"
 | 
				
			||||||
 | 
					   },
 | 
				
			||||||
   {
 | 
					   {
 | 
				
			||||||
    "path": "/apis/batch/v2alpha1",
 | 
					    "path": "/apis/batch/v2alpha1",
 | 
				
			||||||
    "description": "API at /apis/batch/v2alpha1"
 | 
					    "description": "API at /apis/batch/v2alpha1"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -182,6 +182,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{
 | 
				
			|||||||
	{Group: "autoscaling", Version: "v1"}:                        {group: 17500, version: 15},
 | 
						{Group: "autoscaling", Version: "v1"}:                        {group: 17500, version: 15},
 | 
				
			||||||
	{Group: "autoscaling", Version: "v2alpha1"}:                  {group: 17500, version: 9},
 | 
						{Group: "autoscaling", Version: "v2alpha1"}:                  {group: 17500, version: 9},
 | 
				
			||||||
	{Group: "batch", Version: "v1"}:                              {group: 17400, version: 15},
 | 
						{Group: "batch", Version: "v1"}:                              {group: 17400, version: 15},
 | 
				
			||||||
 | 
						{Group: "batch", Version: "v1beta1"}:                         {group: 17400, version: 9},
 | 
				
			||||||
	{Group: "batch", Version: "v2alpha1"}:                        {group: 17400, version: 9},
 | 
						{Group: "batch", Version: "v2alpha1"}:                        {group: 17400, version: 9},
 | 
				
			||||||
	{Group: "certificates.k8s.io", Version: "v1beta1"}:           {group: 17300, version: 9},
 | 
						{Group: "certificates.k8s.io", Version: "v1beta1"}:           {group: 17300, version: 9},
 | 
				
			||||||
	{Group: "networking.k8s.io", Version: "v1"}:                  {group: 17200, version: 15},
 | 
						{Group: "networking.k8s.io", Version: "v1"}:                  {group: 17200, version: 15},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -552,6 +552,7 @@ func BuildStorageFactory(s *options.ServerRunOptions) (*serverstorage.DefaultSto
 | 
				
			|||||||
		s.Etcd.StorageConfig, s.Etcd.DefaultStorageMediaType, api.Codecs,
 | 
							s.Etcd.StorageConfig, s.Etcd.DefaultStorageMediaType, api.Codecs,
 | 
				
			||||||
		serverstorage.NewDefaultResourceEncodingConfig(api.Registry), storageGroupsToEncodingVersion,
 | 
							serverstorage.NewDefaultResourceEncodingConfig(api.Registry), storageGroupsToEncodingVersion,
 | 
				
			||||||
		// FIXME: this GroupVersionResource override should be configurable
 | 
							// FIXME: this GroupVersionResource override should be configurable
 | 
				
			||||||
 | 
							// TODO we need to update this to batch/v1beta1 when it's enabled by default
 | 
				
			||||||
		[]schema.GroupVersionResource{batch.Resource("cronjobs").WithVersion("v2alpha1")},
 | 
							[]schema.GroupVersionResource{batch.Resource("cronjobs").WithVersion("v2alpha1")},
 | 
				
			||||||
		master.DefaultAPIResourceConfigSource(), s.APIEnablement.RuntimeConfig)
 | 
							master.DefaultAPIResourceConfigSource(), s.APIEnablement.RuntimeConfig)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5911
									
								
								docs/api-reference/batch/v1beta1/definitions.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5911
									
								
								docs/api-reference/batch/v1beta1/definitions.html
									
									
									
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										2474
									
								
								docs/api-reference/batch/v1beta1/operations.html
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										2474
									
								
								docs/api-reference/batch/v1beta1/operations.html
									
									
									
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -13297,6 +13297,11 @@
 | 
				
			|||||||
      "version": "v1",
 | 
					      "version": "v1",
 | 
				
			||||||
      "kind": "DeleteOptions"
 | 
					      "kind": "DeleteOptions"
 | 
				
			||||||
     },
 | 
					     },
 | 
				
			||||||
 | 
					     {
 | 
				
			||||||
 | 
					      "group": "batch",
 | 
				
			||||||
 | 
					      "version": "v1beta1",
 | 
				
			||||||
 | 
					      "kind": "DeleteOptions"
 | 
				
			||||||
 | 
					     },
 | 
				
			||||||
     {
 | 
					     {
 | 
				
			||||||
      "group": "batch",
 | 
					      "group": "batch",
 | 
				
			||||||
      "version": "v2alpha1",
 | 
					      "version": "v2alpha1",
 | 
				
			||||||
@@ -13800,6 +13805,11 @@
 | 
				
			|||||||
      "version": "v1",
 | 
					      "version": "v1",
 | 
				
			||||||
      "kind": "WatchEvent"
 | 
					      "kind": "WatchEvent"
 | 
				
			||||||
     },
 | 
					     },
 | 
				
			||||||
 | 
					     {
 | 
				
			||||||
 | 
					      "group": "batch",
 | 
				
			||||||
 | 
					      "version": "v1beta1",
 | 
				
			||||||
 | 
					      "kind": "WatchEvent"
 | 
				
			||||||
 | 
					     },
 | 
				
			||||||
     {
 | 
					     {
 | 
				
			||||||
      "group": "batch",
 | 
					      "group": "batch",
 | 
				
			||||||
      "version": "v2alpha1",
 | 
					      "version": "v2alpha1",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -513,6 +513,7 @@ staging/src/k8s.io/api/authorization/v1beta1
 | 
				
			|||||||
staging/src/k8s.io/api/autoscaling/v1
 | 
					staging/src/k8s.io/api/autoscaling/v1
 | 
				
			||||||
staging/src/k8s.io/api/autoscaling/v2alpha1
 | 
					staging/src/k8s.io/api/autoscaling/v2alpha1
 | 
				
			||||||
staging/src/k8s.io/api/batch/v1
 | 
					staging/src/k8s.io/api/batch/v1
 | 
				
			||||||
 | 
					staging/src/k8s.io/api/batch/v1beta1
 | 
				
			||||||
staging/src/k8s.io/api/batch/v2alpha1
 | 
					staging/src/k8s.io/api/batch/v2alpha1
 | 
				
			||||||
staging/src/k8s.io/api/certificates/v1beta1
 | 
					staging/src/k8s.io/api/certificates/v1beta1
 | 
				
			||||||
staging/src/k8s.io/api/core/v1
 | 
					staging/src/k8s.io/api/core/v1
 | 
				
			||||||
@@ -699,6 +700,8 @@ staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1
 | 
				
			|||||||
staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake
 | 
					staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake
 | 
				
			||||||
staging/src/k8s.io/client-go/kubernetes/typed/batch/v1
 | 
					staging/src/k8s.io/client-go/kubernetes/typed/batch/v1
 | 
				
			||||||
staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake
 | 
					staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake
 | 
				
			||||||
 | 
					staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1
 | 
				
			||||||
 | 
					staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake
 | 
				
			||||||
staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1
 | 
					staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1
 | 
				
			||||||
staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake
 | 
					staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake
 | 
				
			||||||
staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1
 | 
					staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,6 +63,7 @@ authorization.k8s.io/v1beta1 \
 | 
				
			|||||||
autoscaling/v1 \
 | 
					autoscaling/v1 \
 | 
				
			||||||
autoscaling/v2alpha1 \
 | 
					autoscaling/v2alpha1 \
 | 
				
			||||||
batch/v1 \
 | 
					batch/v1 \
 | 
				
			||||||
 | 
					batch/v1beta1 \
 | 
				
			||||||
batch/v2alpha1 \
 | 
					batch/v2alpha1 \
 | 
				
			||||||
certificates.k8s.io/v1beta1 \
 | 
					certificates.k8s.io/v1beta1 \
 | 
				
			||||||
extensions/v1beta1 \
 | 
					extensions/v1beta1 \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1184,7 +1184,7 @@ run_kubectl_run_tests() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  create_and_use_new_namespace
 | 
					  create_and_use_new_namespace
 | 
				
			||||||
  kube::log::status "Testing kubectl run"
 | 
					  kube::log::status "Testing kubectl run"
 | 
				
			||||||
  ## kubectl run should create deployments or jobs
 | 
					  ## kubectl run should create deployments, jobs or cronjob
 | 
				
			||||||
  # Pre-Condition: no Job exists
 | 
					  # Pre-Condition: no Job exists
 | 
				
			||||||
  kube::test::get_object_assert jobs "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
					  kube::test::get_object_assert jobs "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
				
			||||||
  # Command
 | 
					  # Command
 | 
				
			||||||
@@ -1197,6 +1197,7 @@ run_kubectl_run_tests() {
 | 
				
			|||||||
  kubectl delete jobs pi "${kube_flags[@]}"
 | 
					  kubectl delete jobs pi "${kube_flags[@]}"
 | 
				
			||||||
  # Post-condition: no pods exist.
 | 
					  # Post-condition: no pods exist.
 | 
				
			||||||
  kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
					  kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Pre-Condition: no Deployment exists
 | 
					  # Pre-Condition: no Deployment exists
 | 
				
			||||||
  kube::test::get_object_assert deployment "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
					  kube::test::get_object_assert deployment "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
				
			||||||
  # Command
 | 
					  # Command
 | 
				
			||||||
@@ -1218,6 +1219,17 @@ run_kubectl_run_tests() {
 | 
				
			|||||||
  # Clean up
 | 
					  # Clean up
 | 
				
			||||||
  kubectl delete deployment nginx-apps "${kube_flags[@]}"
 | 
					  kubectl delete deployment nginx-apps "${kube_flags[@]}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # TODO: enable batch/v1beta1 by default before 1.8 release, after issues
 | 
				
			||||||
 | 
					  # with CronJobs existing in multiple versions at once is solved
 | 
				
			||||||
 | 
					  # # Pre-Condition: no Job exists
 | 
				
			||||||
 | 
					  # kube::test::get_object_assert cronjobs "{{range.items}}{{$id_field}}:{{end}}" ''
 | 
				
			||||||
 | 
					  # # Command
 | 
				
			||||||
 | 
					  # kubectl run pi --schedule="*/5 * * * *" --generator=cronjob/v1beta1 "--image=$IMAGE_PERL" --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(20)' "${kube_flags[@]}"
 | 
				
			||||||
 | 
					  # # Post-Condition: CronJob "pi" is created
 | 
				
			||||||
 | 
					  # kube::test::get_object_assert cronjobs "{{range.items}}{{$id_field}}:{{end}}" 'pi:'
 | 
				
			||||||
 | 
					  # # Clean up
 | 
				
			||||||
 | 
					  # kubectl delete cronjobs pi "${kube_flags[@]}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  set +o nounset
 | 
					  set +o nounset
 | 
				
			||||||
  set +o errexit
 | 
					  set +o errexit
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -61,14 +61,12 @@ go_test(
 | 
				
			|||||||
        "//pkg/api/testapi:go_default_library",
 | 
					        "//pkg/api/testapi:go_default_library",
 | 
				
			||||||
        "//pkg/api/testing:go_default_library",
 | 
					        "//pkg/api/testing:go_default_library",
 | 
				
			||||||
        "//pkg/api/v1:go_default_library",
 | 
					        "//pkg/api/v1:go_default_library",
 | 
				
			||||||
        "//pkg/apis/batch/v2alpha1:go_default_library",
 | 
					 | 
				
			||||||
        "//pkg/apis/extensions:go_default_library",
 | 
					        "//pkg/apis/extensions:go_default_library",
 | 
				
			||||||
        "//pkg/apis/extensions/v1beta1:go_default_library",
 | 
					        "//pkg/apis/extensions/v1beta1:go_default_library",
 | 
				
			||||||
        "//vendor/github.com/gogo/protobuf/proto:go_default_library",
 | 
					        "//vendor/github.com/gogo/protobuf/proto:go_default_library",
 | 
				
			||||||
        "//vendor/github.com/golang/protobuf/proto:go_default_library",
 | 
					        "//vendor/github.com/golang/protobuf/proto:go_default_library",
 | 
				
			||||||
        "//vendor/github.com/google/gofuzz:go_default_library",
 | 
					        "//vendor/github.com/google/gofuzz:go_default_library",
 | 
				
			||||||
        "//vendor/github.com/ugorji/go/codec:go_default_library",
 | 
					        "//vendor/github.com/ugorji/go/codec:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
 | 
					 | 
				
			||||||
        "//vendor/k8s.io/api/core/v1:go_default_library",
 | 
					        "//vendor/k8s.io/api/core/v1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/extensions/v1beta1:go_default_library",
 | 
					        "//vendor/k8s.io/api/extensions/v1beta1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
 | 
					        "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,6 @@ import (
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	"github.com/google/gofuzz"
 | 
						"github.com/google/gofuzz"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	batchv2alpha1 "k8s.io/api/batch/v2alpha1"
 | 
					 | 
				
			||||||
	apiv1 "k8s.io/api/core/v1"
 | 
						apiv1 "k8s.io/api/core/v1"
 | 
				
			||||||
	extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
 | 
						extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
 | 
				
			||||||
	roundtrip "k8s.io/apimachinery/pkg/api/testing/roundtrip"
 | 
						roundtrip "k8s.io/apimachinery/pkg/api/testing/roundtrip"
 | 
				
			||||||
@@ -33,7 +32,6 @@ import (
 | 
				
			|||||||
	"k8s.io/apimachinery/pkg/runtime/schema"
 | 
						"k8s.io/apimachinery/pkg/runtime/schema"
 | 
				
			||||||
	"k8s.io/apimachinery/pkg/util/diff"
 | 
						"k8s.io/apimachinery/pkg/util/diff"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/api"
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
	k8s_batchv2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type orderedGroupVersionKinds []schema.GroupVersionKind
 | 
					type orderedGroupVersionKinds []schema.GroupVersionKind
 | 
				
			||||||
@@ -44,14 +42,6 @@ func (o orderedGroupVersionKinds) Less(i, j int) bool {
 | 
				
			|||||||
	return o[i].String() < o[j].String()
 | 
						return o[i].String() < o[j].String()
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestVerifyDefaulting(t *testing.T) {
 | 
					 | 
				
			||||||
	job := &batchv2alpha1.JobTemplate{}
 | 
					 | 
				
			||||||
	k8s_batchv2alpha1.SetObjectDefaults_JobTemplate(job)
 | 
					 | 
				
			||||||
	if job.Template.Spec.Template.Spec.DNSPolicy != apiv1.DNSClusterFirst {
 | 
					 | 
				
			||||||
		t.Errorf("unexpected defaulting: %#v", job)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// TODO: add a reflexive test that verifies that all SetDefaults functions are registered
 | 
					// TODO: add a reflexive test that verifies that all SetDefaults functions are registered
 | 
				
			||||||
func TestDefaulting(t *testing.T) {
 | 
					func TestDefaulting(t *testing.T) {
 | 
				
			||||||
	// these are the known types with defaulters - you must add to this list if you add a top level defaulter
 | 
						// these are the known types with defaulters - you must add to this list if you add a top level defaulter
 | 
				
			||||||
@@ -90,10 +80,11 @@ func TestDefaulting(t *testing.T) {
 | 
				
			|||||||
		{Group: "autoscaling", Version: "v2alpha1", Kind: "HorizontalPodAutoscalerList"}:          {},
 | 
							{Group: "autoscaling", Version: "v2alpha1", Kind: "HorizontalPodAutoscalerList"}:          {},
 | 
				
			||||||
		{Group: "batch", Version: "v1", Kind: "Job"}:                                              {},
 | 
							{Group: "batch", Version: "v1", Kind: "Job"}:                                              {},
 | 
				
			||||||
		{Group: "batch", Version: "v1", Kind: "JobList"}:                                          {},
 | 
							{Group: "batch", Version: "v1", Kind: "JobList"}:                                          {},
 | 
				
			||||||
 | 
							{Group: "batch", Version: "v1beta1", Kind: "CronJob"}:                                     {},
 | 
				
			||||||
 | 
							{Group: "batch", Version: "v1beta1", Kind: "CronJobList"}:                                 {},
 | 
				
			||||||
 | 
							{Group: "batch", Version: "v1beta1", Kind: "JobTemplate"}:                                 {},
 | 
				
			||||||
		{Group: "batch", Version: "v2alpha1", Kind: "CronJob"}:                                    {},
 | 
							{Group: "batch", Version: "v2alpha1", Kind: "CronJob"}:                                    {},
 | 
				
			||||||
		{Group: "batch", Version: "v2alpha1", Kind: "CronJobList"}:                                {},
 | 
							{Group: "batch", Version: "v2alpha1", Kind: "CronJobList"}:                                {},
 | 
				
			||||||
		{Group: "batch", Version: "v2alpha1", Kind: "Job"}:                                        {},
 | 
					 | 
				
			||||||
		{Group: "batch", Version: "v2alpha1", Kind: "JobList"}:                                    {},
 | 
					 | 
				
			||||||
		{Group: "batch", Version: "v2alpha1", Kind: "JobTemplate"}:                                {},
 | 
							{Group: "batch", Version: "v2alpha1", Kind: "JobTemplate"}:                                {},
 | 
				
			||||||
		{Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequest"}:     {},
 | 
							{Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequest"}:     {},
 | 
				
			||||||
		{Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequestList"}: {},
 | 
							{Group: "certificates.k8s.io", Version: "v1beta1", Kind: "CertificateSigningRequestList"}: {},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,6 +36,7 @@ filegroup(
 | 
				
			|||||||
        "//pkg/apis/batch/fuzzer:all-srcs",
 | 
					        "//pkg/apis/batch/fuzzer:all-srcs",
 | 
				
			||||||
        "//pkg/apis/batch/install:all-srcs",
 | 
					        "//pkg/apis/batch/install:all-srcs",
 | 
				
			||||||
        "//pkg/apis/batch/v1:all-srcs",
 | 
					        "//pkg/apis/batch/v1:all-srcs",
 | 
				
			||||||
 | 
					        "//pkg/apis/batch/v1beta1:all-srcs",
 | 
				
			||||||
        "//pkg/apis/batch/v2alpha1:all-srcs",
 | 
					        "//pkg/apis/batch/v2alpha1:all-srcs",
 | 
				
			||||||
        "//pkg/apis/batch/validation:all-srcs",
 | 
					        "//pkg/apis/batch/validation:all-srcs",
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,6 +12,7 @@ go_library(
 | 
				
			|||||||
        "//pkg/api:go_default_library",
 | 
					        "//pkg/api:go_default_library",
 | 
				
			||||||
        "//pkg/apis/batch:go_default_library",
 | 
					        "//pkg/apis/batch:go_default_library",
 | 
				
			||||||
        "//pkg/apis/batch/v1:go_default_library",
 | 
					        "//pkg/apis/batch/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//pkg/apis/batch/v1beta1:go_default_library",
 | 
				
			||||||
        "//pkg/apis/batch/v2alpha1:go_default_library",
 | 
					        "//pkg/apis/batch/v2alpha1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
 | 
					        "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
 | 
					        "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,6 +25,7 @@ import (
 | 
				
			|||||||
	"k8s.io/kubernetes/pkg/api"
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/apis/batch"
 | 
						"k8s.io/kubernetes/pkg/apis/batch"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/apis/batch/v1"
 | 
						"k8s.io/kubernetes/pkg/apis/batch/v1"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/apis/batch/v1beta1"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
 | 
						"k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -37,11 +38,12 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
 | 
				
			|||||||
	if err := announced.NewGroupMetaFactory(
 | 
						if err := announced.NewGroupMetaFactory(
 | 
				
			||||||
		&announced.GroupMetaFactoryArgs{
 | 
							&announced.GroupMetaFactoryArgs{
 | 
				
			||||||
			GroupName:                  batch.GroupName,
 | 
								GroupName:                  batch.GroupName,
 | 
				
			||||||
			VersionPreferenceOrder:     []string{v1.SchemeGroupVersion.Version, v2alpha1.SchemeGroupVersion.Version},
 | 
								VersionPreferenceOrder:     []string{v1.SchemeGroupVersion.Version, v1beta1.SchemeGroupVersion.Version, v2alpha1.SchemeGroupVersion.Version},
 | 
				
			||||||
			AddInternalObjectsToScheme: batch.AddToScheme,
 | 
								AddInternalObjectsToScheme: batch.AddToScheme,
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		announced.VersionToSchemeFunc{
 | 
							announced.VersionToSchemeFunc{
 | 
				
			||||||
			v1.SchemeGroupVersion.Version:       v1.AddToScheme,
 | 
								v1.SchemeGroupVersion.Version:       v1.AddToScheme,
 | 
				
			||||||
 | 
								v1beta1.SchemeGroupVersion.Version:  v1beta1.AddToScheme,
 | 
				
			||||||
			v2alpha1.SchemeGroupVersion.Version: v2alpha1.AddToScheme,
 | 
								v2alpha1.SchemeGroupVersion.Version: v2alpha1.AddToScheme,
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
 | 
						).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										61
									
								
								pkg/apis/batch/v1beta1/BUILD
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								pkg/apis/batch/v1beta1/BUILD
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,61 @@
 | 
				
			|||||||
 | 
					package(default_visibility = ["//visibility:public"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					licenses(["notice"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					load(
 | 
				
			||||||
 | 
					    "@io_bazel_rules_go//go:def.bzl",
 | 
				
			||||||
 | 
					    "go_library",
 | 
				
			||||||
 | 
					    "go_test",
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					go_library(
 | 
				
			||||||
 | 
					    name = "go_default_library",
 | 
				
			||||||
 | 
					    srcs = [
 | 
				
			||||||
 | 
					        "conversion.go",
 | 
				
			||||||
 | 
					        "defaults.go",
 | 
				
			||||||
 | 
					        "doc.go",
 | 
				
			||||||
 | 
					        "register.go",
 | 
				
			||||||
 | 
					        "zz_generated.conversion.go",
 | 
				
			||||||
 | 
					        "zz_generated.defaults.go",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    deps = [
 | 
				
			||||||
 | 
					        "//pkg/api:go_default_library",
 | 
				
			||||||
 | 
					        "//pkg/api/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//pkg/apis/batch:go_default_library",
 | 
				
			||||||
 | 
					        "//pkg/apis/batch/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/core/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					go_test(
 | 
				
			||||||
 | 
					    name = "go_default_xtest",
 | 
				
			||||||
 | 
					    srcs = ["defaults_test.go"],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    deps = [
 | 
				
			||||||
 | 
					        ":go_default_library",
 | 
				
			||||||
 | 
					        "//pkg/api:go_default_library",
 | 
				
			||||||
 | 
					        "//pkg/api/install:go_default_library",
 | 
				
			||||||
 | 
					        "//pkg/apis/batch/install:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "package-srcs",
 | 
				
			||||||
 | 
					    srcs = glob(["**"]),
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    visibility = ["//visibility:private"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "all-srcs",
 | 
				
			||||||
 | 
					    srcs = [":package-srcs"],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
							
								
								
									
										44
									
								
								pkg/apis/batch/v1beta1/conversion.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								pkg/apis/batch/v1beta1/conversion.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"k8s.io/apimachinery/pkg/runtime"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func addConversionFuncs(scheme *runtime.Scheme) error {
 | 
				
			||||||
 | 
						var err error
 | 
				
			||||||
 | 
						// Add field label conversions for kinds having selectable nothing but ObjectMeta fields.
 | 
				
			||||||
 | 
						for _, k := range []string{"Job", "JobTemplate", "CronJob"} {
 | 
				
			||||||
 | 
							kind := k // don't close over range variables
 | 
				
			||||||
 | 
							err = scheme.AddFieldLabelConversionFunc("batch/v1beta1", kind,
 | 
				
			||||||
 | 
								func(label, value string) (string, string, error) {
 | 
				
			||||||
 | 
									switch label {
 | 
				
			||||||
 | 
									case "metadata.name", "metadata.namespace", "status.successful":
 | 
				
			||||||
 | 
										return label, value, nil
 | 
				
			||||||
 | 
									default:
 | 
				
			||||||
 | 
										return "", "", fmt.Errorf("field label %q not supported for %q", label, kind)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							if err != nil {
 | 
				
			||||||
 | 
								return err
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										35
									
								
								pkg/apis/batch/v1beta1/defaults.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								pkg/apis/batch/v1beta1/defaults.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						batchv1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
 | 
						"k8s.io/apimachinery/pkg/runtime"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func addDefaultingFuncs(scheme *runtime.Scheme) error {
 | 
				
			||||||
 | 
						return RegisterDefaults(scheme)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func SetDefaults_CronJob(obj *batchv1beta1.CronJob) {
 | 
				
			||||||
 | 
						if obj.Spec.ConcurrencyPolicy == "" {
 | 
				
			||||||
 | 
							obj.Spec.ConcurrencyPolicy = batchv1beta1.AllowConcurrent
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if obj.Spec.Suspend == nil {
 | 
				
			||||||
 | 
							obj.Spec.Suspend = new(bool)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										104
									
								
								pkg/apis/batch/v1beta1/defaults_test.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										104
									
								
								pkg/apis/batch/v1beta1/defaults_test.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,104 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1_test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"reflect"
 | 
				
			||||||
 | 
						"testing"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						batchv1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"k8s.io/apimachinery/pkg/runtime"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						_ "k8s.io/kubernetes/pkg/api/install"
 | 
				
			||||||
 | 
						_ "k8s.io/kubernetes/pkg/apis/batch/install"
 | 
				
			||||||
 | 
						. "k8s.io/kubernetes/pkg/apis/batch/v1beta1"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func TestSetDefaultCronJob(t *testing.T) {
 | 
				
			||||||
 | 
						tests := map[string]struct {
 | 
				
			||||||
 | 
							original *batchv1beta1.CronJob
 | 
				
			||||||
 | 
							expected *batchv1beta1.CronJob
 | 
				
			||||||
 | 
						}{
 | 
				
			||||||
 | 
							"empty batchv2alpha1.CronJob should default batchv2alpha1.ConcurrencyPolicy and Suspend": {
 | 
				
			||||||
 | 
								original: &batchv1beta1.CronJob{},
 | 
				
			||||||
 | 
								expected: &batchv1beta1.CronJob{
 | 
				
			||||||
 | 
									Spec: batchv1beta1.CronJobSpec{
 | 
				
			||||||
 | 
										ConcurrencyPolicy: batchv1beta1.AllowConcurrent,
 | 
				
			||||||
 | 
										Suspend:           newBool(false),
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							"set fields should not be defaulted": {
 | 
				
			||||||
 | 
								original: &batchv1beta1.CronJob{
 | 
				
			||||||
 | 
									Spec: batchv1beta1.CronJobSpec{
 | 
				
			||||||
 | 
										ConcurrencyPolicy: batchv1beta1.ForbidConcurrent,
 | 
				
			||||||
 | 
										Suspend:           newBool(true),
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								expected: &batchv1beta1.CronJob{
 | 
				
			||||||
 | 
									Spec: batchv1beta1.CronJobSpec{
 | 
				
			||||||
 | 
										ConcurrencyPolicy: batchv1beta1.ForbidConcurrent,
 | 
				
			||||||
 | 
										Suspend:           newBool(true),
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for name, test := range tests {
 | 
				
			||||||
 | 
							original := test.original
 | 
				
			||||||
 | 
							expected := test.expected
 | 
				
			||||||
 | 
							obj2 := roundTrip(t, runtime.Object(original))
 | 
				
			||||||
 | 
							actual, ok := obj2.(*batchv1beta1.CronJob)
 | 
				
			||||||
 | 
							if !ok {
 | 
				
			||||||
 | 
								t.Errorf("%s: unexpected object: %v", name, actual)
 | 
				
			||||||
 | 
								t.FailNow()
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if actual.Spec.ConcurrencyPolicy != expected.Spec.ConcurrencyPolicy {
 | 
				
			||||||
 | 
								t.Errorf("%s: got different concurrencyPolicy than expected: %v %v", name, actual.Spec.ConcurrencyPolicy, expected.Spec.ConcurrencyPolicy)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if *actual.Spec.Suspend != *expected.Spec.Suspend {
 | 
				
			||||||
 | 
								t.Errorf("%s: got different suspend than expected: %v %v", name, *actual.Spec.Suspend, *expected.Spec.Suspend)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func roundTrip(t *testing.T, obj runtime.Object) runtime.Object {
 | 
				
			||||||
 | 
						data, err := runtime.Encode(api.Codecs.LegacyCodec(SchemeGroupVersion), obj)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							t.Errorf("%v\n %#v", err, obj)
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						obj2, err := runtime.Decode(api.Codecs.UniversalDecoder(), data)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							t.Errorf("%v\nData: %s\nSource: %#v", err, string(data), obj)
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						obj3 := reflect.New(reflect.TypeOf(obj).Elem()).Interface().(runtime.Object)
 | 
				
			||||||
 | 
						err = api.Scheme.Convert(obj2, obj3, nil)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							t.Errorf("%v\nSource: %#v", err, obj2)
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj3
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func newBool(val bool) *bool {
 | 
				
			||||||
 | 
						p := new(bool)
 | 
				
			||||||
 | 
						*p = val
 | 
				
			||||||
 | 
						return p
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										22
									
								
								pkg/apis/batch/v1beta1/doc.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								pkg/apis/batch/v1beta1/doc.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/batch
 | 
				
			||||||
 | 
					// +k8s:conversion-gen-external-types=../../../../vendor/k8s.io/api/batch/v1beta1
 | 
				
			||||||
 | 
					// +k8s:defaulter-gen=TypeMeta
 | 
				
			||||||
 | 
					// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/batch/v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1 // import "k8s.io/kubernetes/pkg/apis/batch/v1beta1"
 | 
				
			||||||
							
								
								
									
										45
									
								
								pkg/apis/batch/v1beta1/register.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								pkg/apis/batch/v1beta1/register.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						batchv1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
 | 
						"k8s.io/apimachinery/pkg/runtime/schema"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// GroupName is the group name use in this package
 | 
				
			||||||
 | 
					const GroupName = "batch"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SchemeGroupVersion is group version used to register these objects
 | 
				
			||||||
 | 
					var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Resource takes an unqualified resource and returns a Group qualified GroupResource
 | 
				
			||||||
 | 
					func Resource(resource string) schema.GroupResource {
 | 
				
			||||||
 | 
						return SchemeGroupVersion.WithResource(resource).GroupResource()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var (
 | 
				
			||||||
 | 
						localSchemeBuilder = &batchv1beta1.SchemeBuilder
 | 
				
			||||||
 | 
						AddToScheme        = localSchemeBuilder.AddToScheme
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func init() {
 | 
				
			||||||
 | 
						// We only register manually written functions here. The registration of the
 | 
				
			||||||
 | 
						// generated functions takes place in the generated files. The separation
 | 
				
			||||||
 | 
						// makes the code compile even when the generated files are missing.
 | 
				
			||||||
 | 
						localSchemeBuilder.Register(addDefaultingFuncs, addConversionFuncs)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										240
									
								
								pkg/apis/batch/v1beta1/zz_generated.conversion.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										240
									
								
								pkg/apis/batch/v1beta1/zz_generated.conversion.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,240 @@
 | 
				
			|||||||
 | 
					// +build !ignore_autogenerated
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file was autogenerated by conversion-gen. Do not edit it manually!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						v1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
 | 
						core_v1 "k8s.io/api/core/v1"
 | 
				
			||||||
 | 
						v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 | 
				
			||||||
 | 
						conversion "k8s.io/apimachinery/pkg/conversion"
 | 
				
			||||||
 | 
						runtime "k8s.io/apimachinery/pkg/runtime"
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						batch "k8s.io/kubernetes/pkg/apis/batch"
 | 
				
			||||||
 | 
						batch_v1 "k8s.io/kubernetes/pkg/apis/batch/v1"
 | 
				
			||||||
 | 
						unsafe "unsafe"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func init() {
 | 
				
			||||||
 | 
						localSchemeBuilder.Register(RegisterConversions)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// RegisterConversions adds conversion functions to the given scheme.
 | 
				
			||||||
 | 
					// Public to allow building arbitrary schemes.
 | 
				
			||||||
 | 
					func RegisterConversions(scheme *runtime.Scheme) error {
 | 
				
			||||||
 | 
						return scheme.AddGeneratedConversionFuncs(
 | 
				
			||||||
 | 
							Convert_v1beta1_CronJob_To_batch_CronJob,
 | 
				
			||||||
 | 
							Convert_batch_CronJob_To_v1beta1_CronJob,
 | 
				
			||||||
 | 
							Convert_v1beta1_CronJobList_To_batch_CronJobList,
 | 
				
			||||||
 | 
							Convert_batch_CronJobList_To_v1beta1_CronJobList,
 | 
				
			||||||
 | 
							Convert_v1beta1_CronJobSpec_To_batch_CronJobSpec,
 | 
				
			||||||
 | 
							Convert_batch_CronJobSpec_To_v1beta1_CronJobSpec,
 | 
				
			||||||
 | 
							Convert_v1beta1_CronJobStatus_To_batch_CronJobStatus,
 | 
				
			||||||
 | 
							Convert_batch_CronJobStatus_To_v1beta1_CronJobStatus,
 | 
				
			||||||
 | 
							Convert_v1beta1_JobTemplate_To_batch_JobTemplate,
 | 
				
			||||||
 | 
							Convert_batch_JobTemplate_To_v1beta1_JobTemplate,
 | 
				
			||||||
 | 
							Convert_v1beta1_JobTemplateSpec_To_batch_JobTemplateSpec,
 | 
				
			||||||
 | 
							Convert_batch_JobTemplateSpec_To_v1beta1_JobTemplateSpec,
 | 
				
			||||||
 | 
						)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func autoConvert_v1beta1_CronJob_To_batch_CronJob(in *v1beta1.CronJob, out *batch.CronJob, s conversion.Scope) error {
 | 
				
			||||||
 | 
						out.ObjectMeta = in.ObjectMeta
 | 
				
			||||||
 | 
						if err := Convert_v1beta1_CronJobSpec_To_batch_CronJobSpec(&in.Spec, &out.Spec, s); err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if err := Convert_v1beta1_CronJobStatus_To_batch_CronJobStatus(&in.Status, &out.Status, s); err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Convert_v1beta1_CronJob_To_batch_CronJob is an autogenerated conversion function.
 | 
				
			||||||
 | 
					func Convert_v1beta1_CronJob_To_batch_CronJob(in *v1beta1.CronJob, out *batch.CronJob, s conversion.Scope) error {
 | 
				
			||||||
 | 
						return autoConvert_v1beta1_CronJob_To_batch_CronJob(in, out, s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func autoConvert_batch_CronJob_To_v1beta1_CronJob(in *batch.CronJob, out *v1beta1.CronJob, s conversion.Scope) error {
 | 
				
			||||||
 | 
						out.ObjectMeta = in.ObjectMeta
 | 
				
			||||||
 | 
						if err := Convert_batch_CronJobSpec_To_v1beta1_CronJobSpec(&in.Spec, &out.Spec, s); err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if err := Convert_batch_CronJobStatus_To_v1beta1_CronJobStatus(&in.Status, &out.Status, s); err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Convert_batch_CronJob_To_v1beta1_CronJob is an autogenerated conversion function.
 | 
				
			||||||
 | 
					func Convert_batch_CronJob_To_v1beta1_CronJob(in *batch.CronJob, out *v1beta1.CronJob, s conversion.Scope) error {
 | 
				
			||||||
 | 
						return autoConvert_batch_CronJob_To_v1beta1_CronJob(in, out, s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func autoConvert_v1beta1_CronJobList_To_batch_CronJobList(in *v1beta1.CronJobList, out *batch.CronJobList, s conversion.Scope) error {
 | 
				
			||||||
 | 
						out.ListMeta = in.ListMeta
 | 
				
			||||||
 | 
						if in.Items != nil {
 | 
				
			||||||
 | 
							in, out := &in.Items, &out.Items
 | 
				
			||||||
 | 
							*out = make([]batch.CronJob, len(*in))
 | 
				
			||||||
 | 
							for i := range *in {
 | 
				
			||||||
 | 
								if err := Convert_v1beta1_CronJob_To_batch_CronJob(&(*in)[i], &(*out)[i], s); err != nil {
 | 
				
			||||||
 | 
									return err
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							out.Items = nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Convert_v1beta1_CronJobList_To_batch_CronJobList is an autogenerated conversion function.
 | 
				
			||||||
 | 
					func Convert_v1beta1_CronJobList_To_batch_CronJobList(in *v1beta1.CronJobList, out *batch.CronJobList, s conversion.Scope) error {
 | 
				
			||||||
 | 
						return autoConvert_v1beta1_CronJobList_To_batch_CronJobList(in, out, s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func autoConvert_batch_CronJobList_To_v1beta1_CronJobList(in *batch.CronJobList, out *v1beta1.CronJobList, s conversion.Scope) error {
 | 
				
			||||||
 | 
						out.ListMeta = in.ListMeta
 | 
				
			||||||
 | 
						if in.Items != nil {
 | 
				
			||||||
 | 
							in, out := &in.Items, &out.Items
 | 
				
			||||||
 | 
							*out = make([]v1beta1.CronJob, len(*in))
 | 
				
			||||||
 | 
							for i := range *in {
 | 
				
			||||||
 | 
								if err := Convert_batch_CronJob_To_v1beta1_CronJob(&(*in)[i], &(*out)[i], s); err != nil {
 | 
				
			||||||
 | 
									return err
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							out.Items = make([]v1beta1.CronJob, 0)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Convert_batch_CronJobList_To_v1beta1_CronJobList is an autogenerated conversion function.
 | 
				
			||||||
 | 
					func Convert_batch_CronJobList_To_v1beta1_CronJobList(in *batch.CronJobList, out *v1beta1.CronJobList, s conversion.Scope) error {
 | 
				
			||||||
 | 
						return autoConvert_batch_CronJobList_To_v1beta1_CronJobList(in, out, s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func autoConvert_v1beta1_CronJobSpec_To_batch_CronJobSpec(in *v1beta1.CronJobSpec, out *batch.CronJobSpec, s conversion.Scope) error {
 | 
				
			||||||
 | 
						out.Schedule = in.Schedule
 | 
				
			||||||
 | 
						out.StartingDeadlineSeconds = (*int64)(unsafe.Pointer(in.StartingDeadlineSeconds))
 | 
				
			||||||
 | 
						out.ConcurrencyPolicy = batch.ConcurrencyPolicy(in.ConcurrencyPolicy)
 | 
				
			||||||
 | 
						out.Suspend = (*bool)(unsafe.Pointer(in.Suspend))
 | 
				
			||||||
 | 
						if err := Convert_v1beta1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						out.SuccessfulJobsHistoryLimit = (*int32)(unsafe.Pointer(in.SuccessfulJobsHistoryLimit))
 | 
				
			||||||
 | 
						out.FailedJobsHistoryLimit = (*int32)(unsafe.Pointer(in.FailedJobsHistoryLimit))
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Convert_v1beta1_CronJobSpec_To_batch_CronJobSpec is an autogenerated conversion function.
 | 
				
			||||||
 | 
					func Convert_v1beta1_CronJobSpec_To_batch_CronJobSpec(in *v1beta1.CronJobSpec, out *batch.CronJobSpec, s conversion.Scope) error {
 | 
				
			||||||
 | 
						return autoConvert_v1beta1_CronJobSpec_To_batch_CronJobSpec(in, out, s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func autoConvert_batch_CronJobSpec_To_v1beta1_CronJobSpec(in *batch.CronJobSpec, out *v1beta1.CronJobSpec, s conversion.Scope) error {
 | 
				
			||||||
 | 
						out.Schedule = in.Schedule
 | 
				
			||||||
 | 
						out.StartingDeadlineSeconds = (*int64)(unsafe.Pointer(in.StartingDeadlineSeconds))
 | 
				
			||||||
 | 
						out.ConcurrencyPolicy = v1beta1.ConcurrencyPolicy(in.ConcurrencyPolicy)
 | 
				
			||||||
 | 
						out.Suspend = (*bool)(unsafe.Pointer(in.Suspend))
 | 
				
			||||||
 | 
						if err := Convert_batch_JobTemplateSpec_To_v1beta1_JobTemplateSpec(&in.JobTemplate, &out.JobTemplate, s); err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						out.SuccessfulJobsHistoryLimit = (*int32)(unsafe.Pointer(in.SuccessfulJobsHistoryLimit))
 | 
				
			||||||
 | 
						out.FailedJobsHistoryLimit = (*int32)(unsafe.Pointer(in.FailedJobsHistoryLimit))
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Convert_batch_CronJobSpec_To_v1beta1_CronJobSpec is an autogenerated conversion function.
 | 
				
			||||||
 | 
					func Convert_batch_CronJobSpec_To_v1beta1_CronJobSpec(in *batch.CronJobSpec, out *v1beta1.CronJobSpec, s conversion.Scope) error {
 | 
				
			||||||
 | 
						return autoConvert_batch_CronJobSpec_To_v1beta1_CronJobSpec(in, out, s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func autoConvert_v1beta1_CronJobStatus_To_batch_CronJobStatus(in *v1beta1.CronJobStatus, out *batch.CronJobStatus, s conversion.Scope) error {
 | 
				
			||||||
 | 
						out.Active = *(*[]api.ObjectReference)(unsafe.Pointer(&in.Active))
 | 
				
			||||||
 | 
						out.LastScheduleTime = (*v1.Time)(unsafe.Pointer(in.LastScheduleTime))
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Convert_v1beta1_CronJobStatus_To_batch_CronJobStatus is an autogenerated conversion function.
 | 
				
			||||||
 | 
					func Convert_v1beta1_CronJobStatus_To_batch_CronJobStatus(in *v1beta1.CronJobStatus, out *batch.CronJobStatus, s conversion.Scope) error {
 | 
				
			||||||
 | 
						return autoConvert_v1beta1_CronJobStatus_To_batch_CronJobStatus(in, out, s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func autoConvert_batch_CronJobStatus_To_v1beta1_CronJobStatus(in *batch.CronJobStatus, out *v1beta1.CronJobStatus, s conversion.Scope) error {
 | 
				
			||||||
 | 
						out.Active = *(*[]core_v1.ObjectReference)(unsafe.Pointer(&in.Active))
 | 
				
			||||||
 | 
						out.LastScheduleTime = (*v1.Time)(unsafe.Pointer(in.LastScheduleTime))
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Convert_batch_CronJobStatus_To_v1beta1_CronJobStatus is an autogenerated conversion function.
 | 
				
			||||||
 | 
					func Convert_batch_CronJobStatus_To_v1beta1_CronJobStatus(in *batch.CronJobStatus, out *v1beta1.CronJobStatus, s conversion.Scope) error {
 | 
				
			||||||
 | 
						return autoConvert_batch_CronJobStatus_To_v1beta1_CronJobStatus(in, out, s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func autoConvert_v1beta1_JobTemplate_To_batch_JobTemplate(in *v1beta1.JobTemplate, out *batch.JobTemplate, s conversion.Scope) error {
 | 
				
			||||||
 | 
						out.ObjectMeta = in.ObjectMeta
 | 
				
			||||||
 | 
						if err := Convert_v1beta1_JobTemplateSpec_To_batch_JobTemplateSpec(&in.Template, &out.Template, s); err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Convert_v1beta1_JobTemplate_To_batch_JobTemplate is an autogenerated conversion function.
 | 
				
			||||||
 | 
					func Convert_v1beta1_JobTemplate_To_batch_JobTemplate(in *v1beta1.JobTemplate, out *batch.JobTemplate, s conversion.Scope) error {
 | 
				
			||||||
 | 
						return autoConvert_v1beta1_JobTemplate_To_batch_JobTemplate(in, out, s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func autoConvert_batch_JobTemplate_To_v1beta1_JobTemplate(in *batch.JobTemplate, out *v1beta1.JobTemplate, s conversion.Scope) error {
 | 
				
			||||||
 | 
						out.ObjectMeta = in.ObjectMeta
 | 
				
			||||||
 | 
						if err := Convert_batch_JobTemplateSpec_To_v1beta1_JobTemplateSpec(&in.Template, &out.Template, s); err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Convert_batch_JobTemplate_To_v1beta1_JobTemplate is an autogenerated conversion function.
 | 
				
			||||||
 | 
					func Convert_batch_JobTemplate_To_v1beta1_JobTemplate(in *batch.JobTemplate, out *v1beta1.JobTemplate, s conversion.Scope) error {
 | 
				
			||||||
 | 
						return autoConvert_batch_JobTemplate_To_v1beta1_JobTemplate(in, out, s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func autoConvert_v1beta1_JobTemplateSpec_To_batch_JobTemplateSpec(in *v1beta1.JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error {
 | 
				
			||||||
 | 
						out.ObjectMeta = in.ObjectMeta
 | 
				
			||||||
 | 
						if err := batch_v1.Convert_v1_JobSpec_To_batch_JobSpec(&in.Spec, &out.Spec, s); err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Convert_v1beta1_JobTemplateSpec_To_batch_JobTemplateSpec is an autogenerated conversion function.
 | 
				
			||||||
 | 
					func Convert_v1beta1_JobTemplateSpec_To_batch_JobTemplateSpec(in *v1beta1.JobTemplateSpec, out *batch.JobTemplateSpec, s conversion.Scope) error {
 | 
				
			||||||
 | 
						return autoConvert_v1beta1_JobTemplateSpec_To_batch_JobTemplateSpec(in, out, s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func autoConvert_batch_JobTemplateSpec_To_v1beta1_JobTemplateSpec(in *batch.JobTemplateSpec, out *v1beta1.JobTemplateSpec, s conversion.Scope) error {
 | 
				
			||||||
 | 
						out.ObjectMeta = in.ObjectMeta
 | 
				
			||||||
 | 
						if err := batch_v1.Convert_batch_JobSpec_To_v1_JobSpec(&in.Spec, &out.Spec, s); err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Convert_batch_JobTemplateSpec_To_v1beta1_JobTemplateSpec is an autogenerated conversion function.
 | 
				
			||||||
 | 
					func Convert_batch_JobTemplateSpec_To_v1beta1_JobTemplateSpec(in *batch.JobTemplateSpec, out *v1beta1.JobTemplateSpec, s conversion.Scope) error {
 | 
				
			||||||
 | 
						return autoConvert_batch_JobTemplateSpec_To_v1beta1_JobTemplateSpec(in, out, s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										311
									
								
								pkg/apis/batch/v1beta1/zz_generated.defaults.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										311
									
								
								pkg/apis/batch/v1beta1/zz_generated.defaults.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,311 @@
 | 
				
			|||||||
 | 
					// +build !ignore_autogenerated
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file was autogenerated by defaulter-gen. Do not edit it manually!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						v1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
 | 
						runtime "k8s.io/apimachinery/pkg/runtime"
 | 
				
			||||||
 | 
						v1 "k8s.io/kubernetes/pkg/api/v1"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// RegisterDefaults adds defaulters functions to the given scheme.
 | 
				
			||||||
 | 
					// Public to allow building arbitrary schemes.
 | 
				
			||||||
 | 
					// All generated defaulters are covering - they call all nested defaulters.
 | 
				
			||||||
 | 
					func RegisterDefaults(scheme *runtime.Scheme) error {
 | 
				
			||||||
 | 
						scheme.AddTypeDefaultingFunc(&v1beta1.CronJob{}, func(obj interface{}) { SetObjectDefaults_CronJob(obj.(*v1beta1.CronJob)) })
 | 
				
			||||||
 | 
						scheme.AddTypeDefaultingFunc(&v1beta1.CronJobList{}, func(obj interface{}) { SetObjectDefaults_CronJobList(obj.(*v1beta1.CronJobList)) })
 | 
				
			||||||
 | 
						scheme.AddTypeDefaultingFunc(&v1beta1.JobTemplate{}, func(obj interface{}) { SetObjectDefaults_JobTemplate(obj.(*v1beta1.JobTemplate)) })
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func SetObjectDefaults_CronJob(in *v1beta1.CronJob) {
 | 
				
			||||||
 | 
						SetDefaults_CronJob(in)
 | 
				
			||||||
 | 
						v1.SetDefaults_PodSpec(&in.Spec.JobTemplate.Spec.Template.Spec)
 | 
				
			||||||
 | 
						for i := range in.Spec.JobTemplate.Spec.Template.Spec.Volumes {
 | 
				
			||||||
 | 
							a := &in.Spec.JobTemplate.Spec.Template.Spec.Volumes[i]
 | 
				
			||||||
 | 
							v1.SetDefaults_Volume(a)
 | 
				
			||||||
 | 
							if a.VolumeSource.Secret != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.ISCSI != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.RBD != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.DownwardAPI != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
 | 
				
			||||||
 | 
								for j := range a.VolumeSource.DownwardAPI.Items {
 | 
				
			||||||
 | 
									b := &a.VolumeSource.DownwardAPI.Items[j]
 | 
				
			||||||
 | 
									if b.FieldRef != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.ConfigMap != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.AzureDisk != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.Projected != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
 | 
				
			||||||
 | 
								for j := range a.VolumeSource.Projected.Sources {
 | 
				
			||||||
 | 
									b := &a.VolumeSource.Projected.Sources[j]
 | 
				
			||||||
 | 
									if b.DownwardAPI != nil {
 | 
				
			||||||
 | 
										for k := range b.DownwardAPI.Items {
 | 
				
			||||||
 | 
											c := &b.DownwardAPI.Items[k]
 | 
				
			||||||
 | 
											if c.FieldRef != nil {
 | 
				
			||||||
 | 
												v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.ScaleIO != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						for i := range in.Spec.JobTemplate.Spec.Template.Spec.InitContainers {
 | 
				
			||||||
 | 
							a := &in.Spec.JobTemplate.Spec.Template.Spec.InitContainers[i]
 | 
				
			||||||
 | 
							v1.SetDefaults_Container(a)
 | 
				
			||||||
 | 
							for j := range a.Ports {
 | 
				
			||||||
 | 
								b := &a.Ports[j]
 | 
				
			||||||
 | 
								v1.SetDefaults_ContainerPort(b)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							for j := range a.Env {
 | 
				
			||||||
 | 
								b := &a.Env[j]
 | 
				
			||||||
 | 
								if b.ValueFrom != nil {
 | 
				
			||||||
 | 
									if b.ValueFrom.FieldRef != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							v1.SetDefaults_ResourceList(&a.Resources.Limits)
 | 
				
			||||||
 | 
							v1.SetDefaults_ResourceList(&a.Resources.Requests)
 | 
				
			||||||
 | 
							if a.LivenessProbe != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_Probe(a.LivenessProbe)
 | 
				
			||||||
 | 
								if a.LivenessProbe.Handler.HTTPGet != nil {
 | 
				
			||||||
 | 
									v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.ReadinessProbe != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_Probe(a.ReadinessProbe)
 | 
				
			||||||
 | 
								if a.ReadinessProbe.Handler.HTTPGet != nil {
 | 
				
			||||||
 | 
									v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.Lifecycle != nil {
 | 
				
			||||||
 | 
								if a.Lifecycle.PostStart != nil {
 | 
				
			||||||
 | 
									if a.Lifecycle.PostStart.HTTPGet != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if a.Lifecycle.PreStop != nil {
 | 
				
			||||||
 | 
									if a.Lifecycle.PreStop.HTTPGet != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						for i := range in.Spec.JobTemplate.Spec.Template.Spec.Containers {
 | 
				
			||||||
 | 
							a := &in.Spec.JobTemplate.Spec.Template.Spec.Containers[i]
 | 
				
			||||||
 | 
							v1.SetDefaults_Container(a)
 | 
				
			||||||
 | 
							for j := range a.Ports {
 | 
				
			||||||
 | 
								b := &a.Ports[j]
 | 
				
			||||||
 | 
								v1.SetDefaults_ContainerPort(b)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							for j := range a.Env {
 | 
				
			||||||
 | 
								b := &a.Env[j]
 | 
				
			||||||
 | 
								if b.ValueFrom != nil {
 | 
				
			||||||
 | 
									if b.ValueFrom.FieldRef != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							v1.SetDefaults_ResourceList(&a.Resources.Limits)
 | 
				
			||||||
 | 
							v1.SetDefaults_ResourceList(&a.Resources.Requests)
 | 
				
			||||||
 | 
							if a.LivenessProbe != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_Probe(a.LivenessProbe)
 | 
				
			||||||
 | 
								if a.LivenessProbe.Handler.HTTPGet != nil {
 | 
				
			||||||
 | 
									v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.ReadinessProbe != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_Probe(a.ReadinessProbe)
 | 
				
			||||||
 | 
								if a.ReadinessProbe.Handler.HTTPGet != nil {
 | 
				
			||||||
 | 
									v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.Lifecycle != nil {
 | 
				
			||||||
 | 
								if a.Lifecycle.PostStart != nil {
 | 
				
			||||||
 | 
									if a.Lifecycle.PostStart.HTTPGet != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if a.Lifecycle.PreStop != nil {
 | 
				
			||||||
 | 
									if a.Lifecycle.PreStop.HTTPGet != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func SetObjectDefaults_CronJobList(in *v1beta1.CronJobList) {
 | 
				
			||||||
 | 
						for i := range in.Items {
 | 
				
			||||||
 | 
							a := &in.Items[i]
 | 
				
			||||||
 | 
							SetObjectDefaults_CronJob(a)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func SetObjectDefaults_JobTemplate(in *v1beta1.JobTemplate) {
 | 
				
			||||||
 | 
						v1.SetDefaults_PodSpec(&in.Template.Spec.Template.Spec)
 | 
				
			||||||
 | 
						for i := range in.Template.Spec.Template.Spec.Volumes {
 | 
				
			||||||
 | 
							a := &in.Template.Spec.Template.Spec.Volumes[i]
 | 
				
			||||||
 | 
							v1.SetDefaults_Volume(a)
 | 
				
			||||||
 | 
							if a.VolumeSource.Secret != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.ISCSI != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.RBD != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.DownwardAPI != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
 | 
				
			||||||
 | 
								for j := range a.VolumeSource.DownwardAPI.Items {
 | 
				
			||||||
 | 
									b := &a.VolumeSource.DownwardAPI.Items[j]
 | 
				
			||||||
 | 
									if b.FieldRef != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_ObjectFieldSelector(b.FieldRef)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.ConfigMap != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.AzureDisk != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.Projected != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
 | 
				
			||||||
 | 
								for j := range a.VolumeSource.Projected.Sources {
 | 
				
			||||||
 | 
									b := &a.VolumeSource.Projected.Sources[j]
 | 
				
			||||||
 | 
									if b.DownwardAPI != nil {
 | 
				
			||||||
 | 
										for k := range b.DownwardAPI.Items {
 | 
				
			||||||
 | 
											c := &b.DownwardAPI.Items[k]
 | 
				
			||||||
 | 
											if c.FieldRef != nil {
 | 
				
			||||||
 | 
												v1.SetDefaults_ObjectFieldSelector(c.FieldRef)
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.VolumeSource.ScaleIO != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						for i := range in.Template.Spec.Template.Spec.InitContainers {
 | 
				
			||||||
 | 
							a := &in.Template.Spec.Template.Spec.InitContainers[i]
 | 
				
			||||||
 | 
							v1.SetDefaults_Container(a)
 | 
				
			||||||
 | 
							for j := range a.Ports {
 | 
				
			||||||
 | 
								b := &a.Ports[j]
 | 
				
			||||||
 | 
								v1.SetDefaults_ContainerPort(b)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							for j := range a.Env {
 | 
				
			||||||
 | 
								b := &a.Env[j]
 | 
				
			||||||
 | 
								if b.ValueFrom != nil {
 | 
				
			||||||
 | 
									if b.ValueFrom.FieldRef != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							v1.SetDefaults_ResourceList(&a.Resources.Limits)
 | 
				
			||||||
 | 
							v1.SetDefaults_ResourceList(&a.Resources.Requests)
 | 
				
			||||||
 | 
							if a.LivenessProbe != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_Probe(a.LivenessProbe)
 | 
				
			||||||
 | 
								if a.LivenessProbe.Handler.HTTPGet != nil {
 | 
				
			||||||
 | 
									v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.ReadinessProbe != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_Probe(a.ReadinessProbe)
 | 
				
			||||||
 | 
								if a.ReadinessProbe.Handler.HTTPGet != nil {
 | 
				
			||||||
 | 
									v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.Lifecycle != nil {
 | 
				
			||||||
 | 
								if a.Lifecycle.PostStart != nil {
 | 
				
			||||||
 | 
									if a.Lifecycle.PostStart.HTTPGet != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if a.Lifecycle.PreStop != nil {
 | 
				
			||||||
 | 
									if a.Lifecycle.PreStop.HTTPGet != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						for i := range in.Template.Spec.Template.Spec.Containers {
 | 
				
			||||||
 | 
							a := &in.Template.Spec.Template.Spec.Containers[i]
 | 
				
			||||||
 | 
							v1.SetDefaults_Container(a)
 | 
				
			||||||
 | 
							for j := range a.Ports {
 | 
				
			||||||
 | 
								b := &a.Ports[j]
 | 
				
			||||||
 | 
								v1.SetDefaults_ContainerPort(b)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							for j := range a.Env {
 | 
				
			||||||
 | 
								b := &a.Env[j]
 | 
				
			||||||
 | 
								if b.ValueFrom != nil {
 | 
				
			||||||
 | 
									if b.ValueFrom.FieldRef != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_ObjectFieldSelector(b.ValueFrom.FieldRef)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							v1.SetDefaults_ResourceList(&a.Resources.Limits)
 | 
				
			||||||
 | 
							v1.SetDefaults_ResourceList(&a.Resources.Requests)
 | 
				
			||||||
 | 
							if a.LivenessProbe != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_Probe(a.LivenessProbe)
 | 
				
			||||||
 | 
								if a.LivenessProbe.Handler.HTTPGet != nil {
 | 
				
			||||||
 | 
									v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.ReadinessProbe != nil {
 | 
				
			||||||
 | 
								v1.SetDefaults_Probe(a.ReadinessProbe)
 | 
				
			||||||
 | 
								if a.ReadinessProbe.Handler.HTTPGet != nil {
 | 
				
			||||||
 | 
									v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if a.Lifecycle != nil {
 | 
				
			||||||
 | 
								if a.Lifecycle.PostStart != nil {
 | 
				
			||||||
 | 
									if a.Lifecycle.PostStart.HTTPGet != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_HTTPGetAction(a.Lifecycle.PostStart.HTTPGet)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if a.Lifecycle.PreStop != nil {
 | 
				
			||||||
 | 
									if a.Lifecycle.PreStop.HTTPGet != nil {
 | 
				
			||||||
 | 
										v1.SetDefaults_HTTPGetAction(a.Lifecycle.PreStop.HTTPGet)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -29,6 +29,7 @@ openapi_library(
 | 
				
			|||||||
        "k8s.io/api/autoscaling/v1",
 | 
					        "k8s.io/api/autoscaling/v1",
 | 
				
			||||||
        "k8s.io/api/autoscaling/v2alpha1",
 | 
					        "k8s.io/api/autoscaling/v2alpha1",
 | 
				
			||||||
        "k8s.io/api/batch/v1",
 | 
					        "k8s.io/api/batch/v1",
 | 
				
			||||||
 | 
					        "k8s.io/api/batch/v1beta1",
 | 
				
			||||||
        "k8s.io/api/batch/v2alpha1",
 | 
					        "k8s.io/api/batch/v2alpha1",
 | 
				
			||||||
        "k8s.io/api/certificates/v1beta1",
 | 
					        "k8s.io/api/certificates/v1beta1",
 | 
				
			||||||
        "k8s.io/api/core/v1",
 | 
					        "k8s.io/api/core/v1",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -386,6 +386,9 @@ func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig {
 | 
				
			|||||||
		apiv1.SchemeGroupVersion,
 | 
							apiv1.SchemeGroupVersion,
 | 
				
			||||||
		extensionsapiv1beta1.SchemeGroupVersion,
 | 
							extensionsapiv1beta1.SchemeGroupVersion,
 | 
				
			||||||
		batchapiv1.SchemeGroupVersion,
 | 
							batchapiv1.SchemeGroupVersion,
 | 
				
			||||||
 | 
							// TODO: enable batch/v1beta1 by default before 1.8 release, after issues
 | 
				
			||||||
 | 
							// with CronJobs existing in multiple versions at once is solved
 | 
				
			||||||
 | 
							// batchapiv1beta1.SchemeGroupVersion,
 | 
				
			||||||
		authenticationv1.SchemeGroupVersion,
 | 
							authenticationv1.SchemeGroupVersion,
 | 
				
			||||||
		authenticationv1beta1.SchemeGroupVersion,
 | 
							authenticationv1beta1.SchemeGroupVersion,
 | 
				
			||||||
		autoscalingapiv1.SchemeGroupVersion,
 | 
							autoscalingapiv1.SchemeGroupVersion,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,6 +14,7 @@ go_library(
 | 
				
			|||||||
        "//pkg/registry/batch/cronjob/storage:go_default_library",
 | 
					        "//pkg/registry/batch/cronjob/storage:go_default_library",
 | 
				
			||||||
        "//pkg/registry/batch/job/storage:go_default_library",
 | 
					        "//pkg/registry/batch/job/storage:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/batch/v1:go_default_library",
 | 
					        "//vendor/k8s.io/api/batch/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
 | 
					        "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library",
 | 
					        "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library",
 | 
					        "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,6 +18,7 @@ package rest
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	batchapiv1 "k8s.io/api/batch/v1"
 | 
						batchapiv1 "k8s.io/api/batch/v1"
 | 
				
			||||||
 | 
						batchapiv1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
	batchapiv2alpha1 "k8s.io/api/batch/v2alpha1"
 | 
						batchapiv2alpha1 "k8s.io/api/batch/v2alpha1"
 | 
				
			||||||
	"k8s.io/apiserver/pkg/registry/generic"
 | 
						"k8s.io/apiserver/pkg/registry/generic"
 | 
				
			||||||
	"k8s.io/apiserver/pkg/registry/rest"
 | 
						"k8s.io/apiserver/pkg/registry/rest"
 | 
				
			||||||
@@ -40,6 +41,10 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag
 | 
				
			|||||||
		apiGroupInfo.VersionedResourcesStorageMap[batchapiv1.SchemeGroupVersion.Version] = p.v1Storage(apiResourceConfigSource, restOptionsGetter)
 | 
							apiGroupInfo.VersionedResourcesStorageMap[batchapiv1.SchemeGroupVersion.Version] = p.v1Storage(apiResourceConfigSource, restOptionsGetter)
 | 
				
			||||||
		apiGroupInfo.GroupMeta.GroupVersion = batchapiv1.SchemeGroupVersion
 | 
							apiGroupInfo.GroupMeta.GroupVersion = batchapiv1.SchemeGroupVersion
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if apiResourceConfigSource.AnyResourcesForVersionEnabled(batchapiv1beta1.SchemeGroupVersion) {
 | 
				
			||||||
 | 
							apiGroupInfo.VersionedResourcesStorageMap[batchapiv1beta1.SchemeGroupVersion.Version] = p.v1beta1Storage(apiResourceConfigSource, restOptionsGetter)
 | 
				
			||||||
 | 
							apiGroupInfo.GroupMeta.GroupVersion = batchapiv1beta1.SchemeGroupVersion
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if apiResourceConfigSource.AnyResourcesForVersionEnabled(batchapiv2alpha1.SchemeGroupVersion) {
 | 
						if apiResourceConfigSource.AnyResourcesForVersionEnabled(batchapiv2alpha1.SchemeGroupVersion) {
 | 
				
			||||||
		apiGroupInfo.VersionedResourcesStorageMap[batchapiv2alpha1.SchemeGroupVersion.Version] = p.v2alpha1Storage(apiResourceConfigSource, restOptionsGetter)
 | 
							apiGroupInfo.VersionedResourcesStorageMap[batchapiv2alpha1.SchemeGroupVersion.Version] = p.v2alpha1Storage(apiResourceConfigSource, restOptionsGetter)
 | 
				
			||||||
		apiGroupInfo.GroupMeta.GroupVersion = batchapiv2alpha1.SchemeGroupVersion
 | 
							apiGroupInfo.GroupMeta.GroupVersion = batchapiv2alpha1.SchemeGroupVersion
 | 
				
			||||||
@@ -60,6 +65,18 @@ func (p RESTStorageProvider) v1Storage(apiResourceConfigSource serverstorage.API
 | 
				
			|||||||
	return storage
 | 
						return storage
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (p RESTStorageProvider) v1beta1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage {
 | 
				
			||||||
 | 
						version := batchapiv1beta1.SchemeGroupVersion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						storage := map[string]rest.Storage{}
 | 
				
			||||||
 | 
						if apiResourceConfigSource.ResourceEnabled(version.WithResource("cronjobs")) {
 | 
				
			||||||
 | 
							cronJobsStorage, cronJobsStatusStorage := cronjobstore.NewREST(restOptionsGetter)
 | 
				
			||||||
 | 
							storage["cronjobs"] = cronJobsStorage
 | 
				
			||||||
 | 
							storage["cronjobs/status"] = cronJobsStatusStorage
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return storage
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (p RESTStorageProvider) v2alpha1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage {
 | 
					func (p RESTStorageProvider) v2alpha1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) map[string]rest.Storage {
 | 
				
			||||||
	version := batchapiv2alpha1.SchemeGroupVersion
 | 
						version := batchapiv2alpha1.SchemeGroupVersion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,6 +39,7 @@ filegroup(
 | 
				
			|||||||
        "//staging/src/k8s.io/api/autoscaling/v1:all-srcs",
 | 
					        "//staging/src/k8s.io/api/autoscaling/v1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/api/autoscaling/v2alpha1:all-srcs",
 | 
					        "//staging/src/k8s.io/api/autoscaling/v2alpha1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/api/batch/v1:all-srcs",
 | 
					        "//staging/src/k8s.io/api/batch/v1:all-srcs",
 | 
				
			||||||
 | 
					        "//staging/src/k8s.io/api/batch/v1beta1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/api/batch/v2alpha1:all-srcs",
 | 
					        "//staging/src/k8s.io/api/batch/v2alpha1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/api/certificates/v1beta1:all-srcs",
 | 
					        "//staging/src/k8s.io/api/certificates/v1beta1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/api/core/v1:all-srcs",
 | 
					        "//staging/src/k8s.io/api/core/v1:all-srcs",
 | 
				
			||||||
@@ -155,6 +156,7 @@ filegroup(
 | 
				
			|||||||
        "//staging/src/k8s.io/client-go/listers/autoscaling/v1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/listers/autoscaling/v1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/client-go/listers/autoscaling/v2alpha1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/listers/autoscaling/v2alpha1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/client-go/listers/batch/v1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/listers/batch/v1:all-srcs",
 | 
				
			||||||
 | 
					        "//staging/src/k8s.io/client-go/listers/batch/v1beta1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/client-go/listers/batch/v2alpha1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/listers/batch/v2alpha1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/client-go/listers/certificates/v1beta1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/listers/certificates/v1beta1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/client-go/listers/core/v1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/listers/core/v1:all-srcs",
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										54
									
								
								staging/src/k8s.io/api/batch/v1beta1/BUILD
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								staging/src/k8s.io/api/batch/v1beta1/BUILD
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,54 @@
 | 
				
			|||||||
 | 
					package(default_visibility = ["//visibility:public"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					licenses(["notice"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					load(
 | 
				
			||||||
 | 
					    "@io_bazel_rules_go//go:def.bzl",
 | 
				
			||||||
 | 
					    "go_library",
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					go_library(
 | 
				
			||||||
 | 
					    name = "go_default_library",
 | 
				
			||||||
 | 
					    srcs = [
 | 
				
			||||||
 | 
					        "doc.go",
 | 
				
			||||||
 | 
					        "generated.pb.go",
 | 
				
			||||||
 | 
					        "register.go",
 | 
				
			||||||
 | 
					        "types.generated.go",
 | 
				
			||||||
 | 
					        "types.go",
 | 
				
			||||||
 | 
					        "types_swagger_doc_generated.go",
 | 
				
			||||||
 | 
					        "zz_generated.deepcopy.go",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    deps = [
 | 
				
			||||||
 | 
					        "//vendor/github.com/gogo/protobuf/proto:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/github.com/ugorji/go/codec:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/batch/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/core/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "package-srcs",
 | 
				
			||||||
 | 
					    srcs = glob(["**"]),
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    visibility = ["//visibility:private"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "all-srcs",
 | 
				
			||||||
 | 
					    srcs = [":package-srcs"],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "go_default_library_protos",
 | 
				
			||||||
 | 
					    srcs = ["generated.proto"],
 | 
				
			||||||
 | 
					    visibility = ["//visibility:public"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
							
								
								
									
										20
									
								
								staging/src/k8s.io/api/batch/v1beta1/doc.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								staging/src/k8s.io/api/batch/v1beta1/doc.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// +k8s:deepcopy-gen=package,register
 | 
				
			||||||
 | 
					// +k8s:openapi-gen=true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1 // import "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
							
								
								
									
										1509
									
								
								staging/src/k8s.io/api/batch/v1beta1/generated.pb.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1509
									
								
								staging/src/k8s.io/api/batch/v1beta1/generated.pb.go
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										133
									
								
								staging/src/k8s.io/api/batch/v1beta1/generated.proto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										133
									
								
								staging/src/k8s.io/api/batch/v1beta1/generated.proto
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,133 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file was autogenerated by go-to-protobuf. Do not edit it manually!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					syntax = 'proto2';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package k8s.io.api.batch.v1beta1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import "k8s.io/api/batch/v1/generated.proto";
 | 
				
			||||||
 | 
					import "k8s.io/api/core/v1/generated.proto";
 | 
				
			||||||
 | 
					import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
 | 
				
			||||||
 | 
					import "k8s.io/apimachinery/pkg/runtime/generated.proto";
 | 
				
			||||||
 | 
					import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
 | 
				
			||||||
 | 
					import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Package-wide variables from generator "generated".
 | 
				
			||||||
 | 
					option go_package = "v1beta1";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJob represents the configuration of a single cron job.
 | 
				
			||||||
 | 
					message CronJob {
 | 
				
			||||||
 | 
					  // Standard object's metadata.
 | 
				
			||||||
 | 
					  // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Specification of the desired behavior of a cron job, including the schedule.
 | 
				
			||||||
 | 
					  // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional CronJobSpec spec = 2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Current status of a cron job.
 | 
				
			||||||
 | 
					  // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional CronJobStatus status = 3;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobList is a collection of cron jobs.
 | 
				
			||||||
 | 
					message CronJobList {
 | 
				
			||||||
 | 
					  // Standard list metadata.
 | 
				
			||||||
 | 
					  // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // items is the list of CronJobs.
 | 
				
			||||||
 | 
					  repeated CronJob items = 2;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobSpec describes how the job execution will look like and when it will actually run.
 | 
				
			||||||
 | 
					message CronJobSpec {
 | 
				
			||||||
 | 
					  // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
 | 
				
			||||||
 | 
					  optional string schedule = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Optional deadline in seconds for starting the job if it misses scheduled
 | 
				
			||||||
 | 
					  // time for any reason.  Missed jobs executions will be counted as failed ones.
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional int64 startingDeadlineSeconds = 2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Specifies how to treat concurrent executions of a Job.
 | 
				
			||||||
 | 
					  // Defaults to Allow.
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional string concurrencyPolicy = 3;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // This flag tells the controller to suspend subsequent executions, it does
 | 
				
			||||||
 | 
					  // not apply to already started executions.  Defaults to false.
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional bool suspend = 4;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Specifies the job that will be created when executing a CronJob.
 | 
				
			||||||
 | 
					  optional JobTemplateSpec jobTemplate = 5;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // The number of successful finished jobs to retain.
 | 
				
			||||||
 | 
					  // This is a pointer to distinguish between explicit zero and not specified.
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional int32 successfulJobsHistoryLimit = 6;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // The number of failed finished jobs to retain.
 | 
				
			||||||
 | 
					  // This is a pointer to distinguish between explicit zero and not specified.
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional int32 failedJobsHistoryLimit = 7;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobStatus represents the current state of a cron job.
 | 
				
			||||||
 | 
					message CronJobStatus {
 | 
				
			||||||
 | 
					  // A list of pointers to currently running jobs.
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  repeated k8s.io.api.core.v1.ObjectReference active = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Information when was the last time the job was successfully scheduled.
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScheduleTime = 4;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// JobTemplate describes a template for creating copies of a predefined pod.
 | 
				
			||||||
 | 
					message JobTemplate {
 | 
				
			||||||
 | 
					  // Standard object's metadata.
 | 
				
			||||||
 | 
					  // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Defines jobs that will be created from this template.
 | 
				
			||||||
 | 
					  // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional JobTemplateSpec template = 2;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// JobTemplateSpec describes the data a Job should have when created from a template
 | 
				
			||||||
 | 
					message JobTemplateSpec {
 | 
				
			||||||
 | 
					  // Standard object's metadata of the jobs created from this template.
 | 
				
			||||||
 | 
					  // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Specification of the desired behavior of the job.
 | 
				
			||||||
 | 
					  // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
 | 
				
			||||||
 | 
					  // +optional
 | 
				
			||||||
 | 
					  optional k8s.io.api.batch.v1.JobSpec spec = 2;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										53
									
								
								staging/src/k8s.io/api/batch/v1beta1/register.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								staging/src/k8s.io/api/batch/v1beta1/register.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,53 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 | 
				
			||||||
 | 
						"k8s.io/apimachinery/pkg/runtime"
 | 
				
			||||||
 | 
						"k8s.io/apimachinery/pkg/runtime/schema"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// GroupName is the group name use in this package
 | 
				
			||||||
 | 
					const GroupName = "batch"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SchemeGroupVersion is group version used to register these objects
 | 
				
			||||||
 | 
					var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Resource takes an unqualified resource and returns a Group qualified GroupResource
 | 
				
			||||||
 | 
					func Resource(resource string) schema.GroupResource {
 | 
				
			||||||
 | 
						return SchemeGroupVersion.WithResource(resource).GroupResource()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var (
 | 
				
			||||||
 | 
						// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
 | 
				
			||||||
 | 
						// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
 | 
				
			||||||
 | 
						SchemeBuilder      = runtime.NewSchemeBuilder(addKnownTypes)
 | 
				
			||||||
 | 
						localSchemeBuilder = &SchemeBuilder
 | 
				
			||||||
 | 
						AddToScheme        = localSchemeBuilder.AddToScheme
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Adds the list of known types to api.Scheme.
 | 
				
			||||||
 | 
					func addKnownTypes(scheme *runtime.Scheme) error {
 | 
				
			||||||
 | 
						scheme.AddKnownTypes(SchemeGroupVersion,
 | 
				
			||||||
 | 
							&JobTemplate{},
 | 
				
			||||||
 | 
							&CronJob{},
 | 
				
			||||||
 | 
							&CronJobList{},
 | 
				
			||||||
 | 
						)
 | 
				
			||||||
 | 
						metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										2525
									
								
								staging/src/k8s.io/api/batch/v1beta1/types.generated.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2525
									
								
								staging/src/k8s.io/api/batch/v1beta1/types.generated.go
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										153
									
								
								staging/src/k8s.io/api/batch/v1beta1/types.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										153
									
								
								staging/src/k8s.io/api/batch/v1beta1/types.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,153 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						batchv1 "k8s.io/api/batch/v1"
 | 
				
			||||||
 | 
						"k8s.io/api/core/v1"
 | 
				
			||||||
 | 
						metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// JobTemplate describes a template for creating copies of a predefined pod.
 | 
				
			||||||
 | 
					type JobTemplate struct {
 | 
				
			||||||
 | 
						metav1.TypeMeta `json:",inline"`
 | 
				
			||||||
 | 
						// Standard object's metadata.
 | 
				
			||||||
 | 
						// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Defines jobs that will be created from this template.
 | 
				
			||||||
 | 
						// https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						Template JobTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// JobTemplateSpec describes the data a Job should have when created from a template
 | 
				
			||||||
 | 
					type JobTemplateSpec struct {
 | 
				
			||||||
 | 
						// Standard object's metadata of the jobs created from this template.
 | 
				
			||||||
 | 
						// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Specification of the desired behavior of the job.
 | 
				
			||||||
 | 
						// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						Spec batchv1.JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// +genclient
 | 
				
			||||||
 | 
					// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJob represents the configuration of a single cron job.
 | 
				
			||||||
 | 
					type CronJob struct {
 | 
				
			||||||
 | 
						metav1.TypeMeta `json:",inline"`
 | 
				
			||||||
 | 
						// Standard object's metadata.
 | 
				
			||||||
 | 
						// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Specification of the desired behavior of a cron job, including the schedule.
 | 
				
			||||||
 | 
						// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						Spec CronJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Current status of a cron job.
 | 
				
			||||||
 | 
						// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						Status CronJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobList is a collection of cron jobs.
 | 
				
			||||||
 | 
					type CronJobList struct {
 | 
				
			||||||
 | 
						metav1.TypeMeta `json:",inline"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Standard list metadata.
 | 
				
			||||||
 | 
						// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// items is the list of CronJobs.
 | 
				
			||||||
 | 
						Items []CronJob `json:"items" protobuf:"bytes,2,rep,name=items"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobSpec describes how the job execution will look like and when it will actually run.
 | 
				
			||||||
 | 
					type CronJobSpec struct {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
 | 
				
			||||||
 | 
						Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Optional deadline in seconds for starting the job if it misses scheduled
 | 
				
			||||||
 | 
						// time for any reason.  Missed jobs executions will be counted as failed ones.
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Specifies how to treat concurrent executions of a Job.
 | 
				
			||||||
 | 
						// Defaults to Allow.
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// This flag tells the controller to suspend subsequent executions, it does
 | 
				
			||||||
 | 
						// not apply to already started executions.  Defaults to false.
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						Suspend *bool `json:"suspend,omitempty" protobuf:"varint,4,opt,name=suspend"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Specifies the job that will be created when executing a CronJob.
 | 
				
			||||||
 | 
						JobTemplate JobTemplateSpec `json:"jobTemplate" protobuf:"bytes,5,opt,name=jobTemplate"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// The number of successful finished jobs to retain.
 | 
				
			||||||
 | 
						// This is a pointer to distinguish between explicit zero and not specified.
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty" protobuf:"varint,6,opt,name=successfulJobsHistoryLimit"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// The number of failed finished jobs to retain.
 | 
				
			||||||
 | 
						// This is a pointer to distinguish between explicit zero and not specified.
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty" protobuf:"varint,7,opt,name=failedJobsHistoryLimit"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ConcurrencyPolicy describes how the job will be handled.
 | 
				
			||||||
 | 
					// Only one of the following concurrent policies may be specified.
 | 
				
			||||||
 | 
					// If none of the following policies is specified, the default one
 | 
				
			||||||
 | 
					// is AllowConcurrent.
 | 
				
			||||||
 | 
					type ConcurrencyPolicy string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const (
 | 
				
			||||||
 | 
						// AllowConcurrent allows CronJobs to run concurrently.
 | 
				
			||||||
 | 
						AllowConcurrent ConcurrencyPolicy = "Allow"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// ForbidConcurrent forbids concurrent runs, skipping next run if previous
 | 
				
			||||||
 | 
						// hasn't finished yet.
 | 
				
			||||||
 | 
						ForbidConcurrent ConcurrencyPolicy = "Forbid"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// ReplaceConcurrent cancels currently running job and replaces it with a new one.
 | 
				
			||||||
 | 
						ReplaceConcurrent ConcurrencyPolicy = "Replace"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobStatus represents the current state of a cron job.
 | 
				
			||||||
 | 
					type CronJobStatus struct {
 | 
				
			||||||
 | 
						// A list of pointers to currently running jobs.
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Information when was the last time the job was successfully scheduled.
 | 
				
			||||||
 | 
						// +optional
 | 
				
			||||||
 | 
						LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,96 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file contains a collection of methods that can be used from go-restful to
 | 
				
			||||||
 | 
					// generate Swagger API documentation for its models. Please read this PR for more
 | 
				
			||||||
 | 
					// information on the implementation: https://github.com/emicklei/go-restful/pull/215
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
 | 
				
			||||||
 | 
					// they are on one line! For multiple line or blocks that you want to ignore use ---.
 | 
				
			||||||
 | 
					// Any context after a --- is ignored.
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// Those methods can be generated by using hack/update-generated-swagger-docs.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// AUTO-GENERATED FUNCTIONS START HERE
 | 
				
			||||||
 | 
					var map_CronJob = map[string]string{
 | 
				
			||||||
 | 
						"":         "CronJob represents the configuration of a single cron job.",
 | 
				
			||||||
 | 
						"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
 | 
				
			||||||
 | 
						"spec":     "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
 | 
				
			||||||
 | 
						"status":   "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (CronJob) SwaggerDoc() map[string]string {
 | 
				
			||||||
 | 
						return map_CronJob
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var map_CronJobList = map[string]string{
 | 
				
			||||||
 | 
						"":         "CronJobList is a collection of cron jobs.",
 | 
				
			||||||
 | 
						"metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
 | 
				
			||||||
 | 
						"items":    "items is the list of CronJobs.",
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (CronJobList) SwaggerDoc() map[string]string {
 | 
				
			||||||
 | 
						return map_CronJobList
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var map_CronJobSpec = map[string]string{
 | 
				
			||||||
 | 
						"":                           "CronJobSpec describes how the job execution will look like and when it will actually run.",
 | 
				
			||||||
 | 
						"schedule":                   "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.",
 | 
				
			||||||
 | 
						"startingDeadlineSeconds":    "Optional deadline in seconds for starting the job if it misses scheduled time for any reason.  Missed jobs executions will be counted as failed ones.",
 | 
				
			||||||
 | 
						"concurrencyPolicy":          "Specifies how to treat concurrent executions of a Job. Defaults to Allow.",
 | 
				
			||||||
 | 
						"suspend":                    "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions.  Defaults to false.",
 | 
				
			||||||
 | 
						"jobTemplate":                "Specifies the job that will be created when executing a CronJob.",
 | 
				
			||||||
 | 
						"successfulJobsHistoryLimit": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.",
 | 
				
			||||||
 | 
						"failedJobsHistoryLimit":     "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.",
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (CronJobSpec) SwaggerDoc() map[string]string {
 | 
				
			||||||
 | 
						return map_CronJobSpec
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var map_CronJobStatus = map[string]string{
 | 
				
			||||||
 | 
						"":                 "CronJobStatus represents the current state of a cron job.",
 | 
				
			||||||
 | 
						"active":           "A list of pointers to currently running jobs.",
 | 
				
			||||||
 | 
						"lastScheduleTime": "Information when was the last time the job was successfully scheduled.",
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (CronJobStatus) SwaggerDoc() map[string]string {
 | 
				
			||||||
 | 
						return map_CronJobStatus
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var map_JobTemplate = map[string]string{
 | 
				
			||||||
 | 
						"":         "JobTemplate describes a template for creating copies of a predefined pod.",
 | 
				
			||||||
 | 
						"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
 | 
				
			||||||
 | 
						"template": "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (JobTemplate) SwaggerDoc() map[string]string {
 | 
				
			||||||
 | 
						return map_JobTemplate
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var map_JobTemplateSpec = map[string]string{
 | 
				
			||||||
 | 
						"":         "JobTemplateSpec describes the data a Job should have when created from a template",
 | 
				
			||||||
 | 
						"metadata": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
 | 
				
			||||||
 | 
						"spec":     "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (JobTemplateSpec) SwaggerDoc() map[string]string {
 | 
				
			||||||
 | 
						return map_JobTemplateSpec
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// AUTO-GENERATED FUNCTIONS END HERE
 | 
				
			||||||
							
								
								
									
										258
									
								
								staging/src/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										258
									
								
								staging/src/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,258 @@
 | 
				
			|||||||
 | 
					// +build !ignore_autogenerated
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file was autogenerated by deepcopy-gen. Do not edit it manually!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						v1 "k8s.io/api/core/v1"
 | 
				
			||||||
 | 
						meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 | 
				
			||||||
 | 
						conversion "k8s.io/apimachinery/pkg/conversion"
 | 
				
			||||||
 | 
						runtime "k8s.io/apimachinery/pkg/runtime"
 | 
				
			||||||
 | 
						reflect "reflect"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func init() {
 | 
				
			||||||
 | 
						SchemeBuilder.Register(RegisterDeepCopies)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
 | 
				
			||||||
 | 
					// to allow building arbitrary schemes.
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
 | 
				
			||||||
 | 
					func RegisterDeepCopies(scheme *runtime.Scheme) error {
 | 
				
			||||||
 | 
						return scheme.AddGeneratedDeepCopyFuncs(
 | 
				
			||||||
 | 
							conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
 | 
				
			||||||
 | 
								in.(*CronJob).DeepCopyInto(out.(*CronJob))
 | 
				
			||||||
 | 
								return nil
 | 
				
			||||||
 | 
							}, InType: reflect.TypeOf(&CronJob{})},
 | 
				
			||||||
 | 
							conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
 | 
				
			||||||
 | 
								in.(*CronJobList).DeepCopyInto(out.(*CronJobList))
 | 
				
			||||||
 | 
								return nil
 | 
				
			||||||
 | 
							}, InType: reflect.TypeOf(&CronJobList{})},
 | 
				
			||||||
 | 
							conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
 | 
				
			||||||
 | 
								in.(*CronJobSpec).DeepCopyInto(out.(*CronJobSpec))
 | 
				
			||||||
 | 
								return nil
 | 
				
			||||||
 | 
							}, InType: reflect.TypeOf(&CronJobSpec{})},
 | 
				
			||||||
 | 
							conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
 | 
				
			||||||
 | 
								in.(*CronJobStatus).DeepCopyInto(out.(*CronJobStatus))
 | 
				
			||||||
 | 
								return nil
 | 
				
			||||||
 | 
							}, InType: reflect.TypeOf(&CronJobStatus{})},
 | 
				
			||||||
 | 
							conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
 | 
				
			||||||
 | 
								in.(*JobTemplate).DeepCopyInto(out.(*JobTemplate))
 | 
				
			||||||
 | 
								return nil
 | 
				
			||||||
 | 
							}, InType: reflect.TypeOf(&JobTemplate{})},
 | 
				
			||||||
 | 
							conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
 | 
				
			||||||
 | 
								in.(*JobTemplateSpec).DeepCopyInto(out.(*JobTemplateSpec))
 | 
				
			||||||
 | 
								return nil
 | 
				
			||||||
 | 
							}, InType: reflect.TypeOf(&JobTemplateSpec{})},
 | 
				
			||||||
 | 
						)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | 
				
			||||||
 | 
					func (in *CronJob) DeepCopyInto(out *CronJob) {
 | 
				
			||||||
 | 
						*out = *in
 | 
				
			||||||
 | 
						out.TypeMeta = in.TypeMeta
 | 
				
			||||||
 | 
						in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
 | 
				
			||||||
 | 
						in.Spec.DeepCopyInto(&out.Spec)
 | 
				
			||||||
 | 
						in.Status.DeepCopyInto(&out.Status)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJob.
 | 
				
			||||||
 | 
					func (in *CronJob) DeepCopy() *CronJob {
 | 
				
			||||||
 | 
						if in == nil {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						out := new(CronJob)
 | 
				
			||||||
 | 
						in.DeepCopyInto(out)
 | 
				
			||||||
 | 
						return out
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | 
				
			||||||
 | 
					func (in *CronJob) DeepCopyObject() runtime.Object {
 | 
				
			||||||
 | 
						if c := in.DeepCopy(); c != nil {
 | 
				
			||||||
 | 
							return c
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | 
				
			||||||
 | 
					func (in *CronJobList) DeepCopyInto(out *CronJobList) {
 | 
				
			||||||
 | 
						*out = *in
 | 
				
			||||||
 | 
						out.TypeMeta = in.TypeMeta
 | 
				
			||||||
 | 
						out.ListMeta = in.ListMeta
 | 
				
			||||||
 | 
						if in.Items != nil {
 | 
				
			||||||
 | 
							in, out := &in.Items, &out.Items
 | 
				
			||||||
 | 
							*out = make([]CronJob, len(*in))
 | 
				
			||||||
 | 
							for i := range *in {
 | 
				
			||||||
 | 
								(*in)[i].DeepCopyInto(&(*out)[i])
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobList.
 | 
				
			||||||
 | 
					func (in *CronJobList) DeepCopy() *CronJobList {
 | 
				
			||||||
 | 
						if in == nil {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						out := new(CronJobList)
 | 
				
			||||||
 | 
						in.DeepCopyInto(out)
 | 
				
			||||||
 | 
						return out
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | 
				
			||||||
 | 
					func (in *CronJobList) DeepCopyObject() runtime.Object {
 | 
				
			||||||
 | 
						if c := in.DeepCopy(); c != nil {
 | 
				
			||||||
 | 
							return c
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | 
				
			||||||
 | 
					func (in *CronJobSpec) DeepCopyInto(out *CronJobSpec) {
 | 
				
			||||||
 | 
						*out = *in
 | 
				
			||||||
 | 
						if in.StartingDeadlineSeconds != nil {
 | 
				
			||||||
 | 
							in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds
 | 
				
			||||||
 | 
							if *in == nil {
 | 
				
			||||||
 | 
								*out = nil
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								*out = new(int64)
 | 
				
			||||||
 | 
								**out = **in
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if in.Suspend != nil {
 | 
				
			||||||
 | 
							in, out := &in.Suspend, &out.Suspend
 | 
				
			||||||
 | 
							if *in == nil {
 | 
				
			||||||
 | 
								*out = nil
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								*out = new(bool)
 | 
				
			||||||
 | 
								**out = **in
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						in.JobTemplate.DeepCopyInto(&out.JobTemplate)
 | 
				
			||||||
 | 
						if in.SuccessfulJobsHistoryLimit != nil {
 | 
				
			||||||
 | 
							in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit
 | 
				
			||||||
 | 
							if *in == nil {
 | 
				
			||||||
 | 
								*out = nil
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								*out = new(int32)
 | 
				
			||||||
 | 
								**out = **in
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if in.FailedJobsHistoryLimit != nil {
 | 
				
			||||||
 | 
							in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit
 | 
				
			||||||
 | 
							if *in == nil {
 | 
				
			||||||
 | 
								*out = nil
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								*out = new(int32)
 | 
				
			||||||
 | 
								**out = **in
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobSpec.
 | 
				
			||||||
 | 
					func (in *CronJobSpec) DeepCopy() *CronJobSpec {
 | 
				
			||||||
 | 
						if in == nil {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						out := new(CronJobSpec)
 | 
				
			||||||
 | 
						in.DeepCopyInto(out)
 | 
				
			||||||
 | 
						return out
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | 
				
			||||||
 | 
					func (in *CronJobStatus) DeepCopyInto(out *CronJobStatus) {
 | 
				
			||||||
 | 
						*out = *in
 | 
				
			||||||
 | 
						if in.Active != nil {
 | 
				
			||||||
 | 
							in, out := &in.Active, &out.Active
 | 
				
			||||||
 | 
							*out = make([]v1.ObjectReference, len(*in))
 | 
				
			||||||
 | 
							copy(*out, *in)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if in.LastScheduleTime != nil {
 | 
				
			||||||
 | 
							in, out := &in.LastScheduleTime, &out.LastScheduleTime
 | 
				
			||||||
 | 
							if *in == nil {
 | 
				
			||||||
 | 
								*out = nil
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								*out = new(meta_v1.Time)
 | 
				
			||||||
 | 
								(*in).DeepCopyInto(*out)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobStatus.
 | 
				
			||||||
 | 
					func (in *CronJobStatus) DeepCopy() *CronJobStatus {
 | 
				
			||||||
 | 
						if in == nil {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						out := new(CronJobStatus)
 | 
				
			||||||
 | 
						in.DeepCopyInto(out)
 | 
				
			||||||
 | 
						return out
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | 
				
			||||||
 | 
					func (in *JobTemplate) DeepCopyInto(out *JobTemplate) {
 | 
				
			||||||
 | 
						*out = *in
 | 
				
			||||||
 | 
						out.TypeMeta = in.TypeMeta
 | 
				
			||||||
 | 
						in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
 | 
				
			||||||
 | 
						in.Template.DeepCopyInto(&out.Template)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobTemplate.
 | 
				
			||||||
 | 
					func (in *JobTemplate) DeepCopy() *JobTemplate {
 | 
				
			||||||
 | 
						if in == nil {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						out := new(JobTemplate)
 | 
				
			||||||
 | 
						in.DeepCopyInto(out)
 | 
				
			||||||
 | 
						return out
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
 | 
				
			||||||
 | 
					func (in *JobTemplate) DeepCopyObject() runtime.Object {
 | 
				
			||||||
 | 
						if c := in.DeepCopy(); c != nil {
 | 
				
			||||||
 | 
							return c
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 | 
				
			||||||
 | 
					func (in *JobTemplateSpec) DeepCopyInto(out *JobTemplateSpec) {
 | 
				
			||||||
 | 
						*out = *in
 | 
				
			||||||
 | 
						in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
 | 
				
			||||||
 | 
						in.Spec.DeepCopyInto(&out.Spec)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobTemplateSpec.
 | 
				
			||||||
 | 
					func (in *JobTemplateSpec) DeepCopy() *JobTemplateSpec {
 | 
				
			||||||
 | 
						if in == nil {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						out := new(JobTemplateSpec)
 | 
				
			||||||
 | 
						in.DeepCopyInto(out)
 | 
				
			||||||
 | 
						return out
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -18,6 +18,7 @@ go_library(
 | 
				
			|||||||
        "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
 | 
					        "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library",
 | 
					        "//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/batch/v1:go_default_library",
 | 
					        "//vendor/k8s.io/api/batch/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
 | 
					        "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/certificates/v1beta1:go_default_library",
 | 
					        "//vendor/k8s.io/api/certificates/v1beta1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/core/v1:go_default_library",
 | 
					        "//vendor/k8s.io/api/core/v1:go_default_library",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,6 +10,7 @@ go_library(
 | 
				
			|||||||
    srcs = ["interface.go"],
 | 
					    srcs = ["interface.go"],
 | 
				
			||||||
    deps = [
 | 
					    deps = [
 | 
				
			||||||
        "//vendor/k8s.io/client-go/informers/batch/v1:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/informers/batch/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/informers/batch/v1beta1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/client-go/informers/batch/v2alpha1:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/informers/batch/v2alpha1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library",
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
@@ -27,6 +28,7 @@ filegroup(
 | 
				
			|||||||
    srcs = [
 | 
					    srcs = [
 | 
				
			||||||
        ":package-srcs",
 | 
					        ":package-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/client-go/informers/batch/v1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/informers/batch/v1:all-srcs",
 | 
				
			||||||
 | 
					        "//staging/src/k8s.io/client-go/informers/batch/v1beta1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/client-go/informers/batch/v2alpha1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/informers/batch/v2alpha1:all-srcs",
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
    tags = ["automanaged"],
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,6 +20,7 @@ package batch
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	v1 "k8s.io/client-go/informers/batch/v1"
 | 
						v1 "k8s.io/client-go/informers/batch/v1"
 | 
				
			||||||
 | 
						v1beta1 "k8s.io/client-go/informers/batch/v1beta1"
 | 
				
			||||||
	v2alpha1 "k8s.io/client-go/informers/batch/v2alpha1"
 | 
						v2alpha1 "k8s.io/client-go/informers/batch/v2alpha1"
 | 
				
			||||||
	internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
 | 
						internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
@@ -28,6 +29,8 @@ import (
 | 
				
			|||||||
type Interface interface {
 | 
					type Interface interface {
 | 
				
			||||||
	// V1 provides access to shared informers for resources in V1.
 | 
						// V1 provides access to shared informers for resources in V1.
 | 
				
			||||||
	V1() v1.Interface
 | 
						V1() v1.Interface
 | 
				
			||||||
 | 
						// V1beta1 provides access to shared informers for resources in V1beta1.
 | 
				
			||||||
 | 
						V1beta1() v1beta1.Interface
 | 
				
			||||||
	// V2alpha1 provides access to shared informers for resources in V2alpha1.
 | 
						// V2alpha1 provides access to shared informers for resources in V2alpha1.
 | 
				
			||||||
	V2alpha1() v2alpha1.Interface
 | 
						V2alpha1() v2alpha1.Interface
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -46,6 +49,11 @@ func (g *group) V1() v1.Interface {
 | 
				
			|||||||
	return v1.New(g.SharedInformerFactory)
 | 
						return v1.New(g.SharedInformerFactory)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// V1beta1 returns a new v1beta1.Interface.
 | 
				
			||||||
 | 
					func (g *group) V1beta1() v1beta1.Interface {
 | 
				
			||||||
 | 
						return v1beta1.New(g.SharedInformerFactory)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// V2alpha1 returns a new v2alpha1.Interface.
 | 
					// V2alpha1 returns a new v2alpha1.Interface.
 | 
				
			||||||
func (g *group) V2alpha1() v2alpha1.Interface {
 | 
					func (g *group) V2alpha1() v2alpha1.Interface {
 | 
				
			||||||
	return v2alpha1.New(g.SharedInformerFactory)
 | 
						return v2alpha1.New(g.SharedInformerFactory)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										40
									
								
								staging/src/k8s.io/client-go/informers/batch/v1beta1/BUILD
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								staging/src/k8s.io/client-go/informers/batch/v1beta1/BUILD
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
				
			|||||||
 | 
					package(default_visibility = ["//visibility:public"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					licenses(["notice"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					load(
 | 
				
			||||||
 | 
					    "@io_bazel_rules_go//go:def.bzl",
 | 
				
			||||||
 | 
					    "go_library",
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					go_library(
 | 
				
			||||||
 | 
					    name = "go_default_library",
 | 
				
			||||||
 | 
					    srcs = [
 | 
				
			||||||
 | 
					        "cronjob.go",
 | 
				
			||||||
 | 
					        "interface.go",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    deps = [
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/kubernetes:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/listers/batch/v1beta1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "package-srcs",
 | 
				
			||||||
 | 
					    srcs = glob(["**"]),
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    visibility = ["//visibility:private"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "all-srcs",
 | 
				
			||||||
 | 
					    srcs = [":package-srcs"],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
@@ -0,0 +1,73 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file was automatically generated by informer-gen
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						batch_v1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
 | 
						v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 | 
				
			||||||
 | 
						runtime "k8s.io/apimachinery/pkg/runtime"
 | 
				
			||||||
 | 
						watch "k8s.io/apimachinery/pkg/watch"
 | 
				
			||||||
 | 
						internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
 | 
				
			||||||
 | 
						kubernetes "k8s.io/client-go/kubernetes"
 | 
				
			||||||
 | 
						v1beta1 "k8s.io/client-go/listers/batch/v1beta1"
 | 
				
			||||||
 | 
						cache "k8s.io/client-go/tools/cache"
 | 
				
			||||||
 | 
						time "time"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobInformer provides access to a shared informer and lister for
 | 
				
			||||||
 | 
					// CronJobs.
 | 
				
			||||||
 | 
					type CronJobInformer interface {
 | 
				
			||||||
 | 
						Informer() cache.SharedIndexInformer
 | 
				
			||||||
 | 
						Lister() v1beta1.CronJobLister
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type cronJobInformer struct {
 | 
				
			||||||
 | 
						factory internalinterfaces.SharedInformerFactory
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewCronJobInformer constructs a new informer for CronJob type.
 | 
				
			||||||
 | 
					// Always prefer using an informer factory to get a shared informer instead of getting an independent
 | 
				
			||||||
 | 
					// one. This reduces memory footprint and number of connections to the server.
 | 
				
			||||||
 | 
					func NewCronJobInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
 | 
				
			||||||
 | 
						return cache.NewSharedIndexInformer(
 | 
				
			||||||
 | 
							&cache.ListWatch{
 | 
				
			||||||
 | 
								ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
 | 
				
			||||||
 | 
									return client.BatchV1beta1().CronJobs(namespace).List(options)
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
									return client.BatchV1beta1().CronJobs(namespace).Watch(options)
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							&batch_v1beta1.CronJob{},
 | 
				
			||||||
 | 
							resyncPeriod,
 | 
				
			||||||
 | 
							indexers,
 | 
				
			||||||
 | 
						)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func defaultCronJobInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
 | 
				
			||||||
 | 
						return NewCronJobInformer(client, v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (f *cronJobInformer) Informer() cache.SharedIndexInformer {
 | 
				
			||||||
 | 
						return f.factory.InformerFor(&batch_v1beta1.CronJob{}, defaultCronJobInformer)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (f *cronJobInformer) Lister() v1beta1.CronJobLister {
 | 
				
			||||||
 | 
						return v1beta1.NewCronJobLister(f.Informer().GetIndexer())
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,43 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file was automatically generated by informer-gen
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Interface provides access to all the informers in this group version.
 | 
				
			||||||
 | 
					type Interface interface {
 | 
				
			||||||
 | 
						// CronJobs returns a CronJobInformer.
 | 
				
			||||||
 | 
						CronJobs() CronJobInformer
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type version struct {
 | 
				
			||||||
 | 
						internalinterfaces.SharedInformerFactory
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// New returns a new Interface.
 | 
				
			||||||
 | 
					func New(f internalinterfaces.SharedInformerFactory) Interface {
 | 
				
			||||||
 | 
						return &version{f}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobs returns a CronJobInformer.
 | 
				
			||||||
 | 
					func (v *version) CronJobs() CronJobInformer {
 | 
				
			||||||
 | 
						return &cronJobInformer{factory: v.SharedInformerFactory}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -26,6 +26,7 @@ import (
 | 
				
			|||||||
	v1 "k8s.io/api/autoscaling/v1"
 | 
						v1 "k8s.io/api/autoscaling/v1"
 | 
				
			||||||
	v2alpha1 "k8s.io/api/autoscaling/v2alpha1"
 | 
						v2alpha1 "k8s.io/api/autoscaling/v2alpha1"
 | 
				
			||||||
	batch_v1 "k8s.io/api/batch/v1"
 | 
						batch_v1 "k8s.io/api/batch/v1"
 | 
				
			||||||
 | 
						batch_v1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
	batch_v2alpha1 "k8s.io/api/batch/v2alpha1"
 | 
						batch_v2alpha1 "k8s.io/api/batch/v2alpha1"
 | 
				
			||||||
	certificates_v1beta1 "k8s.io/api/certificates/v1beta1"
 | 
						certificates_v1beta1 "k8s.io/api/certificates/v1beta1"
 | 
				
			||||||
	core_v1 "k8s.io/api/core/v1"
 | 
						core_v1 "k8s.io/api/core/v1"
 | 
				
			||||||
@@ -105,6 +106,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
 | 
				
			|||||||
	case batch_v1.SchemeGroupVersion.WithResource("jobs"):
 | 
						case batch_v1.SchemeGroupVersion.WithResource("jobs"):
 | 
				
			||||||
		return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1().Jobs().Informer()}, nil
 | 
							return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1().Jobs().Informer()}, nil
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// Group=Batch, Version=V1beta1
 | 
				
			||||||
 | 
						case batch_v1beta1.SchemeGroupVersion.WithResource("cronjobs"):
 | 
				
			||||||
 | 
							return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1beta1().CronJobs().Informer()}, nil
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Group=Batch, Version=V2alpha1
 | 
							// Group=Batch, Version=V2alpha1
 | 
				
			||||||
	case batch_v2alpha1.SchemeGroupVersion.WithResource("cronjobs"):
 | 
						case batch_v2alpha1.SchemeGroupVersion.WithResource("cronjobs"):
 | 
				
			||||||
		return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil
 | 
							return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,6 +25,7 @@ go_library(
 | 
				
			|||||||
        "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
 | 
				
			||||||
@@ -66,6 +67,7 @@ filegroup(
 | 
				
			|||||||
        "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:all-srcs",
 | 
				
			||||||
 | 
					        "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:all-srcs",
 | 
				
			||||||
        "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:all-srcs",
 | 
					        "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:all-srcs",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,6 +29,7 @@ import (
 | 
				
			|||||||
	autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
 | 
						autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
 | 
				
			||||||
	autoscalingv2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1"
 | 
						autoscalingv2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1"
 | 
				
			||||||
	batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
 | 
						batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
 | 
				
			||||||
 | 
						batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
 | 
				
			||||||
	batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
 | 
						batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
 | 
				
			||||||
	certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
 | 
						certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
 | 
				
			||||||
	corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
 | 
						corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
 | 
				
			||||||
@@ -70,6 +71,7 @@ type Interface interface {
 | 
				
			|||||||
	BatchV1() batchv1.BatchV1Interface
 | 
						BatchV1() batchv1.BatchV1Interface
 | 
				
			||||||
	// Deprecated: please explicitly pick a version if possible.
 | 
						// Deprecated: please explicitly pick a version if possible.
 | 
				
			||||||
	Batch() batchv1.BatchV1Interface
 | 
						Batch() batchv1.BatchV1Interface
 | 
				
			||||||
 | 
						BatchV1beta1() batchv1beta1.BatchV1beta1Interface
 | 
				
			||||||
	BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface
 | 
						BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface
 | 
				
			||||||
	CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface
 | 
						CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface
 | 
				
			||||||
	// Deprecated: please explicitly pick a version if possible.
 | 
						// Deprecated: please explicitly pick a version if possible.
 | 
				
			||||||
@@ -117,6 +119,7 @@ type Clientset struct {
 | 
				
			|||||||
	autoscalingV1                 *autoscalingv1.AutoscalingV1Client
 | 
						autoscalingV1                 *autoscalingv1.AutoscalingV1Client
 | 
				
			||||||
	autoscalingV2alpha1           *autoscalingv2alpha1.AutoscalingV2alpha1Client
 | 
						autoscalingV2alpha1           *autoscalingv2alpha1.AutoscalingV2alpha1Client
 | 
				
			||||||
	batchV1                       *batchv1.BatchV1Client
 | 
						batchV1                       *batchv1.BatchV1Client
 | 
				
			||||||
 | 
						batchV1beta1                  *batchv1beta1.BatchV1beta1Client
 | 
				
			||||||
	batchV2alpha1                 *batchv2alpha1.BatchV2alpha1Client
 | 
						batchV2alpha1                 *batchv2alpha1.BatchV2alpha1Client
 | 
				
			||||||
	certificatesV1beta1           *certificatesv1beta1.CertificatesV1beta1Client
 | 
						certificatesV1beta1           *certificatesv1beta1.CertificatesV1beta1Client
 | 
				
			||||||
	coreV1                        *corev1.CoreV1Client
 | 
						coreV1                        *corev1.CoreV1Client
 | 
				
			||||||
@@ -218,6 +221,11 @@ func (c *Clientset) Batch() batchv1.BatchV1Interface {
 | 
				
			|||||||
	return c.batchV1
 | 
						return c.batchV1
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// BatchV1beta1 retrieves the BatchV1beta1Client
 | 
				
			||||||
 | 
					func (c *Clientset) BatchV1beta1() batchv1beta1.BatchV1beta1Interface {
 | 
				
			||||||
 | 
						return c.batchV1beta1
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// BatchV2alpha1 retrieves the BatchV2alpha1Client
 | 
					// BatchV2alpha1 retrieves the BatchV2alpha1Client
 | 
				
			||||||
func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
 | 
					func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
 | 
				
			||||||
	return c.batchV2alpha1
 | 
						return c.batchV2alpha1
 | 
				
			||||||
@@ -393,6 +401,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
 | 
				
			|||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, err
 | 
							return nil, err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						cs.batchV1beta1, err = batchv1beta1.NewForConfig(&configShallowCopy)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	cs.batchV2alpha1, err = batchv2alpha1.NewForConfig(&configShallowCopy)
 | 
						cs.batchV2alpha1, err = batchv2alpha1.NewForConfig(&configShallowCopy)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, err
 | 
							return nil, err
 | 
				
			||||||
@@ -468,6 +480,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
 | 
				
			|||||||
	cs.autoscalingV1 = autoscalingv1.NewForConfigOrDie(c)
 | 
						cs.autoscalingV1 = autoscalingv1.NewForConfigOrDie(c)
 | 
				
			||||||
	cs.autoscalingV2alpha1 = autoscalingv2alpha1.NewForConfigOrDie(c)
 | 
						cs.autoscalingV2alpha1 = autoscalingv2alpha1.NewForConfigOrDie(c)
 | 
				
			||||||
	cs.batchV1 = batchv1.NewForConfigOrDie(c)
 | 
						cs.batchV1 = batchv1.NewForConfigOrDie(c)
 | 
				
			||||||
 | 
						cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c)
 | 
				
			||||||
	cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c)
 | 
						cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c)
 | 
				
			||||||
	cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c)
 | 
						cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c)
 | 
				
			||||||
	cs.coreV1 = corev1.NewForConfigOrDie(c)
 | 
						cs.coreV1 = corev1.NewForConfigOrDie(c)
 | 
				
			||||||
@@ -499,6 +512,7 @@ func New(c rest.Interface) *Clientset {
 | 
				
			|||||||
	cs.autoscalingV1 = autoscalingv1.New(c)
 | 
						cs.autoscalingV1 = autoscalingv1.New(c)
 | 
				
			||||||
	cs.autoscalingV2alpha1 = autoscalingv2alpha1.New(c)
 | 
						cs.autoscalingV2alpha1 = autoscalingv2alpha1.New(c)
 | 
				
			||||||
	cs.batchV1 = batchv1.New(c)
 | 
						cs.batchV1 = batchv1.New(c)
 | 
				
			||||||
 | 
						cs.batchV1beta1 = batchv1beta1.New(c)
 | 
				
			||||||
	cs.batchV2alpha1 = batchv2alpha1.New(c)
 | 
						cs.batchV2alpha1 = batchv2alpha1.New(c)
 | 
				
			||||||
	cs.certificatesV1beta1 = certificatesv1beta1.New(c)
 | 
						cs.certificatesV1beta1 = certificatesv1beta1.New(c)
 | 
				
			||||||
	cs.coreV1 = corev1.New(c)
 | 
						cs.coreV1 = corev1.New(c)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,6 +23,7 @@ go_library(
 | 
				
			|||||||
        "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
 | 
					        "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library",
 | 
					        "//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/batch/v1:go_default_library",
 | 
					        "//vendor/k8s.io/api/batch/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
 | 
					        "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/certificates/v1beta1:go_default_library",
 | 
					        "//vendor/k8s.io/api/certificates/v1beta1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/core/v1:go_default_library",
 | 
					        "//vendor/k8s.io/api/core/v1:go_default_library",
 | 
				
			||||||
@@ -64,6 +65,8 @@ go_library(
 | 
				
			|||||||
        "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library",
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,6 +42,8 @@ import (
 | 
				
			|||||||
	fakeautoscalingv2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake"
 | 
						fakeautoscalingv2alpha1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2alpha1/fake"
 | 
				
			||||||
	batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
 | 
						batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
 | 
				
			||||||
	fakebatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1/fake"
 | 
						fakebatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1/fake"
 | 
				
			||||||
 | 
						batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
 | 
				
			||||||
 | 
						fakebatchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake"
 | 
				
			||||||
	batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
 | 
						batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
 | 
				
			||||||
	fakebatchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake"
 | 
						fakebatchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake"
 | 
				
			||||||
	certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
 | 
						certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
 | 
				
			||||||
@@ -184,6 +186,11 @@ func (c *Clientset) Batch() batchv1.BatchV1Interface {
 | 
				
			|||||||
	return &fakebatchv1.FakeBatchV1{Fake: &c.Fake}
 | 
						return &fakebatchv1.FakeBatchV1{Fake: &c.Fake}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// BatchV1beta1 retrieves the BatchV1beta1Client
 | 
				
			||||||
 | 
					func (c *Clientset) BatchV1beta1() batchv1beta1.BatchV1beta1Interface {
 | 
				
			||||||
 | 
						return &fakebatchv1beta1.FakeBatchV1beta1{Fake: &c.Fake}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// BatchV2alpha1 retrieves the BatchV2alpha1Client
 | 
					// BatchV2alpha1 retrieves the BatchV2alpha1Client
 | 
				
			||||||
func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
 | 
					func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
 | 
				
			||||||
	return &fakebatchv2alpha1.FakeBatchV2alpha1{Fake: &c.Fake}
 | 
						return &fakebatchv2alpha1.FakeBatchV2alpha1{Fake: &c.Fake}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,6 +27,7 @@ import (
 | 
				
			|||||||
	autoscalingv1 "k8s.io/api/autoscaling/v1"
 | 
						autoscalingv1 "k8s.io/api/autoscaling/v1"
 | 
				
			||||||
	autoscalingv2alpha1 "k8s.io/api/autoscaling/v2alpha1"
 | 
						autoscalingv2alpha1 "k8s.io/api/autoscaling/v2alpha1"
 | 
				
			||||||
	batchv1 "k8s.io/api/batch/v1"
 | 
						batchv1 "k8s.io/api/batch/v1"
 | 
				
			||||||
 | 
						batchv1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
	batchv2alpha1 "k8s.io/api/batch/v2alpha1"
 | 
						batchv2alpha1 "k8s.io/api/batch/v2alpha1"
 | 
				
			||||||
	certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
 | 
						certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
 | 
				
			||||||
	corev1 "k8s.io/api/core/v1"
 | 
						corev1 "k8s.io/api/core/v1"
 | 
				
			||||||
@@ -80,6 +81,7 @@ func AddToScheme(scheme *runtime.Scheme) {
 | 
				
			|||||||
	autoscalingv1.AddToScheme(scheme)
 | 
						autoscalingv1.AddToScheme(scheme)
 | 
				
			||||||
	autoscalingv2alpha1.AddToScheme(scheme)
 | 
						autoscalingv2alpha1.AddToScheme(scheme)
 | 
				
			||||||
	batchv1.AddToScheme(scheme)
 | 
						batchv1.AddToScheme(scheme)
 | 
				
			||||||
 | 
						batchv1beta1.AddToScheme(scheme)
 | 
				
			||||||
	batchv2alpha1.AddToScheme(scheme)
 | 
						batchv2alpha1.AddToScheme(scheme)
 | 
				
			||||||
	certificatesv1beta1.AddToScheme(scheme)
 | 
						certificatesv1beta1.AddToScheme(scheme)
 | 
				
			||||||
	corev1.AddToScheme(scheme)
 | 
						corev1.AddToScheme(scheme)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,6 +22,7 @@ go_library(
 | 
				
			|||||||
        "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
 | 
					        "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library",
 | 
					        "//vendor/k8s.io/api/autoscaling/v2alpha1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/batch/v1:go_default_library",
 | 
					        "//vendor/k8s.io/api/batch/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
 | 
					        "//vendor/k8s.io/api/batch/v2alpha1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/certificates/v1beta1:go_default_library",
 | 
					        "//vendor/k8s.io/api/certificates/v1beta1:go_default_library",
 | 
				
			||||||
        "//vendor/k8s.io/api/core/v1:go_default_library",
 | 
					        "//vendor/k8s.io/api/core/v1:go_default_library",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,6 +27,7 @@ import (
 | 
				
			|||||||
	autoscalingv1 "k8s.io/api/autoscaling/v1"
 | 
						autoscalingv1 "k8s.io/api/autoscaling/v1"
 | 
				
			||||||
	autoscalingv2alpha1 "k8s.io/api/autoscaling/v2alpha1"
 | 
						autoscalingv2alpha1 "k8s.io/api/autoscaling/v2alpha1"
 | 
				
			||||||
	batchv1 "k8s.io/api/batch/v1"
 | 
						batchv1 "k8s.io/api/batch/v1"
 | 
				
			||||||
 | 
						batchv1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
	batchv2alpha1 "k8s.io/api/batch/v2alpha1"
 | 
						batchv2alpha1 "k8s.io/api/batch/v2alpha1"
 | 
				
			||||||
	certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
 | 
						certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
 | 
				
			||||||
	corev1 "k8s.io/api/core/v1"
 | 
						corev1 "k8s.io/api/core/v1"
 | 
				
			||||||
@@ -80,6 +81,7 @@ func AddToScheme(scheme *runtime.Scheme) {
 | 
				
			|||||||
	autoscalingv1.AddToScheme(scheme)
 | 
						autoscalingv1.AddToScheme(scheme)
 | 
				
			||||||
	autoscalingv2alpha1.AddToScheme(scheme)
 | 
						autoscalingv2alpha1.AddToScheme(scheme)
 | 
				
			||||||
	batchv1.AddToScheme(scheme)
 | 
						batchv1.AddToScheme(scheme)
 | 
				
			||||||
 | 
						batchv1beta1.AddToScheme(scheme)
 | 
				
			||||||
	batchv2alpha1.AddToScheme(scheme)
 | 
						batchv2alpha1.AddToScheme(scheme)
 | 
				
			||||||
	certificatesv1beta1.AddToScheme(scheme)
 | 
						certificatesv1beta1.AddToScheme(scheme)
 | 
				
			||||||
	corev1.AddToScheme(scheme)
 | 
						corev1.AddToScheme(scheme)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,44 @@
 | 
				
			|||||||
 | 
					package(default_visibility = ["//visibility:public"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					licenses(["notice"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					load(
 | 
				
			||||||
 | 
					    "@io_bazel_rules_go//go:def.bzl",
 | 
				
			||||||
 | 
					    "go_library",
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					go_library(
 | 
				
			||||||
 | 
					    name = "go_default_library",
 | 
				
			||||||
 | 
					    srcs = [
 | 
				
			||||||
 | 
					        "batch_client.go",
 | 
				
			||||||
 | 
					        "cronjob.go",
 | 
				
			||||||
 | 
					        "doc.go",
 | 
				
			||||||
 | 
					        "generated_expansion.go",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    deps = [
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/rest:go_default_library",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "package-srcs",
 | 
				
			||||||
 | 
					    srcs = glob(["**"]),
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    visibility = ["//visibility:private"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "all-srcs",
 | 
				
			||||||
 | 
					    srcs = [
 | 
				
			||||||
 | 
					        ":package-srcs",
 | 
				
			||||||
 | 
					        "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake:all-srcs",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
@@ -0,0 +1,88 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						v1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
 | 
						serializer "k8s.io/apimachinery/pkg/runtime/serializer"
 | 
				
			||||||
 | 
						"k8s.io/client-go/kubernetes/scheme"
 | 
				
			||||||
 | 
						rest "k8s.io/client-go/rest"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type BatchV1beta1Interface interface {
 | 
				
			||||||
 | 
						RESTClient() rest.Interface
 | 
				
			||||||
 | 
						CronJobsGetter
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// BatchV1beta1Client is used to interact with features provided by the batch group.
 | 
				
			||||||
 | 
					type BatchV1beta1Client struct {
 | 
				
			||||||
 | 
						restClient rest.Interface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *BatchV1beta1Client) CronJobs(namespace string) CronJobInterface {
 | 
				
			||||||
 | 
						return newCronJobs(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewForConfig creates a new BatchV1beta1Client for the given config.
 | 
				
			||||||
 | 
					func NewForConfig(c *rest.Config) (*BatchV1beta1Client, error) {
 | 
				
			||||||
 | 
						config := *c
 | 
				
			||||||
 | 
						if err := setConfigDefaults(&config); err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						client, err := rest.RESTClientFor(&config)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return &BatchV1beta1Client{client}, nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewForConfigOrDie creates a new BatchV1beta1Client for the given config and
 | 
				
			||||||
 | 
					// panics if there is an error in the config.
 | 
				
			||||||
 | 
					func NewForConfigOrDie(c *rest.Config) *BatchV1beta1Client {
 | 
				
			||||||
 | 
						client, err := NewForConfig(c)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							panic(err)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return client
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// New creates a new BatchV1beta1Client for the given RESTClient.
 | 
				
			||||||
 | 
					func New(c rest.Interface) *BatchV1beta1Client {
 | 
				
			||||||
 | 
						return &BatchV1beta1Client{c}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func setConfigDefaults(config *rest.Config) error {
 | 
				
			||||||
 | 
						gv := v1beta1.SchemeGroupVersion
 | 
				
			||||||
 | 
						config.GroupVersion = &gv
 | 
				
			||||||
 | 
						config.APIPath = "/apis"
 | 
				
			||||||
 | 
						config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if config.UserAgent == "" {
 | 
				
			||||||
 | 
							config.UserAgent = rest.DefaultKubernetesUserAgent()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// RESTClient returns a RESTClient that is used to communicate
 | 
				
			||||||
 | 
					// with API server by this client implementation.
 | 
				
			||||||
 | 
					func (c *BatchV1beta1Client) RESTClient() rest.Interface {
 | 
				
			||||||
 | 
						if c == nil {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return c.restClient
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,172 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						v1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
 | 
						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"
 | 
				
			||||||
 | 
						rest "k8s.io/client-go/rest"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobsGetter has a method to return a CronJobInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type CronJobsGetter interface {
 | 
				
			||||||
 | 
						CronJobs(namespace string) CronJobInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobInterface has methods to work with CronJob resources.
 | 
				
			||||||
 | 
					type CronJobInterface interface {
 | 
				
			||||||
 | 
						Create(*v1beta1.CronJob) (*v1beta1.CronJob, error)
 | 
				
			||||||
 | 
						Update(*v1beta1.CronJob) (*v1beta1.CronJob, error)
 | 
				
			||||||
 | 
						UpdateStatus(*v1beta1.CronJob) (*v1beta1.CronJob, error)
 | 
				
			||||||
 | 
						Delete(name string, options *v1.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string, options v1.GetOptions) (*v1beta1.CronJob, error)
 | 
				
			||||||
 | 
						List(opts v1.ListOptions) (*v1beta1.CronJobList, error)
 | 
				
			||||||
 | 
						Watch(opts v1.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error)
 | 
				
			||||||
 | 
						CronJobExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// cronJobs implements CronJobInterface
 | 
				
			||||||
 | 
					type cronJobs struct {
 | 
				
			||||||
 | 
						client rest.Interface
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newCronJobs returns a CronJobs
 | 
				
			||||||
 | 
					func newCronJobs(c *BatchV1beta1Client, namespace string) *cronJobs {
 | 
				
			||||||
 | 
						return &cronJobs{
 | 
				
			||||||
 | 
							client: c.RESTClient(),
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) {
 | 
				
			||||||
 | 
						result = &v1beta1.CronJob{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("cronjobs").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							VersionedParams(&options, scheme.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
 | 
				
			||||||
 | 
					func (c *cronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, err error) {
 | 
				
			||||||
 | 
						result = &v1beta1.CronJobList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("cronjobs").
 | 
				
			||||||
 | 
							VersionedParams(&opts, scheme.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested cronJobs.
 | 
				
			||||||
 | 
					func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						opts.Watch = true
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("cronjobs").
 | 
				
			||||||
 | 
							VersionedParams(&opts, scheme.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a cronJob and creates it.  Returns the server's representation of the cronJob, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *cronJobs) Create(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
 | 
				
			||||||
 | 
						result = &v1beta1.CronJob{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("cronjobs").
 | 
				
			||||||
 | 
							Body(cronJob).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *cronJobs) Update(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
 | 
				
			||||||
 | 
						result = &v1beta1.CronJob{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("cronjobs").
 | 
				
			||||||
 | 
							Name(cronJob.Name).
 | 
				
			||||||
 | 
							Body(cronJob).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// UpdateStatus was generated because the type contains a Status member.
 | 
				
			||||||
 | 
					// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *cronJobs) UpdateStatus(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
 | 
				
			||||||
 | 
						result = &v1beta1.CronJob{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("cronjobs").
 | 
				
			||||||
 | 
							Name(cronJob.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(cronJob).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *cronJobs) Delete(name string, options *v1.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("cronjobs").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("cronjobs").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, scheme.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Patch applies the patch and returns the patched cronJob.
 | 
				
			||||||
 | 
					func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) {
 | 
				
			||||||
 | 
						result = &v1beta1.CronJob{}
 | 
				
			||||||
 | 
						err = c.client.Patch(pt).
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("cronjobs").
 | 
				
			||||||
 | 
							SubResource(subresources...).
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(data).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This package is generated by client-gen with custom arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This package has the automatically generated typed clients.
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
@@ -0,0 +1,42 @@
 | 
				
			|||||||
 | 
					package(default_visibility = ["//visibility:public"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					licenses(["notice"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					load(
 | 
				
			||||||
 | 
					    "@io_bazel_rules_go//go:def.bzl",
 | 
				
			||||||
 | 
					    "go_library",
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					go_library(
 | 
				
			||||||
 | 
					    name = "go_default_library",
 | 
				
			||||||
 | 
					    srcs = [
 | 
				
			||||||
 | 
					        "doc.go",
 | 
				
			||||||
 | 
					        "fake_batch_client.go",
 | 
				
			||||||
 | 
					        "fake_cronjob.go",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    deps = [
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/rest:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/testing:go_default_library",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "package-srcs",
 | 
				
			||||||
 | 
					    srcs = glob(["**"]),
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    visibility = ["//visibility:private"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "all-srcs",
 | 
				
			||||||
 | 
					    srcs = [":package-srcs"],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This package is generated by client-gen with custom arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Package fake has the automatically generated clients.
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
@@ -0,0 +1,38 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						v1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
 | 
				
			||||||
 | 
						rest "k8s.io/client-go/rest"
 | 
				
			||||||
 | 
						testing "k8s.io/client-go/testing"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type FakeBatchV1beta1 struct {
 | 
				
			||||||
 | 
						*testing.Fake
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeBatchV1beta1) CronJobs(namespace string) v1beta1.CronJobInterface {
 | 
				
			||||||
 | 
						return &FakeCronJobs{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// RESTClient returns a RESTClient that is used to communicate
 | 
				
			||||||
 | 
					// with API server by this client implementation.
 | 
				
			||||||
 | 
					func (c *FakeBatchV1beta1) RESTClient() rest.Interface {
 | 
				
			||||||
 | 
						var ret *rest.RESTClient
 | 
				
			||||||
 | 
						return ret
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,138 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						v1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
 | 
						v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 | 
				
			||||||
 | 
						labels "k8s.io/apimachinery/pkg/labels"
 | 
				
			||||||
 | 
						schema "k8s.io/apimachinery/pkg/runtime/schema"
 | 
				
			||||||
 | 
						types "k8s.io/apimachinery/pkg/types"
 | 
				
			||||||
 | 
						watch "k8s.io/apimachinery/pkg/watch"
 | 
				
			||||||
 | 
						testing "k8s.io/client-go/testing"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeCronJobs implements CronJobInterface
 | 
				
			||||||
 | 
					type FakeCronJobs struct {
 | 
				
			||||||
 | 
						Fake *FakeBatchV1beta1
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var cronjobsResource = schema.GroupVersionResource{Group: "batch", Version: "v1beta1", Resource: "cronjobs"}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var cronjobsKind = schema.GroupVersionKind{Group: "batch", Version: "v1beta1", Kind: "CronJob"}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *v1beta1.CronJob, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), &v1beta1.CronJob{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*v1beta1.CronJob), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
 | 
				
			||||||
 | 
					func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(testing.NewListAction(cronjobsResource, cronjobsKind, c.ns, opts), &v1beta1.CronJobList{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label, _, _ := testing.ExtractFromListOptions(opts)
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &v1beta1.CronJobList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*v1beta1.CronJobList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested cronJobs.
 | 
				
			||||||
 | 
					func (c *FakeCronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.Fake.
 | 
				
			||||||
 | 
							InvokesWatch(testing.NewWatchAction(cronjobsResource, c.ns, opts))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a cronJob and creates it.  Returns the server's representation of the cronJob, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *FakeCronJobs) Create(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), &v1beta1.CronJob{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*v1beta1.CronJob), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *FakeCronJobs) Update(cronJob *v1beta1.CronJob) (result *v1beta1.CronJob, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), &v1beta1.CronJob{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*v1beta1.CronJob), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// UpdateStatus was generated because the type contains a Status member.
 | 
				
			||||||
 | 
					// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
 | 
				
			||||||
 | 
					func (c *FakeCronJobs) UpdateStatus(cronJob *v1beta1.CronJob) (*v1beta1.CronJob, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &v1beta1.CronJob{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*v1beta1.CronJob), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *FakeCronJobs) Delete(name string, options *v1.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(testing.NewDeleteAction(cronjobsResource, c.ns, name), &v1beta1.CronJob{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
 | 
				
			||||||
 | 
						action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOptions)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &v1beta1.CronJobList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Patch applies the patch and returns the patched cronJob.
 | 
				
			||||||
 | 
					func (c *FakeCronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CronJob, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, data, subresources...), &v1beta1.CronJob{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*v1beta1.CronJob), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,19 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type CronJobExpansion interface{}
 | 
				
			||||||
							
								
								
									
										36
									
								
								staging/src/k8s.io/client-go/listers/batch/v1beta1/BUILD
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								staging/src/k8s.io/client-go/listers/batch/v1beta1/BUILD
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
				
			|||||||
 | 
					package(default_visibility = ["//visibility:public"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					licenses(["notice"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					load(
 | 
				
			||||||
 | 
					    "@io_bazel_rules_go//go:def.bzl",
 | 
				
			||||||
 | 
					    "go_library",
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					go_library(
 | 
				
			||||||
 | 
					    name = "go_default_library",
 | 
				
			||||||
 | 
					    srcs = [
 | 
				
			||||||
 | 
					        "cronjob.go",
 | 
				
			||||||
 | 
					        "expansion_generated.go",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    deps = [
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/api/batch/v1beta1:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "package-srcs",
 | 
				
			||||||
 | 
					    srcs = glob(["**"]),
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    visibility = ["//visibility:private"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "all-srcs",
 | 
				
			||||||
 | 
					    srcs = [":package-srcs"],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
@@ -0,0 +1,94 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file was automatically generated by lister-gen
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						v1beta1 "k8s.io/api/batch/v1beta1"
 | 
				
			||||||
 | 
						"k8s.io/apimachinery/pkg/api/errors"
 | 
				
			||||||
 | 
						"k8s.io/apimachinery/pkg/labels"
 | 
				
			||||||
 | 
						"k8s.io/client-go/tools/cache"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobLister helps list CronJobs.
 | 
				
			||||||
 | 
					type CronJobLister interface {
 | 
				
			||||||
 | 
						// List lists all CronJobs in the indexer.
 | 
				
			||||||
 | 
						List(selector labels.Selector) (ret []*v1beta1.CronJob, err error)
 | 
				
			||||||
 | 
						// CronJobs returns an object that can list and get CronJobs.
 | 
				
			||||||
 | 
						CronJobs(namespace string) CronJobNamespaceLister
 | 
				
			||||||
 | 
						CronJobListerExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// cronJobLister implements the CronJobLister interface.
 | 
				
			||||||
 | 
					type cronJobLister struct {
 | 
				
			||||||
 | 
						indexer cache.Indexer
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewCronJobLister returns a new CronJobLister.
 | 
				
			||||||
 | 
					func NewCronJobLister(indexer cache.Indexer) CronJobLister {
 | 
				
			||||||
 | 
						return &cronJobLister{indexer: indexer}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List lists all CronJobs in the indexer.
 | 
				
			||||||
 | 
					func (s *cronJobLister) List(selector labels.Selector) (ret []*v1beta1.CronJob, err error) {
 | 
				
			||||||
 | 
						err = cache.ListAll(s.indexer, selector, func(m interface{}) {
 | 
				
			||||||
 | 
							ret = append(ret, m.(*v1beta1.CronJob))
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
						return ret, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobs returns an object that can list and get CronJobs.
 | 
				
			||||||
 | 
					func (s *cronJobLister) CronJobs(namespace string) CronJobNamespaceLister {
 | 
				
			||||||
 | 
						return cronJobNamespaceLister{indexer: s.indexer, namespace: namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobNamespaceLister helps list and get CronJobs.
 | 
				
			||||||
 | 
					type CronJobNamespaceLister interface {
 | 
				
			||||||
 | 
						// List lists all CronJobs in the indexer for a given namespace.
 | 
				
			||||||
 | 
						List(selector labels.Selector) (ret []*v1beta1.CronJob, err error)
 | 
				
			||||||
 | 
						// Get retrieves the CronJob from the indexer for a given namespace and name.
 | 
				
			||||||
 | 
						Get(name string) (*v1beta1.CronJob, error)
 | 
				
			||||||
 | 
						CronJobNamespaceListerExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// cronJobNamespaceLister implements the CronJobNamespaceLister
 | 
				
			||||||
 | 
					// interface.
 | 
				
			||||||
 | 
					type cronJobNamespaceLister struct {
 | 
				
			||||||
 | 
						indexer   cache.Indexer
 | 
				
			||||||
 | 
						namespace string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List lists all CronJobs in the indexer for a given namespace.
 | 
				
			||||||
 | 
					func (s cronJobNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.CronJob, err error) {
 | 
				
			||||||
 | 
						err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
 | 
				
			||||||
 | 
							ret = append(ret, m.(*v1beta1.CronJob))
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
						return ret, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get retrieves the CronJob from the indexer for a given namespace and name.
 | 
				
			||||||
 | 
					func (s cronJobNamespaceLister) Get(name string) (*v1beta1.CronJob, error) {
 | 
				
			||||||
 | 
						obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if !exists {
 | 
				
			||||||
 | 
							return nil, errors.NewNotFound(v1beta1.Resource("cronjob"), name)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*v1beta1.CronJob), nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2017 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.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file was automatically generated by lister-gen
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1beta1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobListerExpansion allows custom methods to be added to
 | 
				
			||||||
 | 
					// CronJobLister.
 | 
				
			||||||
 | 
					type CronJobListerExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CronJobNamespaceListerExpansion allows custom methods to be added to
 | 
				
			||||||
 | 
					// CronJobNamespaceLister.
 | 
				
			||||||
 | 
					type CronJobNamespaceListerExpansion interface{}
 | 
				
			||||||
@@ -79,6 +79,7 @@ func New() *Generator {
 | 
				
			|||||||
			`k8s.io/api/autoscaling/v2alpha1`,
 | 
								`k8s.io/api/autoscaling/v2alpha1`,
 | 
				
			||||||
			`k8s.io/api/authorization/v1beta1`,
 | 
								`k8s.io/api/authorization/v1beta1`,
 | 
				
			||||||
			`k8s.io/api/batch/v1`,
 | 
								`k8s.io/api/batch/v1`,
 | 
				
			||||||
 | 
								`k8s.io/api/batch/v1beta1`,
 | 
				
			||||||
			`k8s.io/api/batch/v2alpha1`,
 | 
								`k8s.io/api/batch/v2alpha1`,
 | 
				
			||||||
			`k8s.io/api/apps/v1beta1`,
 | 
								`k8s.io/api/apps/v1beta1`,
 | 
				
			||||||
			`k8s.io/api/apps/v1beta2`,
 | 
								`k8s.io/api/apps/v1beta2`,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -192,10 +192,19 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
 | 
				
			|||||||
	},
 | 
						},
 | 
				
			||||||
	// --
 | 
						// --
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// k8s.io/kubernetes/pkg/apis/batch/v1beta1
 | 
				
			||||||
 | 
						gvr("batch", "v1beta1", "cronjobs"): {
 | 
				
			||||||
 | 
							stub:             `{"metadata": {"name": "cjv1beta1"}, "spec": {"jobTemplate": {"spec": {"template": {"metadata": {"labels": {"controller-uid": "uid0"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container0"}], "dnsPolicy": "ClusterFirst", "restartPolicy": "Never"}}}}, "schedule": "* * * * *"}}`,
 | 
				
			||||||
 | 
							expectedEtcdPath: "/registry/cronjobs/etcdstoragepathtestnamespace/cjv1beta1",
 | 
				
			||||||
 | 
							// TODO this needs to be updated to batch/v1beta1 when it's enabed by default
 | 
				
			||||||
 | 
							expectedGVK: gvkP("batch", "v2alpha1", "CronJob"),
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						// --
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// k8s.io/kubernetes/pkg/apis/batch/v2alpha1
 | 
						// k8s.io/kubernetes/pkg/apis/batch/v2alpha1
 | 
				
			||||||
	gvr("batch", "v2alpha1", "cronjobs"): {
 | 
						gvr("batch", "v2alpha1", "cronjobs"): {
 | 
				
			||||||
		stub:             `{"metadata": {"name": "cj1"}, "spec": {"jobTemplate": {"spec": {"template": {"metadata": {"labels": {"controller-uid": "uid0"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container0"}], "dnsPolicy": "ClusterFirst", "restartPolicy": "Never"}}}}, "schedule": "* * * * *"}}`,
 | 
							stub:             `{"metadata": {"name": "cjv2alpha1"}, "spec": {"jobTemplate": {"spec": {"template": {"metadata": {"labels": {"controller-uid": "uid0"}}, "spec": {"containers": [{"image": "fedora:latest", "name": "container0"}], "dnsPolicy": "ClusterFirst", "restartPolicy": "Never"}}}}, "schedule": "* * * * *"}}`,
 | 
				
			||||||
		expectedEtcdPath: "/registry/cronjobs/etcdstoragepathtestnamespace/cj1",
 | 
							expectedEtcdPath: "/registry/cronjobs/etcdstoragepathtestnamespace/cjv2alpha1",
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	// --
 | 
						// --
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -407,6 +416,10 @@ var ephemeralWhiteList = createEphemeralWhiteList(
 | 
				
			|||||||
	gvr("apps", "v1beta2", "scales"), // not stored in etcd, part of kapiv1.ReplicationController
 | 
						gvr("apps", "v1beta2", "scales"), // not stored in etcd, part of kapiv1.ReplicationController
 | 
				
			||||||
	// --
 | 
						// --
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// k8s.io/kubernetes/pkg/apis/batch/v1beta1
 | 
				
			||||||
 | 
						gvr("batch", "v1beta1", "jobtemplates"), // not stored in etcd
 | 
				
			||||||
 | 
						// --
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// k8s.io/kubernetes/pkg/apis/batch/v2alpha1
 | 
						// k8s.io/kubernetes/pkg/apis/batch/v2alpha1
 | 
				
			||||||
	gvr("batch", "v2alpha1", "jobtemplates"), // not stored in etcd
 | 
						gvr("batch", "v2alpha1", "jobtemplates"), // not stored in etcd
 | 
				
			||||||
	// --
 | 
						// --
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user