---
# System prepended metadata

title: Application Profile

---

# Application Profile

An application profile:

```yaml=
apiVersion: app.profile/v1alpha1
kind: ServerlessApp
metadata:
  name: cool-name
spec:
  application:
    function:
      runtime: java8
      cpu: 2
      codeURL: https://github.com/my/app
      capabilities:
        autoscaler:
          max: 100
        canary:
          analysisInterval: 30s
```

It will generate below component and appconfig (with help of composition):

```yaml=
apiVersion: core.oam.dev/v1alpha2
kind: Component
metadata:
  name: function-xmhu1
spec:
  workload:
    apiVersion: faas.alibaba.com/v1alpha1
    kind: Function
    spec:
      runtime: java8
      blobCodeUrl: http://xxx/f36286e6-f070-498f-a520-6dd3a589bd90
      resources:
        cpu:
          required: 2
      triggers:
        - type: http
```

```yaml=
apiVersion: core.oam.dev/v1alpha2
kind: ApplicationConfiguration
metadata:
  name: cool-name
spec:
  components:
    - componentName: function-xmhu1
      traits:
        - trait:
            apiVersion: keda.k8s.io/v1alpha1
            kind: ScaledObject
            spec:
              minReplicaCount: 0
              maxReplicaCount: 100
        - trait:
            apiVersion: rollout.core.oam.dev/v1alpha2
            kind: Canary
            spec:
              progressDeadlineSeconds: 60
              analysis:
                interval: 30s
                metrics:
                  - name: request-success-rate
```

