diff --git a/.github/workflows/core.oam.dev_traitdefinitions.yaml b/.github/workflows/core.oam.dev_traitdefinitions.yaml deleted file mode 100644 index fc19e8d19..000000000 --- a/.github/workflows/core.oam.dev_traitdefinitions.yaml +++ /dev/null @@ -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: {} diff --git a/.github/workflows/core.oam.dev_workloaddefinitions.yaml b/.github/workflows/core.oam.dev_workloaddefinitions.yaml deleted file mode 100644 index 1f31002fd..000000000 --- a/.github/workflows/core.oam.dev_workloaddefinitions.yaml +++ /dev/null @@ -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: {} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ff131edb2..10286efa9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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 diff --git a/e2e/application/application_test.go b/e2e/application/application_test.go index a0d8bd48a..e16baa4b8 100644 --- a/e2e/application/application_test.go +++ b/e2e/application/application_test.go @@ -9,8 +9,7 @@ import ( ) var ( - //TODO(zzxwill) Need to change env name after [issue#82](https://github.com/cloud-native-application/RudrX/issues/82) is fixed. - envName = "default" + envName = "env-application" applicationName = "app-ls-basic" ) diff --git a/e2e/trait/trait_test.go b/e2e/trait/trait_test.go index 88d6f6f10..07640230b 100644 --- a/e2e/trait/trait_test.go +++ b/e2e/trait/trait_test.go @@ -8,8 +8,7 @@ import ( ) var ( - //TODO(zzxwill) Need to change env name after [issue#82](https://github.com/cloud-native-application/RudrX/issues/82) is fixed. - envName = "default" + envName = "env-trait" applicationName = "app-trait-basic" ) diff --git a/e2e/workload/workload_test.go b/e2e/workload/workload_test.go index d27563d1c..80b1fb090 100644 --- a/e2e/workload/workload_test.go +++ b/e2e/workload/workload_test.go @@ -8,8 +8,7 @@ import ( ) var ( - //TODO(zzxwill) Need to change env name after [issue#82](https://github.com/cloud-native-application/RudrX/issues/82) is fixed. - envName = "default" + envName = "env-workload" applicationName = "app-testworkloadrun-basic" )