Skip to content

Commit

Permalink
change controller runtime to v0.2 to align kubernetes v1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
wonderflow committed Mar 25, 2020
1 parent d8897e3 commit adb530c
Show file tree
Hide file tree
Showing 15 changed files with 197 additions and 89 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ docker-push:

# find or download controller-gen
# download controller-gen if necessary
# make sure use controller-gen v0.2.1
# make sure use controller-gen v0.2.0
controller-gen:
ifeq (, $(shell which controller-gen))
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5
CONTROLLER_GEN=$(shell go env GOPATH)/bin/controller-gen
ifeq (, $(shell which controller-gen-0.2))
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.0
mv $(shell go env GOPATH)/bin/controller-gen $(shell go env GOPATH)/bin/controller-gen-0.2
CONTROLLER_GEN=$(shell go env GOPATH)/bin/controller-gen-0.2
else
CONTROLLER_GEN=$(shell which controller-gen)
CONTROLLER_GEN=$(shell which controller-gen-0.2)
endif
4 changes: 2 additions & 2 deletions apis/core.oam.dev/v1alpha1/component_schematic_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ type ConfigFile struct {

// Container describes the container configuration for a Component.
type Container struct {
Name string `json:"name"`
Image string `json:"image"`
Name string `json:"name"`
Image string `json:"image"`
// +optional
Resources Resources `json:"resources"`
// +optional
Expand Down
10 changes: 5 additions & 5 deletions apis/core.oam.dev/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions config/crd/bases/core.oam.dev_applicationconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.5
creationTimestamp: null
name: applicationconfigurations.core.oam.dev
spec:
group: core.oam.dev
names:
kind: ApplicationConfiguration
listKind: ApplicationConfigurationList
plural: applicationconfigurations
singular: applicationconfiguration
scope: Namespaced
scope: ""
subresources:
status: {}
validation:
Expand All @@ -25,12 +21,12 @@ spec:
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'
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/sig-architecture/api-conventions.md#types-kinds'
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
Expand Down
10 changes: 3 additions & 7 deletions config/crd/bases/core.oam.dev_applicationscopes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,26 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.5
creationTimestamp: null
name: applicationscopes.core.oam.dev
spec:
group: core.oam.dev
names:
kind: ApplicationScope
listKind: ApplicationScopeList
plural: applicationscopes
singular: applicationscope
scope: Namespaced
scope: ""
validation:
openAPIV3Schema:
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'
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/sig-architecture/api-conventions.md#types-kinds'
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
Expand Down
28 changes: 6 additions & 22 deletions config/crd/bases/core.oam.dev_componentschematics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,27 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.5
creationTimestamp: null
name: componentschematics.core.oam.dev
spec:
group: core.oam.dev
names:
kind: ComponentSchematic
listKind: ComponentSchematicList
plural: componentschematics
singular: componentschematic
scope: Namespaced
scope: ""
validation:
openAPIV3Schema:
description: ComponentSchematic is the Schema for the components 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'
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/sig-architecture/api-conventions.md#types-kinds'
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
Expand Down Expand Up @@ -233,11 +229,7 @@ spec:
for running this container.
properties:
required:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: string
required:
- required
type: object
Expand All @@ -260,11 +252,7 @@ spec:
container.
properties:
required:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: string
required:
- required
type: object
Expand All @@ -275,11 +263,7 @@ spec:
integer, greater than zero.
properties:
required:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: string
required:
- required
type: object
Expand Down
10 changes: 3 additions & 7 deletions config/crd/bases/core.oam.dev_traits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,27 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.5
creationTimestamp: null
name: traits.core.oam.dev
spec:
group: core.oam.dev
names:
kind: Trait
listKind: TraitList
plural: traits
singular: trait
scope: Namespaced
scope: ""
validation:
openAPIV3Schema:
description: Trait is the Schema for the traits 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'
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/sig-architecture/api-conventions.md#types-kinds'
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
Expand Down
10 changes: 3 additions & 7 deletions config/crd/bases/core.oam.dev_workloadtypes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,27 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.5
creationTimestamp: null
name: workloadtypes.core.oam.dev
spec:
group: core.oam.dev
names:
kind: WorkloadType
listKind: WorkloadTypeList
plural: workloadtypes
singular: workloadtype
scope: Namespaced
scope: ""
validation:
openAPIV3Schema:
description: WorkloadType is the Schema for the workloadtypes 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'
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/sig-architecture/api-conventions.md#types-kinds'
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
Expand Down
19 changes: 12 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ go 1.13

require (
github.com/go-logr/logr v0.1.0
github.com/onsi/ginkgo v1.10.1
github.com/onsi/gomega v1.7.0
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d
github.com/onsi/ginkgo v1.6.0
github.com/onsi/gomega v1.4.2
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.4.0
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9
k8s.io/api v0.17.0
k8s.io/apimachinery v0.17.0
k8s.io/client-go v0.17.0
sigs.k8s.io/controller-runtime v0.4.0
sigs.k8s.io/controller-tools v0.2.5 // indirect
gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485
k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b
k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
k8s.io/code-generator v0.0.0-20190311093542-50b561225d70
k8s.io/gengo v0.0.0-20200205140755-e0e292d8aa12
k8s.io/klog v1.0.0
sigs.k8s.io/controller-runtime v0.2.2
)
Loading

0 comments on commit adb530c

Please sign in to comment.