diff --git a/hack/generate-yaml.sh b/hack/generate-yaml.sh index e978c4f7ac..a3bea2918c 100755 --- a/hack/generate-yaml.sh +++ b/hack/generate-yaml.sh @@ -72,8 +72,6 @@ ${HELM_BIN_DIR}/helm template ${VK_ROOT}/installer/helm/chart/volcano --namespac -x templates/bus_v1alpha1_command.yaml \ -x templates/controllers.yaml \ -x templates/scheduler.yaml \ - -x templates/scheduling_v1alpha1_podgroup.yaml \ - -x templates/scheduling_v1alpha1_queue.yaml \ - -x templates/scheduling_v1alpha2_podgroup.yaml \ - -x templates/scheduling_v1alpha2_queue.yaml \ + -x templates/scheduling_v1beta1_podgroup.yaml \ + -x templates/scheduling_v1beta1_queue.yaml \ --notes >> ${DEPLOYMENT_FILE} diff --git a/installer/helm/chart/volcano/templates/admission.yaml b/installer/helm/chart/volcano/templates/admission.yaml index 8bc482174f..76f2dff35f 100644 --- a/installer/helm/chart/volcano/templates/admission.yaml +++ b/installer/helm/chart/volcano/templates/admission.yaml @@ -25,13 +25,13 @@ rules: - apiGroups: [""] resources: ["secrets"] verbs: ["create", "get", "patch"] - - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] resources: ["queues"] verbs: ["get", "list"] - apiGroups: [""] resources: ["services"] verbs: ["get"] - - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] resources: ["podgroups"] verbs: ["get", "list", "watch"] diff --git a/installer/helm/chart/volcano/templates/controllers.yaml b/installer/helm/chart/volcano/templates/controllers.yaml index ed343eacf9..b544884659 100644 --- a/installer/helm/chart/volcano/templates/controllers.yaml +++ b/installer/helm/chart/volcano/templates/controllers.yaml @@ -43,7 +43,7 @@ rules: - apiGroups: [""] resources: ["secrets"] verbs: ["get", "list", "watch", "create", "delete", "update"] - - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] resources: ["podgroups", "queues", "queues/status"] verbs: ["get", "list", "watch", "create", "delete", "update"] - apiGroups: ["scheduling.k8s.io"] diff --git a/installer/helm/chart/volcano/templates/scheduler.yaml b/installer/helm/chart/volcano/templates/scheduler.yaml index 94b181bcde..cd245437fc 100644 --- a/installer/helm/chart/volcano/templates/scheduler.yaml +++ b/installer/helm/chart/volcano/templates/scheduler.yaml @@ -59,10 +59,10 @@ rules: - apiGroups: ["scheduling.k8s.io"] resources: ["priorityclasses"] verbs: ["get", "list", "watch"] - - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] resources: ["queues"] verbs: ["get", "list", "watch", "create", "delete"] - - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] resources: ["podgroups"] verbs: ["list", "watch", "update"] diff --git a/installer/helm/chart/volcano/templates/scheduling_v1alpha1_podgroup.yaml b/installer/helm/chart/volcano/templates/scheduling_v1alpha1_podgroup.yaml deleted file mode 100644 index 244459a520..0000000000 --- a/installer/helm/chart/volcano/templates/scheduling_v1alpha1_podgroup.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: podgroups.scheduling.incubator.k8s.io -spec: - group: scheduling.incubator.k8s.io - names: - kind: PodGroup - plural: podgroups - scope: Namespaced - validation: - openAPIV3Schema: - type: object - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - minMember: - format: int32 - type: integer - type: object - status: - properties: - succeeded: - format: int32 - type: integer - failed: - format: int32 - type: integer - running: - format: int32 - type: integer - type: object - version: v1alpha1 diff --git a/installer/helm/chart/volcano/templates/scheduling_v1alpha1_queue.yaml b/installer/helm/chart/volcano/templates/scheduling_v1alpha1_queue.yaml deleted file mode 100644 index 1398b51b8e..0000000000 --- a/installer/helm/chart/volcano/templates/scheduling_v1alpha1_queue.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: queues.scheduling.incubator.k8s.io -spec: - group: scheduling.incubator.k8s.io - names: - kind: Queue - plural: queues - scope: Cluster - validation: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - weight: - format: int32 - type: integer - type: object - type: object - version: v1alpha1 - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/installer/helm/chart/volcano/templates/scheduling_v1alpha2_podgroup.yaml b/installer/helm/chart/volcano/templates/scheduling_v1beta1_podgroup.yaml similarity index 88% rename from installer/helm/chart/volcano/templates/scheduling_v1alpha2_podgroup.yaml rename to installer/helm/chart/volcano/templates/scheduling_v1beta1_podgroup.yaml index a5c8a7d08f..f63b04b2ad 100644 --- a/installer/helm/chart/volcano/templates/scheduling_v1alpha2_podgroup.yaml +++ b/installer/helm/chart/volcano/templates/scheduling_v1beta1_podgroup.yaml @@ -1,15 +1,15 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: podgroups.scheduling.sigs.dev + name: podgroups.scheduling.volcano.sh spec: - group: scheduling.sigs.dev + group: scheduling.volcano.sh names: kind: PodGroup plural: podgroups shortNames: - pg - - podgroup-v1alpha2 + - podgroup-v1beta1 scope: Namespaced validation: openAPIV3Schema: @@ -43,4 +43,4 @@ spec: type: integer type: object type: object - version: v1alpha2 + version: v1beta1 diff --git a/installer/helm/chart/volcano/templates/scheduling_v1alpha2_queue.yaml b/installer/helm/chart/volcano/templates/scheduling_v1beta1_queue.yaml similarity index 90% rename from installer/helm/chart/volcano/templates/scheduling_v1alpha2_queue.yaml rename to installer/helm/chart/volcano/templates/scheduling_v1beta1_queue.yaml index 195053253e..c11e2e89bf 100644 --- a/installer/helm/chart/volcano/templates/scheduling_v1alpha2_queue.yaml +++ b/installer/helm/chart/volcano/templates/scheduling_v1beta1_queue.yaml @@ -1,15 +1,15 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: queues.scheduling.sigs.dev + name: queues.scheduling.volcano.sh spec: - group: scheduling.sigs.dev + group: scheduling.volcano.sh names: kind: Queue plural: queues shortNames: - q - - queue-v1alpha2 + - queue-v1beta1 scope: Cluster validation: openAPIV3Schema: @@ -48,6 +48,6 @@ spec: type: integer type: object type: object - version: v1alpha2 + version: v1beta1 subresources: status: {} diff --git a/installer/volcano-development.yaml b/installer/volcano-development.yaml index bce0fb1f3a..521b4db370 100644 --- a/installer/volcano-development.yaml +++ b/installer/volcano-development.yaml @@ -78,10 +78,10 @@ rules: - apiGroups: ["scheduling.k8s.io"] resources: ["priorityclasses"] verbs: ["get", "list", "watch"] - - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] resources: ["queues"] verbs: ["get", "list", "watch", "create", "delete"] - - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] resources: ["podgroups"] verbs: ["list", "watch", "update"] @@ -165,13 +165,13 @@ rules: - apiGroups: [""] resources: ["secrets"] verbs: ["create", "get", "patch"] - - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] resources: ["queues"] verbs: ["get", "list"] - apiGroups: [""] resources: ["services"] verbs: ["get"] - - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] resources: ["podgroups"] verbs: ["get", "list", "watch"] @@ -318,7 +318,7 @@ rules: - apiGroups: [""] resources: ["secrets"] verbs: ["get", "list", "watch", "create", "delete", "update"] - - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] resources: ["podgroups", "queues", "queues/status"] verbs: ["get", "list", "watch", "create", "delete", "update"] - apiGroups: ["scheduling.k8s.io"] @@ -620,99 +620,19 @@ status: storedVersions: [] --- -# Source: volcano/templates/scheduling_v1alpha1_podgroup.yaml +# Source: volcano/templates/scheduling_v1beta1_podgroup.yaml apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: podgroups.scheduling.incubator.k8s.io + name: podgroups.scheduling.volcano.sh spec: - group: scheduling.incubator.k8s.io - names: - kind: PodGroup - plural: podgroups - scope: Namespaced - validation: - openAPIV3Schema: - type: object - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - minMember: - format: int32 - type: integer - type: object - status: - properties: - succeeded: - format: int32 - type: integer - failed: - format: int32 - type: integer - running: - format: int32 - type: integer - type: object - version: v1alpha1 - ---- -# Source: volcano/templates/scheduling_v1alpha1_queue.yaml -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: queues.scheduling.incubator.k8s.io -spec: - group: scheduling.incubator.k8s.io - names: - kind: Queue - plural: queues - scope: Cluster - validation: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - weight: - format: int32 - type: integer - type: object - type: object - version: v1alpha1 - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- -# Source: volcano/templates/scheduling_v1alpha2_podgroup.yaml -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: podgroups.scheduling.sigs.dev -spec: - group: scheduling.sigs.dev + group: scheduling.volcano.sh names: kind: PodGroup plural: podgroups shortNames: - pg - - podgroup-v1alpha2 + - podgroup-v1beta1 scope: Namespaced validation: openAPIV3Schema: @@ -746,22 +666,22 @@ spec: type: integer type: object type: object - version: v1alpha2 + version: v1beta1 --- -# Source: volcano/templates/scheduling_v1alpha2_queue.yaml +# Source: volcano/templates/scheduling_v1beta1_queue.yaml apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: queues.scheduling.sigs.dev + name: queues.scheduling.volcano.sh spec: - group: scheduling.sigs.dev + group: scheduling.volcano.sh names: kind: Queue plural: queues shortNames: - q - - queue-v1alpha2 + - queue-v1beta1 scope: Cluster validation: openAPIV3Schema: @@ -800,7 +720,7 @@ spec: type: integer type: object type: object - version: v1alpha2 + version: v1beta1 subresources: status: {} diff --git a/installer/volcano-latest.yaml b/installer/volcano-latest.yaml new file mode 100644 index 0000000000..d509388ac3 --- /dev/null +++ b/installer/volcano-latest.yaml @@ -0,0 +1,726 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: volcano-system +--- +# Source: volcano/templates/scheduler.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: volcano-scheduler-configmap + namespace: volcano-system +data: + volcano-scheduler.conf: | + actions: "enqueue, allocate, backfill" + tiers: + - plugins: + - name: priority + - name: gang + - name: conformance + - plugins: + - name: drf + - name: predicates + - name: proportion + - name: nodeorder + - name: binpack + +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: volcano-scheduler + namespace: volcano-system +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: volcano-scheduler +rules: + - apiGroups: ["apiextensions.k8s.io"] + resources: ["customresourcedefinitions"] + verbs: ["create", "get", "list", "watch", "delete"] + - apiGroups: ["batch.volcano.sh"] + resources: ["jobs"] + verbs: ["get", "list", "watch", "update", "delete"] + - apiGroups: ["batch.volcano.sh"] + resources: ["jobs/status"] + verbs: ["update", "patch"] + - apiGroups: [""] + resources: ["events"] + verbs: ["create", "list", "watch", "update", "patch"] + - apiGroups: [""] + resources: ["pods", "pods/status"] + verbs: ["create", "get", "list", "watch", "update", "bind", "updateStatus", "delete"] + - apiGroups: [""] + resources: ["pods/binding"] + verbs: ["create"] + - apiGroups: [""] + resources: ["persistentvolumeclaims"] + verbs: ["list", "watch"] + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: ["list", "watch"] + - apiGroups: [""] + resources: ["namespaces"] + verbs: ["list", "watch"] + - apiGroups: [""] + resources: ["resourcequotas"] + verbs: ["list", "watch"] + - apiGroups: ["storage.k8s.io"] + resources: ["storageclasses"] + verbs: ["list", "watch"] + - apiGroups: [""] + resources: ["nodes"] + verbs: ["list", "watch"] + - apiGroups: ["policy"] + resources: ["poddisruptionbudgets"] + verbs: ["list", "watch"] + - apiGroups: ["scheduling.k8s.io"] + resources: ["priorityclasses"] + verbs: ["get", "list", "watch"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] + resources: ["queues"] + verbs: ["get", "list", "watch", "create", "delete"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] + resources: ["podgroups"] + verbs: ["list", "watch", "update"] + +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: volcano-scheduler-role +subjects: + - kind: ServiceAccount + name: volcano-scheduler + namespace: volcano-system +roleRef: + kind: ClusterRole + name: volcano-scheduler + apiGroup: rbac.authorization.k8s.io + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: volcano-scheduler + namespace: volcano-system + labels: + app: volcano-scheduler +spec: + replicas: 1 + selector: + matchLabels: + app: volcano-scheduler + template: + metadata: + labels: + app: volcano-scheduler + spec: + serviceAccount: volcano-scheduler + + containers: + - name: volcano-scheduler + image: volcanosh/vc-scheduler:latest + args: + - --alsologtostderr + - --scheduler-conf=/volcano.scheduler/volcano-scheduler.conf + - -v=3 + - 2>&1 + imagePullPolicy: "IfNotPresent" + volumeMounts: + - name: scheduler-config + mountPath: /volcano.scheduler + volumes: + - name: scheduler-config + configMap: + name: volcano-scheduler-configmap + +--- +# Source: volcano/templates/admission.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: volcano-admission + namespace: volcano-system +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: volcano-admission +rules: + - apiGroups: [""] + resources: ["configmaps"] + verbs: ["get", "list", "watch"] + - apiGroups: ["admissionregistration.k8s.io"] + resources: ["mutatingwebhookconfigurations", "validatingwebhookconfigurations"] + verbs: ["get", "list", "watch", "create", "update"] + # Rules below is used generate admission service secret + - apiGroups: ["certificates.k8s.io"] + resources: ["certificatesigningrequests"] + verbs: ["get", "list", "create", "delete"] + - apiGroups: ["certificates.k8s.io"] + resources: ["certificatesigningrequests/approval"] + verbs: ["create", "update"] + - apiGroups: [""] + resources: ["secrets"] + verbs: ["create", "get", "patch"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] + resources: ["queues"] + verbs: ["get", "list"] + - apiGroups: [""] + resources: ["services"] + verbs: ["get"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] + resources: ["podgroups"] + verbs: ["get", "list", "watch"] + +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: volcano-admission-role +subjects: + - kind: ServiceAccount + name: volcano-admission + namespace: volcano-system +roleRef: + kind: ClusterRole + name: volcano-admission + apiGroup: rbac.authorization.k8s.io + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: volcano-admission + name: volcano-admission + namespace: volcano-system +spec: + replicas: 1 + selector: + matchLabels: + app: volcano-admission + template: + metadata: + labels: + app: volcano-admission + spec: + serviceAccount: volcano-admission + + containers: + - args: + - --tls-cert-file=/admission.local.config/certificates/tls.crt + - --tls-private-key-file=/admission.local.config/certificates/tls.key + - --ca-cert-file=/admission.local.config/certificates/ca.crt + - --webhook-namespace=volcano-system + - --webhook-service-name=volcano-admission-service + - --alsologtostderr + - --port=443 + - -v=4 + - 2>&1 + image: volcanosh/vc-webhook-manager:latest + imagePullPolicy: IfNotPresent + name: admission + volumeMounts: + - mountPath: /admission.local.config/certificates + name: admission-certs + readOnly: true + volumes: + - name: admission-certs + secret: + defaultMode: 420 + secretName: volcano-admission-secret + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: volcano-admission + name: volcano-admission-service + namespace: volcano-system +spec: + ports: + - port: 443 + protocol: TCP + targetPort: 443 + selector: + app: volcano-admission + sessionAffinity: None + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: volcano-admission-init + namespace: volcano-system + labels: + app: volcano-admission-init +spec: + backoffLimit: 3 + template: + spec: + serviceAccountName: volcano-admission + restartPolicy: Never + containers: + - name: main + image: volcanosh/vc-webhook-manager:latest + imagePullPolicy: IfNotPresent + command: ["./gen-admission-secret.sh", "--service", "volcano-admission-service", "--namespace", + "volcano-system", "--secret", "volcano-admission-secret"] + +--- +# Source: volcano/templates/controllers.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: volcano-controllers + namespace: volcano-system + +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: volcano-controllers +rules: + - apiGroups: ["apiextensions.k8s.io"] + resources: ["customresourcedefinitions"] + verbs: ["create", "get", "list", "watch", "delete"] + - apiGroups: ["batch"] + resources: ["jobs"] + verbs: ["create", "get", "list", "watch", "delete", "update"] + - apiGroups: ["batch.volcano.sh"] + resources: ["jobs"] + verbs: ["get", "list", "watch", "update", "delete"] + - apiGroups: ["batch.volcano.sh"] + resources: ["jobs/status"] + verbs: ["update", "patch"] + - apiGroups: ["bus.volcano.sh"] + resources: ["commands"] + verbs: ["get", "list", "watch", "delete"] + - apiGroups: [""] + resources: ["events"] + verbs: ["create", "list", "watch", "update", "patch"] + - apiGroups: [""] + resources: ["pods"] + verbs: ["create", "get", "list", "watch", "update", "bind", "delete"] + - apiGroups: [""] + resources: ["persistentvolumeclaims"] + verbs: ["get", "list", "watch", "create"] + - apiGroups: [""] + resources: ["services"] + verbs: ["get", "list", "watch", "create", "delete"] + - apiGroups: [""] + resources: ["configmaps"] + verbs: ["get", "list", "watch", "create", "delete", "update"] + - apiGroups: [""] + resources: ["secrets"] + verbs: ["get", "list", "watch", "create", "delete", "update"] + - apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] + resources: ["podgroups", "queues", "queues/status"] + verbs: ["get", "list", "watch", "create", "delete", "update"] + - apiGroups: ["scheduling.k8s.io"] + resources: ["priorityclasses"] + verbs: ["get", "list", "watch", "create", "delete"] + - apiGroups: ["networking.k8s.io"] + resources: ["networkpolicies"] + verbs: ["get", "create"] + +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: volcano-controllers-role +subjects: + - kind: ServiceAccount + name: volcano-controllers + namespace: volcano-system +roleRef: + kind: ClusterRole + name: volcano-controllers + apiGroup: rbac.authorization.k8s.io + +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: volcano-controllers + namespace: volcano-system + labels: + app: volcano-controller +spec: + replicas: 1 + selector: + matchLabels: + app: volcano-controller + template: + metadata: + labels: + app: volcano-controller + spec: + serviceAccount: volcano-controllers + + containers: + - name: volcano-controllers + image: volcanosh/vc-controller-manager:latest + args: + - --alsologtostderr + - -v=4 + - 2>&1 + imagePullPolicy: "IfNotPresent" + +--- +# Source: volcano/templates/batch_v1alpha1_job.yaml +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: jobs.batch.volcano.sh +spec: + group: batch.volcano.sh + names: + kind: Job + plural: jobs + shortNames: + - vcjob + - vj + scope: Namespaced + validation: + openAPIV3Schema: + type: object + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Specification of the desired behavior of a cron job, including + the minAvailable + properties: + volumes: + description: The volumes for Job + items: + properties: + volumeClaim: + description: VolumeClaim defines the PVC used by the VolumeMount. + type: object + mountPath: + description: Path within the container at which the volume should be mounted. + Must not contain ':'. + type: string + volumeClaimName: + description: The name of the volume claim. + type: string + type: object + required: + - mountPath + type: array + minAvailable: + description: The minimal available pods to run for this Job + format: int32 + type: integer + policies: + description: Specifies the default lifecycle of tasks + items: + properties: + action: + description: The action that will be taken to the PodGroup according + to Event. One of "Restart", "None". Default to None. + type: string + event: + description: The Event recorded by scheduler; the controller takes + actions according to this Event. + type: string + events: + description: The Events recorded by scheduler; the controller takes + actions according to this Events. + type: array + items: + type: string + timeout: + description: Timeout is the grace period for controller to take + actions. Default to nil (take action immediately). + type: object + type: object + type: array + schedulerName: + description: SchedulerName is the default value of `tasks.template.spec.schedulerName`. + type: string + plugins: + description: Enabled task plugins when creating job. + type: object + tasks: + description: Tasks specifies the task specification of Job + items: + properties: + name: + description: Name specifies the name of tasks + type: string + policies: + description: Specifies the lifecycle of task + items: + properties: + action: + description: The action that will be taken to the PodGroup + according to Event. One of "Restart", "None". Default + to None. + type: string + event: + description: The Event recorded by scheduler; the controller + takes actions according to this Event. + type: string + events: + description: The Events recorded by scheduler; the controller takes + actions according to this Events. + type: array + items: + type: string + timeout: + description: Timeout is the grace period for controller + to take actions. Default to nil (take action immediately). + type: object + type: object + type: array + replicas: + description: Replicas specifies the replicas of this TaskSpec + in Job + format: int32 + type: integer + template: + description: Specifies the pod that will be created for this TaskSpec + when executing a Job + type: object + type: object + type: array + queue: + description: The name of the queue on which job should been created + type: string + maxRetry: + description: The limit for retrying submiting job, default is 3 + format: int32 + type: integer + type: object + status: + description: Current status of Job + properties: + Succeeded: + description: The number of pods which reached phase Succeeded. + format: int32 + type: integer + failed: + description: The number of pods which reached phase Failed. + format: int32 + type: integer + minAvailable: + description: The minimal available pods to run for this Job + format: int32 + type: integer + pending: + description: The number of pending pods. + format: int32 + type: integer + running: + description: The number of running pods. + format: int32 + type: integer + version: + description: Job's current version + format: int32 + type: integer + retryCount: + description: The number that volcano retried to submit the job. + format: int32 + type: integer + ControlledResources: + description: All of the resources that are controlled by this job. + type: object + additionalProperties: + type: string + state: + description: Current state of Job. + properties: + message: + description: Human-readable message indicating details about last + transition. + type: string + phase: + description: The phase of Job + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's + last transition. + type: string + type: object + type: object + version: v1alpha1 + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] + +--- +# Source: volcano/templates/bus_v1alpha1_command.yaml +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: commands.bus.volcano.sh +spec: + group: bus.volcano.sh + names: + kind: Command + plural: commands + scope: Namespaced + validation: + openAPIV3Schema: + type: object + properties: + action: + description: Action defines the action that will be took to the target object. + type: string + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + message: + description: Human-readable message indicating details of this command. + type: string + metadata: + type: object + reason: + description: Unique, one-word, CamelCase reason for this command. + type: string + target: + description: TargetObject defines the target object of this command. + type: object + version: v1alpha1 +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] + +--- +# Source: volcano/templates/scheduling_v1beta1_podgroup.yaml +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: podgroups.scheduling.volcano.sh +spec: + group: scheduling.volcano.sh + names: + kind: PodGroup + plural: podgroups + shortNames: + - pg + - podgroup-v1alpha2 + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + minMember: + format: int32 + type: integer + queue: + type: string + priorityClassName: + type: string + type: object + status: + properties: + succeeded: + format: int32 + type: integer + failed: + format: int32 + type: integer + running: + format: int32 + type: integer + type: object + type: object + version: v1beta1 + +--- +# Source: volcano/templates/scheduling_v1beta1_queue.yaml +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: queues.scheduling.volcano.sh +spec: + group: scheduling.volcano.sh + names: + kind: Queue + plural: queues + shortNames: + - q + - queue-v1alpha2 + scope: Cluster + validation: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + weight: + format: int32 + type: integer + capability: + type: object + state: + type: string + type: object + status: + properties: + state: + type: string + unknown: + format: int32 + type: integer + pending: + format: int32 + type: integer + running: + format: int32 + type: integer + inqueue: + format: int32 + type: integer + type: object + type: object + version: v1beta1 + subresources: + status: {} + diff --git a/pkg/controllers/podgroup/pg_controller_test.go b/pkg/controllers/podgroup/pg_controller_test.go index 1b12652bb4..860c75336e 100644 --- a/pkg/controllers/podgroup/pg_controller_test.go +++ b/pkg/controllers/podgroup/pg_controller_test.go @@ -74,7 +74,7 @@ func TestAddPodGroup(t *testing.T) { }, expectedPodGroup: &scheduling.PodGroup{ TypeMeta: metav1.TypeMeta{ - APIVersion: "scheduling.sigs.dev/v1alpha2", + APIVersion: "scheduling.volcano.sh/v1beta1", Kind: "PodGroup", }, ObjectMeta: metav1.ObjectMeta{ @@ -111,7 +111,7 @@ func TestAddPodGroup(t *testing.T) { }, expectedPodGroup: &scheduling.PodGroup{ TypeMeta: metav1.TypeMeta{ - APIVersion: "scheduling.sigs.dev/v1alpha2", + APIVersion: "scheduling.volcano.sh/v1beta1", Kind: "PodGroup", }, ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/controllers/queue/queue_controller_handler.go b/pkg/controllers/queue/queue_controller_handler.go index 88b14f66d4..537489fd52 100644 --- a/pkg/controllers/queue/queue_controller_handler.go +++ b/pkg/controllers/queue/queue_controller_handler.go @@ -65,13 +65,13 @@ func (c *Controller) deleteQueue(obj interface{}) { func (c *Controller) updateQueue(old, new interface{}) { oldQueue, ok := old.(*schedulingv1beta1.Queue) if !ok { - klog.Errorf("Can not covert old object %v to queues.scheduling.sigs.dev.", old) + klog.Errorf("Can not covert old object %v to queues.scheduling.volcano.sh.", old) return } newQueue, ok := new.(*schedulingv1beta1.Queue) if !ok { - klog.Errorf("Can not covert new object %v to queues.scheduling.sigs.dev.", old) + klog.Errorf("Can not covert new object %v to queues.scheduling.volcano.sh.", old) return }