# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/health.cue
apiVersion: core.oam.dev/v1beta1
kind: PolicyDefinition
metadata:
  annotations:
    definition.oam.dev/description: Apply periodical health checking to the application.
  name: health
  namespace: {{.Values.systemDefinitionNamespace}}
spec:
  manageHealthCheck: true
  schematic:
    cue:
      template: |
        output: {
        	apiVersion: "core.oam.dev/v1alpha2"
        	kind:       "HealthScope"
        	spec: {
        		"probe-timeout":  parameter.probeTimeout
        		"probe-interval": parameter.probeInterval
        		appReferences: [{
        			appName: context.appName
        		}]
        		workloadRefs: []
        		manageHealthCheck: true
        	}
        }
        parameter: {
        	// +usage=Specify health checking timeout(seconds), default 10s
        	probeTimeout: *10 | int
        	// +usage=Specify health checking interval(seconds), default 30s
        	probeInterval: *30 | int
        }

