mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-16 14:27:00 +00:00
move dry-run and live-diff into an independent pkg WIP add sample and doc WIP unit test for live-diff add unit test Signed-off-by: roy wang <seiwy2010@gmail.com>
29 lines
682 B
YAML
29 lines
682 B
YAML
apiVersion: core.oam.dev/v1beta1
|
|
kind: TraitDefinition
|
|
metadata:
|
|
annotations:
|
|
definition.oam.dev/description: "Configures replicas for your service."
|
|
name: myscaler
|
|
spec:
|
|
appliesToWorkloads:
|
|
- webservice
|
|
- worker
|
|
definitionRef:
|
|
name: manualscalertraits.core.oam.dev
|
|
workloadRefPath: spec.workloadRef
|
|
schematic:
|
|
cue:
|
|
template: |
|
|
outputs: scaler: {
|
|
apiVersion: "core.oam.dev/v1alpha2"
|
|
kind: "ManualScalerTrait"
|
|
spec: {
|
|
replicaCount: parameter.replicas
|
|
}
|
|
}
|
|
parameter: {
|
|
//+short=r
|
|
//+usage=Replicas of the workload
|
|
replicas: *1 | int
|
|
}
|