Skip to content

Commit

Permalink
Upgrade CRDs to apiextensions.k8s.io/v1 (#1610)
Browse files Browse the repository at this point in the history
* Changes for v1 version

* Add temp schema

* Use Kubebuilder 2.3.0

* Remove count 1
  • Loading branch information
andreyvelich authored Aug 10, 2021
1 parent a3e36b3 commit a83828c
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 51 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
run: |
go mod download
curl -L -O "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v1.0.7/kubebuilder_1.0.7_linux_amd64.tar.gz"
tar -zxvf kubebuilder_1.0.7_linux_amd64.tar.gz
sudo mv kubebuilder_1.0.7_linux_amd64 /usr/local/kubebuilder
curl -L -O "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.0/kubebuilder_2.3.0_linux_amd64.tar.gz"
tar -zxvf kubebuilder_2.3.0_linux_amd64.tar.gz
sudo mv kubebuilder_2.3.0_linux_amd64 /usr/local/kubebuilder
export PATH=$PATH:/usr/local/kubebuilder/bin
make check
Expand Down
35 changes: 21 additions & 14 deletions manifests/v1beta1/components/crd/experiment.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: experiments.kubeflow.org
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[-1:].type
name: Type
type: string
- JSONPath: .status.conditions[-1:].status
name: Status
type: string
- JSONPath: .metadata.creationTimestamp
name: Age
type: date
group: kubeflow.org
version: v1beta1
scope: Namespaced
subresources:
status: {}
versions:
- name: v1beta1
served: true
storage: true
additionalPrinterColumns:
- name: Type
type: string
jsonPath: .status.conditions[-1:].type
- name: Status
type: string
jsonPath: .status.conditions[-1:].status
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
names:
kind: Experiment
singular: experiment
Expand Down
47 changes: 27 additions & 20 deletions manifests/v1beta1/components/crd/suggestion.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: suggestions.kubeflow.org
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[-1:].type
name: Type
type: string
- JSONPath: .status.conditions[-1:].status
name: Status
type: string
- JSONPath: .spec.requests
name: Requested
type: string
- JSONPath: .status.suggestionCount
name: Assigned
type: string
- JSONPath: .metadata.creationTimestamp
name: Age
type: date
group: kubeflow.org
version: v1beta1
scope: Namespaced
subresources:
status: {}
versions:
- name: v1beta1
served: true
storage: true
additionalPrinterColumns:
- name: Type
type: string
jsonPath: .status.conditions[-1:].type
- name: Status
type: string
jsonPath: .status.conditions[-1:].status
- name: Requested
type: string
jsonPath: .spec.requests
- name: Assigned
type: string
jsonPath: .status.suggestionCount
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
names:
kind: Suggestion
singular: suggestion
Expand Down
35 changes: 21 additions & 14 deletions manifests/v1beta1/components/crd/trial.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: trials.kubeflow.org
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[-1:].type
name: Type
type: string
- JSONPath: .status.conditions[-1:].status
name: Status
type: string
- JSONPath: .metadata.creationTimestamp
name: Age
type: date
group: kubeflow.org
version: v1beta1
scope: Namespaced
subresources:
status: {}
versions:
- name: v1beta1
served: true
storage: true
additionalPrinterColumns:
- name: Type
type: string
jsonPath: .status.conditions[-1:].type
- name: Status
type: string
jsonPath: .status.conditions[-1:].status
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
names:
kind: Trial
singular: trial
Expand Down

0 comments on commit a83828c

Please sign in to comment.