remove oam runtime workaround and complete some TODOs

This commit is contained in:
zzxwill
2020-08-10 11:48:54 +08:00
parent bdf67d7e11
commit 190fe97530
6 changed files with 3 additions and 194 deletions

View File

@@ -1,87 +0,0 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"apiextensions.k8s.io/v1","kind":"CustomResourceDefinition","metadata":{"annotations":{"controller-gen.kubebuilder.io/version":"v0.2.4"},"creationTimestamp":null,"name":"traitdefinitions.core.oam.dev"},"spec":{"group":"core.oam.dev","names":{"categories":["crossplane","oam"],"kind":"TraitDefinition","listKind":"TraitDefinitionList","plural":"traitdefinitions","singular":"traitdefinition"},"scope":"Cluster","versions":[{"additionalPrinterColumns":[{"jsonPath":".spec.definitionRef.name","name":"DEFINITION-NAME","type":"string"}],"name":"v1alpha2","schema":{"openAPIV3Schema":{"description":"A TraitDefinition registers a kind of Kubernetes custom resource as a valid OAM trait kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the trait when it is embedded in an OAM ApplicationConfiguration.","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":"A TraitDefinitionSpec defines the desired state of a TraitDefinition.","properties":{"appliesToWorkloads":{"description":"AppliesToWorkloads specifies the list of workload kinds this trait applies to. Workload kinds are specified in kind.group/version format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this field apply to all workload kinds.","items":{"type":"string"},"type":"array"},"definitionRef":{"description":"Reference to the CustomResourceDefinition that defines this trait kind.","properties":{"name":{"description":"Name of the referenced CustomResourceDefinition.","type":"string"}},"required":["name"],"type":"object"},"extension":{"description":"Extension is used for extension needs by OAM platform builders","type":"object","x-kubernetes-preserve-unknown-fields":true},"revisionEnabled":{"description":"Revision indicates whether a trait is aware of component revision","type":"boolean"},"workloadRefPath":{"description":"WorkloadRefPath indicates where/if a trait accepts a workloadRef object","type":"string"}},"required":["definitionRef"],"type":"object"}},"type":"object"}},"served":true,"storage":true,"subresources":{}}]},"status":{"acceptedNames":{"kind":"","plural":""},"conditions":[],"storedVersions":[]}}
name: traitdefinitions.core.oam.dev
spec:
conversion:
strategy: None
group: core.oam.dev
names:
categories:
- crossplane
- oam
kind: TraitDefinition
listKind: TraitDefinitionList
plural: traitdefinitions
singular: traitdefinition
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .spec.definitionRef.name
name: DEFINITION-NAME
type: string
name: v1alpha2
schema:
openAPIV3Schema:
description: A TraitDefinition registers a kind of Kubernetes custom resource
as a valid OAM trait kind by referencing its CustomResourceDefinition. The
CRD is used to validate the schema of the trait when it is embedded in an
OAM ApplicationConfiguration.
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: A TraitDefinitionSpec defines the desired state of a TraitDefinition.
properties:
appliesToWorkloads:
description: AppliesToWorkloads specifies the list of workload kinds
this trait applies to. Workload kinds are specified in kind.group/version
format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this
field apply to all workload kinds.
items:
type: string
type: array
definitionRef:
description: Reference to the CustomResourceDefinition that defines
this trait kind.
properties:
name:
description: Name of the referenced CustomResourceDefinition.
type: string
required:
- name
type: object
extension:
description: Extension is used for extension needs by OAM platform
builders
type: object
x-kubernetes-preserve-unknown-fields: true
revisionEnabled:
description: Revision indicates whether a trait is aware of component
revision
type: boolean
workloadRefPath:
description: WorkloadRefPath indicates where/if a trait accepts a
workloadRef object
type: string
required:
- definitionRef
type: object
type: object
served: true
storage: true
subresources: {}

View File

