This repository has been archived by the owner on Jun 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add mutating for appConfig to support name/properties format of trait (…
…#242) * add mutating for appConfig to support name/properties fomart of trait Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com> * add example for webhook Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
- Loading branch information
1 parent
c6573e6
commit d1bbf9f
Showing
15 changed files
with
775 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: core.oam.dev/v1alpha2 | ||
kind: Component | ||
metadata: | ||
name: foo | ||
spec: | ||
workload: | ||
type: fooworkload | ||
spec: | ||
key: workload | ||
|
||
--- | ||
apiVersion: core.oam.dev/v1alpha2 | ||
kind: ApplicationConfiguration | ||
metadata: | ||
name: example-appconfig | ||
spec: | ||
components: | ||
- componentName: foo | ||
traits: | ||
- trait: | ||
name: footrait | ||
properties: | ||
key: trait |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: foo.example.com | ||
spec: | ||
group: example.com | ||
names: | ||
kind: Foo | ||
listKind: FooList | ||
plural: foo | ||
singular: foo | ||
scope: Namespaced | ||
version: v1 | ||
preserveUnknownFields: true | ||
--- | ||
apiVersion: core.oam.dev/v1alpha2 | ||
kind: WorkloadDefinition | ||
metadata: | ||
name: fooworkload | ||
spec: | ||
definitionRef: | ||
name: foo.example.com | ||
--- | ||
apiVersion: core.oam.dev/v1alpha2 | ||
kind: TraitDefinition | ||
metadata: | ||
name: footrait | ||
spec: | ||
definitionRef: | ||
name: foo.example.com | ||
|
||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: foo:system:aggregate-to-controller | ||
labels: | ||
rbac.oam.dev/aggregate-to-controller: "true" | ||
rules: | ||
- apiGroups: | ||
- example.com | ||
resources: | ||
- "*" | ||
verbs: | ||
- "*" | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- controllerrevisions | ||
verbs: | ||
- "*" | ||
- apiGroups: | ||
- apiextensions.k8s.io | ||
resources: | ||
- customresourcedefinitions | ||
verbs: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.