github.com/oam-dev/kubevela@v1.9.11/charts/vela-core/templates/defwithtemplate/scaler.yaml (about)

     1  # Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
     2  # Definition source cue file: vela-templates/definitions/internal/scaler.cue
     3  apiVersion: core.oam.dev/v1beta1
     4  kind: TraitDefinition
     5  metadata:
     6    annotations:
     7      definition.oam.dev/description: Manually scale K8s pod for your workload which follows the pod spec in path 'spec.template'.
     8    name: scaler
     9    namespace: {{ include "systemDefinitionNamespace" . }}
    10  spec:
    11    appliesToWorkloads:
    12      - deployments.apps
    13      - statefulsets.apps
    14    podDisruptive: false
    15    schematic:
    16      cue:
    17        template: |
    18          parameter: {
    19          	// +usage=Specify the number of workload
    20          	replicas: *1 | int
    21          }
    22          // +patchStrategy=retainKeys
    23          patch: spec: replicas: parameter.replicas
    24