@@ -1,95 +0,0 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"apiextensions.k8s.io/v1","kind":"CustomResourceDefinition","metadata":{"annotations":{"controller-gen.kubebuilder.io/version":"v0.2.4"},"creationTimestamp":null,"name":"workloaddefinitions.core.oam.dev"},"spec":{"group":"core.oam.dev","names":{"categories":["crossplane","oam"],"kind":"WorkloadDefinition","listKind":"WorkloadDefinitionList","plural":"workloaddefinitions","singular":"workloaddefinition"},"scope":"Cluster","versions":[{"additionalPrinterColumns":[{"jsonPath":".spec.definitionRef.name","name":"DEFINITION-NAME","type":"string"}],"name":"v1alpha2","schema":{"openAPIV3Schema":{"description":"A WorkloadDefinition registers a kind of Kubernetes custom resource as a valid OAM workload kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the workload when it is embedded in an OAM Component.","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":"A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition.","properties":{"childResourceKinds":{"description":"ChildResourceKinds are the list of GVK of the child resources this workload generates","items":{"description":"A ChildResourceKind defines a child Kubernetes resource kind with a selector","properties":{"apiVersion":{"description":"APIVersion of the child resource","type":"string"},"kind":{"description":"Kind of the child resource","type":"string"},"selector":{"additionalProperties":{"type":"string"},"description":"Selector to select the child resources that the workload wants to expose to traits","type":"object"}},"required":["apiVersion","kind"],"type":"object"},"type":"array"},"definitionRef":{"description":"Reference to the CustomResourceDefinition that defines this workload kind.","properties":{"name":{"description":"Name of the referenced CustomResourceDefinition.","type":"string"}},"required":["name"],"type":"object"},"extension":{"description":"Extension is used for extension needs by OAM platform builders","type":"object","x-kubernetes-preserve-unknown-fields":true}},"required":["definitionRef"],"type":"object"}},"type":"object"}},"served":true,"storage":true,"subresources":{}}]},"status":{"acceptedNames":{"kind":"","plural":""},"conditions":[],"storedVersions":[]}}
name: workloaddefinitions.core.oam.dev
spec:
conversion:
strategy: None
group: core.oam.dev
names:
categories:
- crossplane
- oam
kind: WorkloadDefinition
listKind: WorkloadDefinitionList
plural: workloaddefinitions
singular: workloaddefinition
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .spec.definitionRef.name
name: DEFINITION-NAME
type: string
name: v1alpha2
schema:
openAPIV3Schema:
description: A WorkloadDefinition registers a kind of Kubernetes custom resource
as a valid OAM workload kind by referencing its CustomResourceDefinition.
The CRD is used to validate the schema of the workload when it is embedded
in an OAM Component.
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: A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition.
properties:
childResourceKinds:
description: ChildResourceKinds are the list of GVK of the child resources
this workload generates
items:
description: A ChildResourceKind defines a child Kubernetes resource
kind with a selector
properties:
apiVersion:
description: APIVersion of the child resource
type: string
kind:
description: Kind of the child resource
type: string
selector:
additionalProperties:
type: string
description: Selector to select the child resources that the
workload wants to expose to traits
type: object
required:
- apiVersion
- kind
type: object
type: array
definitionRef:
description: Reference to the CustomResourceDefinition that defines
this workload kind.
properties:
name:
description: Name of the referenced CustomResourceDefinition.
type: string
required:
- name
type: object
extension:
description: Extension is used for extension needs by OAM platform
builders
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- definitionRef
type: object
type: object
served: true
storage: true
subresources: {}

View File

@@ -51,12 +51,6 @@ jobs:
helm repo add crossplane-master https://charts.crossplane.io/master/
helm install oam --namespace oam-system crossplane-master/oam-kubernetes-runtime --devel
kubectl delete crd workloaddefinitions.core.oam.dev traitdefinitions.core.oam.dev
kubectl apply -f .github/workflows/core.oam.dev_workloaddefinitions.yaml
kubectl apply -f .github/workflows/core.oam.dev_traitdefinitions.yaml
kubectl get crd | grep oam
kubectl apply -R -f config/samples
- name: Run e2e tests