Skip to content

Commit

Permalink
Move KUDO to v1 CRDs (#1725)
Browse files Browse the repository at this point in the history
this means we now support k8s 1.16+
  • Loading branch information
alenkacz committed Nov 12, 2020
1 parent 6296fc0 commit 287faea
Show file tree
Hide file tree
Showing 18 changed files with 2,077 additions and 2,089 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -172,7 +172,7 @@ ifneq ($(shell go list -f '{{.Version}}' -m sigs.k8s.io/controller-tools), $(she
@echo "(Re-)installing controller-gen. Current version: $(controller-gen --version 2>/dev/null | cut -b 10-). Need $(go list -f '{{.Version}}' -m sigs.k8s.io/controller-tools)"
go get sigs.k8s.io/controller-tools/cmd/controller-gen@$$(go list -f '{{.Version}}' -m sigs.k8s.io/controller-tools)
endif
controller-gen crd:crdVersions=v1beta1 paths=./pkg/apis/... output:crd:dir=config/crds output:stdout
controller-gen crd paths=./pkg/apis/... output:crd:dir=config/crds output:stdout
ifeq (, $(shell which go-bindata))
go get github.com/go-bindata/go-bindata/v3/go-bindata@$$(go list -f '{{.Version}}' -m github.com/go-bindata/go-bindata/v3)
endif
Expand Down
4 changes: 2 additions & 2 deletions cmd/manager/main.go
Expand Up @@ -25,7 +25,7 @@ import (
"strings"
"time"

apiextenstionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
apiext1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/discovery/cached/memory"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
Expand Down Expand Up @@ -98,7 +98,7 @@ func main() {
}
log.Print("Scheme initialization")

if err := apiextenstionsv1beta1.AddToScheme(mgr.GetScheme()); err != nil {
if err := apiext1.AddToScheme(mgr.GetScheme()); err != nil {
log.Printf("Unable to add extension APIs to scheme: %v", err)
}

Expand Down
283 changes: 141 additions & 142 deletions config/crds/kudo.dev_instances.yaml

Large diffs are not rendered by default.

87 changes: 43 additions & 44 deletions config/crds/kudo.dev_operators.yaml
@@ -1,6 +1,6 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
Expand All @@ -15,51 +15,50 @@ spec:
plural: operators
singular: operator
scope: Namespaced
validation:
openAPIV3Schema:
description: Operator is the Schema for the operator API
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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: OperatorSpec defines the desired state of Operator
properties:
description:
type: string
kubernetesVersion:
type: string
kudoVersion:
type: string
maintainers:
items:
description: Maintainer describes an Operator maintainer.
properties:
email:
description: Email is an optional email address to contact the named maintainer.
type: string
name:
description: Name is a user name or organization name.
type: string
type: object
type: array
namespaceManifest:
type: string
url:
type: string
type: object
status:
description: OperatorStatus defines the observed state of Operator
type: object
type: object
version: v1beta1
versions:
- name: v1beta1
schema:
openAPIV3Schema:
description: Operator is the Schema for the operator API
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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: OperatorSpec defines the desired state of Operator
properties:
description:
type: string
kubernetesVersion:
type: string
kudoVersion:
type: string
maintainers:
items:
description: Maintainer describes an Operator maintainer.
properties:
email:
description: Email is an optional email address to contact the named maintainer.
type: string
name:
description: Name is a user name or organization name.
type: string
type: object
type: array
namespaceManifest:
type: string
url:
type: string
type: object
status:
description: OperatorStatus defines the observed state of Operator
type: object
type: object
served: true
storage: true
status:
Expand Down

0 comments on commit 287faea

Please sign in to comment.