diff --git a/examples/component-versioning/component-mutable-app.yaml b/examples/component-versioning/component-mutable-app.yaml index b794148a..b3cc1890 100644 --- a/examples/component-versioning/component-mutable-app.yaml +++ b/examples/component-versioning/component-mutable-app.yaml @@ -4,10 +4,10 @@ metadata: name: example-appconfig spec: components: - - revisionName: example-component-brkaek3ipt3d60vfo4u0 + - revisionName: example-component-v1 traits: - trait: apiVersion: core.oam.dev/v1alpha2 kind: ManualScalerTrait spec: - replicaCount: 3 \ No newline at end of file + replicaCount: 3 diff --git a/examples/dependency/demo-with-conditions.yaml b/examples/dependency/demo-with-conditions.yaml index 209b47be..40cc0941 100644 --- a/examples/dependency/demo-with-conditions.yaml +++ b/examples/dependency/demo-with-conditions.yaml @@ -1,3 +1,17 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: dependency-clusterrole + labels: + rbac.oam.dev/aggregate-to-controller: "true" +rules: + - apiGroups: + - example.com + resources: + - 'foo' + verbs: + - '*' +--- apiVersion: core.oam.dev/v1alpha2 kind: Component metadata: @@ -43,4 +57,4 @@ spec: - valueFrom: dataOutputName: example-key toFieldPaths: - - "spec.key" \ No newline at end of file + - "spec.key" diff --git a/examples/dependency/demo-with-valuefrom.yaml b/examples/dependency/demo-with-valuefrom.yaml index e3b94c4e..4a56d12e 100644 --- a/examples/dependency/demo-with-valuefrom.yaml +++ b/examples/dependency/demo-with-valuefrom.yaml @@ -1,3 +1,17 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: dependency-clusterrole + labels: + rbac.oam.dev/aggregate-to-controller: "true" +rules: + - apiGroups: + - example.com + resources: + - 'foo' + verbs: + - '*' +--- apiVersion: core.oam.dev/v1alpha2 kind: Component metadata: @@ -28,6 +42,8 @@ apiVersion: core.oam.dev/v1alpha2 kind: ApplicationConfiguration metadata: name: example-appconfig + labels: + state: running spec: components: - componentName: source @@ -37,11 +53,11 @@ spec: conditions: - op: eq valueFrom: - fieldPath: metadata.annotations[oam.updateVersion] + fieldPath: metadata.labels[state] fieldPath: "status.state" - componentName: sink dataInputs: - valueFrom: dataOutputName: example-key toFieldPaths: - - "spec.key" \ No newline at end of file + - "spec.key" diff --git a/examples/dependency/demo.yaml b/examples/dependency/demo.yaml index 8fc7ff1c..9d960a4d 100644 --- a/examples/dependency/demo.yaml +++ b/examples/dependency/demo.yaml @@ -1,3 +1,17 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: dependency-clusterrole + labels: + rbac.oam.dev/aggregate-to-controller: "true" +rules: + - apiGroups: + - example.com + resources: + - 'foo' + verbs: + - '*' +--- apiVersion: core.oam.dev/v1alpha2 kind: Component metadata: @@ -8,15 +22,16 @@ spec: kind: Foo metadata: name: source + status: {} # Uncomment the following and apply again will make dependency satisfied. # status: # key: test - status: - key: - - name: a - value: aa - - name: b - value: bb + # status: + # key: + # - name: a + # value: aa + # - name: b + # value: bb --- apiVersion: core.oam.dev/v1alpha2 kind: Component diff --git a/examples/flight-tracker/tracker-app-config.yaml b/examples/flight-tracker/tracker-app-config.yaml index c0fb1afa..6f15c6ec 100644 --- a/examples/flight-tracker/tracker-app-config.yaml +++ b/examples/flight-tracker/tracker-app-config.yaml @@ -7,7 +7,20 @@ data: endpoint: ZGItd29ya2xvYWQ= password: ZGJwYXNzd29yZA== username: cG9zdGdyZXM= - +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: flight-tracker-clusterrole + labels: + rbac.oam.dev/aggregate-to-controller: "true" +rules: + - apiGroups: + - extensions + resources: + - 'ingresses' + verbs: + - '*' --- apiVersion: core.oam.dev/v1alpha2 kind: ApplicationConfiguration @@ -43,7 +56,7 @@ spec: - componentName: quakes-api parameterValues: - name: dataUri - value: "http://data-api.default.svc.cluster.local:3009/" + value: "http://data-api.default.svc.cluster.local:3009/" traits: - trait: apiVersion: core.oam.dev/v1alpha2 @@ -51,7 +64,7 @@ spec: metadata: name: quakes-api spec: - replicaCount: 2 + replicaCount: 2 - componentName: weather-api parameterValues: - name: dataUri @@ -63,7 +76,7 @@ spec: metadata: name: weather-api spec: - replicaCount: 2 + replicaCount: 2 - componentName: service-tracker-ui parameterValues: - name: flightsUri @@ -79,6 +92,6 @@ spec: metadata: name: tracker-ingress spec: - backend: - serviceName: web-ui - servicePort: 8080 \ No newline at end of file + backend: + serviceName: web-ui + servicePort: 8080 diff --git a/examples/typed-component/sample_application_config.yaml b/examples/typed-component/sample_application_config.yaml index a4de9f23..f521a0b2 100644 --- a/examples/typed-component/sample_application_config.yaml +++ b/examples/typed-component/sample_application_config.yaml @@ -8,10 +8,7 @@ spec: workloadRefs: - apiVersion: core.oam.dev/v1alpha2 kind: ContainerizedWorkload - name: example-component - - apiVersion: core.oam.dev/v1alpha2 - kind: ContainerizedWorkload - name: example-component2 + name: web-service-component --- apiVersion: core.oam.dev/v1alpha2 kind: ApplicationConfiguration