Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

Commit

Permalink
Use v1beta1 as default apiVersion for CronJob
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanKanojia committed Aug 9, 2018
1 parent 8c739e7 commit 029efe6
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 142 deletions.
8 changes: 4 additions & 4 deletions cmd/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
k8sauthapi "k8s.io/api/authorization/v1"
autoscalingapi "k8s.io/api/autoscaling/v1"
batchapiv1 "k8s.io/api/batch/v1"
batchapiv2alpha1 "k8s.io/api/batch/v2alpha1"
batchapiv1beta1 "k8s.io/api/batch/v1beta1"
kapi "k8s.io/api/core/v1"
extensions "k8s.io/api/extensions/v1beta1"
networking "k8s.io/api/networking/v1"
Expand Down Expand Up @@ -156,8 +156,8 @@ type Schema struct {
ListMeta rapi.ListMeta
Job batchapiv1.Job
JobList batchapiv1.JobList
CronJob batchapiv2alpha1.CronJob
CronJobList batchapiv2alpha1.CronJobList
CronJob batchapiv1beta1.CronJob
CronJobList batchapiv1beta1.CronJobList
Scale extensions.Scale
HorizontalPodAutoscaler autoscalingapi.HorizontalPodAutoscaler
HorizontalPodAutoscalerList autoscalingapi.HorizontalPodAutoscalerList
Expand Down Expand Up @@ -233,7 +233,7 @@ func main() {
{"k8s.io/api/authentication/v1", "authentication.k8s.io", "io.fabric8.kubernetes.api.model.authentication", "kubernetes_authentication_"},
{"k8s.io/api/authorization/v1", "authorization.k8s.io", "io.fabric8.kubernetes.api.model.authorization", "kubernetes_authorization_"},
{"k8s.io/api/apps/v1", "", "io.fabric8.kubernetes.api.model.apps", "kubernetes_apps_"},
{"k8s.io/api/batch/v2alpha1", "", "io.fabric8.kubernetes.api.model.batch", "kubernetes_batch_"},
{"k8s.io/api/batch/v1beta1", "", "io.fabric8.kubernetes.api.model.batch", "kubernetes_batch_"},
{"k8s.io/api/batch/v1", "", "io.fabric8.kubernetes.api.model.batch", "kubernetes_batch_"},
{"k8s.io/api/autoscaling/v1", "", "io.fabric8.kubernetes.api.model", "kubernetes_autoscaling_"},
{"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1", "", "io.fabric8.kubernetes.api.model.apiextensions", "kubernetes_apiextensions_"},
Expand Down
4 changes: 2 additions & 2 deletions kubernetes-model/src/main/resources/schema/kube-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2508,7 +2508,7 @@
"apiVersion": {
"type": "string",
"description": "",
"default": "batch/v2alpha1",
"default": "batch/v1beta1",
"required": true
},
"kind": {
Expand Down Expand Up @@ -2543,7 +2543,7 @@
"apiVersion": {
"type": "string",
"description": "",
"default": "batch/v2alpha1",
"default": "batch/v1beta1",
"required": true
},
"items": {
Expand Down
198 changes: 62 additions & 136 deletions kubernetes-model/src/main/resources/schema/validation-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2508,7 +2508,7 @@
"apiVersion": {
"type": "string",
"description": "",
"default": "batch/v2alpha1",
"default": "batch/v1beta1",
"required": true
},
"kind": {
Expand Down Expand Up @@ -2543,7 +2543,7 @@
"apiVersion": {
"type": "string",
"description": "",
"default": "batch/v2alpha1",
"default": "batch/v1beta1",
"required": true
},
"items": {
Expand Down Expand Up @@ -17935,9 +17935,17 @@
"apiVersion": {
"type": "string",
"description": "",
"default": "rbac.authorization.k8s.io/v1",
"default": "authorization.openshift.io/v1",
"required": true
},
"groupNames": {
"type": "array",
"description": "",
"items": {
"type": "string",
"description": ""
}
},
"kind": {
"type": "string",
"description": "",
Expand All @@ -17949,15 +17957,23 @@
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"roleRef": {
"$ref": "#/definitions/kubernetes_rbac_RoleRef",
"javaType": "io.fabric8.kubernetes.api.model.rbac.KubernetesRoleRef"
"$ref": "#/definitions/kubernetes_core_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
},
"subjects": {
"type": "array",
"description": "",
"items": {
"$ref": "#/definitions/kubernetes_rbac_Subject",
"javaType": "io.fabric8.kubernetes.api.model.rbac.KubernetesSubject"
"$ref": "#/definitions/kubernetes_core_ObjectReference",
"javaType": "io.fabric8.kubernetes.api.model.ObjectReference"
}
},
"userNames": {
"type": "array",
"description": "",
"items": {
"type": "string",
"description": ""
}
}
},
Expand Down Expand Up @@ -18690,7 +18706,7 @@
"apiVersion": {
"type": "string",
"description": "",
"default": "batch/v2alpha1",
"default": "batch/v1beta1",
"required": true
},
"kind": {
Expand Down Expand Up @@ -18719,7 +18735,7 @@
"apiVersion": {
"type": "string",
"description": "",
"default": "batch/v2alpha1",
"default": "batch/v1beta1",
"required": true
},
"items": {
Expand Down Expand Up @@ -20361,11 +20377,11 @@
"description": "",
"javaOmitEmpty": true,
"items": {
"$ref": "#/definitions/os_security_IDRange",
"javaType": "io.fabric8.openshift.api.model.IDRange"
"$ref": "#/definitions/kubernetes_extensions_IDRange",
"javaType": "io.fabric8.kubernetes.api.model.extensions.IDRange"
}
},
"type": {
"rule": {
"type": "string",
"description": ""
}
Expand Down Expand Up @@ -22529,6 +22545,10 @@
},
"listmeta": {
"properties": {
"continue": {
"type": "string",
"description": ""
},
"resourceVersion": {
"type": "string",
"description": ""
Expand Down Expand Up @@ -22581,70 +22601,26 @@
"apiVersion": {
"type": "string",
"description": "",
"default": "authorization.openshift.io/v1",
"default": "authorization.k8s.io/v1",
"required": true
},
"content": {
"$ref": "#/definitions/kubernetes_apimachinery_pkg_runtime_RawExtension",
"javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
},
"groups": {
"type": "array",
"description": "",
"items": {
"type": "string",
"description": ""
}
},
"isNonResourceURL": {
"type": "boolean",
"description": ""
},
"kind": {
"type": "string",
"description": "",
"default": "LocalSubjectAccessReview",
"required": true
},
"namespace": {
"type": "string",
"description": ""
},
"path": {
"type": "string",
"description": ""
},
"resource": {
"type": "string",
"description": ""
},
"resourceAPIGroup": {
"type": "string",
"description": ""
},
"resourceAPIVersion": {
"type": "string",
"description": ""
},
"resourceName": {
"type": "string",
"description": ""
},
"scopes": {
"type": "array",
"description": "",
"items": {
"type": "string",
"description": ""
}
"metadata": {
"$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"user": {
"type": "string",
"description": ""
"spec": {
"$ref": "#/definitions/kubernetes_authorization_SubjectAccessReviewSpec",
"javaType": "io.fabric8.kubernetes.api.model.authorization.SubjectAccessReviewSpec"
},
"verb": {
"type": "string",
"description": ""
"status": {
"$ref": "#/definitions/kubernetes_authorization_SubjectAccessReviewStatus",
"javaType": "io.fabric8.kubernetes.api.model.authorization.SubjectAccessReviewStatus"
}
},
"additionalProperties": true
Expand Down Expand Up @@ -26853,24 +26829,18 @@
},
"runasuserstrategyoptions": {
"properties": {
"type": {
"type": "string",
"description": ""
},
"uid": {
"type": "integer",
"description": "",
"javaType": "Long"
},
"uidRangeMax": {
"type": "integer",
"ranges": {
"type": "array",
"description": "",
"javaType": "Long"
"javaOmitEmpty": true,
"items": {
"$ref": "#/definitions/kubernetes_extensions_IDRange",
"javaType": "io.fabric8.kubernetes.api.model.extensions.IDRange"
}
},
"uidRangeMin": {
"type": "integer",
"description": "",
"javaType": "Long"
"rule": {
"type": "string",
"description": ""
}
},
"additionalProperties": true
Expand Down Expand Up @@ -28394,70 +28364,26 @@
"apiVersion": {
"type": "string",
"description": "",
"default": "authorization.openshift.io/v1",
"default": "authorization.k8s.io/v1",
"required": true
},
"content": {
"$ref": "#/definitions/kubernetes_apimachinery_pkg_runtime_RawExtension",
"javaType": "io.fabric8.kubernetes.api.model.HasMetadata"
},
"groups": {
"type": "array",
"description": "",
"items": {
"type": "string",
"description": ""
}
},
"isNonResourceURL": {
"type": "boolean",
"description": ""
},
"kind": {
"type": "string",
"description": "",
"default": "SubjectAccessReview",
"required": true
},
"namespace": {
"type": "string",
"description": ""
},
"path": {
"type": "string",
"description": ""
},
"resource": {
"type": "string",
"description": ""
},
"resourceAPIGroup": {
"type": "string",
"description": ""
},
"resourceAPIVersion": {
"type": "string",
"description": ""
},
"resourceName": {
"type": "string",
"description": ""
},
"scopes": {
"type": "array",
"description": "",
"items": {
"type": "string",
"description": ""
}
"metadata": {
"$ref": "#/definitions/kubernetes_apimachinery_ObjectMeta",
"javaType": "io.fabric8.kubernetes.api.model.ObjectMeta"
},
"user": {
"type": "string",
"description": ""
"spec": {
"$ref": "#/definitions/kubernetes_authorization_SubjectAccessReviewSpec",
"javaType": "io.fabric8.kubernetes.api.model.authorization.SubjectAccessReviewSpec"
},
"verb": {
"type": "string",
"description": ""
"status": {
"$ref": "#/definitions/kubernetes_authorization_SubjectAccessReviewStatus",
"javaType": "io.fabric8.kubernetes.api.model.authorization.SubjectAccessReviewStatus"
}
},
"additionalProperties": true
Expand Down

0 comments on commit 029efe6

Please sign in to comment.