From 428776c6ba923c71735a694a209d33f7d1dc7d6e Mon Sep 17 00:00:00 2001 From: Armin Schlegel Date: Fri, 28 Apr 2023 08:59:00 +0200 Subject: [PATCH] feat: refactoring edgefarm.applications BREAKING CHANGE: for openyurt and new version of edgefarm.network --- Makefile | 59 +- cue/components/application-network.cue | 91 - cue/components/cloud-worker.cue | 235 - cue/components/edge-worker.cue | 248 - cue/components/edgefarm-applications.cue | 316 ++ .../cloud-network-participant-trait.cue | 113 - cue/traits/edge-network-participant-trait.cue | 170 - cue/traits/edgefarm-network-trait.cue | 164 + cue/traits/edgefarm-storage-trait.cue | 253 + cue/traits/volume-trait.cue | 120 - dev/devspace.yaml | 61 - dev/k3d-config.yaml | 40 - dev/manifests/applications/examples/README.md | 35 - .../applications/examples/cloud-only.yaml | 15 - .../applications/examples/edge-nats-box.yaml | 80 - .../applications/examples/edge-only.yaml | 18 - dev/manifests/vela-caps/kustomization.yaml | 8 - dev/manifests/vela-system/kustomization.yaml | 8 - devspace.yaml | 74 +- examples/example.yaml | 35 + .../components/application-network.yaml | 94 - .../vela-caps/components/cloud-worker.yaml | 233 - .../vela-caps/components/edge-worker.yaml | 244 - .../components/edgefarm-applications.yaml | 16 + manifests/vela-caps/kustomization.yaml | 13 +- .../cloud-network-participant-trait.yaml | 103 - .../vela-caps/traits/configmap-trait.yaml | 57 - .../edge-network-participant-trait.yaml | 152 - .../traits/edgefarm-network-trait.yaml | 152 + .../traits/edgefarm-storage-trait.yaml | 249 + manifests/vela-caps/traits/env-trait.yaml | 26 - manifests/vela-caps/traits/labels-trait.yaml | 26 - .../vela-caps/traits/resource-trait.yaml | 26 - manifests/vela-caps/traits/volume-trait.yaml | 114 - manifests/vela-system/base/.gitignore | 1 + .../base/charts/vela-minimal/.helmignore | 23 - .../base/charts/vela-minimal/Chart.yaml | 8 - .../base/charts/vela-minimal/README.md | 79 - .../core.oam.dev_applicationrevisions.yaml | 4722 ----------------- .../crds/core.oam.dev_applications.yaml | 1522 ------ .../core.oam.dev_componentdefinitions.yaml | 565 -- .../core.oam.dev_definitionrevisions.yaml | 1162 ---- .../crds/core.oam.dev_healthscopes.yaml | 590 -- .../crds/core.oam.dev_policydefinitions.yaml | 249 - .../crds/core.oam.dev_resourcetrackers.yaml | 116 - .../crds/core.oam.dev_scopedefinitions.yaml | 153 - .../crds/core.oam.dev_traitdefinitions.yaml | 595 --- .../core.oam.dev_workflowstepdefinitions.yaml | 250 - .../core.oam.dev_workloaddefinitions.yaml | 554 -- .../crds/standard.oam.dev_rollouts.yaml | 482 -- .../charts/vela-minimal/templates/NOTES.txt | 1 - .../vela-minimal/templates/_helpers.tpl | 73 - .../job-patch/clusterrole.yaml | 28 - .../job-patch/clusterrolebinding.yaml | 20 - .../job-patch/job-createSecret.yaml | 50 - .../job-patch/job-patchWebhook.yaml | 50 - .../admission-webhooks/job-patch/role.yaml | 21 - .../job-patch/rolebinding.yaml | 21 - .../job-patch/serviceaccount.yaml | 13 - .../mutatingWebhookConfiguration.yaml | 122 - .../validatingWebhookConfiguration.yaml | 172 - .../admission-webhooks/webhookService.yaml | 19 - .../vela-minimal/templates/certmanager.yaml | 53 - .../templates/cluster-gateway.yaml | 191 - .../templates/definitions/autodetect.yaml | 10 - .../templates/definitions/healthscopes.yaml | 10 - .../defwithtemplate/annotations.yaml | 30 - .../defwithtemplate/apply-application.yaml | 20 - .../defwithtemplate/apply-object.yaml | 28 - .../defwithtemplate/apply-remaining.yaml | 26 - .../templates/defwithtemplate/configmap.yaml | 61 - .../templates/defwithtemplate/cpuscaler.yaml | 51 - .../defwithtemplate/depends-on-app.yaml | 63 - .../templates/defwithtemplate/env.yaml | 30 - .../defwithtemplate/export2config.yaml | 42 - .../defwithtemplate/export2secret.yaml | 47 - .../templates/defwithtemplate/expose.yaml | 36 - .../templates/defwithtemplate/health.yaml | 34 - .../templates/defwithtemplate/hostalias.yaml | 28 - .../defwithtemplate/ingress-1-20.yaml | 76 - .../templates/defwithtemplate/ingress.yaml | 69 - .../defwithtemplate/init-container.yaml | 71 - .../templates/defwithtemplate/labels.yaml | 30 - .../templates/defwithtemplate/lifecycle.yaml | 49 - .../templates/defwithtemplate/nocalhost.yaml | 113 - .../defwithtemplate/node-affinity.yaml | 42 - .../templates/defwithtemplate/pvc.yaml | 120 - .../templates/defwithtemplate/raw.yaml | 18 - .../defwithtemplate/read-object.yaml | 62 - .../templates/defwithtemplate/resource.yaml | 30 - .../templates/defwithtemplate/rollout.yaml | 44 - .../templates/defwithtemplate/scaler.yaml | 22 - .../defwithtemplate/service-binding.yaml | 45 - .../templates/defwithtemplate/sidecar.yaml | 57 - .../templates/defwithtemplate/task.yaml | 230 - .../templates/defwithtemplate/volumes.yaml | 83 - .../defwithtemplate/webhook-notification.yaml | 195 - .../templates/defwithtemplate/webservice.yaml | 255 - .../templates/defwithtemplate/worker.yaml | 234 - .../templates/kubevela-apiserver.yaml | 68 - .../templates/kubevela-controller.yaml | 182 - .../templates/test/test-application.yaml | 62 - .../base/charts/vela-minimal/values.yaml | 128 - manifests/vela-system/base/kustomization.yaml | 20 +- manifests/vela-system/delete-caps.yaml | 481 +- manifests/vela-system/kustomization.yaml | 2 +- 106 files changed, 1669 insertions(+), 17188 deletions(-) delete mode 100644 cue/components/application-network.cue delete mode 100644 cue/components/cloud-worker.cue delete mode 100644 cue/components/edge-worker.cue create mode 100644 cue/components/edgefarm-applications.cue delete mode 100644 cue/traits/cloud-network-participant-trait.cue delete mode 100644 cue/traits/edge-network-participant-trait.cue create mode 100644 cue/traits/edgefarm-network-trait.cue create mode 100644 cue/traits/edgefarm-storage-trait.cue delete mode 100644 cue/traits/volume-trait.cue delete mode 100644 dev/devspace.yaml delete mode 100644 dev/k3d-config.yaml delete mode 100644 dev/manifests/applications/examples/README.md delete mode 100644 dev/manifests/applications/examples/cloud-only.yaml delete mode 100644 dev/manifests/applications/examples/edge-nats-box.yaml delete mode 100644 dev/manifests/applications/examples/edge-only.yaml delete mode 100644 dev/manifests/vela-caps/kustomization.yaml delete mode 100644 dev/manifests/vela-system/kustomization.yaml create mode 100644 examples/example.yaml delete mode 100644 manifests/vela-caps/components/application-network.yaml delete mode 100644 manifests/vela-caps/components/cloud-worker.yaml delete mode 100644 manifests/vela-caps/components/edge-worker.yaml create mode 100644 manifests/vela-caps/components/edgefarm-applications.yaml delete mode 100644 manifests/vela-caps/traits/cloud-network-participant-trait.yaml delete mode 100644 manifests/vela-caps/traits/configmap-trait.yaml delete mode 100644 manifests/vela-caps/traits/edge-network-participant-trait.yaml create mode 100644 manifests/vela-caps/traits/edgefarm-network-trait.yaml create mode 100644 manifests/vela-caps/traits/edgefarm-storage-trait.yaml delete mode 100644 manifests/vela-caps/traits/env-trait.yaml delete mode 100644 manifests/vela-caps/traits/labels-trait.yaml delete mode 100644 manifests/vela-caps/traits/resource-trait.yaml delete mode 100644 manifests/vela-caps/traits/volume-trait.yaml create mode 100644 manifests/vela-system/base/.gitignore delete mode 100644 manifests/vela-system/base/charts/vela-minimal/.helmignore delete mode 100644 manifests/vela-system/base/charts/vela-minimal/Chart.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/README.md delete mode 100644 manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_applicationrevisions.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_applications.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_componentdefinitions.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_definitionrevisions.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_healthscopes.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_policydefinitions.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_resourcetrackers.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_scopedefinitions.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_traitdefinitions.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_workflowstepdefinitions.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_workloaddefinitions.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/crds/standard.oam.dev_rollouts.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/NOTES.txt delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/_helpers.tpl delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrole.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrolebinding.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/job-createSecret.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/job-patchWebhook.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/role.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/rolebinding.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/serviceaccount.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/mutatingWebhookConfiguration.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/validatingWebhookConfiguration.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/webhookService.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/certmanager.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/cluster-gateway.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/definitions/autodetect.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/definitions/healthscopes.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/annotations.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/apply-application.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/apply-object.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/apply-remaining.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/configmap.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/cpuscaler.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/depends-on-app.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/env.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/export2config.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/export2secret.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/expose.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/health.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/hostalias.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/ingress-1-20.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/ingress.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/init-container.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/labels.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/lifecycle.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/nocalhost.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/node-affinity.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/pvc.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/raw.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/read-object.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/resource.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/rollout.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/scaler.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/service-binding.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/task.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/volumes.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/webhook-notification.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/webservice.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/worker.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/kubevela-apiserver.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/kubevela-controller.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/templates/test/test-application.yaml delete mode 100644 manifests/vela-system/base/charts/vela-minimal/values.yaml diff --git a/Makefile b/Makefile index e233810..56e9b7b 100644 --- a/Makefile +++ b/Makefile @@ -1,53 +1,40 @@ - - all: render deploy ## renders and deploys all templates into the current k8s cluster - -render: edge-worker-render cloud-worker-render app-network-render traits-render ## renders all templates -deploy: edge-worker-deploy cloud-worker-deploy app-network-deploy traits-deploy ## deploys all templates +render: traits-render components-render ## renders all templates +apply: traits-apply components-apply ## applies all templates +deploy: traits-deploy components-deploy ## deploys all templates test: ## test example, e.g. `make test dev/manifests/applications/some-app.yaml` @vela dry-run -f $(filter-out $@,$(MAKECMDGOALS)) -traits-render: - @vela def vet ./cue/traits/volume-trait.cue - @vela def render ./cue/traits/volume-trait.cue -o manifests/vela-caps/traits/volume-trait.yaml - -traits-deploy: - @vela def apply ./cue/traits/volume-trait.cue - -edge-worker-render: ## renders the edge-worker crd - @vela def vet ./cue/components/edge-worker.cue - vela def render ./cue/components/edge-worker.cue -o manifests/vela-caps/components/edge-worker.yaml - -edge-worker-deploy: ## deploys the edge-worker crd into the current k8s cluster - @vela def apply ./cue/components/edge-worker.cue +traits-render: ## renders all traits + @vela def vet cue/traits/edgefarm-network-trait.cue + @vela def render cue/traits/edgefarm-network-trait.cue -o manifests/vela-caps/traits/edgefarm-network-trait.yaml + @vela def vet cue/traits/edgefarm-storage-trait.cue + @vela def render cue/traits/edgefarm-storage-trait.cue -o manifests/vela-caps/traits/edgefarm-storage-trait.yaml -cloud-worker-render: ## renders the cloud-worker crd - @vela def vet ./cue/components/cloud-worker.cue - vela def render ./cue/components/cloud-worker.cue -o manifests/vela-caps/components/cloud-worker.yaml +traits-apply: ## applies all traits using vela cli + @vela def apply cue/traits/edgefarm-network-trait.cue + @vela def apply cue/traits/edgefarm-storage-trait.cue -cloud-worker-deploy: ## deploys the cloud-worker crd into the current k8s cluster - @vela def apply ./cue/components/cloud-worker.cue +traits-deploy: ## deploys all traits using kubectl + kubectl apply -n vela-system -f manifests/vela-caps/traits/edgefarm-network-trait.yaml + kubectl apply -n vela-system -f manifests/vela-caps/traits/edgefarm-storage-trait.yaml -app-network-render: ## renders the app-network crd - @vela def vet ./cue/components/application-network.cue - @vela def vet ./cue/traits/cloud-network-participant-trait.cue - @vela def vet ./cue/traits/edge-network-participant-trait.cue - vela def render cue/components/application-network.cue -o manifests/vela-caps/components/application-network.yaml - vela def render cue/traits/cloud-network-participant-trait.cue -o manifests/vela-caps/traits/cloud-network-participant-trait.yaml - vela def render cue/traits/edge-network-participant-trait.cue -o manifests/vela-caps/traits/edge-network-participant-trait.yaml +components-render: ## renders all components + @vela def vet cue/components/edgefarm-applications.cue + @vela def render cue/components/edgefarm-applications.cue -o manifests/vela-caps/components/edgefarm-applications.yaml +components-apply: ## applies all components using vela cli + @vela def apply cue/components/edgefarm-applications.cue +components-deploy: ## deploys all components using kubectl + kubectl apply -n vela-system -f manifests/vela-caps/components/edgefarm-applications.yaml -app-network-deploy: ## deploys the app-network crd into the current k8s cluster - @vela def apply ./cue/components/application-network.cue - @vela def apply ./cue/traits/cloud-network-participant-trait.cue - @vela def apply ./cue/traits/edge-network-participant-trait.cue install-vela: ## install kubevela - @VELA_VERSION=v1.2.4 + @VELA_VERSION=v1.8.0 @curl -fsSl https://kubevela.io/script/install.sh | bash -s ${VELA_VERSION} @vela install help: ## show help message @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make [target]\033[36m\033[0m\n"} /^[$$()% 0-9a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m\t %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) -.PHONY: all test deploy edge-worker-render cloud-worker-render app-network-render edge-worker-deploy cloud-worker-deploy app-network-deploy install-vela help +.PHONY: all render apply deploy traits-render traits-apply traits-deploy components-render components-apply components-deploy install-vela help diff --git a/cue/components/application-network.cue b/cue/components/application-network.cue deleted file mode 100644 index 015863f..0000000 --- a/cue/components/application-network.cue +++ /dev/null @@ -1,91 +0,0 @@ -"application-network": { - annotations: {} - attributes: workload: definition: { - apiVersion: "network.edgefarm.io/v1alpha1" - kind: "Network" - } - description: "" - labels: {} - type: "component" -} - -template: { - output: { - apiVersion: "network.edgefarm.io/v1alpha1" - kind: "Network" - spec: { - app: context.appName - namespace: context.namespace - streams: parameter.streams - subjects: parameter.subjects - } - info: { - participating: { - components: {} - nodes: {} - pods: {} - podsCreating: {} - podsTerminating: {} - } - mainDomain: { - standard: {} - mirror: {} - aggregate: {} - } - usedAccount: "" - } - } - parameter: { - // +usage=Subject defines the subjects of the network - subjects: [...{ - // +usage=name defines the name of the subject - name: string - // +usage=subject defines the subject - subjects: [...string] - // +usage=stream defines the stream name for the subject - stream: string - }] - - // +usage=Specify the streams to be created for the network. - streams: [...{ - // +usage=name defines the name of the stream - name: string - // +usage=location defines where the stream is located. Allowed values are: node, main - // +required - // +default="node" - location: string| *"node" - // +usage=link defines if the stream is linked to another stream - link?: { - // +usage=stream defines the name of the linked stream - stream: string - } - // +usage=config defines the configuration of the stream - config: { - // +usage=Streams are stored on the server, this can be one of many backends and all are usable in clustering mode. Allowed values are: file, memory - // +default="file" - storage?: string | *"file" - // +usage=Messages are retained either based on limits like size and age (Limits), as long as there are Consumers (Interest) or until any worker processed them (Work Queue). Allowed values are: limits, interest, workqueue - // +default="limits" - retention?: string | *"limits" - // +usage=MaxMsgsPerSubject defines the amount of messages to keep in the store for this Stream per unique subject, when exceeded oldest messages are removed, -1 for unlimited. - // +default=-1 - maxMsgsPerSubject?: int64 | *-1 - // +usage=MaxMsgs defines the amount of messages to keep in the store for this Stream, when exceeded oldest messages are removed, -1 for unlimited. - // +default=-1 - maxMsgs?: int64 | *-1 - // +usage=MaxBytes defines the combined size of all messages in a Stream, when exceeded oldest messages are removed, -1 for unlimited. - // +default=-1 - maxBytes?: int64 | *-1 - // +usage=MaxAge defines the oldest messages that can be stored in the Stream, any messages older than this period will be removed, -1 for unlimited. Supports units (s)econds, (m)inutes, (h)ours, (d)ays, (M)onths, (y)ears. - // +default="1y" - maxAge?: string | *"1y" - // +usage=MaxMsgSize defines the maximum size any single message may be to be accepted by the Stream. - // +default=-1 - maxMsgSize?: int64 | *-1 - // +usage=Discard defines which messages shall be dropped. Allowed values are: old, new - // +default="old" - discard?: string | *"old" - } - }] - } -} diff --git a/cue/components/cloud-worker.cue b/cue/components/cloud-worker.cue deleted file mode 100644 index de7b8c4..0000000 --- a/cue/components/cloud-worker.cue +++ /dev/null @@ -1,235 +0,0 @@ -package stdlib - -"cloud-worker": { - type: "component" - annotations: {} - labels: {} - description: "Describes long-running, scalable, containerized services that running at backend. They do NOT have network endpoint to receive external network traffic." - attributes: workload: definition: { - apiVersion: "apps/v1" - kind: "Deployment" - } -} -template: { - output: { - apiVersion: "apps/v1" - kind: "Deployment" - spec: { - selector: matchLabels: { - "app.kubernetes.io/component": context.name, - "app.kubernetes.io/app": context.appName, - } - - template: { - metadata: { - labels: { - "app.kubernetes.io/component": context.name, - "app.kubernetes.io/app": context.appName, - } - } - - spec: { - containers: [ - { - name: context.name - image: parameter.image - - if parameter["imagePullPolicy"] != _|_ { - imagePullPolicy: parameter.imagePullPolicy - } - - if parameter["command"] != _|_ { - command: parameter.command - } - - if parameter["args"] != _|_ { - args: parameter.args - } - - if parameter["env"] != _|_ { - env: parameter.env - } - - if parameter["ports"] != _|_ { - ports: parameter.ports - } - - if parameter["cpu"] != _|_ { - resources: { - limits: cpu: parameter.cpu - requests: cpu: parameter.cpu - } - } - - if parameter["memory"] != _|_ { - resources: { - limits: memory: parameter.memory - requests: memory: parameter.memory - } - } - - if parameter["livenessProbe"] != _|_ { - livenessProbe: parameter.livenessProbe - } - - if parameter["readinessProbe"] != _|_ { - readinessProbe: parameter.readinessProbe - } - - if parameter["securityContext"] != _|_ { - securityContext: parameter.securityContext - } - - } - - ] - - if parameter["imagePullSecrets"] != _|_ { - imagePullSecrets: [ for v in parameter.imagePullSecrets { - name: v - }, - ] - } - - if parameter["labelSelector"] != _|_ { - affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: [{ - matchExpressions: [ - for v in parameter.labelSelector { - { - key: v - operator: "Exists" - }} - ] - }] - } - } - } - } - } - - parameter: { - // +usage=Which image would you like to use for your service - // +short=i - image: string - - // +usage=labelSelector define labels that must be present on cloud nodes to receive the application. If not specified, the application will be deployed to any cloud node. - labelSelector?: [...string] - - // +usage=Specify image pull policy for your service - imagePullPolicy?: string - - // +usage=Specify image pull secrets for your service - imagePullSecrets?: [...string] - - // +usage=Commands to run in the container - command?: [...string] - - // +usage=Args to run for the command - args?: [...string] - - // +usage=Specifies the SecurityContext of the container - securityContext?: { - allowPrivilegeEscalation?: bool - capabilities?: { - add?: [...string] - drop?: [...string] - } - privileged?: bool - // procMount currently ununsed - // procMount?: string - readOnlyRootFilesystem?: bool - runAsGroup?: int - runAsNonRoot?: bool - runAsUser?: int - // seLinuxOptions currently ununsed - // seLinuxOptions?: {...} - // seccompProfile currently ununsed - // seccompProfile?: {} - // windowsOptions never used - } - - // +usage=Define arguments by using environment variables - env?: [...{ - // +usage=Environment variable name - name: string - // +usage=The value of the environment variable - value?: string - // +usage=Specifies a source the value of this var should come from - valueFrom?: { - // +usage=Selects a key of a secret in the pod's namespace - secretKeyRef: { - // +usage=The name of the secret in the pod's namespace to select from - name: string - // +usage=The key of the secret to select from. Must be a valid secret key - key: string - } - } - }] - - // +usage=Define arguments by using port mappings - ports?: [...{ - // +usage=Name of the port mapping - name?: string - // +usage=The container port to expose - containerPort: int - // +usage=The host port the container port is mapped to - hostPort: int - // +usage=The protocol of the port mapping - protocol?: string - }] - - // +usage=Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core) - cpu?: string - - // +usage=Specifies the attributes of the memory resource required for the container. - memory?: string - - // +usage=Instructions for assessing whether the container is alive. - livenessProbe?: #HealthProbe - - // +usage=Instructions for assessing whether the container is in a suitable state to serve traffic. - readinessProbe?: #HealthProbe - } - - #HealthProbe: { - - // +usage=Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. - exec?: { - // +usage=A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures. - command: [...string] - } - - // +usage=Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. - httpGet?: { - // +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed. - path: string - // +usage=The TCP socket within the container to which the HTTP GET request should be directed. - port: int - httpHeaders?: [...{ - name: string - value: string - }] - } - - // +usage=Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. - tcpSocket?: { - // +usage=The TCP socket within the container that should be probed to assess container health. - port: int - } - - // +usage=Number of seconds after the container is started before the first probe is initiated. - initialDelaySeconds: *0 | int - - // +usage=How often, in seconds, to execute the probe. - periodSeconds: *10 | int - - // +usage=Number of seconds after which the probe times out. - timeoutSeconds: *1 | int - - // +usage=Minimum consecutive successes for the probe to be considered successful after having failed. - successThreshold: *1 | int - - // +usage=Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). - failureThreshold: *3 | int - } -} diff --git a/cue/components/edge-worker.cue b/cue/components/edge-worker.cue deleted file mode 100644 index 447da86..0000000 --- a/cue/components/edge-worker.cue +++ /dev/null @@ -1,248 +0,0 @@ -package stdlib - -import "list" - -"edge-worker": { - type: "component" - annotations: {} - labels: {} - description: "Describes long-running, scalable, containerized services that running at backend. They do NOT have network endpoint to receive external network traffic." - attributes: workload: definition: { - apiVersion: "apps/v1" - kind: "DaemonSet" - } -} -template: { - output: { - apiVersion: "apps/v1" - kind: "DaemonSet" - spec: { - selector: matchLabels: { - "app.kubernetes.io/component": context.name, - "app.kubernetes.io/app": context.appName, - "node-dns.host": context.appName, - } - - template: { - metadata: { - labels: { - "app.kubernetes.io/component": context.name, - "app.kubernetes.io/app": context.appName, - "node-dns.host": context.appName, - } - } - - spec: { - containers: [ - { - name: context.name - image: parameter.image - - if parameter["imagePullPolicy"] != _|_ { - imagePullPolicy: parameter.imagePullPolicy - } - - if parameter["command"] != _|_ { - command: parameter.command - } - - if parameter["args"] != _|_ { - args: parameter.args - } - - if parameter["env"] != _|_ { - env: parameter.env - } - - if parameter["ports"] != _|_ { - ports: parameter.ports - } - - if parameter["cpu"] != _|_ { - resources: { - limits: cpu: parameter.cpu - requests: cpu: parameter.cpu - } - } - - if parameter["memory"] != _|_ { - resources: { - limits: memory: parameter.memory - requests: memory: parameter.memory - } - } - - if parameter["livenessProbe"] != _|_ { - livenessProbe: parameter.livenessProbe - } - - if parameter["readinessProbe"] != _|_ { - readinessProbe: parameter.readinessProbe - } - - if parameter["securityContext"] != _|_ { - securityContext: parameter.securityContext - } - } - - ] - - if parameter["imagePullSecrets"] != _|_ { - imagePullSecrets: [ for v in parameter.imagePullSecrets { - name: v - }, - ] - } - - affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: [{ - matchExpressions: [ - for v in list.FlattenN(#MatchExpressions, 1) { - { - key: v - operator: "Exists" - }} - ] - }] - - tolerations: [ - { - key: "edgefarm.applications" - operator: "Exists" - effect: "NoExecute" - } - ] - } - } - } - } - - parameter: { - // +usage=Which image would you like to use for your service - // +short=i - image: string - - // +usage=Specify runtimes that shall receive the application. If not specified, the application will be deployed on all runtimes. - runtime: [...string] - - // +usage=Specify image pull policy for your service - imagePullPolicy?: string - - // +usage=Specify image pull secrets for your service - imagePullSecrets?: [...string] - - // +usage=Commands to run in the container - command?: [...string] - - // +usage=Args to run for the command - args?: [...string] - - // +usage=Specifies the SecurityContext of the container - securityContext?: { - allowPrivilegeEscalation?: bool - capabilities?: { - add?: [...string] - drop?: [...string] - } - privileged?: bool - // procMount currently ununsed - // procMount?: string - readOnlyRootFilesystem?: bool - runAsGroup?: int - runAsNonRoot?: bool - runAsUser?: int - // seLinuxOptions currently ununsed - // seLinuxOptions?: {...} - // seccompProfile currently ununsed - // seccompProfile?: {} - // windowsOptions never used - } - - // +usage=Define arguments by using environment variables - env?: [...{ - // +usage=Environment variable name - name: string - // +usage=The value of the environment variable - value?: string - // +usage=Specifies a source the value of this var should come from - valueFrom?: { - // +usage=Selects a key of a secret in the pod's namespace - secretKeyRef: { - // +usage=The name of the secret in the pod's namespace to select from - name: string - // +usage=The key of the secret to select from. Must be a valid secret key - key: string - } - } - }] - - // +usage=Define arguments by using port mappings - ports?: [...{ - // +usage=Name of the port mapping - name?: string - // +usage=The container port to expose - containerPort: int - // +usage=The host port the container port is mapped to - hostPort: int - // +usage=The protocol of the port mapping - protocol?: string - }] - - - // +usage=Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core) - cpu?: string - - // +usage=Specifies the attributes of the memory resource required for the container. - memory?: string - - // +usage=Instructions for assessing whether the container is alive. - livenessProbe?: #HealthProbe - - // +usage=Instructions for assessing whether the container is in a suitable state to serve traffic. - readinessProbe?: #HealthProbe - } - - // Note: parameter.runtime MUST not be an optional property, otherwise the deployment will fail. - #MatchExpressions: [ "node-role.kubernetes.io/edge", "node-role.kubernetes.io/agent", parameter.runtime ] - - #HealthProbe: { - - // +usage=Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. - exec?: { - // +usage=A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures. - command: [...string] - } - - // +usage=Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. - httpGet?: { - // +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed. - path: string - // +usage=The TCP socket within the container to which the HTTP GET request should be directed. - port: int - httpHeaders?: [...{ - name: string - value: string - }] - } - - // +usage=Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. - tcpSocket?: { - // +usage=The TCP socket within the container that should be probed to assess container health. - port: int - } - - // +usage=Number of seconds after the container is started before the first probe is initiated. - initialDelaySeconds: *0 | int - - // +usage=How often, in seconds, to execute the probe. - periodSeconds: *10 | int - - // +usage=Number of seconds after which the probe times out. - timeoutSeconds: *1 | int - - // +usage=Minimum consecutive successes for the probe to be considered successful after having failed. - successThreshold: *1 | int - - // +usage=Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). - failureThreshold: *3 | int - } -} diff --git a/cue/components/edgefarm-applications.cue b/cue/components/edgefarm-applications.cue new file mode 100644 index 0000000..d4f14ca --- /dev/null +++ b/cue/components/edgefarm-applications.cue @@ -0,0 +1,316 @@ +"edgefarm-applications": { + type: "component" + annotations: {} + labels: {} + description: "Describes an edgefarm.application that runs on EdgeFarm edge nodes." + attributes: workload: { + definition: { + apiVersion: "apps.openyurt.io/v1alpha1" + kind: "YurtAppDaemon" + } + } +} +template: { + output: { + apiVersion: "apps.openyurt.io/v1alpha1" + kind: "YurtAppDaemon" + spec: { + if parameter["nodepoolSelector"] != _|_ { + nodepoolSelector: parameter.nodepoolSelector + } + + selector: { + matchLabels: { + "app.kubernetes.io/component": context.name, + "app.kubernetes.io/app": context.appName, + } + } + workloadTemplate: { + deploymentTemplate: { + metadata: { + labels: { + "app.kubernetes.io/component": context.name, + "app.kubernetes.io/app": context.appName, + } + } + + spec: { + replicas: 1 + selector: matchLabels: { + "app.kubernetes.io/component": context.name, + "app.kubernetes.io/app": context.appName, + } + template: { + metadata: { + labels: { + "app.kubernetes.io/component": context.name, + "app.kubernetes.io/app": context.appName, + } + } + spec: { + if parameter.tolerations != _|_ { + tolerations: [ + for k in parameter.tolerations { + if k.key != _|_ { + key: k.key + } + if k.effect != _|_ { + effect: k.effect + } + if k.value != _|_ { + value: k.value + } + operator: k.operator + if k.tolerationSeconds != _|_ { + tolerationSeconds: k.tolerationSeconds + } + }] + } + containers: [{ + name: context.name + image: parameter.image + + if parameter["imagePullPolicy"] != _|_ { + imagePullPolicy: parameter.imagePullPolicy + } + + if parameter["command"] != _|_ { + command: parameter.command + } + + if parameter["args"] != _|_ { + args: parameter.args + } + + if parameter["env"] != _|_ { + env: parameter.env + } + + if parameter["ports"] != _|_ { + ports: parameter.ports + } + + resources: { + if parameter.cpu != _|_ if parameter.memory != _|_ if parameter.requests == _|_ if parameter.limits == _|_ { + // +patchStrategy=retainKeys + requests: { + cpu: parameter.cpu + memory: parameter.memory + } + // +patchStrategy=retainKeys + limits: { + cpu: parameter.cpu + memory: parameter.memory + } + } + + if parameter.requests != _|_ { + // +patchStrategy=retainKeys + requests: { + cpu: parameter.requests.cpu + memory: parameter.requests.memory + } + } + if parameter.limits != _|_ { + // +patchStrategy=retainKeys + limits: { + cpu: parameter.limits.cpu + memory: parameter.limits.memory + } + } + } + + if parameter["livenessProbe"] != _|_ { + livenessProbe: parameter.livenessProbe + } + + if parameter["readinessProbe"] != _|_ { + readinessProbe: parameter.readinessProbe + } + + if parameter["securityContext"] != _|_ { + securityContext: parameter.securityContext + } + }] + + if parameter["imagePullSecrets"] != _|_ { + imagePullSecrets: [ for v in parameter.imagePullSecrets { + name: v + }] + } + } + } + } + } + } + } + } + + #nodepoolSelector: { + matchLabels?: [string]: string + matchExpressions?: [...{ + key: string + operator: *"In" | "NotIn" | "Exists" | "DoesNotExist" + values?: [...string] + }] + } + + #tolerations: [...{ + key?: string + operator: *"Equal" | "Exists" + value?: string + effect?: "NoSchedule" | "PreferNoSchedule" | "NoExecute" + // +usage=Specify the period of time the toleration + tolerationSeconds?: int + }] + + + parameter: { + // +usage=Which image would you like to use for your application + image: string + + // +usage=Specify a list of nodepool selectors + nodepoolSelector: #nodepoolSelector + + // +usage=Specify tolerant taint + tolerations?: #tolerations + + // +usage=Specify image pull policy for your application + imagePullPolicy?: string + + // +usage=Specify image pull secrets for your application + imagePullSecrets?: [...string] + + // +usage=Commands to run in the container + command?: [...string] + + // +usage=Args to run for the command + args?: [...string] + + // +usage=Specifies the SecurityContext of the container + securityContext?: { + // +usage=AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. + allowPrivilegeEscalation?: bool + // +uasge=The capabilities to add/drop when running containers. + capabilities?: { + // +usage=Added capabilities + add?: [...string] + // +usage=Dropped capabilities + drop?: [...string] + } + // +usage=Run container in privileged mode. + privileged?: bool + // +usage=Whether this container has a read-only root filesystem. + readOnlyRootFilesystem?: bool + // +usage=The GID to run the entrypoint of the container process. + runAsGroup?: int + // +usage=Indicates that the container must run as a non-root user. + runAsNonRoot?: bool + // +usage=The UID to run the entrypoint of the container process. + runAsUser?: int + // procMount currently ununsed + // procMount?: string + // seLinuxOptions currently ununsed + // seLinuxOptions?: {...} + // seccompProfile currently ununsed + // seccompProfile?: {} + // windowsOptions never used + } + + // +usage=Define arguments by using environment variables + env?: [...{ + // +usage=Environment variable name + name: string + // +usage=The value of the environment variable + value?: string + // +usage=Specifies a source the value of this var should come from + valueFrom?: { + // +usage=Selects a key of a secret in the pod's namespace + secretKeyRef?: { + // +usage=The name of the secret in the pod's namespace to select from + name: string + // +usage=The key of the secret to select from. Must be a valid secret key + key: string + } + // +usage=Selects a key of a config map in the pod's namespace + configMapKeyRef?: { + // +usage=The name of the config map in the pod's namespace to select from + name: string + // +usage=The key of the config map to select from. Must be a valid secret key + key: string + } + } + }] + + // +usage=Specify port mappings + ports?: [...{ + // +usage=Name of the port mapping + name?: string + // +usage=The container port to expose + containerPort: int + // +usage=The host port the container port is mapped to + hostPort: int + // +usage=The protocol of the port mapping + protocol?: string + }] + + + // +usage=Specify the amount of cpu for requests and limits + cpu?: *"0.25" | number | string + // +usage=Specify the amount of memory for requests and limits + memory?: *"256Mi" | =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$" + // +usage=Specify the resources in requests + requests?: { + // +usage=Specify the amount of cpu for requests + cpu: *"0.25" | number | string + // +usage=Specify the amount of memory for requests + memory: *"256Mi" | =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$" + } + // +usage=Specify the resources in limits + limits?: { + // +usage=Specify the amount of cpu for limits + cpu: *"0.5" | number | string + // +usage=Specify the amount of memory for limits + memory: *"512Mi" | =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$" + } + + // +usage=Instructions for assessing whether the container is alive. + livenessProbe?: #HealthProbe + // +usage=Instructions for assessing whether the container is in a suitable state to serve traffic. + readinessProbe?: #HealthProbe + } + + #HealthProbe: { + // +usage=Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. + exec?: { + // +usage=A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures. + command: [...string] + } + // +usage=Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. + httpGet?: { + // +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed. + path: string + // +usage=The TCP socket within the container to which the HTTP GET request should be directed. + port: int + httpHeaders?: [...{ + name: string + value: string + }] + } + // +usage=Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. + tcpSocket?: { + // +usage=The TCP socket within the container that should be probed to assess container health. + port: int + } + // +usage=Number of seconds after the container is started before the first probe is initiated. + initialDelaySeconds: *0 | int + // +usage=How often, in seconds, to execute the probe. + periodSeconds: *10 | int + // +usage=Number of seconds after which the probe times out. + timeoutSeconds: *1 | int + // +usage=Minimum consecutive successes for the probe to be considered successful after having failed. + successThreshold: *1 | int + // +usage=Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). + failureThreshold: *3 | int + } +} diff --git a/cue/traits/cloud-network-participant-trait.cue b/cue/traits/cloud-network-participant-trait.cue deleted file mode 100644 index 148ee4c..0000000 --- a/cue/traits/cloud-network-participant-trait.cue +++ /dev/null @@ -1,113 +0,0 @@ -"cloud-network-participant": { - type: "trait" - annotations: {} - labels: { - } - description: "Add network-participant on application for specific component that runs in the cloud." - attributes: { - appliesToWorkloads: ["*"] - podDisruptive: true - } -} -template: { - outputs: { - for k, n in parameter.networks { - "\(k)": { - apiVersion: "network.edgefarm.io/v1alpha1" - kind: "Participants" - metadata: { - name: context.appName + "." + n + "." + context.name - namespace: context.namespace - } - spec: { - component: context.name - network: n - app: context.appName - type: "cloud" - } - } - } - } - patch: { - metadata: { - annotations: { - "secret.reloader.stakater.com/reload": context.appName+"."+context.name+".dapr" - } - } - // +patchKey=name - spec: selector: matchLabels: { - for _, n in parameter.networks { - "participant.edgefarm.io/\(n)": "\(n)" - } - } - spec: template: metadata: { - labels: { - for _, n in parameter.networks { - "participant.edgefarm.io/\(n)": "\(n)" - } - } - } - spec: template: spec: { - volumes: [ - { - name: "creds", - secret: - secretName: context.appName+"."+context.name - }, - { - name: "resolv", - hostPath: - path: "/etc/resolv.conf" - type: "File" - }, - { - name: "dapr-components", - secret: - secretName: context.appName+"."+context.name+".dapr" - } - ] - } - spec: template: spec: { - // +patchKey=name - containers: [{ - "volumeMounts": [{ - "name": "creds" - "mountPath": "/nats-credentials" - }] - }, - { - "name": "dapr", - "image": "daprio/daprd:nightly-2022-03-13", - "command": [ - "./daprd", - "--dapr-grpc-port", - "3500", - "--components-path", - "/components", - "--dapr-http-port", - "3501", - "--app-port", - "50001", - "--app-protocol", - parameter.daprProtocol, - "--app-id", - context.name - ], - "volumeMounts": [ - { - "name": "dapr-components", - "mountPath": "/components", - "readOnly": true - } - ] - } - ] - } - } - - parameter: { - networks: [...string] - // +usage=Define, which protocol to use for dapr subscriptions, options: "grpc", "http". Defaults to "grpc". - daprProtocol: *"grpc" | "http" - } -} \ No newline at end of file diff --git a/cue/traits/edge-network-participant-trait.cue b/cue/traits/edge-network-participant-trait.cue deleted file mode 100644 index 0ac74b9..0000000 --- a/cue/traits/edge-network-participant-trait.cue +++ /dev/null @@ -1,170 +0,0 @@ -"edge-network-participant": { - type: "trait" - annotations: {} - labels: { - } - description: "Add network-participant on application for specific component that runs on the edge device." - attributes: { - appliesToWorkloads: ["*"] - podDisruptive: true - } -} -template: { - outputs: { - for k, n in parameter.networks { - "\(k)": { - apiVersion: "network.edgefarm.io/v1alpha1" - kind: "Participants" - metadata: { - name: context.appName + "." + n + "." + context.name - namespace: context.namespace - } - spec: { - component: context.name - network: n - app: context.appName - type: "edge" - } - } - } - } - patch: { - metadata: { - annotations: { - "secret.reloader.stakater.com/reload": context.appName+"."+context.name+".dapr" - } - } - // +patchKey=name - spec: selector: matchLabels: { - for _, n in parameter.networks { - "participant.edgefarm.io/\(n)": "\(n)" - } - } - spec: template: metadata: { - finalizers: [ - "applications.edgefarm.io/finalizer" - ] - labels: { - for _, n in parameter.networks { - "participant.edgefarm.io/\(n)": "\(n)" - } - } - } - spec: template: spec: { - volumes: [ - { - name: "creds", - secret: - secretName: context.appName+"."+context.name - }, - { - name: "resolv", - hostPath: - path: "/etc/resolv.conf" - type: "File" - }, - { - name: "dapr-components", - secret: - secretName: context.appName+"."+context.name+".dapr" - } - ] - } - spec: template: spec: { - // +patchKey=name - containers: [{ - "env": [ - { - "name": "DAPR_GRPC_ADDRESS", - "value": "localhost:3500" - }, - { - "name": "DAPR_HTTP_ADDRESS", - "value": "localhost:3501" - }, - { - "name": "NODE_NAME", - "valueFrom": - "fieldRef": - "fieldPath": "spec.nodeName" - } - ], - "volumeMounts": [ - { - "name": "creds" - "mountPath": "/nats-credentials" - } - ] - }, - { - "name": "nats-leafnode-sidecar", - "image": "ghcr.io/edgefarm/nats-leafnode-client:0.2.0-beta.2", - "command": ["/bin/sh", "-c", "env && echo $REMOTE && /client --remote $REMOTE --natsuri nats://172.17.0.1:4222 --creds /creds --component "+context.name], - "env": [ - { - "name": "REMOTE", - "valueFrom": { - "secretKeyRef": { - "name": "nats-server-info", - "key": "LEAF_ADDRESS", - "optional": false - } - } - } - ], - "lifecycle": { - "preStop": { - "exec": { - "command": ["/bin/sh", "-c", "kill -SIGUSR1 1"] - } - } - }, - "volumeMounts": [ - { - "name": "creds", - "mountPath": "/creds", - "readOnly": true - } - ], - }, - { - "name": "dapr", - "image": "daprio/daprd:1.9.5", - "command": [ - "./daprd", - "--dapr-grpc-port", - "3500", - "--components-path", - "/components", - "--dapr-http-port", - "3501", - "--app-port", - "50001", - "--app-protocol", - parameter.daprProtocol, - "--app-id", - context.name - ], - "volumeMounts": [ - { - "name": "dapr-components", - "mountPath": "/components", - "readOnly": true - }, - { - "name": "resolv", - "mountPath": "/etc/resolv.conf", - "readOnly": true - } - ] - } - ] - } - } - - parameter: { - networks: [...string] - // +usage=Define, which protocol to use for dapr subscriptions, options: "grpc", "http". Defaults to "grpc". - daprProtocol: *"grpc" | "http" - } -} \ No newline at end of file diff --git a/cue/traits/edgefarm-network-trait.cue b/cue/traits/edgefarm-network-trait.cue new file mode 100644 index 0000000..fa856b9 --- /dev/null +++ b/cue/traits/edgefarm-network-trait.cue @@ -0,0 +1,164 @@ +"edgefarm-network": { + type: "trait" + annotations: {} + labels: { + } + description: "Add edgefarm.network participation to a edgefarm.applications workload" + attributes: { + appliesToWorkloads: ["yurtappdaemons.apps"] + podDisruptive: true + } +} +template: { + patch: { + spec: workloadTemplate: deploymentTemplate: spec: template: spec: { + // +patchKey=name + // +patchStrategy=retainKeys + volumes: [ + { + name: "secret-"+parameter.network.name+"-"+parameter.network.user, + secret: + secretName: parameter.network.name+"-"+parameter.network.user + }, + { + name: "config"+parameter.network.name+"-"+parameter.network.user, + emptyDir: {} + }, + { + name: "dapr-resiliency" + configMap: + name: "resiliency-"+parameter.network.name+"-"+parameter.network.user + }, + ] + initContainers: [{ + command: ["sh", "-c", "cp /secret/dapr /config/streams.yaml && sed -i \"s#localhost#$SUBNETWORK_SVC_ADDRESS.$SUBNETWORK_NAMESPACE#g\" /config/streams.yaml && cat /config/streams.yaml && cp /resiliency-config/resiliency.yaml /config/resiliency.yaml"] + env: [{ + name: "SUBNETWORK_SVC_ADDRESS" + value: parameter.network.name+"-"+context.namespace+"-"+parameter.network.subnetwork + }, { + name: "SUBNETWORK_NAMESPACE" + valueFrom: fieldRef: fieldPath: "metadata.namespace" + }] + image: "bash:5.1-alpine3.17" + imagePullPolicy: "IfNotPresent" + name: "init-dapr-network-"+parameter.network.name+"-"+context.namespace+"-"+parameter.network.subnetwork + volumeMounts: [{ + mountPath: "/config/" + name: "config"+parameter.network.name+"-"+parameter.network.user, + }, + { + mountPath: "/secret" + name: "secret-"+parameter.network.name+"-"+parameter.network.user + }, + { + mountPath: "/resiliency-config" + name: "dapr-resiliency" + }] + }] + // +patchKey=name + containers: [{ + name: context.name, + // +patchStrategy=retainKeys + volumeMounts: [{ + name: "secret-"+parameter.network.name+"-"+parameter.network.user + mountPath: "/creds/network.creds" + subPath: "creds" + readOnly: true + }], + env: [ + { + name: "DAPR_GRPC_ADDRESS", + value: "localhost: \(parameter.daprGrpcPort)" + }, + { + name: "DAPR_HTTP_ADDRESS", + value: "localhost: \(parameter.daprHttpPort)" + }, + { + name: "NODE_NAME", + valueFrom: + fieldRef: + fieldPath: "spec.nodeName" + }, + ], + }, + { + name: "dapr", + image: "daprio/daprd:1.10.5", + command: [ + "./daprd", + "--dapr-grpc-port", + "\(parameter.daprGrpcPort)", + "--components-path", + "/config", + "--dapr-http-port", + "\(parameter.daprHttpPort)", + "--app-port", + "\(parameter.daprAppPort)", + "--app-protocol", + parameter.daprProtocol, + "--app-id", + context.name + ], + volumeMounts: [ + { + "name": "config"+parameter.network.name+"-"+parameter.network.user, + "mountPath": "/config/" + "readOnly": true + } + ] + }] + } + } + outputs: { + "resiliency-dapr-component": { + apiVersion: "v1" + kind: "ConfigMap" + metadata: { + name: "resiliency-"+parameter.network.name+"-"+parameter.network.user + } + data: { + "resiliency.yaml": """ + apiVersion: dapr.io/v1alpha1 + kind: Resiliency + metadata: + name: streams + spec: + policies: + retries: + retryForever: + policy: exponential + maxInterval: 15s + maxRetries: -1 + circuitBreakers: + pubsubCB: + maxRequests: 1 + interval: 8s + timeout: 45s + trip: consecutiveFailures > 1 + targets: + components: + streams: + outbound: + retry: retryForever + circuitBreaker: simpleCB + pubsub1: + outbound: + retry: pubsubRetry + circuitBreaker: pubsubCB + """ + } + } + } + parameter: { + network: + name: string + user: string + subnetwork: string + // +usage=Define which protocol to use for dapr connections, options: "grpc", "http". Defaults to "grpc". + daprProtocol: *"grpc" | "http" + daprGrpcPort: *3500 | int + daprHttpPort: *3501 | int + daprAppPort: *50001 | int + } +} \ No newline at end of file diff --git a/cue/traits/edgefarm-storage-trait.cue b/cue/traits/edgefarm-storage-trait.cue new file mode 100644 index 0000000..0b3213a --- /dev/null +++ b/cue/traits/edgefarm-storage-trait.cue @@ -0,0 +1,253 @@ +"edgefarm-storage": { + type: "trait" + annotations: {} + labels: {} + description: "Add storages to edgefarm.applications workload." + attributes: { + appliesToWorkloads: ["yurtappdaemons.apps"] + podDisruptive: true + } +} +template: { + volumesList: [ + if parameter.configMap != _|_ for v in parameter.configMap if v.mountPath != _|_ { + { + name: "configmap-" + v.name + configMap: { + defaultMode: v.defaultMode + name: v.name + if v.items != _|_ { + items: v.items + } + } + } + }, + if parameter.secret != _|_ for v in parameter.secret if v.mountPath != _|_ { + { + name: "secret-" + v.name + secret: { + defaultMode: v.defaultMode + secretName: v.name + if v.items != _|_ { + items: v.items + } + } + } + }, + if parameter.emptyDir != _|_ for v in parameter.emptyDir { + { + name: "emptydir-" + v.name + emptyDir: { + medium: v.medium + } + } + }, + if parameter.hostPath != _|_ for v in parameter.hostPath { + { + name: "hostpath-" + v.name + path: v.path + } + }, + ] + + volumeMountsList: [ + if parameter.configMap != _|_ for v in parameter.configMap if v.mountPath != _|_ { + { + name: "configmap-" + v.name + mountPath: v.mountPath + if v.subPath != _|_ { + subPath: v.subPath + } + } + }, + if parameter.secret != _|_ for v in parameter.secret if v.mountPath != _|_ { + { + name: "secret-" + v.name + mountPath: v.mountPath + if v.subPath != _|_ { + subPath: v.subPath + } + } + }, + if parameter.emptyDir != _|_ for v in parameter.emptyDir { + { + name: "emptydir-" + v.name + mountPath: v.mountPath + if v.subPath != _|_ { + subPath: v.subPath + } + } + }, + if parameter.hostPath != _|_ for v in parameter.hostPath { + { + name: "hostpath-" + v.name + mountPath: v.mountPath + } + }, + ] + + envList: [ + if parameter.configMap != _|_ for v in parameter.configMap if v.mountToEnv != _|_ { + { + name: v.mountToEnv.envName + valueFrom: configMapKeyRef: { + name: v.name + key: v.mountToEnv.configMapKey + } + } + }, + if parameter.configMap != _|_ for v in parameter.configMap if v.mountToEnvs != _|_ for k in v.mountToEnvs { + { + name: k.envName + valueFrom: configMapKeyRef: { + name: v.name + key: k.configMapKey + } + } + }, + if parameter.secret != _|_ for v in parameter.secret if v.mountToEnv != _|_ { + { + name: v.mountToEnv.envName + valueFrom: secretKeyRef: { + name: v.name + key: v.mountToEnv.secretKey + } + } + }, + if parameter.secret != _|_ for v in parameter.secret if v.mountToEnvs != _|_ for k in v.mountToEnvs { + { + name: k.envName + valueFrom: secretKeyRef: { + name: v.name + key: k.secretKey + } + } + }, + ] + + deDupVolumesArray: [ + for val in [ + for i, vi in volumesList { + for j, vj in volumesList if j < i && vi.name == vj.name { + _ignore: true + } + vi + }, + ] if val._ignore == _|_ { + val + }, + ] + patch: { + spec: workloadTemplate: deploymentTemplate: spec: template: spec: { + // +patchKey=name + // +patchStrategy=retainKeys + volumes: deDupVolumesArray + + // +patchKey=name + containers: [{ + // +patchKey=name + env: envList + // +patchKey=name + volumeMounts: volumeMountsList + }, ...] + } + } + outputs: { + for v in parameter.configMap { + if v.mountOnly == false { + "configmap-\(v.name)": { + apiVersion: "v1" + kind: "ConfigMap" + metadata: name: v.name + if v.data != _|_ { + data: v.data + } + } + } + } + + for v in parameter.secret { + if v.mountOnly == false { + "secret-\(v.name)": { + apiVersion: "v1" + kind: "Secret" + metadata: name: v.name + if v.data != _|_ { + data: v.data + } + if v.stringData != _|_ { + stringData: v.stringData + } + } + } + } + } + + parameter: { + // +usage=Declare config map type storage + configMap?: [...{ + name: string + mountOnly: *false | bool + mountToEnv?: { + envName: string + configMapKey: string + } + mountToEnvs?: [...{ + envName: string + configMapKey: string + }] + mountPath?: string + subPath?: string + defaultMode: *420 | int + readOnly: *false | bool + data?: {...} + items?: [...{ + key: string + path: string + mode: *511 | int + }] + }] + + // +usage=Declare secret type storage + secret?: [...{ + name: string + mountOnly: *false | bool + mountToEnv?: { + envName: string + secretKey: string + } + mountToEnvs?: [...{ + envName: string + secretKey: string + }] + mountPath: string + subPath?: string + defaultMode: *420 | int + readOnly: *false | bool + stringData?: {...} + data?: {...} + items?: [...{ + key: string + path: string + mode: *511 | int + }] + }] + + // +usage=Declare empty dir type storage + emptyDir?: [...{ + name: string + mountPath: string + subPath?: string + medium: *"" | "Memory" + }] + + // +usage=Declare host path type storage + hostPath?: [...{ + name: string + path: string + mountPath: string + type: *"Directory" | "DirectoryOrCreate" | "FileOrCreate" | "File" | "Socket" | "CharDevice" | "BlockDevice" + }] + } + +} \ No newline at end of file diff --git a/cue/traits/volume-trait.cue b/cue/traits/volume-trait.cue deleted file mode 100644 index 17f905b..0000000 --- a/cue/traits/volume-trait.cue +++ /dev/null @@ -1,120 +0,0 @@ -"volumes": { - type: "trait" - annotations: {} - labels: { - } - description: "Add volumes on K8s pod for your workload which follows the pod spec in path 'spec.template'." - attributes: { - appliesToWorkloads: ["*"] - podDisruptive: true - } -} -template: { - patch: { - // +patchKey=name - spec: template: spec: { - volumes: [ - for v in parameter.volumes { - { - name: v.name - if v.type == "pvc" { - persistentVolumeClaim: { - claimName: v.claimName - } - } - if v.type == "configMap" { - configMap: { - defaultMode: v.defaultMode - name: v.cmName - if v.items != _|_ { - items: v.items - } - } - } - if v.type == "secret" { - secret: { - defaultMode: v.defaultMode - secretName: v.secretName - if v.items != _|_ { - items: v.items - } - } - } - if v.type == "emptyDir" { - emptyDir: { - medium: v.medium - } - } - if v.type == "hostPath" { - hostPath: { - path: v.path - if v.mountType != _|_ { - type: v.mountType - } - } - } - } - }, - ] - } - spec: template: spec: { - // +patchKey=name - containers: [{ - volumeMounts: [ - for v in parameter.volumes { - { - name: v.name - mountPath: v.mountPath - readOnly: v.readOnly - } - } - ] - }] - } - } - - parameter: { - // +usage=Declare volumes and volumeMounts - volumes?: [...{ - name: string - // +usage=Specify volume type, options: "pvc","configMap","secret","emptyDir", "hostPath" - type: "pvc" | "configMap" | "secret" | "emptyDir" | "hostPath" - if type == "pvc" { - claimName: string - readOnly: *false | bool - } - if type == "configMap" { - defaultMode: *420 | int - cmName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - readOnly: *false | bool - } - if type == "secret" { - defaultMode: *420 | int - secretName: string - mountPath: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - readOnly: *false | bool - } - if type == "emptyDir" { - medium: *"" | "Memory" - readOnly: *false | bool - } - if type == "hostPath" { - path: string - mountPath: string - mountType?: "DirectoryOrCreate" | "Directory" | "FileOrCreate" | "File" | "Socket" | "CharDevice" | "BlockDevice" - readOnly: *false | bool - } - }] - } - -} \ No newline at end of file diff --git a/dev/devspace.yaml b/dev/devspace.yaml deleted file mode 100644 index ace5844..0000000 --- a/dev/devspace.yaml +++ /dev/null @@ -1,61 +0,0 @@ -version: v1beta11 - -vars: - # k3d - - name: K3D_CLUSTER_NAME - value: edgefarm-applications - - name: K3D_CONFIG - command: echo $(pwd)/k3d-config.yaml - - name: K3D_EXTRA_ARGS - value: --volume $HOME/.devspace/certs/:/etc/self-ssl/@server:* - -dependencies: - - name: k3d - source: - git: https://github.com/edgefarm/devspace.base - subPath: /environments/k3d - branch: v1.0.1 - vars: - - name: K3D_CLUSTER_NAME - value: ${K3D_CLUSTER_NAME} - - name: K3D_CONFIG - value: ${K3D_CONFIG} - - name: K3D_EXTRA_ARGS - value: ${K3D_EXTRA_ARGS} - - - name: olm - source: - git: https://github.com/edgefarm/devspace.base - subPath: /environments/olm - branch: v1.0.1 - - - name: ingress - source: - git: https://github.com/edgefarm/devspace.base - subPath: /environments/ingress - branch: v1.0.1 - - - name: edgefarm-applications - source: - path: ../ - -commands: - - name: init - command: |- - devspace run update - devspace run k3d.init - devspace run ingress.init - devspace run olm.install - devspace run ingress.install - - - name: purge - command: |- - devspace run k3d.purge - - - name: activate - command: |- - devspace run k3d.activate - - - name: update - command: |- - devspace update dependencies diff --git a/dev/k3d-config.yaml b/dev/k3d-config.yaml deleted file mode 100644 index a8605ae..0000000 --- a/dev/k3d-config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: k3d.io/v1alpha3 -kind: Simple -name: edgefarm-applications -servers: 1 -agents: 1 -kubeAPI: - hostPort: "40550" -image: rancher/k3s:v1.20.12-k3s1 -registries: - use: - - registry.k3d.localhost:5000 -options: - k3s: - extraArgs: - - arg: --disable=traefik - nodeFilters: - - server:* - # set admission plugins (e.g. for capsule) - - arg: --kube-apiserver-arg=enable-admission-plugins=PodNodeSelector,LimitRanger,ResourceQuota,MutatingAdmissionWebhook,ValidatingAdmissionWebhook - nodeFilters: - - server:* -ports: - - port: 40080:80 - nodeFilters: - - loadbalancer - - port: 40443:443 - nodeFilters: - - loadbalancer - - port: 40000:10000 - nodeFilters: - - server:* - - port: 40002:10002 - nodeFilters: - - server:* - - port: 40003:10003 - nodeFilters: - - server:* - - port: 40004:10004 - nodeFilters: - - server:* diff --git a/dev/manifests/applications/examples/README.md b/dev/manifests/applications/examples/README.md deleted file mode 100644 index a4ced47..0000000 --- a/dev/manifests/applications/examples/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# examples - -Here you can find some examples how to define and use edgefarm.applications manifests. - -# edge-nats-box.yaml - -This example shows how to define a mixed application running on both edge and cloud runtimes. -It runs a nats-box on the edge runtime. Due to the runtime field in the component spec, -the component will run on all edge runtimes that have the label `mydevice=` set. - -This example introduces the `application-network` component which allows to configure the EdgeFarm network for the application. -The trait `network-participant` defines which component can communicate through the network. -The specified network has three streams defined. -1. `cloudstream` that lives in the cloud and has specific subjects and a specific configuration (size, retention, ...). -2. `mystream` that lives on each edge runtime that is participating in the network. It has different subjects and a different stream configuration. -3. `mystream_aggregate` that lives on the cloud and collects/aggregates the data from the streams linked to that are running on the edge runtimes. - -See the [edge-nats-box.yaml](edge-nats-box.yaml) for details. - -# cloud-only.yaml - -This example shows how to define a single application running on the cloud runtime only. - -It runs a simple nginx webserver on the cloud runtime. -The specified edge-worker resource `cloud-application1` is labeled with `release: stable`. - -See the [cloud-app.yaml](cloud-app.yaml) for details. - -# edge-app.yaml - -This example shows how to define a single application running on the edge runtime only. -It runs a simple Nginx web server only on edge runtimes that have both labels `mynode` and `cheesebread` set. -The specified edge-worker resource `edge-application1` is labeled with `app: edge-application1`. - -See the [edge-app.yaml](edge-app.yaml) for details. \ No newline at end of file diff --git a/dev/manifests/applications/examples/cloud-only.yaml b/dev/manifests/applications/examples/cloud-only.yaml deleted file mode 100644 index 899eba8..0000000 --- a/dev/manifests/applications/examples/cloud-only.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: core.oam.dev/v1beta1 -kind: Application -metadata: - name: cloud-app -spec: - components: - - name: cloud-application1 - type: main-worker - properties: - image: nginx - name: simplenginx - traits: - - type: labels - properties: - "release": "stable" diff --git a/dev/manifests/applications/examples/edge-nats-box.yaml b/dev/manifests/applications/examples/edge-nats-box.yaml deleted file mode 100644 index d449d12..0000000 --- a/dev/manifests/applications/examples/edge-nats-box.yaml +++ /dev/null @@ -1,80 +0,0 @@ ---- -apiVersion: core.oam.dev/v1beta1 -kind: Application -metadata: - name: nats-box - namespace: nats-box -spec: - components: - - name: nats-box - type: edge-worker - properties: - image: natsio/nats-box:latest - name: nats-box - runtime: - - mydevice - command: - - /bin/sh - - -c - - -- - args: - - "while true; do sleep 1; done;" - traits: - - type: edge-network-participant - properties: - networks: - - nats-box-network - - - type: application-network - name: nats-box-network - properties: - subjects: - - name: data-on-leaf - subjects: - - "data.>" - stream: mystream - - name: cloudsubjects - subjects: - - "cloud.>" - stream: cloudstream - streams: - - name: mystream - location: node - config: - storage: file - retention: limits - maxMsgsPerSubject: 5000 - maxMsgs: 500 - maxBytes: 30000000 - maxAge: 3d - maxMsgSize: 500 - discard: old - - name: cloudstream - location: main - config: - storage: file - retention: limits - maxMsgsPerSubject: 5000 - maxMsgs: 500 - maxBytes: 30000000 - maxAge: 3d - maxMsgSize: 500 - discard: old - - name: mystream_aggregate - location: main - link: - stream: mystream - config: - storage: file - retention: limits - maxMsgsPerSubject: 20000 - maxMsgs: 2000 - maxBytes: 60000000 - maxAge: 2W - maxMsgSize: 2000 - discard: old ---- -apiVersion: v1 -kind: Namespace -metadata: - name: nats-box diff --git a/dev/manifests/applications/examples/edge-only.yaml b/dev/manifests/applications/examples/edge-only.yaml deleted file mode 100644 index cceffd9..0000000 --- a/dev/manifests/applications/examples/edge-only.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: core.oam.dev/v1beta1 -kind: Application -metadata: - name: edge-app -spec: - components: - - name: edge-application1 - type: edge-worker - properties: - image: nginx - name: simplenginx - runtime: - - mynode - - cheesebread - traits: - - type: labels - properties: - "app": "edge-application1" diff --git a/dev/manifests/vela-caps/kustomization.yaml b/dev/manifests/vela-caps/kustomization.yaml deleted file mode 100644 index dae1a2f..0000000 --- a/dev/manifests/vela-caps/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# yaml-language-server: https://json.schemastore.org/kustomization.json -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: vela-system - -resources: - - "../../../manifests/vela-caps" diff --git a/dev/manifests/vela-system/kustomization.yaml b/dev/manifests/vela-system/kustomization.yaml deleted file mode 100644 index a00be1c..0000000 --- a/dev/manifests/vela-system/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# yaml-language-server: https://json.schemastore.org/kustomization.json -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: vela-system - -resources: - - "../../../manifests/vela-system" diff --git a/devspace.yaml b/devspace.yaml index ce0e76c..32e5681 100644 --- a/devspace.yaml +++ b/devspace.yaml @@ -1,56 +1,42 @@ -version: v1beta11 +version: v2beta1 +name: edgefarm-applications + +functions: + wait_for_deployment: |- + #!/bin/bash + set -e + echo "wait for deployment/$1 (ns: $2)" + until kubectl wait --for=condition=available deployment/$1 -n $2 --timeout=60s 2>/dev/null; do echo -n "." && sleep 2; done + +pipelines: + deploy: | + run_pipelines deploy-vela-core + run_pipelines deploy-vela-caps + + deploy-vela-core: |- + #!/bin/bash + set -e + create_deployments vela-system + wait_for_deployment kubevela-cluster-gateway vela-system + wait_for_deployment kubevela-vela-core vela-system + + deploy-vela-caps: |- + #!/bin/bash + set -e + create_deployments vela-caps deployments: - - name: vela-system + vela-system: kubectl: kustomize: true kustomizeArgs: ["--enable-helm"] manifests: - - ./dev/manifests/vela-system + - ./manifests/vela-system namespace: vela-system - - name: vela-caps + vela-caps: kubectl: kustomize: true manifests: - - ./dev/manifests/vela-caps + - ./manifests/vela-caps namespace: vela-system - -hooks: - - name: update-caps - command: make render - events: ["before:deploy:vela-caps"] - -profiles: - - name: user - activation: - - env: - ENV: "user" - patches: - - op: add - path: "/deployments" - value: - name: cloud-app - kubectl: - kustomize: true - manifests: - - ./dev/manifests/applications/cloud-app - namespace: cloud-app - - op: add - path: "/deployments" - value: - name: mixed-app - kubectl: - kustomize: true - manifests: - - ./dev/manifests/applications/mixed-app - namespace: mixed-app - - op: add - path: "/deployments" - value: - name: mixed-app-network - kubectl: - kustomize: true - manifests: - - ./dev/manifests/applications/mixed-app-network - namespace: mixed-app-network diff --git a/examples/example.yaml b/examples/example.yaml new file mode 100644 index 0000000..0677f4d --- /dev/null +++ b/examples/example.yaml @@ -0,0 +1,35 @@ +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: myapp +spec: + components: + - name: myapp + type: edgefarm-applications + properties: + image: natsio/nats-box:latest + nodepoolSelector: + matchLabels: + mynetwork-big: "" + name: myapp + command: + - sh + - "-c" + - "sleep infinity" + traits: + - type: edgefarm-network + properties: + network: + name: mynetwork + subnetwork: big + user: bigonly + - type: edgefarm-storage + properties: + configMap: + - name: mycm + data: + foo: bar + mountPath: /mypath + emptyDir: + - name: test1 + mountPath: /test/mount/emptydir diff --git a/manifests/vela-caps/components/application-network.yaml b/manifests/vela-caps/components/application-network.yaml deleted file mode 100644 index bb04750..0000000 --- a/manifests/vela-caps/components/application-network.yaml +++ /dev/null @@ -1,94 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -apiVersion: core.oam.dev/v1beta1 -kind: ComponentDefinition -metadata: - annotations: - definition.oam.dev/description: "" - name: application-network -spec: - schematic: - cue: - template: | - output: { - apiVersion: "network.edgefarm.io/v1alpha1" - kind: "Network" - spec: { - app: context.appName - namespace: context.namespace - streams: parameter.streams - subjects: parameter.subjects - } - info: { - participating: { - components: {} - nodes: {} - pods: {} - podsCreating: {} - podsTerminating: {} - } - mainDomain: { - standard: {} - mirror: {} - aggregate: {} - } - usedAccount: "" - } - } - parameter: { - // +usage=Subject defines the subjects of the network - subjects: [...{ - // +usage=name defines the name of the subject - name: string - // +usage=subject defines the subject - subjects: [...string] - // +usage=stream defines the stream name for the subject - stream: string - }] - - // +usage=Specify the streams to be created for the network. - streams: [...{ - // +usage=name defines the name of the stream - name: string - // +usage=location defines where the stream is located. Allowed values are: node, main - // +required - // +default="node" - location: string | *"node" - // +usage=link defines if the stream is linked to another stream - link?: { - // +usage=stream defines the name of the linked stream - stream: string - } - // +usage=config defines the configuration of the stream - config: { - // +usage=Streams are stored on the server, this can be one of many backends and all are usable in clustering mode. Allowed values are: file, memory - // +default="file" - storage?: string | *"file" - // +usage=Messages are retained either based on limits like size and age (Limits), as long as there are Consumers (Interest) or until any worker processed them (Work Queue). Allowed values are: limits, interest, workqueue - // +default="limits" - retention?: string | *"limits" - // +usage=MaxMsgsPerSubject defines the amount of messages to keep in the store for this Stream per unique subject, when exceeded oldest messages are removed, -1 for unlimited. - // +default=-1 - maxMsgsPerSubject?: int64 | *-1 - // +usage=MaxMsgs defines the amount of messages to keep in the store for this Stream, when exceeded oldest messages are removed, -1 for unlimited. - // +default=-1 - maxMsgs?: int64 | *-1 - // +usage=MaxBytes defines the combined size of all messages in a Stream, when exceeded oldest messages are removed, -1 for unlimited. - // +default=-1 - maxBytes?: int64 | *-1 - // +usage=MaxAge defines the oldest messages that can be stored in the Stream, any messages older than this period will be removed, -1 for unlimited. Supports units (s)econds, (m)inutes, (h)ours, (d)ays, (M)onths, (y)ears. - // +default="1y" - maxAge?: string | *"1y" - // +usage=MaxMsgSize defines the maximum size any single message may be to be accepted by the Stream. - // +default=-1 - maxMsgSize?: int64 | *-1 - // +usage=Discard defines which messages shall be dropped. Allowed values are: old, new - // +default="old" - discard?: string | *"old" - } - }] - } - workload: - definition: - apiVersion: network.edgefarm.io/v1alpha1 - kind: Network - diff --git a/manifests/vela-caps/components/cloud-worker.yaml b/manifests/vela-caps/components/cloud-worker.yaml deleted file mode 100644 index 841e7c0..0000000 --- a/manifests/vela-caps/components/cloud-worker.yaml +++ /dev/null @@ -1,233 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -apiVersion: core.oam.dev/v1beta1 -kind: ComponentDefinition -metadata: - annotations: - definition.oam.dev/description: Describes long-running, scalable, containerized services that running at backend. They do NOT have network endpoint to receive external network traffic. - name: cloud-worker -spec: - schematic: - cue: - template: | - output: { - apiVersion: "apps/v1" - kind: "Deployment" - spec: { - selector: matchLabels: { - "app.kubernetes.io/component": context.name - "app.kubernetes.io/app": context.appName - } - - template: { - metadata: labels: { - "app.kubernetes.io/component": context.name - "app.kubernetes.io/app": context.appName - } - - spec: { - containers: [ - { - name: context.name - image: parameter.image - - if parameter["imagePullPolicy"] != _|_ { - imagePullPolicy: parameter.imagePullPolicy - } - - if parameter["command"] != _|_ { - command: parameter.command - } - - if parameter["args"] != _|_ { - args: parameter.args - } - - if parameter["env"] != _|_ { - env: parameter.env - } - - if parameter["ports"] != _|_ { - ports: parameter.ports - } - - if parameter["cpu"] != _|_ { - resources: { - limits: cpu: parameter.cpu - requests: cpu: parameter.cpu - } - } - - if parameter["memory"] != _|_ { - resources: { - limits: memory: parameter.memory - requests: memory: parameter.memory - } - } - - if parameter["livenessProbe"] != _|_ { - livenessProbe: parameter.livenessProbe - } - - if parameter["readinessProbe"] != _|_ { - readinessProbe: parameter.readinessProbe - } - - if parameter["securityContext"] != _|_ { - securityContext: parameter.securityContext - } - - }, - - ] - - if parameter["imagePullSecrets"] != _|_ { - imagePullSecrets: [ for v in parameter.imagePullSecrets { - name: v - }, - ] - } - - if parameter["labelSelector"] != _|_ { - affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: [{ - matchExpressions: [ - for v in parameter.labelSelector { - { - key: v - operator: "Exists" - }}, - ] - }] - } - } - } - } - } - parameter: { - // +usage=Which image would you like to use for your service - // +short=i - image: string - - // +usage=labelSelector define labels that must be present on cloud nodes to receive the application. If not specified, the application will be deployed to any cloud node. - labelSelector?: [...string] - - // +usage=Specify image pull policy for your service - imagePullPolicy?: string - - // +usage=Specify image pull secrets for your service - imagePullSecrets?: [...string] - - // +usage=Commands to run in the container - command?: [...string] - - // +usage=Args to run for the command - args?: [...string] - - // +usage=Specifies the SecurityContext of the container - securityContext?: { - allowPrivilegeEscalation?: bool - capabilities?: { - add?: [...string] - drop?: [...string] - } - privileged?: bool - // procMount currently ununsed - // procMount?: string - readOnlyRootFilesystem?: bool - runAsGroup?: int - runAsNonRoot?: bool - runAsUser?: int - // seLinuxOptions currently ununsed - // seLinuxOptions?: {...} - // seccompProfile currently ununsed - // seccompProfile?: {} - // windowsOptions never used - } - - // +usage=Define arguments by using environment variables - env?: [...{ - // +usage=Environment variable name - name: string - // +usage=The value of the environment variable - value?: string - // +usage=Specifies a source the value of this var should come from - valueFrom?: { - // +usage=Selects a key of a secret in the pod's namespace - secretKeyRef: { - // +usage=The name of the secret in the pod's namespace to select from - name: string - // +usage=The key of the secret to select from. Must be a valid secret key - key: string - } - } - }] - - // +usage=Define arguments by using port mappings - ports?: [...{ - // +usage=Name of the port mapping - name?: string - // +usage=The container port to expose - containerPort: int - // +usage=The host port the container port is mapped to - hostPort: int - // +usage=The protocol of the port mapping - protocol?: string - }] - - // +usage=Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core) - cpu?: string - - // +usage=Specifies the attributes of the memory resource required for the container. - memory?: string - - // +usage=Instructions for assessing whether the container is alive. - livenessProbe?: #HealthProbe - - // +usage=Instructions for assessing whether the container is in a suitable state to serve traffic. - readinessProbe?: #HealthProbe - } - #HealthProbe: { - - // +usage=Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. - exec?: { - // +usage=A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures. - command: [...string] - } - - // +usage=Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. - httpGet?: { - // +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed. - path: string - // +usage=The TCP socket within the container to which the HTTP GET request should be directed. - port: int - httpHeaders?: [...{ - name: string - value: string - }] - } - - // +usage=Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. - tcpSocket?: { - // +usage=The TCP socket within the container that should be probed to assess container health. - port: int - } - - // +usage=Number of seconds after the container is started before the first probe is initiated. - initialDelaySeconds: *0 | int - - // +usage=How often, in seconds, to execute the probe. - periodSeconds: *10 | int - - // +usage=Number of seconds after which the probe times out. - timeoutSeconds: *1 | int - - // +usage=Minimum consecutive successes for the probe to be considered successful after having failed. - successThreshold: *1 | int - - // +usage=Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). - failureThreshold: *3 | int - } - workload: - definition: - apiVersion: apps/v1 - kind: Deployment - diff --git a/manifests/vela-caps/components/edge-worker.yaml b/manifests/vela-caps/components/edge-worker.yaml deleted file mode 100644 index 9cd9788..0000000 --- a/manifests/vela-caps/components/edge-worker.yaml +++ /dev/null @@ -1,244 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -apiVersion: core.oam.dev/v1beta1 -kind: ComponentDefinition -metadata: - annotations: - definition.oam.dev/description: Describes long-running, scalable, containerized services that running at backend. They do NOT have network endpoint to receive external network traffic. - name: edge-worker -spec: - schematic: - cue: - template: | - import "list" - - output: { - apiVersion: "apps/v1" - kind: "DaemonSet" - spec: { - selector: matchLabels: { - "app.kubernetes.io/component": context.name - "app.kubernetes.io/app": context.appName - "node-dns.host": context.appName - } - - template: { - metadata: labels: { - "app.kubernetes.io/component": context.name - "app.kubernetes.io/app": context.appName - "node-dns.host": context.appName - } - - spec: { - containers: [ - { - name: context.name - image: parameter.image - - if parameter["imagePullPolicy"] != _|_ { - imagePullPolicy: parameter.imagePullPolicy - } - - if parameter["command"] != _|_ { - command: parameter.command - } - - if parameter["args"] != _|_ { - args: parameter.args - } - - if parameter["env"] != _|_ { - env: parameter.env - } - - if parameter["ports"] != _|_ { - ports: parameter.ports - } - - if parameter["cpu"] != _|_ { - resources: { - limits: cpu: parameter.cpu - requests: cpu: parameter.cpu - } - } - - if parameter["memory"] != _|_ { - resources: { - limits: memory: parameter.memory - requests: memory: parameter.memory - } - } - - if parameter["livenessProbe"] != _|_ { - livenessProbe: parameter.livenessProbe - } - - if parameter["readinessProbe"] != _|_ { - readinessProbe: parameter.readinessProbe - } - - if parameter["securityContext"] != _|_ { - securityContext: parameter.securityContext - } - }, - - ] - - if parameter["imagePullSecrets"] != _|_ { - imagePullSecrets: [ for v in parameter.imagePullSecrets { - name: v - }, - ] - } - - affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: [{ - matchExpressions: [ - for v in list.FlattenN(#MatchExpressions, 1) { - { - key: v - operator: "Exists" - }}, - ] - }] - - tolerations: [ - { - key: "edgefarm.applications" - operator: "Exists" - effect: "NoExecute" - }, - ] - } - } - } - } - parameter: { - // +usage=Which image would you like to use for your service - // +short=i - image: string - - // +usage=Specify runtimes that shall receive the application. If not specified, the application will be deployed on all runtimes. - runtime: [...string] - - // +usage=Specify image pull policy for your service - imagePullPolicy?: string - - // +usage=Specify image pull secrets for your service - imagePullSecrets?: [...string] - - // +usage=Commands to run in the container - command?: [...string] - - // +usage=Args to run for the command - args?: [...string] - - // +usage=Specifies the SecurityContext of the container - securityContext?: { - allowPrivilegeEscalation?: bool - capabilities?: { - add?: [...string] - drop?: [...string] - } - privileged?: bool - // procMount currently ununsed - // procMount?: string - readOnlyRootFilesystem?: bool - runAsGroup?: int - runAsNonRoot?: bool - runAsUser?: int - // seLinuxOptions currently ununsed - // seLinuxOptions?: {...} - // seccompProfile currently ununsed - // seccompProfile?: {} - // windowsOptions never used - } - - // +usage=Define arguments by using environment variables - env?: [...{ - // +usage=Environment variable name - name: string - // +usage=The value of the environment variable - value?: string - // +usage=Specifies a source the value of this var should come from - valueFrom?: { - // +usage=Selects a key of a secret in the pod's namespace - secretKeyRef: { - // +usage=The name of the secret in the pod's namespace to select from - name: string - // +usage=The key of the secret to select from. Must be a valid secret key - key: string - } - } - }] - - // +usage=Define arguments by using port mappings - ports?: [...{ - // +usage=Name of the port mapping - name?: string - // +usage=The container port to expose - containerPort: int - // +usage=The host port the container port is mapped to - hostPort: int - // +usage=The protocol of the port mapping - protocol?: string - }] - - // +usage=Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core) - cpu?: string - - // +usage=Specifies the attributes of the memory resource required for the container. - memory?: string - - // +usage=Instructions for assessing whether the container is alive. - livenessProbe?: #HealthProbe - - // +usage=Instructions for assessing whether the container is in a suitable state to serve traffic. - readinessProbe?: #HealthProbe - } - // Note: parameter.runtime MUST not be an optional property, otherwise the deployment will fail. - #MatchExpressions: [ "node-role.kubernetes.io/edge", "node-role.kubernetes.io/agent", parameter.runtime] - #HealthProbe: { - - // +usage=Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. - exec?: { - // +usage=A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures. - command: [...string] - } - - // +usage=Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. - httpGet?: { - // +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed. - path: string - // +usage=The TCP socket within the container to which the HTTP GET request should be directed. - port: int - httpHeaders?: [...{ - name: string - value: string - }] - } - - // +usage=Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. - tcpSocket?: { - // +usage=The TCP socket within the container that should be probed to assess container health. - port: int - } - - // +usage=Number of seconds after the container is started before the first probe is initiated. - initialDelaySeconds: *0 | int - - // +usage=How often, in seconds, to execute the probe. - periodSeconds: *10 | int - - // +usage=Number of seconds after which the probe times out. - timeoutSeconds: *1 | int - - // +usage=Minimum consecutive successes for the probe to be considered successful after having failed. - successThreshold: *1 | int - - // +usage=Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). - failureThreshold: *3 | int - } - workload: - definition: - apiVersion: apps/v1 - kind: DaemonSet - diff --git a/manifests/vela-caps/components/edgefarm-applications.yaml b/manifests/vela-caps/components/edgefarm-applications.yaml new file mode 100644 index 0000000..9fa0674 --- /dev/null +++ b/manifests/vela-caps/components/edgefarm-applications.yaml @@ -0,0 +1,16 @@ +# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. +apiVersion: core.oam.dev/v1beta1 +kind: ComponentDefinition +metadata: + annotations: + definition.oam.dev/description: Describes an edgefarm.application that runs on EdgeFarm edge nodes. + name: edgefarm-applications +spec: + schematic: + cue: + template: "output: {\n\tapiVersion: \"apps.openyurt.io/v1alpha1\"\n\tkind: \"YurtAppDaemon\"\n\tspec: {\n\t\tif parameter[\"nodepoolSelector\"] != _|_ {\n\t\t\tnodepoolSelector: parameter.nodepoolSelector\n\t\t}\n\n\t\tselector: matchLabels: {\n\t\t\t\"app.kubernetes.io/component\": context.name\n\t\t\t\"app.kubernetes.io/app\": context.appName\n\t\t}\n\t\tworkloadTemplate: deploymentTemplate: {\n\t\t\tmetadata: labels: {\n\t\t\t\t\"app.kubernetes.io/component\": context.name\n\t\t\t\t\"app.kubernetes.io/app\": context.appName\n\t\t\t}\n\n\t\t\tspec: {\n\t\t\t\treplicas: 1\n\t\t\t\tselector: matchLabels: {\n\t\t\t\t\t\"app.kubernetes.io/component\": context.name\n\t\t\t\t\t\"app.kubernetes.io/app\": context.appName\n\t\t\t\t}\n\t\t\t\ttemplate: {\n\t\t\t\t\tmetadata: labels: {\n\t\t\t\t\t\t\"app.kubernetes.io/component\": context.name\n\t\t\t\t\t\t\"app.kubernetes.io/app\": context.appName\n\t\t\t\t\t}\n\t\t\t\t\tspec: {\n\t\t\t\t\t\tif parameter.tolerations != _|_ {\n\t\t\t\t\t\t\ttolerations: [\n\t\t\t\t\t\t\t\tfor k in parameter.tolerations {\n\t\t\t\t\t\t\t\t\tif k.key != _|_ {\n\t\t\t\t\t\t\t\t\t\tkey: k.key\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif k.effect != _|_ {\n\t\t\t\t\t\t\t\t\t\teffect: k.effect\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif k.value != _|_ {\n\t\t\t\t\t\t\t\t\t\tvalue: k.value\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\toperator: k.operator\n\t\t\t\t\t\t\t\t\tif k.tolerationSeconds != _|_ {\n\t\t\t\t\t\t\t\t\t\ttolerationSeconds: k.tolerationSeconds\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}]\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontainers: [{\n\t\t\t\t\t\t\tname: context.name\n\t\t\t\t\t\t\timage: parameter.image\n\t\t\t\t\t\t\t// env: []\n\n\t\t\t\t\t\t\tif parameter[\"imagePullPolicy\"] != _|_ {\n\t\t\t\t\t\t\t\timagePullPolicy: parameter.imagePullPolicy\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif parameter[\"command\"] != _|_ {\n\t\t\t\t\t\t\t\tcommand: parameter.command\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif parameter[\"args\"] != _|_ {\n\t\t\t\t\t\t\t\targs: parameter.args\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif parameter[\"env\"] != _|_ {\n\t\t\t\t\t\t\t\tenv: parameter.env\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif parameter[\"ports\"] != _|_ {\n\t\t\t\t\t\t\t\tports: parameter.ports\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tresources: {\n\t\t\t\t\t\t\t\tif parameter.cpu != _|_ if parameter.memory != _|_ if parameter.requests == _|_ if parameter.limits == _|_ {\n\t\t\t\t\t\t\t\t\t// +patchStrategy=retainKeys\n\t\t\t\t\t\t\t\t\trequests: {\n\t\t\t\t\t\t\t\t\t\tcpu: parameter.cpu\n\t\t\t\t\t\t\t\t\t\tmemory: parameter.memory\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// +patchStrategy=retainKeys\n\t\t\t\t\t\t\t\t\tlimits: {\n\t\t\t\t\t\t\t\t\t\tcpu: parameter.cpu\n\t\t\t\t\t\t\t\t\t\tmemory: parameter.memory\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif parameter.requests != _|_ {\n\t\t\t\t\t\t\t\t\t// +patchStrategy=retainKeys\n\t\t\t\t\t\t\t\t\trequests: {\n\t\t\t\t\t\t\t\t\t\tcpu: parameter.requests.cpu\n\t\t\t\t\t\t\t\t\t\tmemory: parameter.requests.memory\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif parameter.limits != _|_ {\n\t\t\t\t\t\t\t\t\t// +patchStrategy=retainKeys\n\t\t\t\t\t\t\t\t\tlimits: {\n\t\t\t\t\t\t\t\t\t\tcpu: parameter.limits.cpu\n\t\t\t\t\t\t\t\t\t\tmemory: parameter.limits.memory\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif parameter[\"livenessProbe\"] != _|_ {\n\t\t\t\t\t\t\t\tlivenessProbe: parameter.livenessProbe\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif parameter[\"readinessProbe\"] != _|_ {\n\t\t\t\t\t\t\t\treadinessProbe: parameter.readinessProbe\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif parameter[\"securityContext\"] != _|_ {\n\t\t\t\t\t\t\t\tsecurityContext: parameter.securityContext\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}]\n\n\t\t\t\t\t\tif parameter[\"imagePullSecrets\"] != _|_ {\n\t\t\t\t\t\t\timagePullSecrets: [ for v in parameter.imagePullSecrets {\n\t\t\t\t\t\t\t\tname: v\n\t\t\t\t\t\t\t}]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n#nodepoolSelector: {\n\tmatchLabels?: [string]: string\n\tmatchExpressions?: [...{\n\t\tkey: string\n\t\toperator: *\"In\" | \"NotIn\" | \"Exists\" | \"DoesNotExist\"\n\t\tvalues?: [...string]\n\t}]\n}\n\n#tolerations: [...{\n\tkey?: string\n\toperator: *\"Equal\" | \"Exists\"\n\tvalue?: string\n\teffect?: \"NoSchedule\" | \"PreferNoSchedule\" | \"NoExecute\"\n\t// +usage=Specify the period of time the toleration\n\ttolerationSeconds?: int\n}]\n\nparameter: {\n\t// +usage=Which image would you like to use for your application\n\timage: string\n\n\t// +usage=Specify a list of nodepool selectors\n\tnodepoolSelector: #nodepoolSelector\n\n\t// +usage=Specify tolerant taint\n\ttolerations?: #tolerations\n\n\t// +usage=Specify image pull policy for your application\n\timagePullPolicy?: string\n\n\t// +usage=Specify image pull secrets for your application\n\timagePullSecrets?: [...string]\n\n\t// +usage=Commands to run in the container\n\tcommand?: [...string]\n\n\t// +usage=Args to run for the command\n\targs?: [...string]\n\n\t// +usage=Specifies the SecurityContext of the container\n\tsecurityContext?: {\n\t\t// +usage=AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process.\n\t\tallowPrivilegeEscalation?: bool\n\t\t// +uasge=The capabilities to add/drop when running containers. \n\t\tcapabilities?: {\n\t\t\t// +usage=Added capabilities\n\t\t\tadd?: [...string]\n\t\t\t// +usage=Dropped capabilities\n\t\t\tdrop?: [...string]\n\t\t}\n\t\t// +usage=Run container in privileged mode. \n\t\tprivileged?: bool\n\t\t// +usage=Whether this container has a read-only root filesystem.\n\t\treadOnlyRootFilesystem?: bool\n\t\t// +usage=The GID to run the entrypoint of the container process.\n\t\trunAsGroup?: int\n\t\t// +usage=Indicates that the container must run as a non-root user.\n\t\trunAsNonRoot?: bool\n\t\t// +usage=The UID to run the entrypoint of the container process. \n\t\trunAsUser?: int\n\t\t// procMount currently ununsed\n\t\t// procMount?: string\n\t\t// seLinuxOptions currently ununsed\n\t\t// seLinuxOptions?: {...}\n\t\t// seccompProfile currently ununsed\n\t\t// seccompProfile?: {}\n\t\t// windowsOptions never used\n\t}\n\n\t// +usage=Define arguments by using environment variables\n\tenv?: [...{\n\t\t// +usage=Environment variable name\n\t\tname: string\n\t\t// +usage=The value of the environment variable\n\t\tvalue?: string\n\t\t// +usage=Specifies a source the value of this var should come from\n\t\tvalueFrom?: {\n\t\t\t// +usage=Selects a key of a secret in the pod's namespace\n\t\t\tsecretKeyRef?: {\n\t\t\t\t// +usage=The name of the secret in the pod's namespace to select from\n\t\t\t\tname: string\n\t\t\t\t// +usage=The key of the secret to select from. Must be a valid secret key\n\t\t\t\tkey: string\n\t\t\t}\n\t\t\t// +usage=Selects a key of a config map in the pod's namespace\n\t\t\tconfigMapKeyRef?: {\n\t\t\t\t// +usage=The name of the config map in the pod's namespace to select from\n\t\t\t\tname: string\n\t\t\t\t// +usage=The key of the config map to select from. Must be a valid secret key\n\t\t\t\tkey: string\n\t\t\t}\n\t\t}\n\t}]\n\n\t// +usage=Specify port mappings\n\tports?: [...{\n\t\t// +usage=Name of the port mapping\n\t\tname?: string\n\t\t// +usage=The container port to expose\n\t\tcontainerPort: int\n\t\t// +usage=The host port the container port is mapped to\n\t\thostPort: int\n\t\t// +usage=The protocol of the port mapping\n\t\tprotocol?: string\n\t}]\n\n\t// +usage=Specify the amount of cpu for requests and limits\n\tcpu?: *\"0.25\" | number | string\n\t// +usage=Specify the amount of memory for requests and limits\n\tmemory?: *\"256Mi\" | =~\"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$\"\n\t// +usage=Specify the resources in requests\n\trequests?: {\n\t\t// +usage=Specify the amount of cpu for requests\n\t\tcpu: *\"0.25\" | number | string\n\t\t// +usage=Specify the amount of memory for requests\n\t\tmemory: *\"256Mi\" | =~\"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$\"\n\t}\n\t// +usage=Specify the resources in limits\n\tlimits?: {\n\t\t// +usage=Specify the amount of cpu for limits\n\t\tcpu: *\"0.5\" | number | string\n\t\t// +usage=Specify the amount of memory for limits\n\t\tmemory: *\"512Mi\" | =~\"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$\"\n\t}\n\n\t// +usage=Instructions for assessing whether the container is alive.\n\tlivenessProbe?: #HealthProbe\n\t// +usage=Instructions for assessing whether the container is in a suitable state to serve traffic.\n\treadinessProbe?: #HealthProbe\n}\n\n#HealthProbe: {\n\t// +usage=Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute.\n\texec?: {\n\t\t// +usage=A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures.\n\t\tcommand: [...string]\n\t}\n\t// +usage=Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute.\n\thttpGet?: {\n\t\t// +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed.\n\t\tpath: string\n\t\t// +usage=The TCP socket within the container to which the HTTP GET request should be directed.\n\t\tport: int\n\t\thttpHeaders?: [...{\n\t\t\tname: string\n\t\t\tvalue: string\n\t\t}]\n\t}\n\t// +usage=Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute.\n\ttcpSocket?: {\n\t\t// +usage=The TCP socket within the container that should be probed to assess container health.\n\t\tport: int\n\t}\n\t// +usage=Number of seconds after the container is started before the first probe is initiated.\n\tinitialDelaySeconds: *0 | int\n\t// +usage=How often, in seconds, to execute the probe.\n\tperiodSeconds: *10 | int\n\t// +usage=Number of seconds after which the probe times out.\n\ttimeoutSeconds: *1 | int\n\t// +usage=Minimum consecutive successes for the probe to be considered successful after having failed.\n\tsuccessThreshold: *1 | int\n\t// +usage=Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe).\n\tfailureThreshold: *3 | int\n}\n" + workload: + definition: + apiVersion: apps.openyurt.io/v1alpha1 + kind: YurtAppDaemon + diff --git a/manifests/vela-caps/kustomization.yaml b/manifests/vela-caps/kustomization.yaml index 13c42a1..8aa2b02 100644 --- a/manifests/vela-caps/kustomization.yaml +++ b/manifests/vela-caps/kustomization.yaml @@ -3,13 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ./components/application-network.yaml - - ./components/edge-worker.yaml - - ./components/cloud-worker.yaml - - ./traits/cloud-network-participant-trait.yaml - - ./traits/configmap-trait.yaml - - ./traits/edge-network-participant-trait.yaml - - ./traits/env-trait.yaml - - ./traits/labels-trait.yaml - - ./traits/resource-trait.yaml - - ./traits/volume-trait.yaml + - ./components/edgefarm-applications.yaml + - ./traits/edgefarm-network-trait.yaml + - ./traits/edgefarm-storage-trait.yaml diff --git a/manifests/vela-caps/traits/cloud-network-participant-trait.yaml b/manifests/vela-caps/traits/cloud-network-participant-trait.yaml deleted file mode 100644 index 7dbef0e..0000000 --- a/manifests/vela-caps/traits/cloud-network-participant-trait.yaml +++ /dev/null @@ -1,103 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add network-participant on application for specific component that runs in the cloud. - name: cloud-network-participant -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - outputs: { - for k, n in parameter.networks { - "\(k)": { - apiVersion: "network.edgefarm.io/v1alpha1" - kind: "Participants" - metadata: { - name: context.appName + "." + n + "." + context.name - namespace: context.namespace - } - spec: { - component: context.name - network: n - app: context.appName - type: "cloud" - } - } - } - } - patch: { - metadata: annotations: "secret.reloader.stakater.com/reload": context.appName + "." + context.name + ".dapr" - // +patchKey=name - spec: selector: matchLabels: { - for _, n in parameter.networks { - "participant.edgefarm.io/\(n)": "\(n)" - } - } - spec: template: metadata: labels: { - for _, n in parameter.networks { - "participant.edgefarm.io/\(n)": "\(n)" - } - } - spec: template: spec: volumes: [ - { - name: "creds" - secret: secretName: context.appName + "." + context.name - }, - { - name: "resolv" - hostPath: path: "/etc/resolv.conf" - type: "File" - }, - { - name: "dapr-components" - secret: secretName: context.appName + "." + context.name + ".dapr" - }, - ] - spec: template: spec: { - // +patchKey=name - containers: [{ - volumeMounts: [{ - name: "creds" - mountPath: "/nats-credentials" - }] - }, - { - name: "dapr" - image: "daprio/daprd:nightly-2022-03-13" - command: [ - "./daprd", - "--dapr-grpc-port", - "3500", - "--components-path", - "/components", - "--dapr-http-port", - "3501", - "--app-port", - "50001", - "--app-protocol", - parameter.daprProtocol, - "--app-id", - context.name, - ] - volumeMounts: [ - { - name: "dapr-components" - mountPath: "/components" - readOnly: true - }, - ] - }, - ] - } - } - parameter: { - networks: [...string] - // +usage=Define, which protocol to use for dapr subscriptions, options: "grpc", "http". Defaults to "grpc". - daprProtocol: *"grpc" | "http" - } - diff --git a/manifests/vela-caps/traits/configmap-trait.yaml b/manifests/vela-caps/traits/configmap-trait.yaml deleted file mode 100644 index 005e9d7..0000000 --- a/manifests/vela-caps/traits/configmap-trait.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Create/Attach configmaps on K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: configmap -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - patch: spec: template: spec: { - containers: [{ - // +patchKey=name - volumeMounts: [ - for v in parameter.volumes { - { - name: "volume-\(v.name)" - mountPath: v.mountPath - readOnly: v.readOnly - } - }, - ] - }, ...] - // +patchKey=name - volumes: [ - for v in parameter.volumes { - { - name: "volume-\(v.name)" - configMap: name: v.name - } - }, - ] - } - outputs: { - for v in parameter.volumes { - if v.data != _|_ { - "\(v.name)": { - apiVersion: "v1" - kind: "ConfigMap" - metadata: name: v.name - data: v.data - } - } - } - } - parameter: { - // +usage=Specify mounted configmap names and their mount paths in the container - volumes: [...{ - name: string - mountPath: string - readOnly: *false | bool - data?: [string]: string - }] - } diff --git a/manifests/vela-caps/traits/edge-network-participant-trait.yaml b/manifests/vela-caps/traits/edge-network-participant-trait.yaml deleted file mode 100644 index fe55557..0000000 --- a/manifests/vela-caps/traits/edge-network-participant-trait.yaml +++ /dev/null @@ -1,152 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add network-participant on application for specific component that runs on the edge device. - name: edge-network-participant -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - outputs: { - for k, n in parameter.networks { - "\(k)": { - apiVersion: "network.edgefarm.io/v1alpha1" - kind: "Participants" - metadata: { - name: context.appName + "." + n + "." + context.name - namespace: context.namespace - } - spec: { - component: context.name - network: n - app: context.appName - type: "edge" - } - } - } - } - patch: { - metadata: annotations: "secret.reloader.stakater.com/reload": context.appName + "." + context.name + ".dapr" - // +patchKey=name - spec: selector: matchLabels: { - for _, n in parameter.networks { - "participant.edgefarm.io/\(n)": "\(n)" - } - } - spec: template: metadata: { - finalizers: [ - "applications.edgefarm.io/finalizer", - ] - labels: { - for _, n in parameter.networks { - "participant.edgefarm.io/\(n)": "\(n)" - } - } - } - spec: template: spec: volumes: [ - { - name: "creds" - secret: secretName: context.appName + "." + context.name - }, - { - name: "resolv" - hostPath: path: "/etc/resolv.conf" - type: "File" - }, - { - name: "dapr-components" - secret: secretName: context.appName + "." + context.name + ".dapr" - }, - ] - spec: template: spec: { - // +patchKey=name - containers: [{ - env: [ - { - name: "DAPR_GRPC_ADDRESS" - value: "localhost:3500" - }, - { - name: "DAPR_HTTP_ADDRESS" - value: "localhost:3501" - }, - { - name: "NODE_NAME" - valueFrom: fieldRef: fieldPath: "spec.nodeName" - }, - ] - volumeMounts: [ - { - name: "creds" - mountPath: "/nats-credentials" - }, - ] - }, - { - name: "nats-leafnode-sidecar" - image: "ghcr.io/edgefarm/nats-leafnode-client:0.2.0-beta.2" - command: ["/bin/sh", "-c", "env && echo $REMOTE && /client --remote $REMOTE --natsuri nats://172.17.0.1:4222 --creds /creds --component " + context.name] - env: [ - { - name: "REMOTE" - valueFrom: secretKeyRef: { - name: "nats-server-info" - key: "LEAF_ADDRESS" - optional: false - } - }, - ] - lifecycle: preStop: exec: command: ["/bin/sh", "-c", "kill -SIGUSR1 1"] - volumeMounts: [ - { - name: "creds" - mountPath: "/creds" - readOnly: true - }, - ] - }, - { - name: "dapr" - image: "daprio/daprd:1.9.5" - command: [ - "./daprd", - "--dapr-grpc-port", - "3500", - "--components-path", - "/components", - "--dapr-http-port", - "3501", - "--app-port", - "50001", - "--app-protocol", - parameter.daprProtocol, - "--app-id", - context.name, - ] - volumeMounts: [ - { - name: "dapr-components" - mountPath: "/components" - readOnly: true - }, - { - name: "resolv" - mountPath: "/etc/resolv.conf" - readOnly: true - }, - ] - }, - ] - } - } - parameter: { - networks: [...string] - // +usage=Define, which protocol to use for dapr subscriptions, options: "grpc", "http". Defaults to "grpc". - daprProtocol: *"grpc" | "http" - } - diff --git a/manifests/vela-caps/traits/edgefarm-network-trait.yaml b/manifests/vela-caps/traits/edgefarm-network-trait.yaml new file mode 100644 index 0000000..3a0a5c6 --- /dev/null +++ b/manifests/vela-caps/traits/edgefarm-network-trait.yaml @@ -0,0 +1,152 @@ +# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: + annotations: + definition.oam.dev/description: Add edgefarm.network participation to a edgefarm.applications workload + name: edgefarm-network +spec: + appliesToWorkloads: + - yurtappdaemons.apps + podDisruptive: true + schematic: + cue: + template: | + patch: spec: workloadTemplate: deploymentTemplate: spec: template: spec: { + // +patchStrategy=retainKeys + volumes: [ + { + name: "secret-" + parameter.network.name + "-" + parameter.network.user + secret: secretName: parameter.network.name + "-" + parameter.network.user + }, + { + name: "config" + emptyDir: {} + }, + { + name: "dapr-resiliency" + configMap: name: "resiliency-" + parameter.network.name + "-" + parameter.network.user + }, + ] + initContainers: [{ + command: ["sh", "-c", "cp /secret/dapr /config/streams.yaml && sed -i \"s#localhost#$SUBNETWORK_SVC_ADDRESS.$SUBNETWORK_NAMESPACE#g\" /config/streams.yaml && cat /config/streams.yaml && cp /resiliency-config/resiliency.yaml /config/resiliency.yaml"] + env: [{ + name: "SUBNETWORK_SVC_ADDRESS" + value: parameter.network.name + "-" + context.namespace + "-" + parameter.network.subnetwork + }, { + name: "SUBNETWORK_NAMESPACE" + valueFrom: fieldRef: fieldPath: "metadata.namespace" + }] + image: "bash:5.1-alpine3.17" + imagePullPolicy: "IfNotPresent" + name: "init-dapr-network-" + parameter.network.name + "-" + context.namespace + "-" + parameter.network.subnetwork + volumeMounts: [{ + mountPath: "/config/" + name: "config" + }, + { + mountPath: "/secret" + name: "secret-" + parameter.network.name + "-" + parameter.network.user + }, + { + mountPath: "/resiliency-config" + name: "dapr-resiliency" + }] + }] + // +patchKey=name + containers: [{ + name: context.name + // +patchStrategy=retainKeys + volumeMounts: [{ + name: "secret-" + parameter.network.name + "-" + parameter.network.user + mountPath: "/creds/network.creds" + subPath: "creds" + readOnly: true + }] + env: [ + { + name: "DAPR_GRPC_ADDRESS" + value: "localhost: \(parameter.daprGrpcPort)" + }, + { + name: "DAPR_HTTP_ADDRESS" + value: "localhost: \(parameter.daprHttpPort)" + }, + { + name: "NODE_NAME" + valueFrom: fieldRef: fieldPath: "spec.nodeName" + }, + ] + }, + { + name: "dapr" + image: "daprio/daprd:1.10.5" + command: [ + "./daprd", + "--dapr-grpc-port", + "\(parameter.daprGrpcPort)", + "--components-path", + "/config", + "--dapr-http-port", + "\(parameter.daprHttpPort)", + "--app-port", + "\(parameter.daprAppPort)", + "--app-protocol", + parameter.daprProtocol, + "--app-id", + context.name, + ] + volumeMounts: [ + { + name: "config" + mountPath: "/config/" + readOnly: true + }, + ] + }] + } + outputs: "resiliency-dapr-component": { + apiVersion: "v1" + kind: "ConfigMap" + metadata: name: "resiliency-" + parameter.network.name + "-" + parameter.network.user + data: "resiliency.yaml": """ + apiVersion: dapr.io/v1alpha1 + kind: Resiliency + metadata: + name: streams + spec: + policies: + retries: + retryForever: + policy: exponential + maxInterval: 15s + maxRetries: -1 + circuitBreakers: + pubsubCB: + maxRequests: 1 + interval: 8s + timeout: 45s + trip: consecutiveFailures > 1 + targets: + components: + streams: + outbound: + retry: retryForever + circuitBreaker: simpleCB + pubsub1: + outbound: + retry: pubsubRetry + circuitBreaker: pubsubCB + """ + } + parameter: { + network: name: string + user: string + subnetwork: string + // +usage=Define which protocol to use for dapr connections, options: "grpc", "http". Defaults to "grpc". + daprProtocol: *"grpc" | "http" + daprGrpcPort: *3500 | int + daprHttpPort: *3501 | int + daprAppPort: *50001 | int + } + diff --git a/manifests/vela-caps/traits/edgefarm-storage-trait.yaml b/manifests/vela-caps/traits/edgefarm-storage-trait.yaml new file mode 100644 index 0000000..a062b3d --- /dev/null +++ b/manifests/vela-caps/traits/edgefarm-storage-trait.yaml @@ -0,0 +1,249 @@ +# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: + annotations: + definition.oam.dev/description: Add storages to edgefarm.applications workload. + name: edgefarm-storage +spec: + appliesToWorkloads: + - yurtappdaemons.apps + podDisruptive: true + schematic: + cue: + template: | + volumesList: [ + if parameter.configMap != _|_ for v in parameter.configMap if v.mountPath != _|_ { + { + name: "configmap-" + v.name + configMap: { + defaultMode: v.defaultMode + name: v.name + if v.items != _|_ { + items: v.items + } + } + } + }, + if parameter.secret != _|_ for v in parameter.secret if v.mountPath != _|_ { + { + name: "secret-" + v.name + secret: { + defaultMode: v.defaultMode + secretName: v.name + if v.items != _|_ { + items: v.items + } + } + } + }, + if parameter.emptyDir != _|_ for v in parameter.emptyDir { + { + name: "emptydir-" + v.name + emptyDir: medium: v.medium + } + }, + if parameter.hostPath != _|_ for v in parameter.hostPath { + { + name: "hostpath-" + v.name + path: v.path + } + }, + ] + + volumeMountsList: [ + if parameter.configMap != _|_ for v in parameter.configMap if v.mountPath != _|_ { + { + name: "configmap-" + v.name + mountPath: v.mountPath + if v.subPath != _|_ { + subPath: v.subPath + } + } + }, + if parameter.secret != _|_ for v in parameter.secret if v.mountPath != _|_ { + { + name: "secret-" + v.name + mountPath: v.mountPath + if v.subPath != _|_ { + subPath: v.subPath + } + } + }, + if parameter.emptyDir != _|_ for v in parameter.emptyDir { + { + name: "emptydir-" + v.name + mountPath: v.mountPath + if v.subPath != _|_ { + subPath: v.subPath + } + } + }, + if parameter.hostPath != _|_ for v in parameter.hostPath { + { + name: "hostpath-" + v.name + mountPath: v.mountPath + } + }, + ] + + envList: [ + if parameter.configMap != _|_ for v in parameter.configMap if v.mountToEnv != _|_ { + { + name: v.mountToEnv.envName + valueFrom: configMapKeyRef: { + name: v.name + key: v.mountToEnv.configMapKey + } + } + }, + if parameter.configMap != _|_ for v in parameter.configMap if v.mountToEnvs != _|_ for k in v.mountToEnvs { + { + name: k.envName + valueFrom: configMapKeyRef: { + name: v.name + key: k.configMapKey + } + } + }, + if parameter.secret != _|_ for v in parameter.secret if v.mountToEnv != _|_ { + { + name: v.mountToEnv.envName + valueFrom: secretKeyRef: { + name: v.name + key: v.mountToEnv.secretKey + } + } + }, + if parameter.secret != _|_ for v in parameter.secret if v.mountToEnvs != _|_ for k in v.mountToEnvs { + { + name: k.envName + valueFrom: secretKeyRef: { + name: v.name + key: k.secretKey + } + } + }, + ] + + deDupVolumesArray: [ + for val in [ + for i, vi in volumesList { + for j, vj in volumesList if j < i && vi.name == vj.name { + _ignore: true + } + vi + }, + ] if val._ignore == _|_ { + val + }, + ] + patch: spec: workloadTemplate: deploymentTemplate: spec: template: spec: { + // +patchStrategy=retainKeys + volumes: deDupVolumesArray + + containers: [{ + name: context.name + env: envList + // +patchStrategy=retainKeys + volumeMounts: volumeMountsList + }, ...] + } + outputs: { + for v in parameter.configMap { + if v.mountOnly == false { + "configmap-\(v.name)": { + apiVersion: "v1" + kind: "ConfigMap" + metadata: name: v.name + if v.data != _|_ { + data: v.data + } + } + } + } + + for v in parameter.secret { + if v.mountOnly == false { + "secret-\(v.name)": { + apiVersion: "v1" + kind: "Secret" + metadata: name: v.name + if v.data != _|_ { + data: v.data + } + if v.stringData != _|_ { + stringData: v.stringData + } + } + } + } + } + + parameter: { + // +usage=Declare config map type storage + configMap?: [...{ + name: string + mountOnly: *false | bool + mountToEnv?: { + envName: string + configMapKey: string + } + mountToEnvs?: [...{ + envName: string + configMapKey: string + }] + mountPath?: string + subPath?: string + defaultMode: *420 | int + readOnly: *false | bool + data?: {...} + items?: [...{ + key: string + path: string + mode: *511 | int + }] + }] + + // +usage=Declare secret type storage + secret?: [...{ + name: string + mountOnly: *false | bool + mountToEnv?: { + envName: string + secretKey: string + } + mountToEnvs?: [...{ + envName: string + secretKey: string + }] + mountPath: string + subPath?: string + defaultMode: *420 | int + readOnly: *false | bool + stringData?: {...} + data?: {...} + items?: [...{ + key: string + path: string + mode: *511 | int + }] + }] + + // +usage=Declare empty dir type storage + emptyDir?: [...{ + name: string + mountPath: string + subPath?: string + medium: *"" | "Memory" + }] + + // +usage=Declare host path type storage + hostPath?: [...{ + name: string + path: string + mountPath: string + type: *"Directory" | "DirectoryOrCreate" | "FileOrCreate" | "File" | "Socket" | "CharDevice" | "BlockDevice" + }] + } + diff --git a/manifests/vela-caps/traits/env-trait.yaml b/manifests/vela-caps/traits/env-trait.yaml deleted file mode 100644 index 0d86c55..0000000 --- a/manifests/vela-caps/traits/env-trait.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: add env on K8s pod for your workload which follows the pod spec in path 'spec.template.' - name: env -spec: - appliesToWorkloads: - - '*' - schematic: - cue: - template: | - patch: spec: template: spec: { - // +patchKey=name - containers: [{ - name: context.name - // +patchStrategy=retainKeys - env: [ - for k, v in parameter.env { - name: k - value: v - }, - ] - }] - } - parameter: env: [string]: string diff --git a/manifests/vela-caps/traits/labels-trait.yaml b/manifests/vela-caps/traits/labels-trait.yaml deleted file mode 100644 index 0b7dcea..0000000 --- a/manifests/vela-caps/traits/labels-trait.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add labels on K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: labels -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - patch: { - metadata: labels: { - for k, v in parameter { - "\(k)": v - } - } - spec: template: metadata: labels: { - for k, v in parameter { - "\(k)": v - } - } - } - parameter: [string]: string diff --git a/manifests/vela-caps/traits/resource-trait.yaml b/manifests/vela-caps/traits/resource-trait.yaml deleted file mode 100644 index a1c46f4..0000000 --- a/manifests/vela-caps/traits/resource-trait.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add resource requests and limits on K8s pod for your workload which follows the pod spec in path 'spec.template.' - name: resource -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - patch: spec: template: spec: containers: [{ - metadata: annotations: "customized-resource": "cpu:\(parameter.cpu) memory:\(parameter.memory)" - resources: { - requests: parameter - limits: parameter - } - }, ...] - parameter: { - // +usage=Specify the amount of cpu to limit - cpu: *1 | number - // +usage=Specify the amount of memory to limit - memory: *"2048Mi" | =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$" - } diff --git a/manifests/vela-caps/traits/volume-trait.yaml b/manifests/vela-caps/traits/volume-trait.yaml deleted file mode 100644 index f2c1cc9..0000000 --- a/manifests/vela-caps/traits/volume-trait.yaml +++ /dev/null @@ -1,114 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add volumes on K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: volumes -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - patch: { - // +patchKey=name - spec: template: spec: volumes: [ - for v in parameter.volumes { - { - name: v.name - if v.type == "pvc" { - persistentVolumeClaim: claimName: v.claimName - } - if v.type == "configMap" { - configMap: { - defaultMode: v.defaultMode - name: v.cmName - if v.items != _|_ { - items: v.items - } - } - } - if v.type == "secret" { - secret: { - defaultMode: v.defaultMode - secretName: v.secretName - if v.items != _|_ { - items: v.items - } - } - } - if v.type == "emptyDir" { - emptyDir: medium: v.medium - } - if v.type == "hostPath" { - hostPath: { - path: v.path - if v.mountType != _|_ { - type: v.mountType - } - } - } - } - }, - ] - spec: template: spec: { - // +patchKey=name - containers: [{ - volumeMounts: [ - for v in parameter.volumes { - { - name: v.name - mountPath: v.mountPath - readOnly: v.readOnly - } - }, - ] - }] - } - } - parameter: { - // +usage=Declare volumes and volumeMounts - volumes?: [...{ - name: string - // +usage=Specify volume type, options: "pvc","configMap","secret","emptyDir", "hostPath" - type: "pvc" | "configMap" | "secret" | "emptyDir" | "hostPath" - if type == "pvc" { - claimName: string - readOnly: *false | bool - } - if type == "configMap" { - defaultMode: *420 | int - cmName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - readOnly: *false | bool - } - if type == "secret" { - defaultMode: *420 | int - secretName: string - mountPath: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - readOnly: *false | bool - } - if type == "emptyDir" { - medium: *"" | "Memory" - readOnly: *false | bool - } - if type == "hostPath" { - path: string - mountPath: string - mountType?: "DirectoryOrCreate" | "Directory" | "FileOrCreate" | "File" | "Socket" | "CharDevice" | "BlockDevice" - readOnly: *false | bool - } - }] - } - diff --git a/manifests/vela-system/base/.gitignore b/manifests/vela-system/base/.gitignore new file mode 100644 index 0000000..80bf7fc --- /dev/null +++ b/manifests/vela-system/base/.gitignore @@ -0,0 +1 @@ +charts \ No newline at end of file diff --git a/manifests/vela-system/base/charts/vela-minimal/.helmignore b/manifests/vela-system/base/charts/vela-minimal/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/manifests/vela-system/base/charts/vela-minimal/Chart.yaml b/manifests/vela-system/base/charts/vela-minimal/Chart.yaml deleted file mode 100644 index 2340a80..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/Chart.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -appVersion: 1.1.8 -description: A Helm chart for KubeVela minimal -home: https://kubevela.io -icon: https://kubevela.io/img/logo.jpg -name: vela-minimal -type: application -version: 1.1.8 diff --git a/manifests/vela-system/base/charts/vela-minimal/README.md b/manifests/vela-system/base/charts/vela-minimal/README.md deleted file mode 100644 index 257ee10..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/README.md +++ /dev/null @@ -1,79 +0,0 @@ -![Build status](https://github.com/oam-dev/kubevela/workflows/E2E/badge.svg) -[![Go Report Card](https://goreportcard.com/badge/github.com/oam-dev/kubevela)](https://goreportcard.com/report/github.com/oam-dev/kubevela) -![Docker Pulls](https://img.shields.io/docker/pulls/oamdev/vela-core) -[![codecov](https://codecov.io/gh/oam-dev/kubevela/branch/master/graph/badge.svg)](https://codecov.io/gh/oam-dev/kubevela) -[![LICENSE](https://img.shields.io/github/license/oam-dev/kubevela.svg?style=flat-square)](/LICENSE) -[![Releases](https://img.shields.io/github/release/oam-dev/kubevela/all.svg?style=flat-square)](https://github.com/oam-dev/kubevela/releases) -[![TODOs](https://img.shields.io/endpoint?url=https://api.tickgit.com/badge?repo=github.com/oam-dev/kubevela)](https://www.tickgit.com/browse?repo=github.com/oam-dev/kubevela) -[![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Foam_dev)](https://twitter.com/oam_dev) -[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kubevela)](https://artifacthub.io/packages/search?repo=kubevela) - -![logo](https://raw.githubusercontent.com/oam-dev/kubevela.io/main/docs/resources/KubeVela-03.png) - -*Make shipping applications more enjoyable.* - -# KubeVela Minimal - -KubeVela is a modern application platform that makes deploying and managing applications across today's hybrid, multi-cloud environments easier and faster. - -KubeVela Minimal is the minimal version of KubeVela, it only contains the minimal components to run KubeVela and do not support features like multi clusters and env binding. For more complete experience, please install the [full version of KubeVela]((https://kubevela.io/docs/install)). - -KubeVela Minimal contains the following CRDs: - -CRD Name | Usage ------------- | ------------- -applications.core.oam.dev | KubeVela Core Application Object -applicationrevisions.core.oam.dev | The revision CRD of Application -componentdefinitions.core.oam.dev | ComponentDefinition Object -traitdefinitions.core.oam.dev | TraitDefinition Object -workflowstepdefinitions.core.oam.dev | Workflowstep Object -scopedefinitions.core.oam.dev | ScopeDefinition Object -policydefinitions.core.oam.dev | PolicyDefinition Object - workloaddefinitions.core.oam.dev | WorkloadDefinition Object -definitionrevisions.core.oam.dev | The revision CRD for all definition objects -rollouts.standard.oam.dev | Rollout feature trait -resourcetrackers.core.oam.dev | Garbage Collection feature -healthscopes.core.oam.dev | Health Check feature - -## Features - -**Application Centric** - KubeVela introduces [Open Application Model (OAM)](https://oam.dev/) as the consistent yet higher level API to capture a full deployment of microservices on top of hybrid environments. Placement strategy, traffic shifting and rolling update are declared at application level. No infrastructure level concern, simply deploy. - -**Programmable Workflow** - KubeVela leverages [CUE](https://cuelang.org/) to implement its model layer. This allows you to declare application deployment workflow as a DAG, with all steps and application's needs glued together in programmable approach. No restrictions, natively extensible. - -**Runtime Agnostic** - KubeVela works as an application delivery control plane that is fully runtime agnostic. It can deploy and manage any application components including containers, cloud functions, databases, or even EC2 instances across hybrid environments, following the workflow you defined. - -## Getting Started - -- [Introduction](https://kubevela.io/docs) -- [Installation](https://kubevela.io/docs/install) -- [Design Your First Deployment Plan](https://kubevela.io/docs/quick-start) - -## Documentation - -Full documentation is available on the [KubeVela website](https://kubevela.io/). - -## Community - -- Slack: [CNCF Slack](https://slack.cncf.io/) #kubevela channel (*English*) -- Gitter: [oam-dev](https://gitter.im/oam-dev/community) (*English*) -- [DingTalk Group](https://page.dingtalk.com/wow/dingtalk/act/en-home): `23310022` (*Chinese*) -- Bi-weekly Community Call: [Meeting Notes](https://docs.google.com/document/d/1nqdFEyULekyksFHtFvgvFAYE-0AMHKoS3RMnaKsarjs) - -## Talks and Conferences - -| Engagement | Link | -|:-----------|:------------| -| 🎤 Talks | - [KubeVela - The Modern App Delivery System in Alibaba](https://docs.google.com/presentation/d/1CWCLcsKpDQB3bBDTfdv2BZ8ilGGJv2E8L-iOA5HMrV0/edit?usp=sharing) | -| 🌎 KubeCon | - [ [NA 2020] Standardizing Cloud Native Application Delivery Across Different Clouds](https://www.youtube.com/watch?v=0yhVuBIbHcI)
- [ [EU 2021] Zero Pain Microservice Development and Deployment with Dapr and KubeVela](https://sched.co/iE4S) | -| 📺 Conferences | - [Dapr, Rudr, OAM: Mark Russinovich presents next gen app development & deployment](https://www.youtube.com/watch?v=eJCu6a-x9uo)
- [Mark Russinovich presents "The Future of Cloud Native Applications with OAM and Dapr"](https://myignite.techcommunity.microsoft.com/sessions/82059)| - -## Contributing -Check out [CONTRIBUTING](./CONTRIBUTING.md) to see how to develop with KubeVela. - -## Report Vulnerability - -Security is a first priority thing for us at KubeVela. If you come across a related issue, please send email to security@mail.kubevela.io . - -## Code of Conduct -KubeVela adopts [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). diff --git a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_applicationrevisions.yaml b/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_applicationrevisions.yaml deleted file mode 100644 index dbc74dd..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_applicationrevisions.yaml +++ /dev/null @@ -1,4722 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - name: applicationrevisions.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: ApplicationRevision - listKind: ApplicationRevisionList - plural: applicationrevisions - shortNames: - - apprev - singular: applicationrevision - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha2 - schema: - openAPIV3Schema: - description: ApplicationRevision is the Schema for the ApplicationRevision - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ApplicationRevisionSpec is the spec of ApplicationRevision - properties: - application: - description: Application records the snapshot of the created/modified - Application - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: ApplicationSpec is the spec of Application - properties: - components: - items: - description: ApplicationComponent describe the component - of application - properties: - name: - type: string - scopes: - additionalProperties: - type: string - description: scopes in ApplicationComponent defines - the component-level scopes the format is - pairs, the key represents type of `ScopeDefinition` - while the value represent the name of scope instance. - type: object - x-kubernetes-preserve-unknown-fields: true - settings: - type: object - x-kubernetes-preserve-unknown-fields: true - traits: - description: Traits define the trait of one component, - the type must be array to keep the order. - items: - description: ApplicationTrait defines the trait of - application - properties: - name: - type: string - properties: - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - name - type: object - type: array - type: - type: string - required: - - name - - type - type: object - type: array - rolloutPlan: - description: RolloutPlan is the details on how to rollout - the resources The controller simply replace the old resources - with the new one if there is no rollout plan involved - properties: - batchPartition: - description: All pods in the batches up to the batchPartition - (included) will have the target resource specification - while the rest still have the source resource This is - designed for the operators to manually rollout Default - is the the number of batches which will rollout all - the batches - format: int32 - type: integer - canaryMetric: - description: CanaryMetric provides a way for the rollout - process to automatically check certain metrics before - complete the process - items: - description: CanaryMetric holds the reference to metrics - used for canary analysis - properties: - interval: - description: Interval represents the windows size - type: string - metricsRange: - description: Range value accepted for this metric - properties: - max: - anyOf: - - type: integer - - type: string - description: Maximum value - x-kubernetes-int-or-string: true - min: - anyOf: - - type: integer - - type: string - description: Minimum value - x-kubernetes-int-or-string: true - type: object - name: - description: Name of the metric - type: string - templateRef: - description: TemplateRef references a metric template - object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an - object instead of an entire object, this string - should contain a valid JSON/Go field access - statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to - a container within a pod, this would take - on a value like: "spec.containers{name}" (where - "name" refers to the name of the container - that triggered the event) or if no container - name is specified "spec.containers[2]" (container - with index 2 in this pod). This syntax is - chosen only to have some well-defined way - of referencing a part of an object. TODO: - this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which - this reference is made, if any. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - name - type: object - type: array - numBatches: - description: The number of batches, default = 1 - format: int32 - type: integer - paused: - description: Paused the rollout, default is false - type: boolean - rolloutBatches: - description: The exact distribution among batches. its - size has to be exactly the same as the NumBatches (if - set) The total number cannot exceed the targetSize or - the size of the source resource We will IGNORE the last - batch's replica field if it's a percentage since round - errors can lead to inaccurate sum We highly recommend - to leave the last batch's replica field empty - items: - description: RolloutBatch is used to describe how the - each batch rollout should be - properties: - batchRolloutWebhooks: - description: RolloutWebhooks provides a way for - the batch rollout to interact with an external - process - items: - description: RolloutWebhook holds the reference - to external checks used for canary analysis - properties: - expectedStatus: - description: ExpectedStatus contains all the - expected http status code that we will accept - as success - items: - type: integer - type: array - metadata: - additionalProperties: - type: string - description: Metadata (key-value pairs) for - this webhook - type: object - method: - description: Method the HTTP call method, - default is POST - type: string - name: - description: Name of this webhook - type: string - type: - description: Type of this webhook - type: string - url: - description: URL address of this webhook - type: string - required: - - name - - type - - url - type: object - type: array - canaryMetric: - description: CanaryMetric provides a way for the - batch rollout process to automatically check certain - metrics before moving to the next batch - items: - description: CanaryMetric holds the reference - to metrics used for canary analysis - properties: - interval: - description: Interval represents the windows - size - type: string - metricsRange: - description: Range value accepted for this - metric - properties: - max: - anyOf: - - type: integer - - type: string - description: Maximum value - x-kubernetes-int-or-string: true - min: - anyOf: - - type: integer - - type: string - description: Minimum value - x-kubernetes-int-or-string: true - type: object - name: - description: Name of the metric - type: string - templateRef: - description: TemplateRef references a metric - template object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece - of an object instead of an entire object, - this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference - is to a container within a pod, this - would take on a value like: "spec.containers{name}" - (where "name" refers to the name of - the container that triggered the event) - or if no container name is specified - "spec.containers[2]" (container with - index 2 in this pod). This syntax is - chosen only to have some well-defined - way of referencing a part of an object. - TODO: this design is not final and this - field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion - to which this reference is made, if - any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - name - type: object - type: array - instanceInterval: - description: The wait time, in seconds, between - instances upgrades, default = 0 - format: int32 - type: integer - maxUnavailable: - anyOf: - - type: integer - - type: string - description: MaxUnavailable is the max allowed number - of pods that is unavailable during the upgrade. - We will mark the batch as ready as long as there - are less or equal number of pods unavailable than - this number. default = 0 - x-kubernetes-int-or-string: true - podList: - description: The list of Pods to get upgraded it - is mutually exclusive with the Replicas field - items: - type: string - type: array - replicas: - anyOf: - - type: integer - - type: string - description: 'Replicas is the number of pods to - upgrade in this batch it can be an absolute number - (ex: 5) or a percentage of total pods we will - ignore the percentage of the last batch to just - fill the gap it is mutually exclusive with the - PodList field' - x-kubernetes-int-or-string: true - type: object - type: array - rolloutStrategy: - description: RolloutStrategy defines strategies for the - rollout plan The default is IncreaseFirstRolloutStrategyType - type: string - rolloutWebhooks: - description: RolloutWebhooks provide a way for the rollout - to interact with an external process - items: - description: RolloutWebhook holds the reference to external - checks used for canary analysis - properties: - expectedStatus: - description: ExpectedStatus contains all the expected - http status code that we will accept as success - items: - type: integer - type: array - metadata: - additionalProperties: - type: string - description: Metadata (key-value pairs) for this - webhook - type: object - method: - description: Method the HTTP call method, default - is POST - type: string - name: - description: Name of this webhook - type: string - type: - description: Type of this webhook - type: string - url: - description: URL address of this webhook - type: string - required: - - name - - type - - url - type: object - type: array - targetSize: - description: The size of the target resource. The default - is the same as the size of the source resource. - format: int32 - type: integer - type: object - required: - - components - type: object - status: - description: AppStatus defines the observed state of Application - properties: - appliedResources: - description: AppliedResources record the resources that the workflow - step apply. - items: - description: ClusterObjectReference defines the object reference - with cluster. - properties: - apiVersion: - description: API version of the referent. - type: string - cluster: - type: string - creator: - description: ResourceCreatorRole defines the resource - creator. - type: string - fieldPath: - description: 'If referring to a piece of an object instead - of an entire object, this string should contain a - valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container - that triggered the event) or if no container name - is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to - have some well-defined way of referencing a part of - an object. TODO: this design is not final and this - field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this - reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - components: - description: Components record the related Components created - by Application Controller - items: - description: 'ObjectReference contains enough information - to let you inspect or modify the referred object. --- - New uses of this type are discouraged because of difficulty - describing its usage when embedded in APIs. 1. Ignored - fields. It includes many fields which are not generally - honored. For instance, ResourceVersion and FieldPath - are both very rarely valid in actual usage. 2. Invalid - usage help. It is impossible to add specific help for - individual usage. In most embedded usages, there are - particular restrictions like, "must refer only to - types A and B" or "UID not honored" or "name must be restricted". Those - cannot be well described when embedded. 3. Inconsistent - validation. Because the usages are different, the validation - rules are different by usage, which makes it hard for - users to predict what will happen. 4. The fields are - both imprecise and overly precise. Kind is not a precise - mapping to a URL. This can produce ambiguity during - interpretation and require a REST mapping. In most cases, - the dependency is on the group,resource tuple and - the version of the actual struct is irrelevant. 5. We - cannot easily change it. Because this type is embedded - in many locations, updates to this type will affect - numerous schemas. Don''t make new APIs embed an underspecified - API type they do not control. Instead of using this type, - create a locally provided and used type that is well-focused - on your reference. For example, ServiceReferences for - admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead - of an entire object, this string should contain a - valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container - that triggered the event) or if no container name - is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to - have some well-defined way of referencing a part of - an object. TODO: this design is not final and this - field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this - reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - latestRevision: - description: LatestRevision of the application configuration - it generates - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the - spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - observedGeneration: - description: The generation observed by the application controller. - format: int64 - type: integer - resourceTracker: - description: ResourceTracker record the status of the ResourceTracker - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead - of an entire object, this string should contain a valid - JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that - triggered the event) or if no container name is specified - "spec.containers[2]" (container with index 2 in this - pod). This syntax is chosen only to have some well-defined - way of referencing a part of an object. TODO: this design - is not final and this field is subject to change in - the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - rollout: - description: AppRolloutStatus defines the observed state of - AppRollout - properties: - LastSourceAppRevision: - description: LastSourceAppRevision contains the name of - the app that we need to upgrade from. We will restart - the rollout if this is not the same as the spec - type: string - batchRollingState: - description: BatchRollingState only meaningful when the - Status is rolling - type: string - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time - this condition transitioned from one status to - another. - format: date-time - type: string - message: - description: A Message containing details about - this condition's last transition from one status - to another, if any. - type: string - reason: - description: A Reason for this condition's last - transition from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one - of each condition type may apply to a resource - at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - currentBatch: - description: The current batch the rollout is working - on/blocked it starts from 0 - format: int32 - type: integer - lastAppliedPodTemplateIdentifier: - description: lastAppliedPodTemplateIdentifier is a string - that uniquely represent the last pod template each workload - type could use different ways to identify that so we - cannot compare between resources We update this field - only after a successful rollout - type: string - lastTargetAppRevision: - description: LastUpgradedTargetAppRevision contains the - name of the app that we upgraded to We will restart - the rollout if this is not the same as the spec - type: string - rollingState: - description: RollingState is the Rollout State - type: string - rolloutOriginalSize: - description: RolloutTargetSize is the size of the target - resources. This is determined once the initial spec - verification and does not change until the rollout is - restarted - format: int32 - type: integer - rolloutTargetSize: - description: RolloutTargetSize is the size of the target - resources. This is determined once the initial spec - verification and does not change until the rollout is - restarted - format: int32 - type: integer - targetGeneration: - description: NewPodTemplateIdentifier is a string that - uniquely represent the new pod template each workload - type could use different ways to identify that so we - cannot compare between resources - type: string - upgradedReadyReplicas: - description: UpgradedReadyReplicas is the number of Pods - upgraded by the rollout controller that have a Ready - Condition. - format: int32 - type: integer - upgradedReplicas: - description: UpgradedReplicas is the number of Pods upgraded - by the rollout controller - format: int32 - type: integer - required: - - currentBatch - - lastTargetAppRevision - - rollingState - - upgradedReadyReplicas - - upgradedReplicas - type: object - services: - description: Services record the status of the application - services - items: - description: ApplicationComponentStatus record the health - status of App component - properties: - env: - type: string - healthy: - type: boolean - message: - type: string - name: - type: string - scopes: - items: - description: 'ObjectReference contains enough information - to let you inspect or modify the referred object. - --- New uses of this type are discouraged because - of difficulty describing its usage when embedded - in APIs. 1. Ignored fields. It includes many fields - which are not generally honored. For instance, - ResourceVersion and FieldPath are both very rarely - valid in actual usage. 2. Invalid usage help. It - is impossible to add specific help for individual - usage. In most embedded usages, there are particular restrictions - like, "must refer only to types A and B" or "UID - not honored" or "name must be restricted". Those - cannot be well described when embedded. 3. Inconsistent - validation. Because the usages are different, the - validation rules are different by usage, which makes - it hard for users to predict what will happen. 4. - The fields are both imprecise and overly precise. Kind - is not a precise mapping to a URL. This can produce - ambiguity during interpretation and require - a REST mapping. In most cases, the dependency is - on the group,resource tuple and the version - of the actual struct is irrelevant. 5. We cannot - easily change it. Because this type is embedded - in many locations, updates to this type will - affect numerous schemas. Don''t make new APIs embed - an underspecified API type they do not control. - Instead of using this type, create a locally provided - and used type that is well-focused on your reference. - For example, ServiceReferences for admission registration: - https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object - instead of an entire object, this string should - contain a valid JSON/Go field access statement, - such as desiredState.manifest.containers[2]. - For example, if the object reference is to a - container within a pod, this would take on a - value like: "spec.containers{name}" (where "name" - refers to the name of the container that triggered - the event) or if no container name is specified - "spec.containers[2]" (container with index 2 - in this pod). This syntax is chosen only to - have some well-defined way of referencing a - part of an object. TODO: this design is not - final and this field is subject to change in - the future.' - type: string - kind: - description: 'Kind of the referent. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which - this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - traits: - items: - description: ApplicationTraitStatus records the trait - health status - properties: - healthy: - type: boolean - message: - type: string - type: - type: string - required: - - healthy - - type - type: object - type: array - workloadDefinition: - description: WorkloadDefinition is the definition of - a WorkloadDefinition, such as deployments/apps.v1 - properties: - apiVersion: - type: string - kind: - type: string - required: - - apiVersion - - kind - type: object - required: - - healthy - - name - type: object - type: array - status: - description: ApplicationPhase is a label for the condition - of a application at the current time - type: string - workflow: - description: Workflow record the status of workflow - properties: - appRevision: - type: string - contextBackend: - description: 'ObjectReference contains enough information - to let you inspect or modify the referred object. --- - New uses of this type are discouraged because of difficulty - describing its usage when embedded in APIs. 1. Ignored - fields. It includes many fields which are not generally - honored. For instance, ResourceVersion and FieldPath - are both very rarely valid in actual usage. 2. Invalid - usage help. It is impossible to add specific help for - individual usage. In most embedded usages, there are - particular restrictions like, "must refer only to - types A and B" or "UID not honored" or "name must be - restricted". Those cannot be well described when - embedded. 3. Inconsistent validation. Because the - usages are different, the validation rules are different - by usage, which makes it hard for users to predict what - will happen. 4. The fields are both imprecise and overly - precise. Kind is not a precise mapping to a URL. This - can produce ambiguity during interpretation and - require a REST mapping. In most cases, the dependency - is on the group,resource tuple and the version of - the actual struct is irrelevant. 5. We cannot easily - change it. Because this type is embedded in many locations, - updates to this type will affect numerous schemas. Don''t - make new APIs embed an underspecified API type they - do not control. Instead of using this type, create a - locally provided and used type that is well-focused - on your reference. For example, ServiceReferences for - admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object - instead of an entire object, this string should - contain a valid JSON/Go field access statement, - such as desiredState.manifest.containers[2]. For - example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container - that triggered the event) or if no container name - is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only - to have some well-defined way of referencing a part - of an object. TODO: this design is not final and - this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this - reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - mode: - description: WorkflowMode describes the mode of workflow - type: string - steps: - items: - description: WorkflowStepStatus record the status of - a workflow step - properties: - id: - type: string - message: - description: A human readable message indicating - details about why the workflowStep is in this - state. - type: string - name: - type: string - phase: - description: WorkflowStepPhase describes the phase - of a workflow step. - type: string - reason: - description: A brief CamelCase message indicating - details about why the workflowStep is in this - state. - type: string - subSteps: - description: SubStepsStatus record the status of - workflow steps. - properties: - mode: - description: WorkflowMode describes the mode - of workflow - type: string - stepIndex: - type: integer - steps: - items: - description: WorkflowSubStepStatus record - the status of a workflow step - properties: - id: - type: string - message: - description: A human readable message - indicating details about why the workflowStep - is in this state. - type: string - name: - type: string - phase: - description: WorkflowStepPhase describes - the phase of a workflow step. - type: string - reason: - description: A brief CamelCase message - indicating details about why the workflowStep - is in this state. - type: string - type: - type: string - required: - - id - type: object - type: array - type: object - type: - type: string - required: - - id - type: object - type: array - suspend: - type: boolean - terminated: - type: boolean - required: - - mode - - suspend - - terminated - type: object - type: object - type: object - applicationConfiguration: - description: ApplicationConfiguration records the rendered applicationConfiguration - from Application, it will contains the whole K8s CR of trait and - the reference component in it. - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - componentDefinitions: - additionalProperties: - description: ComponentDefinition is the Schema for the componentdefinitions - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: ComponentDefinitionSpec defines the desired state - of ComponentDefinition - properties: - childResourceKinds: - description: ChildResourceKinds are the list of GVK of the - child resources this workload generates - items: - description: A ChildResourceKind defines a child Kubernetes - resource kind with a selector - properties: - apiVersion: - description: APIVersion of the child resource - type: string - kind: - description: Kind of the child resource - type: string - selector: - additionalProperties: - type: string - description: Selector to select the child resources - that the workload wants to expose to traits - type: object - required: - - apiVersion - - kind - type: object - type: array - extension: - description: Extension is used for extension needs by OAM - platform builders - type: object - x-kubernetes-preserve-unknown-fields: true - podSpecPath: - description: PodSpecPath indicates where/if this workload - has K8s podSpec field if one workload has podSpec, trait - can do lot's of assumption such as port, env, volume fields. - type: string - revisionLabel: - description: RevisionLabel indicates which label for underlying - resources(e.g. pods) of this workload can be used by trait - to create resource selectors(e.g. label selector for pods). - type: string - schematic: - description: Schematic defines the data format and template - of the encapsulation of the workload - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template - data of the capability, it will replace the old - CUE template in extension field. Template is a - required field if CUE is defined in Capability - Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm - module - properties: - release: - description: Release records a Helm release used - by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository - used by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable - parameter of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array - of fields within this workload that will - be overwritten by the value of this parameter. - \tAll fields must be of the same type. Fields - are specified as JSON field paths without - a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or - not a value for this parameter must be supplied - when authoring an Application. - type: boolean - type: - description: 'ValueType indicates the type - of the parameter value, and only supports - basic data types: string, number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes - resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud - resources managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote - git repository. It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference - to Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - status: - description: Status defines the custom health policy and - status message for workload - properties: - customStatus: - description: CustomStatus defines the custom status - message that could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy - for the abstraction - type: string - type: object - workload: - description: Workload is a workload type descriptor - properties: - definition: - description: Definition mutually exclusive to workload.type, - a embedded WorkloadDefinition - properties: - apiVersion: - type: string - kind: - type: string - required: - - apiVersion - - kind - type: object - type: - description: Type ref to a WorkloadDefinition via name - type: string - type: object - required: - - workload - type: object - status: - description: ComponentDefinitionStatus is the status of ComponentDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains - OpenAPI V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the - spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - description: ComponentDefinitions records the snapshot of the componentDefinitions - related with the created/modified Application - type: object - components: - items: - description: RawComponent record raw component - properties: - raw: - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - required: - - raw - type: object - type: array - scopeDefinitions: - additionalProperties: - description: A ScopeDefinition registers a kind of Kubernetes custom - resource as a valid OAM scope kind by referencing its CustomResourceDefinition. - The CRD is used to validate the schema of the scope when it is - embedded in an OAM ApplicationConfiguration. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: A ScopeDefinitionSpec defines the desired state - of a ScopeDefinition. - properties: - allowComponentOverlap: - description: AllowComponentOverlap specifies whether an - OAM component may exist in multiple instances of this - kind of scope. - type: boolean - definitionRef: - description: Reference to the CustomResourceDefinition that - defines this scope kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be - used if CRD has multiple versions by default it will - use the first one if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM - platform builders - type: object - x-kubernetes-preserve-unknown-fields: true - workloadRefsPath: - description: WorkloadRefsPath indicates if/where a scope - accepts workloadRef objects - type: string - required: - - allowComponentOverlap - - definitionRef - type: object - type: object - description: ScopeDefinitions records the snapshot of the scopeDefinitions - related with the created/modified Application - type: object - traitDefinitions: - additionalProperties: - description: A TraitDefinition registers a kind of Kubernetes custom - resource as a valid OAM trait kind by referencing its CustomResourceDefinition. - The CRD is used to validate the schema of the trait when it is - embedded in an OAM ApplicationConfiguration. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: A TraitDefinitionSpec defines the desired state - of a TraitDefinition. - properties: - appliesToWorkloads: - description: AppliesToWorkloads specifies the list of workload - kinds this trait applies to. Workload kinds are specified - in kind.group/version format, e.g. server.core.oam.dev/v1alpha2. - Traits that omit this field apply to all workload kinds. - items: - type: string - type: array - conflictsWith: - description: 'ConflictsWith specifies the list of traits(CRD - name, Definition name, CRD group) which could not apply - to the same workloads with this trait. Traits that omit - this field can work with any other traits. Example rules: - "service" # Trait definition name "services.k8s.io" # - API resource/crd name "*.networking.k8s.io" # API group - "labelSelector:foo=bar" # label selector labelSelector - format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse' - items: - type: string - type: array - definitionRef: - description: Reference to the CustomResourceDefinition that - defines this trait kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be - used if CRD has multiple versions by default it will - use the first one if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM - platform builders - type: object - x-kubernetes-preserve-unknown-fields: true - podDisruptive: - description: PodDisruptive specifies whether using the trait - will cause the pod to restart or not. - type: boolean - revisionEnabled: - description: Revision indicates whether a trait is aware - of component revision - type: boolean - schematic: - description: Schematic defines the data format and template - of the encapsulation of the trait - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template - data of the capability, it will replace the old - CUE template in extension field. Template is a - required field if CUE is defined in Capability - Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm - module - properties: - release: - description: Release records a Helm release used - by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository - used by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable - parameter of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array - of fields within this workload that will - be overwritten by the value of this parameter. - \tAll fields must be of the same type. Fields - are specified as JSON field paths without - a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or - not a value for this parameter must be supplied - when authoring an Application. - type: boolean - type: - description: 'ValueType indicates the type - of the parameter value, and only supports - basic data types: string, number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes - resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud - resources managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote - git repository. It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference - to Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - status: - description: Status defines the custom health policy and - status message for trait - properties: - customStatus: - description: CustomStatus defines the custom status - message that could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy - for the abstraction - type: string - type: object - workloadRefPath: - description: WorkloadRefPath indicates where/if a trait - accepts a workloadRef object - type: string - type: object - status: - description: TraitDefinitionStatus is the status of TraitDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains - OpenAPI V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the trait definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the - spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - description: TraitDefinitions records the snapshot of the traitDefinitions - related with the created/modified Application - type: object - workloadDefinitions: - additionalProperties: - description: A WorkloadDefinition registers a kind of Kubernetes - custom resource as a valid OAM workload kind by referencing its - CustomResourceDefinition. The CRD is used to validate the schema - of the workload when it is embedded in an OAM Component. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: A WorkloadDefinitionSpec defines the desired state - of a WorkloadDefinition. - properties: - childResourceKinds: - description: ChildResourceKinds are the list of GVK of the - child resources this workload generates - items: - description: A ChildResourceKind defines a child Kubernetes - resource kind with a selector - properties: - apiVersion: - description: APIVersion of the child resource - type: string - kind: - description: Kind of the child resource - type: string - selector: - additionalProperties: - type: string - description: Selector to select the child resources - that the workload wants to expose to traits - type: object - required: - - apiVersion - - kind - type: object - type: array - definitionRef: - description: Reference to the CustomResourceDefinition that - defines this workload kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be - used if CRD has multiple versions by default it will - use the first one if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM - platform builders - type: object - x-kubernetes-preserve-unknown-fields: true - podSpecPath: - description: PodSpecPath indicates where/if this workload - has K8s podSpec field if one workload has podSpec, trait - can do lot's of assumption such as port, env, volume fields. - type: string - revisionLabel: - description: RevisionLabel indicates which label for underlying - resources(e.g. pods) of this workload can be used by trait - to create resource selectors(e.g. label selector for pods). - type: string - schematic: - description: Schematic defines the data format and template - of the encapsulation of the workload - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template - data of the capability, it will replace the old - CUE template in extension field. Template is a - required field if CUE is defined in Capability - Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm - module - properties: - release: - description: Release records a Helm release used - by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository - used by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable - parameter of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array - of fields within this workload that will - be overwritten by the value of this parameter. - \tAll fields must be of the same type. Fields - are specified as JSON field paths without - a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or - not a value for this parameter must be supplied - when authoring an Application. - type: boolean - type: - description: 'ValueType indicates the type - of the parameter value, and only supports - basic data types: string, number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes - resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud - resources managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote - git repository. It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference - to Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - status: - description: Status defines the custom health policy and - status message for workload - properties: - customStatus: - description: CustomStatus defines the custom status - message that could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy - for the abstraction - type: string - type: object - required: - - definitionRef - type: object - status: - description: WorkloadDefinitionStatus is the status of WorkloadDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - type: object - type: object - description: WorkloadDefinitions records the snapshot of the workloadDefinitions - related with the created/modified Application - type: object - required: - - application - - applicationConfiguration - type: object - type: object - served: true - storage: false - subresources: {} - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1beta1 - schema: - openAPIV3Schema: - description: ApplicationRevision is the Schema for the ApplicationRevision - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ApplicationRevisionSpec is the spec of ApplicationRevision - properties: - application: - description: Application records the snapshot of the created/modified - Application - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: ApplicationSpec is the spec of Application - properties: - components: - items: - description: ApplicationComponent describe the component - of application - properties: - dependsOn: - items: - type: string - type: array - externalRevision: - description: ExternalRevision specified the component - revisionName - type: string - inputs: - description: StepInputs defines variable input of WorkflowStep - items: - properties: - from: - type: string - parameterKey: - type: string - required: - - from - - parameterKey - type: object - type: array - name: - type: string - outputs: - description: StepOutputs defines output variable of - WorkflowStep - items: - properties: - name: - type: string - valueFrom: - type: string - required: - - name - - valueFrom - type: object - type: array - properties: - type: object - x-kubernetes-preserve-unknown-fields: true - scopes: - additionalProperties: - type: string - description: scopes in ApplicationComponent defines - the component-level scopes the format is - pairs, the key represents type of `ScopeDefinition` - while the value represent the name of scope instance. - type: object - x-kubernetes-preserve-unknown-fields: true - traits: - description: Traits define the trait of one component, - the type must be array to keep the order. - items: - description: ApplicationTrait defines the trait of - application - properties: - properties: - type: object - x-kubernetes-preserve-unknown-fields: true - type: - type: string - required: - - type - type: object - type: array - type: - type: string - required: - - name - - type - type: object - type: array - policies: - description: Policies defines the global policies for all - components in the app, e.g. security, metrics, gitops, multi-cluster - placement rules, etc. Policies are applied after components - are rendered and before workflow steps are executed. - items: - description: AppPolicy defines a global policy for all components - in the app. - properties: - name: - description: Name is the unique name of the policy. - type: string - properties: - type: object - x-kubernetes-preserve-unknown-fields: true - type: - type: string - required: - - name - - type - type: object - type: array - rolloutPlan: - description: RolloutPlan is the details on how to rollout - the resources The controller simply replace the old resources - with the new one if there is no rollout plan involved - properties: - batchPartition: - description: All pods in the batches up to the batchPartition - (included) will have the target resource specification - while the rest still have the source resource This is - designed for the operators to manually rollout Default - is the the number of batches which will rollout all - the batches - format: int32 - type: integer - canaryMetric: - description: CanaryMetric provides a way for the rollout - process to automatically check certain metrics before - complete the process - items: - description: CanaryMetric holds the reference to metrics - used for canary analysis - properties: - interval: - description: Interval represents the windows size - type: string - metricsRange: - description: Range value accepted for this metric - properties: - max: - anyOf: - - type: integer - - type: string - description: Maximum value - x-kubernetes-int-or-string: true - min: - anyOf: - - type: integer - - type: string - description: Minimum value - x-kubernetes-int-or-string: true - type: object - name: - description: Name of the metric - type: string - templateRef: - description: TemplateRef references a metric template - object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an - object instead of an entire object, this string - should contain a valid JSON/Go field access - statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to - a container within a pod, this would take - on a value like: "spec.containers{name}" (where - "name" refers to the name of the container - that triggered the event) or if no container - name is specified "spec.containers[2]" (container - with index 2 in this pod). This syntax is - chosen only to have some well-defined way - of referencing a part of an object. TODO: - this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which - this reference is made, if any. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - name - type: object - type: array - numBatches: - description: The number of batches, default = 1 - format: int32 - type: integer - paused: - description: Paused the rollout, default is false - type: boolean - rolloutBatches: - description: The exact distribution among batches. its - size has to be exactly the same as the NumBatches (if - set) The total number cannot exceed the targetSize or - the size of the source resource We will IGNORE the last - batch's replica field if it's a percentage since round - errors can lead to inaccurate sum We highly recommend - to leave the last batch's replica field empty - items: - description: RolloutBatch is used to describe how the - each batch rollout should be - properties: - batchRolloutWebhooks: - description: RolloutWebhooks provides a way for - the batch rollout to interact with an external - process - items: - description: RolloutWebhook holds the reference - to external checks used for canary analysis - properties: - expectedStatus: - description: ExpectedStatus contains all the - expected http status code that we will accept - as success - items: - type: integer - type: array - metadata: - additionalProperties: - type: string - description: Metadata (key-value pairs) for - this webhook - type: object - method: - description: Method the HTTP call method, - default is POST - type: string - name: - description: Name of this webhook - type: string - type: - description: Type of this webhook - type: string - url: - description: URL address of this webhook - type: string - required: - - name - - type - - url - type: object - type: array - canaryMetric: - description: CanaryMetric provides a way for the - batch rollout process to automatically check certain - metrics before moving to the next batch - items: - description: CanaryMetric holds the reference - to metrics used for canary analysis - properties: - interval: - description: Interval represents the windows - size - type: string - metricsRange: - description: Range value accepted for this - metric - properties: - max: - anyOf: - - type: integer - - type: string - description: Maximum value - x-kubernetes-int-or-string: true - min: - anyOf: - - type: integer - - type: string - description: Minimum value - x-kubernetes-int-or-string: true - type: object - name: - description: Name of the metric - type: string - templateRef: - description: TemplateRef references a metric - template object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece - of an object instead of an entire object, - this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference - is to a container within a pod, this - would take on a value like: "spec.containers{name}" - (where "name" refers to the name of - the container that triggered the event) - or if no container name is specified - "spec.containers[2]" (container with - index 2 in this pod). This syntax is - chosen only to have some well-defined - way of referencing a part of an object. - TODO: this design is not final and this - field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More - info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion - to which this reference is made, if - any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - name - type: object - type: array - instanceInterval: - description: The wait time, in seconds, between - instances upgrades, default = 0 - format: int32 - type: integer - maxUnavailable: - anyOf: - - type: integer - - type: string - description: MaxUnavailable is the max allowed number - of pods that is unavailable during the upgrade. - We will mark the batch as ready as long as there - are less or equal number of pods unavailable than - this number. default = 0 - x-kubernetes-int-or-string: true - podList: - description: The list of Pods to get upgraded it - is mutually exclusive with the Replicas field - items: - type: string - type: array - replicas: - anyOf: - - type: integer - - type: string - description: 'Replicas is the number of pods to - upgrade in this batch it can be an absolute number - (ex: 5) or a percentage of total pods we will - ignore the percentage of the last batch to just - fill the gap it is mutually exclusive with the - PodList field' - x-kubernetes-int-or-string: true - type: object - type: array - rolloutStrategy: - description: RolloutStrategy defines strategies for the - rollout plan The default is IncreaseFirstRolloutStrategyType - type: string - rolloutWebhooks: - description: RolloutWebhooks provide a way for the rollout - to interact with an external process - items: - description: RolloutWebhook holds the reference to external - checks used for canary analysis - properties: - expectedStatus: - description: ExpectedStatus contains all the expected - http status code that we will accept as success - items: - type: integer - type: array - metadata: - additionalProperties: - type: string - description: Metadata (key-value pairs) for this - webhook - type: object - method: - description: Method the HTTP call method, default - is POST - type: string - name: - description: Name of this webhook - type: string - type: - description: Type of this webhook - type: string - url: - description: URL address of this webhook - type: string - required: - - name - - type - - url - type: object - type: array - targetSize: - description: The size of the target resource. The default - is the same as the size of the source resource. - format: int32 - type: integer - type: object - workflow: - description: 'Workflow defines how to customize the control - logic. If workflow is specified, Vela won''t apply any resource, - but provide rendered output in AppRevision. Workflow steps - are executed in array order, and each step: - will have - a context in annotation. - should mark "finish" phase in - status.conditions.' - properties: - steps: - items: - description: WorkflowStep defines how to execute a workflow - step. - properties: - dependsOn: - items: - type: string - type: array - inputs: - description: StepInputs defines variable input of - WorkflowStep - items: - properties: - from: - type: string - parameterKey: - type: string - required: - - from - - parameterKey - type: object - type: array - name: - description: Name is the unique name of the workflow - step. - type: string - outputs: - description: StepOutputs defines output variable - of WorkflowStep - items: - properties: - name: - type: string - valueFrom: - type: string - required: - - name - - valueFrom - type: object - type: array - properties: - type: object - x-kubernetes-preserve-unknown-fields: true - type: - type: string - required: - - name - - type - type: object - type: array - type: object - required: - - components - type: object - status: - description: AppStatus defines the observed state of Application - properties: - appliedResources: - description: AppliedResources record the resources that the workflow - step apply. - items: - description: ClusterObjectReference defines the object reference - with cluster. - properties: - apiVersion: - description: API version of the referent. - type: string - cluster: - type: string - creator: - description: ResourceCreatorRole defines the resource - creator. - type: string - fieldPath: - description: 'If referring to a piece of an object instead - of an entire object, this string should contain a - valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container - that triggered the event) or if no container name - is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to - have some well-defined way of referencing a part of - an object. TODO: this design is not final and this - field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this - reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - components: - description: Components record the related Components created - by Application Controller - items: - description: 'ObjectReference contains enough information - to let you inspect or modify the referred object. --- - New uses of this type are discouraged because of difficulty - describing its usage when embedded in APIs. 1. Ignored - fields. It includes many fields which are not generally - honored. For instance, ResourceVersion and FieldPath - are both very rarely valid in actual usage. 2. Invalid - usage help. It is impossible to add specific help for - individual usage. In most embedded usages, there are - particular restrictions like, "must refer only to - types A and B" or "UID not honored" or "name must be restricted". Those - cannot be well described when embedded. 3. Inconsistent - validation. Because the usages are different, the validation - rules are different by usage, which makes it hard for - users to predict what will happen. 4. The fields are - both imprecise and overly precise. Kind is not a precise - mapping to a URL. This can produce ambiguity during - interpretation and require a REST mapping. In most cases, - the dependency is on the group,resource tuple and - the version of the actual struct is irrelevant. 5. We - cannot easily change it. Because this type is embedded - in many locations, updates to this type will affect - numerous schemas. Don''t make new APIs embed an underspecified - API type they do not control. Instead of using this type, - create a locally provided and used type that is well-focused - on your reference. For example, ServiceReferences for - admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead - of an entire object, this string should contain a - valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container - that triggered the event) or if no container name - is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to - have some well-defined way of referencing a part of - an object. TODO: this design is not final and this - field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this - reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - latestRevision: - description: LatestRevision of the application configuration - it generates - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the - spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - observedGeneration: - description: The generation observed by the application controller. - format: int64 - type: integer - resourceTracker: - description: ResourceTracker record the status of the ResourceTracker - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead - of an entire object, this string should contain a valid - JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that - triggered the event) or if no container name is specified - "spec.containers[2]" (container with index 2 in this - pod). This syntax is chosen only to have some well-defined - way of referencing a part of an object. TODO: this design - is not final and this field is subject to change in - the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - rollout: - description: AppRolloutStatus defines the observed state of - AppRollout - properties: - LastSourceAppRevision: - description: LastSourceAppRevision contains the name of - the app that we need to upgrade from. We will restart - the rollout if this is not the same as the spec - type: string - batchRollingState: - description: BatchRollingState only meaningful when the - Status is rolling - type: string - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time - this condition transitioned from one status to - another. - format: date-time - type: string - message: - description: A Message containing details about - this condition's last transition from one status - to another, if any. - type: string - reason: - description: A Reason for this condition's last - transition from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one - of each condition type may apply to a resource - at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - currentBatch: - description: The current batch the rollout is working - on/blocked it starts from 0 - format: int32 - type: integer - lastAppliedPodTemplateIdentifier: - description: lastAppliedPodTemplateIdentifier is a string - that uniquely represent the last pod template each workload - type could use different ways to identify that so we - cannot compare between resources We update this field - only after a successful rollout - type: string - lastTargetAppRevision: - description: LastUpgradedTargetAppRevision contains the - name of the app that we upgraded to We will restart - the rollout if this is not the same as the spec - type: string - rollingState: - description: RollingState is the Rollout State - type: string - rolloutOriginalSize: - description: RolloutTargetSize is the size of the target - resources. This is determined once the initial spec - verification and does not change until the rollout is - restarted - format: int32 - type: integer - rolloutTargetSize: - description: RolloutTargetSize is the size of the target - resources. This is determined once the initial spec - verification and does not change until the rollout is - restarted - format: int32 - type: integer - targetGeneration: - description: NewPodTemplateIdentifier is a string that - uniquely represent the new pod template each workload - type could use different ways to identify that so we - cannot compare between resources - type: string - upgradedReadyReplicas: - description: UpgradedReadyReplicas is the number of Pods - upgraded by the rollout controller that have a Ready - Condition. - format: int32 - type: integer - upgradedReplicas: - description: UpgradedReplicas is the number of Pods upgraded - by the rollout controller - format: int32 - type: integer - required: - - currentBatch - - lastTargetAppRevision - - rollingState - - upgradedReadyReplicas - - upgradedReplicas - type: object - services: - description: Services record the status of the application - services - items: - description: ApplicationComponentStatus record the health - status of App component - properties: - env: - type: string - healthy: - type: boolean - message: - type: string - name: - type: string - scopes: - items: - description: 'ObjectReference contains enough information - to let you inspect or modify the referred object. - --- New uses of this type are discouraged because - of difficulty describing its usage when embedded - in APIs. 1. Ignored fields. It includes many fields - which are not generally honored. For instance, - ResourceVersion and FieldPath are both very rarely - valid in actual usage. 2. Invalid usage help. It - is impossible to add specific help for individual - usage. In most embedded usages, there are particular restrictions - like, "must refer only to types A and B" or "UID - not honored" or "name must be restricted". Those - cannot be well described when embedded. 3. Inconsistent - validation. Because the usages are different, the - validation rules are different by usage, which makes - it hard for users to predict what will happen. 4. - The fields are both imprecise and overly precise. Kind - is not a precise mapping to a URL. This can produce - ambiguity during interpretation and require - a REST mapping. In most cases, the dependency is - on the group,resource tuple and the version - of the actual struct is irrelevant. 5. We cannot - easily change it. Because this type is embedded - in many locations, updates to this type will - affect numerous schemas. Don''t make new APIs embed - an underspecified API type they do not control. - Instead of using this type, create a locally provided - and used type that is well-focused on your reference. - For example, ServiceReferences for admission registration: - https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object - instead of an entire object, this string should - contain a valid JSON/Go field access statement, - such as desiredState.manifest.containers[2]. - For example, if the object reference is to a - container within a pod, this would take on a - value like: "spec.containers{name}" (where "name" - refers to the name of the container that triggered - the event) or if no container name is specified - "spec.containers[2]" (container with index 2 - in this pod). This syntax is chosen only to - have some well-defined way of referencing a - part of an object. TODO: this design is not - final and this field is subject to change in - the future.' - type: string - kind: - description: 'Kind of the referent. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which - this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - traits: - items: - description: ApplicationTraitStatus records the trait - health status - properties: - healthy: - type: boolean - message: - type: string - type: - type: string - required: - - healthy - - type - type: object - type: array - workloadDefinition: - description: WorkloadDefinition is the definition of - a WorkloadDefinition, such as deployments/apps.v1 - properties: - apiVersion: - type: string - kind: - type: string - required: - - apiVersion - - kind - type: object - required: - - healthy - - name - type: object - type: array - status: - description: ApplicationPhase is a label for the condition - of a application at the current time - type: string - workflow: - description: Workflow record the status of workflow - properties: - appRevision: - type: string - contextBackend: - description: 'ObjectReference contains enough information - to let you inspect or modify the referred object. --- - New uses of this type are discouraged because of difficulty - describing its usage when embedded in APIs. 1. Ignored - fields. It includes many fields which are not generally - honored. For instance, ResourceVersion and FieldPath - are both very rarely valid in actual usage. 2. Invalid - usage help. It is impossible to add specific help for - individual usage. In most embedded usages, there are - particular restrictions like, "must refer only to - types A and B" or "UID not honored" or "name must be - restricted". Those cannot be well described when - embedded. 3. Inconsistent validation. Because the - usages are different, the validation rules are different - by usage, which makes it hard for users to predict what - will happen. 4. The fields are both imprecise and overly - precise. Kind is not a precise mapping to a URL. This - can produce ambiguity during interpretation and - require a REST mapping. In most cases, the dependency - is on the group,resource tuple and the version of - the actual struct is irrelevant. 5. We cannot easily - change it. Because this type is embedded in many locations, - updates to this type will affect numerous schemas. Don''t - make new APIs embed an underspecified API type they - do not control. Instead of using this type, create a - locally provided and used type that is well-focused - on your reference. For example, ServiceReferences for - admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object - instead of an entire object, this string should - contain a valid JSON/Go field access statement, - such as desiredState.manifest.containers[2]. For - example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container - that triggered the event) or if no container name - is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only - to have some well-defined way of referencing a part - of an object. TODO: this design is not final and - this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this - reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - mode: - description: WorkflowMode describes the mode of workflow - type: string - steps: - items: - description: WorkflowStepStatus record the status of - a workflow step - properties: - id: - type: string - message: - description: A human readable message indicating - details about why the workflowStep is in this - state. - type: string - name: - type: string - phase: - description: WorkflowStepPhase describes the phase - of a workflow step. - type: string - reason: - description: A brief CamelCase message indicating - details about why the workflowStep is in this - state. - type: string - subSteps: - description: SubStepsStatus record the status of - workflow steps. - properties: - mode: - description: WorkflowMode describes the mode - of workflow - type: string - stepIndex: - type: integer - steps: - items: - description: WorkflowSubStepStatus record - the status of a workflow step - properties: - id: - type: string - message: - description: A human readable message - indicating details about why the workflowStep - is in this state. - type: string - name: - type: string - phase: - description: WorkflowStepPhase describes - the phase of a workflow step. - type: string - reason: - description: A brief CamelCase message - indicating details about why the workflowStep - is in this state. - type: string - type: - type: string - required: - - id - type: object - type: array - type: object - type: - type: string - required: - - id - type: object - type: array - suspend: - type: boolean - terminated: - type: boolean - required: - - mode - - suspend - - terminated - type: object - type: object - type: object - applicationConfiguration: - description: ApplicationConfiguration records the rendered applicationConfiguration - from Application, it will contains the whole K8s CR of trait and - the reference component in it. - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - componentDefinitions: - additionalProperties: - description: ComponentDefinition is the Schema for the componentdefinitions - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: ComponentDefinitionSpec defines the desired state - of ComponentDefinition - properties: - childResourceKinds: - description: ChildResourceKinds are the list of GVK of the - child resources this workload generates - items: - description: A ChildResourceKind defines a child Kubernetes - resource kind with a selector - properties: - apiVersion: - description: APIVersion of the child resource - type: string - kind: - description: Kind of the child resource - type: string - selector: - additionalProperties: - type: string - description: Selector to select the child resources - that the workload wants to expose to traits - type: object - required: - - apiVersion - - kind - type: object - type: array - extension: - description: Extension is used for extension needs by OAM - platform builders - type: object - x-kubernetes-preserve-unknown-fields: true - podSpecPath: - description: PodSpecPath indicates where/if this workload - has K8s podSpec field if one workload has podSpec, trait - can do lot's of assumption such as port, env, volume fields. - type: string - revisionLabel: - description: RevisionLabel indicates which label for underlying - resources(e.g. pods) of this workload can be used by trait - to create resource selectors(e.g. label selector for pods). - type: string - schematic: - description: Schematic defines the data format and template - of the encapsulation of the workload - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template - data of the capability, it will replace the old - CUE template in extension field. Template is a - required field if CUE is defined in Capability - Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm - module - properties: - release: - description: Release records a Helm release used - by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository - used by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable - parameter of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array - of fields within this workload that will - be overwritten by the value of this parameter. - \tAll fields must be of the same type. Fields - are specified as JSON field paths without - a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or - not a value for this parameter must be supplied - when authoring an Application. - type: boolean - type: - description: 'ValueType indicates the type - of the parameter value, and only supports - basic data types: string, number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes - resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud - resources managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote - git repository. It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference - to Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - status: - description: Status defines the custom health policy and - status message for workload - properties: - customStatus: - description: CustomStatus defines the custom status - message that could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy - for the abstraction - type: string - type: object - workload: - description: Workload is a workload type descriptor - properties: - definition: - description: Definition mutually exclusive to workload.type, - a embedded WorkloadDefinition - properties: - apiVersion: - type: string - kind: - type: string - required: - - apiVersion - - kind - type: object - type: - description: Type ref to a WorkloadDefinition via name - type: string - type: object - required: - - workload - type: object - status: - description: ComponentDefinitionStatus is the status of ComponentDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains - OpenAPI V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the - spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - description: ComponentDefinitions records the snapshot of the componentDefinitions - related with the created/modified Application - type: object - components: - description: Components records the rendered components from Application, - it will contains the whole K8s CR of workload in it. - items: - description: RawComponent record raw component - properties: - raw: - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - required: - - raw - type: object - type: array - policyDefinitions: - additionalProperties: - description: PolicyDefinition is the Schema for the policydefinitions - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: PolicyDefinitionSpec defines the desired state - of PolicyDefinition - properties: - definitionRef: - description: Reference to the CustomResourceDefinition that - defines this trait kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be - used if CRD has multiple versions by default it will - use the first one if not specified - type: string - required: - - name - type: object - manageHealthCheck: - description: ManageHealthCheck means the policy will handle - health checking and skip application controller built-in - health checking. - type: boolean - schematic: - description: Schematic defines the data format and template - of the encapsulation of the policy definition - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template - data of the capability, it will replace the old - CUE template in extension field. Template is a - required field if CUE is defined in Capability - Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm - module - properties: - release: - description: Release records a Helm release used - by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository - used by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable - parameter of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array - of fields within this workload that will - be overwritten by the value of this parameter. - \tAll fields must be of the same type. Fields - are specified as JSON field paths without - a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or - not a value for this parameter must be supplied - when authoring an Application. - type: boolean - type: - description: 'ValueType indicates the type - of the parameter value, and only supports - basic data types: string, number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes - resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud - resources managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote - git repository. It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference - to Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - type: object - status: - description: PolicyDefinitionStatus is the status of PolicyDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the - spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - description: PolicyDefinitions records the snapshot of the PolicyDefinitions - related with the created/modified Application - type: object - resourcesConfigMap: - description: ResourcesConfigMap references the ConfigMap that's generated - to contain all final rendered resources. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - scopeDefinitions: - additionalProperties: - description: A ScopeDefinition registers a kind of Kubernetes custom - resource as a valid OAM scope kind by referencing its CustomResourceDefinition. - The CRD is used to validate the schema of the scope when it is - embedded in an OAM ApplicationConfiguration. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: A ScopeDefinitionSpec defines the desired state - of a ScopeDefinition. - properties: - allowComponentOverlap: - description: AllowComponentOverlap specifies whether an - OAM component may exist in multiple instances of this - kind of scope. - type: boolean - definitionRef: - description: Reference to the CustomResourceDefinition that - defines this scope kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be - used if CRD has multiple versions by default it will - use the first one if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM - platform builders - type: object - x-kubernetes-preserve-unknown-fields: true - workloadRefsPath: - description: WorkloadRefsPath indicates if/where a scope - accepts workloadRef objects - type: string - required: - - allowComponentOverlap - - definitionRef - type: object - type: object - description: ScopeDefinitions records the snapshot of the scopeDefinitions - related with the created/modified Application - type: object - scopeGVK: - additionalProperties: - description: GroupVersionKind unambiguously identifies a kind. It - doesn't anonymously include GroupVersion to avoid automatic coersion. It - doesn't use a GroupVersion to avoid custom marshalling - properties: - group: - type: string - kind: - type: string - version: - type: string - required: - - group - - kind - - version - type: object - description: ScopeGVK records the apiVersion to GVK mapping - type: object - traitDefinitions: - additionalProperties: - description: A TraitDefinition registers a kind of Kubernetes custom - resource as a valid OAM trait kind by referencing its CustomResourceDefinition. - The CRD is used to validate the schema of the trait when it is - embedded in an OAM ApplicationConfiguration. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: A TraitDefinitionSpec defines the desired state - of a TraitDefinition. - properties: - appliesToWorkloads: - description: AppliesToWorkloads specifies the list of workload - kinds this trait applies to. Workload kinds are specified - in kind.group/version format, e.g. server.core.oam.dev/v1alpha2. - Traits that omit this field apply to all workload kinds. - items: - type: string - type: array - conflictsWith: - description: 'ConflictsWith specifies the list of traits(CRD - name, Definition name, CRD group) which could not apply - to the same workloads with this trait. Traits that omit - this field can work with any other traits. Example rules: - "service" # Trait definition name "services.k8s.io" # - API resource/crd name "*.networking.k8s.io" # API group - "labelSelector:foo=bar" # label selector labelSelector - format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse' - items: - type: string - type: array - definitionRef: - description: Reference to the CustomResourceDefinition that - defines this trait kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be - used if CRD has multiple versions by default it will - use the first one if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM - platform builders - type: object - x-kubernetes-preserve-unknown-fields: true - manageWorkload: - description: ManageWorkload defines the trait would be responsible - for creating the workload - type: boolean - podDisruptive: - description: PodDisruptive specifies whether using the trait - will cause the pod to restart or not. - type: boolean - revisionEnabled: - description: Revision indicates whether a trait is aware - of component revision - type: boolean - schematic: - description: Schematic defines the data format and template - of the encapsulation of the trait - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template - data of the capability, it will replace the old - CUE template in extension field. Template is a - required field if CUE is defined in Capability - Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm - module - properties: - release: - description: Release records a Helm release used - by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository - used by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable - parameter of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array - of fields within this workload that will - be overwritten by the value of this parameter. - \tAll fields must be of the same type. Fields - are specified as JSON field paths without - a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or - not a value for this parameter must be supplied - when authoring an Application. - type: boolean - type: - description: 'ValueType indicates the type - of the parameter value, and only supports - basic data types: string, number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes - resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud - resources managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote - git repository. It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference - to Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - skipRevisionAffect: - description: SkipRevisionAffect defines the update this - trait will not generate a new application Revision - type: boolean - status: - description: Status defines the custom health policy and - status message for trait - properties: - customStatus: - description: CustomStatus defines the custom status - message that could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy - for the abstraction - type: string - type: object - workloadRefPath: - description: WorkloadRefPath indicates where/if a trait - accepts a workloadRef object - type: string - type: object - status: - description: TraitDefinitionStatus is the status of TraitDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains - OpenAPI V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the - spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - description: TraitDefinitions records the snapshot of the traitDefinitions - related with the created/modified Application - type: object - workflowStepDefinitions: - additionalProperties: - description: WorkflowStepDefinition is the Schema for the workflowstepdefinitions - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: WorkflowStepDefinitionSpec defines the desired - state of WorkflowStepDefinition - properties: - definitionRef: - description: Reference to the CustomResourceDefinition that - defines this trait kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be - used if CRD has multiple versions by default it will - use the first one if not specified - type: string - required: - - name - type: object - schematic: - description: Schematic defines the data format and template - of the encapsulation of the workflow step definition - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template - data of the capability, it will replace the old - CUE template in extension field. Template is a - required field if CUE is defined in Capability - Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm - module - properties: - release: - description: Release records a Helm release used - by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository - used by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable - parameter of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array - of fields within this workload that will - be overwritten by the value of this parameter. - \tAll fields must be of the same type. Fields - are specified as JSON field paths without - a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or - not a value for this parameter must be supplied - when authoring an Application. - type: boolean - type: - description: 'ValueType indicates the type - of the parameter value, and only supports - basic data types: string, number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes - resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud - resources managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote - git repository. It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference - to Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - type: object - status: - description: WorkflowStepDefinitionStatus is the status of WorkflowStepDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains - OpenAPI V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the - spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - description: WorkflowStepDefinitions records the snapshot of the WorkflowStepDefinitions - related with the created/modified Application - type: object - workloadDefinitions: - additionalProperties: - description: A WorkloadDefinition registers a kind of Kubernetes - custom resource as a valid OAM workload kind by referencing its - CustomResourceDefinition. The CRD is used to validate the schema - of the workload when it is embedded in an OAM Component. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: A WorkloadDefinitionSpec defines the desired state - of a WorkloadDefinition. - properties: - childResourceKinds: - description: ChildResourceKinds are the list of GVK of the - child resources this workload generates - items: - description: A ChildResourceKind defines a child Kubernetes - resource kind with a selector - properties: - apiVersion: - description: APIVersion of the child resource - type: string - kind: - description: Kind of the child resource - type: string - selector: - additionalProperties: - type: string - description: Selector to select the child resources - that the workload wants to expose to traits - type: object - required: - - apiVersion - - kind - type: object - type: array - definitionRef: - description: Reference to the CustomResourceDefinition that - defines this workload kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be - used if CRD has multiple versions by default it will - use the first one if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM - platform builders - type: object - x-kubernetes-preserve-unknown-fields: true - podSpecPath: - description: PodSpecPath indicates where/if this workload - has K8s podSpec field if one workload has podSpec, trait - can do lot's of assumption such as port, env, volume fields. - type: string - revisionLabel: - description: RevisionLabel indicates which label for underlying - resources(e.g. pods) of this workload can be used by trait - to create resource selectors(e.g. label selector for pods). - type: string - schematic: - description: Schematic defines the data format and template - of the encapsulation of the workload - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template - data of the capability, it will replace the old - CUE template in extension field. Template is a - required field if CUE is defined in Capability - Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm - module - properties: - release: - description: Release records a Helm release used - by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository - used by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable - parameter of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array - of fields within this workload that will - be overwritten by the value of this parameter. - \tAll fields must be of the same type. Fields - are specified as JSON field paths without - a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or - not a value for this parameter must be supplied - when authoring an Application. - type: boolean - type: - description: 'ValueType indicates the type - of the parameter value, and only supports - basic data types: string, number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes - resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud - resources managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote - git repository. It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference - to Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - status: - description: Status defines the custom health policy and - status message for workload - properties: - customStatus: - description: CustomStatus defines the custom status - message that could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy - for the abstraction - type: string - type: object - required: - - definitionRef - type: object - status: - description: WorkloadDefinitionStatus is the status of WorkloadDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - type: object - type: object - description: WorkloadDefinitions records the snapshot of the workloadDefinitions - related with the created/modified Application - type: object - required: - - application - type: object - type: object - served: true - storage: true - subresources: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_applications.yaml b/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_applications.yaml deleted file mode 100644 index eadd800..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_applications.yaml +++ /dev/null @@ -1,1522 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: vela-system/kubevela-vela-core-root-cert - controller-gen.kubebuilder.io/version: v0.6.2 - name: applications.core.oam.dev -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: vela-core-webhook - namespace: vela-system - path: /convert - port: 443 - conversionReviewVersions: - - v1beta1 - - v1alpha2 - group: core.oam.dev - names: - categories: - - oam - kind: Application - listKind: ApplicationList - plural: applications - shortNames: - - app - singular: application - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.components[*].name - name: COMPONENT - type: string - - jsonPath: .spec.components[*].type - name: TYPE - type: string - - jsonPath: .status.status - name: PHASE - type: string - - jsonPath: .status.services[*].healthy - name: HEALTHY - type: boolean - - jsonPath: .status.services[*].message - name: STATUS - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha2 - schema: - openAPIV3Schema: - description: Application is the Schema for the applications API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ApplicationSpec is the spec of Application - properties: - components: - items: - description: ApplicationComponent describe the component of application - properties: - name: - type: string - scopes: - additionalProperties: - type: string - description: scopes in ApplicationComponent defines the component-level scopes the format is pairs, the key represents type of `ScopeDefinition` while the value represent the name of scope instance. - type: object - x-kubernetes-preserve-unknown-fields: true - settings: - type: object - x-kubernetes-preserve-unknown-fields: true - traits: - description: Traits define the trait of one component, the type must be array to keep the order. - items: - description: ApplicationTrait defines the trait of application - properties: - name: - type: string - properties: - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - name - type: object - type: array - type: - type: string - required: - - name - - type - type: object - type: array - rolloutPlan: - description: RolloutPlan is the details on how to rollout the resources The controller simply replace the old resources with the new one if there is no rollout plan involved - properties: - batchPartition: - description: All pods in the batches up to the batchPartition (included) will have the target resource specification while the rest still have the source resource This is designed for the operators to manually rollout Default is the the number of batches which will rollout all the batches - format: int32 - type: integer - canaryMetric: - description: CanaryMetric provides a way for the rollout process to automatically check certain metrics before complete the process - items: - description: CanaryMetric holds the reference to metrics used for canary analysis - properties: - interval: - description: Interval represents the windows size - type: string - metricsRange: - description: Range value accepted for this metric - properties: - max: - anyOf: - - type: integer - - type: string - description: Maximum value - x-kubernetes-int-or-string: true - min: - anyOf: - - type: integer - - type: string - description: Minimum value - x-kubernetes-int-or-string: true - type: object - name: - description: Name of the metric - type: string - templateRef: - description: TemplateRef references a metric template object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - name - type: object - type: array - numBatches: - description: The number of batches, default = 1 - format: int32 - type: integer - paused: - description: Paused the rollout, default is false - type: boolean - rolloutBatches: - description: The exact distribution among batches. its size has to be exactly the same as the NumBatches (if set) The total number cannot exceed the targetSize or the size of the source resource We will IGNORE the last batch's replica field if it's a percentage since round errors can lead to inaccurate sum We highly recommend to leave the last batch's replica field empty - items: - description: RolloutBatch is used to describe how the each batch rollout should be - properties: - batchRolloutWebhooks: - description: RolloutWebhooks provides a way for the batch rollout to interact with an external process - items: - description: RolloutWebhook holds the reference to external checks used for canary analysis - properties: - expectedStatus: - description: ExpectedStatus contains all the expected http status code that we will accept as success - items: - type: integer - type: array - metadata: - additionalProperties: - type: string - description: Metadata (key-value pairs) for this webhook - type: object - method: - description: Method the HTTP call method, default is POST - type: string - name: - description: Name of this webhook - type: string - type: - description: Type of this webhook - type: string - url: - description: URL address of this webhook - type: string - required: - - name - - type - - url - type: object - type: array - canaryMetric: - description: CanaryMetric provides a way for the batch rollout process to automatically check certain metrics before moving to the next batch - items: - description: CanaryMetric holds the reference to metrics used for canary analysis - properties: - interval: - description: Interval represents the windows size - type: string - metricsRange: - description: Range value accepted for this metric - properties: - max: - anyOf: - - type: integer - - type: string - description: Maximum value - x-kubernetes-int-or-string: true - min: - anyOf: - - type: integer - - type: string - description: Minimum value - x-kubernetes-int-or-string: true - type: object - name: - description: Name of the metric - type: string - templateRef: - description: TemplateRef references a metric template object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - name - type: object - type: array - instanceInterval: - description: The wait time, in seconds, between instances upgrades, default = 0 - format: int32 - type: integer - maxUnavailable: - anyOf: - - type: integer - - type: string - description: MaxUnavailable is the max allowed number of pods that is unavailable during the upgrade. We will mark the batch as ready as long as there are less or equal number of pods unavailable than this number. default = 0 - x-kubernetes-int-or-string: true - podList: - description: The list of Pods to get upgraded it is mutually exclusive with the Replicas field - items: - type: string - type: array - replicas: - anyOf: - - type: integer - - type: string - description: 'Replicas is the number of pods to upgrade in this batch it can be an absolute number (ex: 5) or a percentage of total pods we will ignore the percentage of the last batch to just fill the gap it is mutually exclusive with the PodList field' - x-kubernetes-int-or-string: true - type: object - type: array - rolloutStrategy: - description: RolloutStrategy defines strategies for the rollout plan The default is IncreaseFirstRolloutStrategyType - type: string - rolloutWebhooks: - description: RolloutWebhooks provide a way for the rollout to interact with an external process - items: - description: RolloutWebhook holds the reference to external checks used for canary analysis - properties: - expectedStatus: - description: ExpectedStatus contains all the expected http status code that we will accept as success - items: - type: integer - type: array - metadata: - additionalProperties: - type: string - description: Metadata (key-value pairs) for this webhook - type: object - method: - description: Method the HTTP call method, default is POST - type: string - name: - description: Name of this webhook - type: string - type: - description: Type of this webhook - type: string - url: - description: URL address of this webhook - type: string - required: - - name - - type - - url - type: object - type: array - targetSize: - description: The size of the target resource. The default is the same as the size of the source resource. - format: int32 - type: integer - type: object - required: - - components - type: object - status: - description: AppStatus defines the observed state of Application - properties: - appliedResources: - description: AppliedResources record the resources that the workflow step apply. - items: - description: ClusterObjectReference defines the object reference with cluster. - properties: - apiVersion: - description: API version of the referent. - type: string - cluster: - type: string - creator: - description: ResourceCreatorRole defines the resource creator. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - components: - description: Components record the related Components created by Application Controller - items: - description: 'ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don''t make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from one status to another. - type: string - status: - description: Status of this condition; is it currently True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - latestRevision: - description: LatestRevision of the application configuration it generates - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - observedGeneration: - description: The generation observed by the application controller. - format: int64 - type: integer - resourceTracker: - description: ResourceTracker record the status of the ResourceTracker - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - rollout: - description: AppRolloutStatus defines the observed state of AppRollout - properties: - LastSourceAppRevision: - description: LastSourceAppRevision contains the name of the app that we need to upgrade from. We will restart the rollout if this is not the same as the spec - type: string - batchRollingState: - description: BatchRollingState only meaningful when the Status is rolling - type: string - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from one status to another. - type: string - status: - description: Status of this condition; is it currently True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - currentBatch: - description: The current batch the rollout is working on/blocked it starts from 0 - format: int32 - type: integer - lastAppliedPodTemplateIdentifier: - description: lastAppliedPodTemplateIdentifier is a string that uniquely represent the last pod template each workload type could use different ways to identify that so we cannot compare between resources We update this field only after a successful rollout - type: string - lastTargetAppRevision: - description: LastUpgradedTargetAppRevision contains the name of the app that we upgraded to We will restart the rollout if this is not the same as the spec - type: string - rollingState: - description: RollingState is the Rollout State - type: string - rolloutOriginalSize: - description: RolloutTargetSize is the size of the target resources. This is determined once the initial spec verification and does not change until the rollout is restarted - format: int32 - type: integer - rolloutTargetSize: - description: RolloutTargetSize is the size of the target resources. This is determined once the initial spec verification and does not change until the rollout is restarted - format: int32 - type: integer - targetGeneration: - description: NewPodTemplateIdentifier is a string that uniquely represent the new pod template each workload type could use different ways to identify that so we cannot compare between resources - type: string - upgradedReadyReplicas: - description: UpgradedReadyReplicas is the number of Pods upgraded by the rollout controller that have a Ready Condition. - format: int32 - type: integer - upgradedReplicas: - description: UpgradedReplicas is the number of Pods upgraded by the rollout controller - format: int32 - type: integer - required: - - currentBatch - - lastTargetAppRevision - - rollingState - - upgradedReadyReplicas - - upgradedReplicas - type: object - services: - description: Services record the status of the application services - items: - description: ApplicationComponentStatus record the health status of App component - properties: - env: - type: string - healthy: - type: boolean - message: - type: string - name: - type: string - scopes: - items: - description: 'ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don''t make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - traits: - items: - description: ApplicationTraitStatus records the trait health status - properties: - healthy: - type: boolean - message: - type: string - type: - type: string - required: - - healthy - - type - type: object - type: array - workloadDefinition: - description: WorkloadDefinition is the definition of a WorkloadDefinition, such as deployments/apps.v1 - properties: - apiVersion: - type: string - kind: - type: string - required: - - apiVersion - - kind - type: object - required: - - healthy - - name - type: object - type: array - status: - description: ApplicationPhase is a label for the condition of a application at the current time - type: string - workflow: - description: Workflow record the status of workflow - properties: - appRevision: - type: string - contextBackend: - description: 'ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don''t make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - mode: - description: WorkflowMode describes the mode of workflow - type: string - steps: - items: - description: WorkflowStepStatus record the status of a workflow step - properties: - id: - type: string - message: - description: A human readable message indicating details about why the workflowStep is in this state. - type: string - name: - type: string - phase: - description: WorkflowStepPhase describes the phase of a workflow step. - type: string - reason: - description: A brief CamelCase message indicating details about why the workflowStep is in this state. - type: string - subSteps: - description: SubStepsStatus record the status of workflow steps. - properties: - mode: - description: WorkflowMode describes the mode of workflow - type: string - stepIndex: - type: integer - steps: - items: - description: WorkflowSubStepStatus record the status of a workflow step - properties: - id: - type: string - message: - description: A human readable message indicating details about why the workflowStep is in this state. - type: string - name: - type: string - phase: - description: WorkflowStepPhase describes the phase of a workflow step. - type: string - reason: - description: A brief CamelCase message indicating details about why the workflowStep is in this state. - type: string - type: - type: string - required: - - id - type: object - type: array - type: object - type: - type: string - required: - - id - type: object - type: array - suspend: - type: boolean - terminated: - type: boolean - required: - - mode - - suspend - - terminated - type: object - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.components[*].name - name: COMPONENT - type: string - - jsonPath: .spec.components[*].type - name: TYPE - type: string - - jsonPath: .status.status - name: PHASE - type: string - - jsonPath: .status.services[*].healthy - name: HEALTHY - type: boolean - - jsonPath: .status.services[*].message - name: STATUS - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1beta1 - schema: - openAPIV3Schema: - description: Application is the Schema for the applications API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ApplicationSpec is the spec of Application - properties: - components: - items: - description: ApplicationComponent describe the component of application - properties: - dependsOn: - items: - type: string - type: array - externalRevision: - description: ExternalRevision specified the component revisionName - type: string - inputs: - description: StepInputs defines variable input of WorkflowStep - items: - properties: - from: - type: string - parameterKey: - type: string - required: - - from - - parameterKey - type: object - type: array - name: - type: string - outputs: - description: StepOutputs defines output variable of WorkflowStep - items: - properties: - name: - type: string - valueFrom: - type: string - required: - - name - - valueFrom - type: object - type: array - properties: - type: object - x-kubernetes-preserve-unknown-fields: true - scopes: - additionalProperties: - type: string - description: scopes in ApplicationComponent defines the component-level scopes the format is pairs, the key represents type of `ScopeDefinition` while the value represent the name of scope instance. - type: object - x-kubernetes-preserve-unknown-fields: true - traits: - description: Traits define the trait of one component, the type must be array to keep the order. - items: - description: ApplicationTrait defines the trait of application - properties: - properties: - type: object - x-kubernetes-preserve-unknown-fields: true - type: - type: string - required: - - type - type: object - type: array - type: - type: string - required: - - name - - type - type: object - type: array - policies: - description: Policies defines the global policies for all components in the app, e.g. security, metrics, gitops, multi-cluster placement rules, etc. Policies are applied after components are rendered and before workflow steps are executed. - items: - description: AppPolicy defines a global policy for all components in the app. - properties: - name: - description: Name is the unique name of the policy. - type: string - properties: - type: object - x-kubernetes-preserve-unknown-fields: true - type: - type: string - required: - - name - - type - type: object - type: array - rolloutPlan: - description: RolloutPlan is the details on how to rollout the resources The controller simply replace the old resources with the new one if there is no rollout plan involved - properties: - batchPartition: - description: All pods in the batches up to the batchPartition (included) will have the target resource specification while the rest still have the source resource This is designed for the operators to manually rollout Default is the the number of batches which will rollout all the batches - format: int32 - type: integer - canaryMetric: - description: CanaryMetric provides a way for the rollout process to automatically check certain metrics before complete the process - items: - description: CanaryMetric holds the reference to metrics used for canary analysis - properties: - interval: - description: Interval represents the windows size - type: string - metricsRange: - description: Range value accepted for this metric - properties: - max: - anyOf: - - type: integer - - type: string - description: Maximum value - x-kubernetes-int-or-string: true - min: - anyOf: - - type: integer - - type: string - description: Minimum value - x-kubernetes-int-or-string: true - type: object - name: - description: Name of the metric - type: string - templateRef: - description: TemplateRef references a metric template object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - name - type: object - type: array - numBatches: - description: The number of batches, default = 1 - format: int32 - type: integer - paused: - description: Paused the rollout, default is false - type: boolean - rolloutBatches: - description: The exact distribution among batches. its size has to be exactly the same as the NumBatches (if set) The total number cannot exceed the targetSize or the size of the source resource We will IGNORE the last batch's replica field if it's a percentage since round errors can lead to inaccurate sum We highly recommend to leave the last batch's replica field empty - items: - description: RolloutBatch is used to describe how the each batch rollout should be - properties: - batchRolloutWebhooks: - description: RolloutWebhooks provides a way for the batch rollout to interact with an external process - items: - description: RolloutWebhook holds the reference to external checks used for canary analysis - properties: - expectedStatus: - description: ExpectedStatus contains all the expected http status code that we will accept as success - items: - type: integer - type: array - metadata: - additionalProperties: - type: string - description: Metadata (key-value pairs) for this webhook - type: object - method: - description: Method the HTTP call method, default is POST - type: string - name: - description: Name of this webhook - type: string - type: - description: Type of this webhook - type: string - url: - description: URL address of this webhook - type: string - required: - - name - - type - - url - type: object - type: array - canaryMetric: - description: CanaryMetric provides a way for the batch rollout process to automatically check certain metrics before moving to the next batch - items: - description: CanaryMetric holds the reference to metrics used for canary analysis - properties: - interval: - description: Interval represents the windows size - type: string - metricsRange: - description: Range value accepted for this metric - properties: - max: - anyOf: - - type: integer - - type: string - description: Maximum value - x-kubernetes-int-or-string: true - min: - anyOf: - - type: integer - - type: string - description: Minimum value - x-kubernetes-int-or-string: true - type: object - name: - description: Name of the metric - type: string - templateRef: - description: TemplateRef references a metric template object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - name - type: object - type: array - instanceInterval: - description: The wait time, in seconds, between instances upgrades, default = 0 - format: int32 - type: integer - maxUnavailable: - anyOf: - - type: integer - - type: string - description: MaxUnavailable is the max allowed number of pods that is unavailable during the upgrade. We will mark the batch as ready as long as there are less or equal number of pods unavailable than this number. default = 0 - x-kubernetes-int-or-string: true - podList: - description: The list of Pods to get upgraded it is mutually exclusive with the Replicas field - items: - type: string - type: array - replicas: - anyOf: - - type: integer - - type: string - description: 'Replicas is the number of pods to upgrade in this batch it can be an absolute number (ex: 5) or a percentage of total pods we will ignore the percentage of the last batch to just fill the gap it is mutually exclusive with the PodList field' - x-kubernetes-int-or-string: true - type: object - type: array - rolloutStrategy: - description: RolloutStrategy defines strategies for the rollout plan The default is IncreaseFirstRolloutStrategyType - type: string - rolloutWebhooks: - description: RolloutWebhooks provide a way for the rollout to interact with an external process - items: - description: RolloutWebhook holds the reference to external checks used for canary analysis - properties: - expectedStatus: - description: ExpectedStatus contains all the expected http status code that we will accept as success - items: - type: integer - type: array - metadata: - additionalProperties: - type: string - description: Metadata (key-value pairs) for this webhook - type: object - method: - description: Method the HTTP call method, default is POST - type: string - name: - description: Name of this webhook - type: string - type: - description: Type of this webhook - type: string - url: - description: URL address of this webhook - type: string - required: - - name - - type - - url - type: object - type: array - targetSize: - description: The size of the target resource. The default is the same as the size of the source resource. - format: int32 - type: integer - type: object - workflow: - description: 'Workflow defines how to customize the control logic. If workflow is specified, Vela won''t apply any resource, but provide rendered output in AppRevision. Workflow steps are executed in array order, and each step: - will have a context in annotation. - should mark "finish" phase in status.conditions.' - properties: - steps: - items: - description: WorkflowStep defines how to execute a workflow step. - properties: - dependsOn: - items: - type: string - type: array - inputs: - description: StepInputs defines variable input of WorkflowStep - items: - properties: - from: - type: string - parameterKey: - type: string - required: - - from - - parameterKey - type: object - type: array - name: - description: Name is the unique name of the workflow step. - type: string - outputs: - description: StepOutputs defines output variable of WorkflowStep - items: - properties: - name: - type: string - valueFrom: - type: string - required: - - name - - valueFrom - type: object - type: array - properties: - type: object - x-kubernetes-preserve-unknown-fields: true - type: - type: string - required: - - name - - type - type: object - type: array - type: object - required: - - components - type: object - status: - description: AppStatus defines the observed state of Application - properties: - appliedResources: - description: AppliedResources record the resources that the workflow step apply. - items: - description: ClusterObjectReference defines the object reference with cluster. - properties: - apiVersion: - description: API version of the referent. - type: string - cluster: - type: string - creator: - description: ResourceCreatorRole defines the resource creator. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - components: - description: Components record the related Components created by Application Controller - items: - description: 'ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don''t make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from one status to another. - type: string - status: - description: Status of this condition; is it currently True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - latestRevision: - description: LatestRevision of the application configuration it generates - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - observedGeneration: - description: The generation observed by the application controller. - format: int64 - type: integer - resourceTracker: - description: ResourceTracker record the status of the ResourceTracker - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - rollout: - description: AppRolloutStatus defines the observed state of AppRollout - properties: - LastSourceAppRevision: - description: LastSourceAppRevision contains the name of the app that we need to upgrade from. We will restart the rollout if this is not the same as the spec - type: string - batchRollingState: - description: BatchRollingState only meaningful when the Status is rolling - type: string - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from one status to another. - type: string - status: - description: Status of this condition; is it currently True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - currentBatch: - description: The current batch the rollout is working on/blocked it starts from 0 - format: int32 - type: integer - lastAppliedPodTemplateIdentifier: - description: lastAppliedPodTemplateIdentifier is a string that uniquely represent the last pod template each workload type could use different ways to identify that so we cannot compare between resources We update this field only after a successful rollout - type: string - lastTargetAppRevision: - description: LastUpgradedTargetAppRevision contains the name of the app that we upgraded to We will restart the rollout if this is not the same as the spec - type: string - rollingState: - description: RollingState is the Rollout State - type: string - rolloutOriginalSize: - description: RolloutTargetSize is the size of the target resources. This is determined once the initial spec verification and does not change until the rollout is restarted - format: int32 - type: integer - rolloutTargetSize: - description: RolloutTargetSize is the size of the target resources. This is determined once the initial spec verification and does not change until the rollout is restarted - format: int32 - type: integer - targetGeneration: - description: NewPodTemplateIdentifier is a string that uniquely represent the new pod template each workload type could use different ways to identify that so we cannot compare between resources - type: string - upgradedReadyReplicas: - description: UpgradedReadyReplicas is the number of Pods upgraded by the rollout controller that have a Ready Condition. - format: int32 - type: integer - upgradedReplicas: - description: UpgradedReplicas is the number of Pods upgraded by the rollout controller - format: int32 - type: integer - required: - - currentBatch - - lastTargetAppRevision - - rollingState - - upgradedReadyReplicas - - upgradedReplicas - type: object - services: - description: Services record the status of the application services - items: - description: ApplicationComponentStatus record the health status of App component - properties: - env: - type: string - healthy: - type: boolean - message: - type: string - name: - type: string - scopes: - items: - description: 'ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don''t make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - traits: - items: - description: ApplicationTraitStatus records the trait health status - properties: - healthy: - type: boolean - message: - type: string - type: - type: string - required: - - healthy - - type - type: object - type: array - workloadDefinition: - description: WorkloadDefinition is the definition of a WorkloadDefinition, such as deployments/apps.v1 - properties: - apiVersion: - type: string - kind: - type: string - required: - - apiVersion - - kind - type: object - required: - - healthy - - name - type: object - type: array - status: - description: ApplicationPhase is a label for the condition of a application at the current time - type: string - workflow: - description: Workflow record the status of workflow - properties: - appRevision: - type: string - contextBackend: - description: 'ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don''t make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - mode: - description: WorkflowMode describes the mode of workflow - type: string - steps: - items: - description: WorkflowStepStatus record the status of a workflow step - properties: - id: - type: string - message: - description: A human readable message indicating details about why the workflowStep is in this state. - type: string - name: - type: string - phase: - description: WorkflowStepPhase describes the phase of a workflow step. - type: string - reason: - description: A brief CamelCase message indicating details about why the workflowStep is in this state. - type: string - subSteps: - description: SubStepsStatus record the status of workflow steps. - properties: - mode: - description: WorkflowMode describes the mode of workflow - type: string - stepIndex: - type: integer - steps: - items: - description: WorkflowSubStepStatus record the status of a workflow step - properties: - id: - type: string - message: - description: A human readable message indicating details about why the workflowStep is in this state. - type: string - name: - type: string - phase: - description: WorkflowStepPhase describes the phase of a workflow step. - type: string - reason: - description: A brief CamelCase message indicating details about why the workflowStep is in this state. - type: string - type: - type: string - required: - - id - type: object - type: array - type: object - type: - type: string - required: - - id - type: object - type: array - suspend: - type: boolean - terminated: - type: boolean - required: - - mode - - suspend - - terminated - type: object - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_componentdefinitions.yaml b/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_componentdefinitions.yaml deleted file mode 100644 index b188fe8..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_componentdefinitions.yaml +++ /dev/null @@ -1,565 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - name: componentdefinitions.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: ComponentDefinition - listKind: ComponentDefinitionList - plural: componentdefinitions - shortNames: - - comp - singular: componentdefinition - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.workload.definition.kind - name: WORKLOAD-KIND - type: string - - jsonPath: .metadata.annotations.definition\.oam\.dev/description - name: DESCRIPTION - type: string - name: v1alpha2 - schema: - openAPIV3Schema: - description: ComponentDefinition is the Schema for the componentdefinitions - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ComponentDefinitionSpec defines the desired state of ComponentDefinition - properties: - childResourceKinds: - description: ChildResourceKinds are the list of GVK of the child resources - this workload generates - items: - description: A ChildResourceKind defines a child Kubernetes resource - kind with a selector - properties: - apiVersion: - description: APIVersion of the child resource - type: string - kind: - description: Kind of the child resource - type: string - selector: - additionalProperties: - type: string - description: Selector to select the child resources that the - workload wants to expose to traits - type: object - required: - - apiVersion - - kind - type: object - type: array - extension: - description: Extension is used for extension needs by OAM platform - builders - type: object - x-kubernetes-preserve-unknown-fields: true - podSpecPath: - description: PodSpecPath indicates where/if this workload has K8s - podSpec field if one workload has podSpec, trait can do lot's of - assumption such as port, env, volume fields. - type: string - revisionLabel: - description: RevisionLabel indicates which label for underlying resources(e.g. - pods) of this workload can be used by trait to create resource selectors(e.g. - label selector for pods). - type: string - schematic: - description: Schematic defines the data format and template of the - encapsulation of the workload - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template data - of the capability, it will replace the old CUE template - in extension field. Template is a required field if CUE - is defined in Capability Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm module - properties: - release: - description: Release records a Helm release used by a Helm - module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository used by - a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable parameter - of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array of fields - within this workload that will be overwritten by the - value of this parameter. \tAll fields must be of the - same type. Fields are specified as JSON field paths - without a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not a value - for this parameter must be supplied when authoring - an Application. - type: boolean - type: - description: 'ValueType indicates the type of the parameter - value, and only supports basic data types: string, - number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud resources - managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - type: string - required: - - configuration - type: object - type: object - status: - description: Status defines the custom health policy and status message - for workload - properties: - customStatus: - description: CustomStatus defines the custom status message that - could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy for - the abstraction - type: string - type: object - workload: - description: Workload is a workload type descriptor - properties: - definition: - description: Definition mutually exclusive to workload.type, a - embedded WorkloadDefinition - properties: - apiVersion: - type: string - kind: - type: string - required: - - apiVersion - - kind - type: object - type: - description: Type ref to a WorkloadDefinition via name - type: string - type: object - required: - - workload - type: object - status: - description: ComponentDefinitionStatus is the status of ComponentDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's - last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from - one status to another. - type: string - status: - description: Status of this condition; is it currently True, - False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains OpenAPI - V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the spec of - ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.workload.definition.kind - name: WORKLOAD-KIND - type: string - - jsonPath: .metadata.annotations.definition\.oam\.dev/description - name: DESCRIPTION - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: ComponentDefinition is the Schema for the componentdefinitions - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ComponentDefinitionSpec defines the desired state of ComponentDefinition - properties: - childResourceKinds: - description: ChildResourceKinds are the list of GVK of the child resources - this workload generates - items: - description: A ChildResourceKind defines a child Kubernetes resource - kind with a selector - properties: - apiVersion: - description: APIVersion of the child resource - type: string - kind: - description: Kind of the child resource - type: string - selector: - additionalProperties: - type: string - description: Selector to select the child resources that the - workload wants to expose to traits - type: object - required: - - apiVersion - - kind - type: object - type: array - extension: - description: Extension is used for extension needs by OAM platform - builders - type: object - x-kubernetes-preserve-unknown-fields: true - podSpecPath: - description: PodSpecPath indicates where/if this workload has K8s - podSpec field if one workload has podSpec, trait can do lot's of - assumption such as port, env, volume fields. - type: string - revisionLabel: - description: RevisionLabel indicates which label for underlying resources(e.g. - pods) of this workload can be used by trait to create resource selectors(e.g. - label selector for pods). - type: string - schematic: - description: Schematic defines the data format and template of the - encapsulation of the workload - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template data - of the capability, it will replace the old CUE template - in extension field. Template is a required field if CUE - is defined in Capability Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm module - properties: - release: - description: Release records a Helm release used by a Helm - module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository used by - a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable parameter - of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array of fields - within this workload that will be overwritten by the - value of this parameter. \tAll fields must be of the - same type. Fields are specified as JSON field paths - without a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not a value - for this parameter must be supplied when authoring - an Application. - type: boolean - type: - description: 'ValueType indicates the type of the parameter - value, and only supports basic data types: string, - number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud resources - managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - type: string - required: - - configuration - type: object - type: object - status: - description: Status defines the custom health policy and status message - for workload - properties: - customStatus: - description: CustomStatus defines the custom status message that - could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy for - the abstraction - type: string - type: object - workload: - description: Workload is a workload type descriptor - properties: - definition: - description: Definition mutually exclusive to workload.type, a - embedded WorkloadDefinition - properties: - apiVersion: - type: string - kind: - type: string - required: - - apiVersion - - kind - type: object - type: - description: Type ref to a WorkloadDefinition via name - type: string - type: object - required: - - workload - type: object - status: - description: ComponentDefinitionStatus is the status of ComponentDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's - last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from - one status to another. - type: string - status: - description: Status of this condition; is it currently True, - False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains OpenAPI - V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the spec of - ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_definitionrevisions.yaml b/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_definitionrevisions.yaml deleted file mode 100644 index ce9d540..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_definitionrevisions.yaml +++ /dev/null @@ -1,1162 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - name: definitionrevisions.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: DefinitionRevision - listKind: DefinitionRevisionList - plural: definitionrevisions - shortNames: - - defrev - singular: definitionrevision - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.revision - name: REVISION - type: integer - - jsonPath: .spec.revisionHash - name: HASH - type: string - - jsonPath: .spec.definitionType - name: TYPE - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: DefinitionRevision is the Schema for the DefinitionRevision API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: DefinitionRevisionSpec is the spec of DefinitionRevision - properties: - componentDefinition: - description: ComponentDefinition records the snapshot of the created/modified - ComponentDefinition - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: ComponentDefinitionSpec defines the desired state - of ComponentDefinition - properties: - childResourceKinds: - description: ChildResourceKinds are the list of GVK of the - child resources this workload generates - items: - description: A ChildResourceKind defines a child Kubernetes - resource kind with a selector - properties: - apiVersion: - description: APIVersion of the child resource - type: string - kind: - description: Kind of the child resource - type: string - selector: - additionalProperties: - type: string - description: Selector to select the child resources - that the workload wants to expose to traits - type: object - required: - - apiVersion - - kind - type: object - type: array - extension: - description: Extension is used for extension needs by OAM - platform builders - type: object - x-kubernetes-preserve-unknown-fields: true - podSpecPath: - description: PodSpecPath indicates where/if this workload - has K8s podSpec field if one workload has podSpec, trait - can do lot's of assumption such as port, env, volume fields. - type: string - revisionLabel: - description: RevisionLabel indicates which label for underlying - resources(e.g. pods) of this workload can be used by trait - to create resource selectors(e.g. label selector for pods). - type: string - schematic: - description: Schematic defines the data format and template - of the encapsulation of the workload - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template - data of the capability, it will replace the old - CUE template in extension field. Template is a required - field if CUE is defined in Capability Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm - module - properties: - release: - description: Release records a Helm release used by - a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository - used by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable - parameter of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array - of fields within this workload that will be - overwritten by the value of this parameter. - \tAll fields must be of the same type. Fields - are specified as JSON field paths without - a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not - a value for this parameter must be supplied - when authoring an Application. - type: boolean - type: - description: 'ValueType indicates the type of - the parameter value, and only supports basic - data types: string, number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud - resources managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote git - repository. It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference - to Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - status: - description: Status defines the custom health policy and status - message for workload - properties: - customStatus: - description: CustomStatus defines the custom status message - that could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy - for the abstraction - type: string - type: object - workload: - description: Workload is a workload type descriptor - properties: - definition: - description: Definition mutually exclusive to workload.type, - a embedded WorkloadDefinition - properties: - apiVersion: - type: string - kind: - type: string - required: - - apiVersion - - kind - type: object - type: - description: Type ref to a WorkloadDefinition via name - type: string - type: object - required: - - workload - type: object - status: - description: ComponentDefinitionStatus is the status of ComponentDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains - OpenAPI V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the - spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - definitionType: - description: DefinitionType - enum: - - Component - - Trait - - Policy - - WorkflowStep - type: string - policyDefinition: - description: PolicyDefinition records the snapshot of the created/modified - PolicyDefinition - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: PolicyDefinitionSpec defines the desired state of - PolicyDefinition - properties: - definitionRef: - description: Reference to the CustomResourceDefinition that - defines this trait kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be - used if CRD has multiple versions by default it will - use the first one if not specified - type: string - required: - - name - type: object - manageHealthCheck: - description: ManageHealthCheck means the policy will handle - health checking and skip application controller built-in - health checking. - type: boolean - schematic: - description: Schematic defines the data format and template - of the encapsulation of the policy definition - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template - data of the capability, it will replace the old - CUE template in extension field. Template is a required - field if CUE is defined in Capability Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm - module - properties: - release: - description: Release records a Helm release used by - a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository - used by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable - parameter of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array - of fields within this workload that will be - overwritten by the value of this parameter. - \tAll fields must be of the same type. Fields - are specified as JSON field paths without - a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not - a value for this parameter must be supplied - when authoring an Application. - type: boolean - type: - description: 'ValueType indicates the type of - the parameter value, and only supports basic - data types: string, number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud - resources managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote git - repository. It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference - to Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - type: object - status: - description: PolicyDefinitionStatus is the status of PolicyDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the - spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - revision: - description: Revision record revision number of DefinitionRevision - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the spec of DefinitionRevision - object. - type: string - traitDefinition: - description: TraitDefinition records the snapshot of the created/modified - TraitDefinition - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: A TraitDefinitionSpec defines the desired state of - a TraitDefinition. - properties: - appliesToWorkloads: - description: AppliesToWorkloads specifies the list of workload - kinds this trait applies to. Workload kinds are specified - in kind.group/version format, e.g. server.core.oam.dev/v1alpha2. - Traits that omit this field apply to all workload kinds. - items: - type: string - type: array - conflictsWith: - description: 'ConflictsWith specifies the list of traits(CRD - name, Definition name, CRD group) which could not apply - to the same workloads with this trait. Traits that omit - this field can work with any other traits. Example rules: - "service" # Trait definition name "services.k8s.io" # API - resource/crd name "*.networking.k8s.io" # API group "labelSelector:foo=bar" - # label selector labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse' - items: - type: string - type: array - definitionRef: - description: Reference to the CustomResourceDefinition that - defines this trait kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be - used if CRD has multiple versions by default it will - use the first one if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM - platform builders - type: object - x-kubernetes-preserve-unknown-fields: true - manageWorkload: - description: ManageWorkload defines the trait would be responsible - for creating the workload - type: boolean - podDisruptive: - description: PodDisruptive specifies whether using the trait - will cause the pod to restart or not. - type: boolean - revisionEnabled: - description: Revision indicates whether a trait is aware of - component revision - type: boolean - schematic: - description: Schematic defines the data format and template - of the encapsulation of the trait - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template - data of the capability, it will replace the old - CUE template in extension field. Template is a required - field if CUE is defined in Capability Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm - module - properties: - release: - description: Release records a Helm release used by - a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository - used by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable - parameter of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array - of fields within this workload that will be - overwritten by the value of this parameter. - \tAll fields must be of the same type. Fields - are specified as JSON field paths without - a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not - a value for this parameter must be supplied - when authoring an Application. - type: boolean - type: - description: 'ValueType indicates the type of - the parameter value, and only supports basic - data types: string, number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud - resources managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote git - repository. It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference - to Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - skipRevisionAffect: - description: SkipRevisionAffect defines the update this trait - will not generate a new application Revision - type: boolean - status: - description: Status defines the custom health policy and status - message for trait - properties: - customStatus: - description: CustomStatus defines the custom status message - that could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy - for the abstraction - type: string - type: object - workloadRefPath: - description: WorkloadRefPath indicates where/if a trait accepts - a workloadRef object - type: string - type: object - status: - description: TraitDefinitionStatus is the status of TraitDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains - OpenAPI V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the - spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - workflowStepDefinition: - description: WorkflowStepDefinition records the snapshot of the created/modified - WorkflowStepDefinition - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: WorkflowStepDefinitionSpec defines the desired state - of WorkflowStepDefinition - properties: - definitionRef: - description: Reference to the CustomResourceDefinition that - defines this trait kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be - used if CRD has multiple versions by default it will - use the first one if not specified - type: string - required: - - name - type: object - schematic: - description: Schematic defines the data format and template - of the encapsulation of the workflow step definition - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template - data of the capability, it will replace the old - CUE template in extension field. Template is a required - field if CUE is defined in Capability Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm - module - properties: - release: - description: Release records a Helm release used by - a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository - used by a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable - parameter of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array - of fields within this workload that will be - overwritten by the value of this parameter. - \tAll fields must be of the same type. Fields - are specified as JSON field paths without - a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not - a value for this parameter must be supplied - when authoring an Application. - type: boolean - type: - description: 'ValueType indicates the type of - the parameter value, and only supports basic - data types: string, number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud - resources managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote git - repository. It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference - to Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - type: object - status: - description: WorkflowStepDefinitionStatus is the status of WorkflowStepDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this - condition transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this - condition's last transition from one status to another, - if any. - type: string - reason: - description: A Reason for this condition's last transition - from one status to another. - type: string - status: - description: Status of this condition; is it currently - True, False, or Unknown? - type: string - type: - description: Type of this condition. At most one of - each condition type may apply to a resource at any - point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains - OpenAPI V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the - spec of ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - required: - - definitionType - - revision - - revisionHash - type: object - type: object - served: true - storage: true - subresources: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_healthscopes.yaml b/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_healthscopes.yaml deleted file mode 100644 index 8ddc2c1..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_healthscopes.yaml +++ /dev/null @@ -1,590 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - name: healthscopes.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: HealthScope - listKind: HealthScopeList - plural: healthscopes - singular: healthscope - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.health - name: HEALTH - type: string - name: v1alpha2 - schema: - openAPIV3Schema: - description: A HealthScope determines an aggregate health status based of - the health of components. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: A HealthScopeSpec defines the desired state of a HealthScope. - properties: - appReferences: - description: AppRefs records references of applications' components - items: - description: AppReference records references of an application's - components - properties: - appName: - type: string - compReferences: - items: - description: CompReference records references of a component's - resources - properties: - compName: - type: string - traits: - items: - description: 'ObjectReference contains enough information - to let you inspect or modify the referred object. - --- New uses of this type are discouraged because - of difficulty describing its usage when embedded in - APIs. 1. Ignored fields. It includes many fields - which are not generally honored. For instance, ResourceVersion - and FieldPath are both very rarely valid in actual - usage. 2. Invalid usage help. It is impossible to - add specific help for individual usage. In most embedded - usages, there are particular restrictions like, - "must refer only to types A and B" or "UID not honored" - or "name must be restricted". Those cannot be - well described when embedded. 3. Inconsistent validation. Because - the usages are different, the validation rules are - different by usage, which makes it hard for users - to predict what will happen. 4. The fields are both - imprecise and overly precise. Kind is not a precise - mapping to a URL. This can produce ambiguity during - interpretation and require a REST mapping. In most - cases, the dependency is on the group,resource tuple and - the version of the actual struct is irrelevant. 5. - We cannot easily change it. Because this type is - embedded in many locations, updates to this type will - affect numerous schemas. Don''t make new APIs embed - an underspecified API type they do not control. Instead - of using this type, create a locally provided and - used type that is well-focused on your reference. - For example, ServiceReferences for admission registration: - https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object - instead of an entire object, this string should - contain a valid JSON/Go field access statement, - such as desiredState.manifest.containers[2]. For - example, if the object reference is to a container - within a pod, this would take on a value like: - "spec.containers{name}" (where "name" refers to - the name of the container that triggered the event) - or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax - is chosen only to have some well-defined way of - referencing a part of an object. TODO: this design - is not final and this field is subject to change - in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which - this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - workload: - description: 'ObjectReference contains enough information - to let you inspect or modify the referred object. --- - New uses of this type are discouraged because of difficulty - describing its usage when embedded in APIs. 1. Ignored - fields. It includes many fields which are not generally - honored. For instance, ResourceVersion and FieldPath - are both very rarely valid in actual usage. 2. Invalid - usage help. It is impossible to add specific help for - individual usage. In most embedded usages, there are - particular restrictions like, "must refer only to - types A and B" or "UID not honored" or "name must be - restricted". Those cannot be well described when - embedded. 3. Inconsistent validation. Because the - usages are different, the validation rules are different - by usage, which makes it hard for users to predict what - will happen. 4. The fields are both imprecise and overly - precise. Kind is not a precise mapping to a URL. This - can produce ambiguity during interpretation and - require a REST mapping. In most cases, the dependency - is on the group,resource tuple and the version of - the actual struct is irrelevant. 5. We cannot easily - change it. Because this type is embedded in many locations, - updates to this type will affect numerous schemas. Don''t - make new APIs embed an underspecified API type they - do not control. Instead of using this type, create a - locally provided and used type that is well-focused - on your reference. For example, ServiceReferences for - admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object - instead of an entire object, this string should - contain a valid JSON/Go field access statement, - such as desiredState.manifest.containers[2]. For - example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container - that triggered the event) or if no container name - is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only - to have some well-defined way of referencing a part - of an object. TODO: this design is not final and - this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this - reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: object - type: array - type: object - type: array - probe-interval: - description: ProbeInterval is the amount of time in seconds between - probing tries. - format: int32 - type: integer - probe-timeout: - description: ProbeTimeout is the amount of time in seconds to wait - when receiving a response before marked failure. - format: int32 - type: integer - workloadRefs: - description: WorkloadReferences to the workloads that are in this - scope. - items: - description: 'ObjectReference contains enough information to let - you inspect or modify the referred object. --- New uses of this - type are discouraged because of difficulty describing its usage - when embedded in APIs. 1. Ignored fields. It includes many fields - which are not generally honored. For instance, ResourceVersion - and FieldPath are both very rarely valid in actual usage. 2. - Invalid usage help. It is impossible to add specific help for - individual usage. In most embedded usages, there are particular restrictions - like, "must refer only to types A and B" or "UID not honored" - or "name must be restricted". Those cannot be well described - when embedded. 3. Inconsistent validation. Because the usages - are different, the validation rules are different by usage, which - makes it hard for users to predict what will happen. 4. The fields - are both imprecise and overly precise. Kind is not a precise - mapping to a URL. This can produce ambiguity during interpretation - and require a REST mapping. In most cases, the dependency is - on the group,resource tuple and the version of the actual - struct is irrelevant. 5. We cannot easily change it. Because - this type is embedded in many locations, updates to this type will - affect numerous schemas. Don''t make new APIs embed an underspecified - API type they do not control. Instead of using this type, create - a locally provided and used type that is well-focused on your - reference. For example, ServiceReferences for admission registration: - https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - required: - - workloadRefs - type: object - status: - description: A HealthScopeStatus represents the observed state of a HealthScope. - properties: - appHealthConditions: - description: AppHealthConditions represents health condition of applications - in the scope - items: - description: AppHealthCondition represents health condition of an - application - properties: - appName: - type: string - components: - items: - description: WorkloadHealthCondition represents informative - health condition of a workload. - properties: - componentName: - description: ComponentName represents the component name - if target is a workload - type: string - customStatusMsg: - type: string - diagnosis: - type: string - healthStatus: - description: HealthStatus represents health status strings. - type: string - targetWorkload: - description: 'ObjectReference contains enough information - to let you inspect or modify the referred object. --- - New uses of this type are discouraged because of difficulty - describing its usage when embedded in APIs. 1. Ignored - fields. It includes many fields which are not generally - honored. For instance, ResourceVersion and FieldPath - are both very rarely valid in actual usage. 2. Invalid - usage help. It is impossible to add specific help for - individual usage. In most embedded usages, there are - particular restrictions like, "must refer only to - types A and B" or "UID not honored" or "name must be - restricted". Those cannot be well described when - embedded. 3. Inconsistent validation. Because the - usages are different, the validation rules are different - by usage, which makes it hard for users to predict what - will happen. 4. The fields are both imprecise and overly - precise. Kind is not a precise mapping to a URL. This - can produce ambiguity during interpretation and - require a REST mapping. In most cases, the dependency - is on the group,resource tuple and the version of - the actual struct is irrelevant. 5. We cannot easily - change it. Because this type is embedded in many locations, - updates to this type will affect numerous schemas. Don''t - make new APIs embed an underspecified API type they - do not control. Instead of using this type, create a - locally provided and used type that is well-focused - on your reference. For example, ServiceReferences for - admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object - instead of an entire object, this string should - contain a valid JSON/Go field access statement, - such as desiredState.manifest.containers[2]. For - example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container - that triggered the event) or if no container name - is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only - to have some well-defined way of referencing a part - of an object. TODO: this design is not final and - this field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this - reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - traits: - items: - description: TraitHealthCondition represents informative - health condition of a trait. - properties: - customStatusMsg: - type: string - diagnosis: - type: string - healthStatus: - description: HealthStatus represents health status - strings. - type: string - resource: - type: string - type: - type: string - required: - - healthStatus - - resource - - type - type: object - type: array - workloadStatus: - description: WorkloadStatus represents status of workloads - whose HealthStatus is UNKNOWN. - type: string - required: - - healthStatus - type: object - type: array - envName: - type: string - required: - - appName - type: object - type: array - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's - last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from - one status to another. - type: string - status: - description: Status of this condition; is it currently True, - False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - healthConditions: - description: WorkloadHealthConditions represents health condition - of workloads in the scope Use AppHealthConditions to provide app - level status - items: - description: WorkloadHealthCondition represents informative health - condition of a workload. - properties: - componentName: - description: ComponentName represents the component name if - target is a workload - type: string - customStatusMsg: - type: string - diagnosis: - type: string - healthStatus: - description: HealthStatus represents health status strings. - type: string - targetWorkload: - description: 'ObjectReference contains enough information to - let you inspect or modify the referred object. --- New uses - of this type are discouraged because of difficulty describing - its usage when embedded in APIs. 1. Ignored fields. It includes - many fields which are not generally honored. For instance, - ResourceVersion and FieldPath are both very rarely valid in - actual usage. 2. Invalid usage help. It is impossible to - add specific help for individual usage. In most embedded - usages, there are particular restrictions like, "must - refer only to types A and B" or "UID not honored" or "name - must be restricted". Those cannot be well described when - embedded. 3. Inconsistent validation. Because the usages - are different, the validation rules are different by usage, - which makes it hard for users to predict what will happen. 4. - The fields are both imprecise and overly precise. Kind is - not a precise mapping to a URL. This can produce ambiguity during - interpretation and require a REST mapping. In most cases, - the dependency is on the group,resource tuple and the - version of the actual struct is irrelevant. 5. We cannot - easily change it. Because this type is embedded in many locations, - updates to this type will affect numerous schemas. Don''t - make new APIs embed an underspecified API type they do not - control. Instead of using this type, create a locally provided - and used type that is well-focused on your reference. For - example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead - of an entire object, this string should contain a valid - JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that - triggered the event) or if no container name is specified - "spec.containers[2]" (container with index 2 in this pod). - This syntax is chosen only to have some well-defined way - of referencing a part of an object. TODO: this design - is not final and this field is subject to change in the - future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - traits: - items: - description: TraitHealthCondition represents informative health - condition of a trait. - properties: - customStatusMsg: - type: string - diagnosis: - type: string - healthStatus: - description: HealthStatus represents health status strings. - type: string - resource: - type: string - type: - type: string - required: - - healthStatus - - resource - - type - type: object - type: array - workloadStatus: - description: WorkloadStatus represents status of workloads whose - HealthStatus is UNKNOWN. - type: string - required: - - healthStatus - type: object - type: array - scopeHealthCondition: - description: ScopeHealthCondition represents health condition summary - of the scope - properties: - healthStatus: - description: HealthStatus represents health status strings. - type: string - healthyWorkloads: - format: int64 - type: integer - total: - format: int64 - type: integer - unhealthyWorkloads: - format: int64 - type: integer - unknownWorkloads: - format: int64 - type: integer - required: - - healthStatus - type: object - required: - - scopeHealthCondition - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_policydefinitions.yaml b/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_policydefinitions.yaml deleted file mode 100644 index 16eeb06..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_policydefinitions.yaml +++ /dev/null @@ -1,249 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - name: policydefinitions.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: PolicyDefinition - listKind: PolicyDefinitionList - plural: policydefinitions - shortNames: - - policy - singular: policydefinition - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: PolicyDefinition is the Schema for the policydefinitions API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: PolicyDefinitionSpec defines the desired state of PolicyDefinition - properties: - definitionRef: - description: Reference to the CustomResourceDefinition that defines - this trait kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be used if - CRD has multiple versions by default it will use the first one - if not specified - type: string - required: - - name - type: object - manageHealthCheck: - description: ManageHealthCheck means the policy will handle health - checking and skip application controller built-in health checking. - type: boolean - schematic: - description: Schematic defines the data format and template of the - encapsulation of the policy definition - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template data - of the capability, it will replace the old CUE template - in extension field. Template is a required field if CUE - is defined in Capability Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm module - properties: - release: - description: Release records a Helm release used by a Helm - module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository used by - a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable parameter - of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array of fields - within this workload that will be overwritten by the - value of this parameter. \tAll fields must be of the - same type. Fields are specified as JSON field paths - without a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not a value - for this parameter must be supplied when authoring - an Application. - type: boolean - type: - description: 'ValueType indicates the type of the parameter - value, and only supports basic data types: string, - number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud resources - managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote git repository. - It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference to - Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - type: object - status: - description: PolicyDefinitionStatus is the status of PolicyDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's - last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from - one status to another. - type: string - status: - description: Status of this condition; is it currently True, - False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the spec of - ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_resourcetrackers.yaml b/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_resourcetrackers.yaml deleted file mode 100644 index bbf6894..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_resourcetrackers.yaml +++ /dev/null @@ -1,116 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - name: resourcetrackers.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: ResourceTracker - listKind: ResourceTrackerList - plural: resourcetrackers - shortNames: - - tracker - singular: resourcetracker - scope: Cluster - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: An ResourceTracker represents a tracker for track cross namespace - resources - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - status: - description: ResourceTrackerStatus define the status of resourceTracker - properties: - trackedResources: - items: - description: 'ObjectReference contains enough information to let - you inspect or modify the referred object. --- New uses of this - type are discouraged because of difficulty describing its usage - when embedded in APIs. 1. Ignored fields. It includes many fields - which are not generally honored. For instance, ResourceVersion - and FieldPath are both very rarely valid in actual usage. 2. - Invalid usage help. It is impossible to add specific help for - individual usage. In most embedded usages, there are particular restrictions - like, "must refer only to types A and B" or "UID not honored" - or "name must be restricted". Those cannot be well described - when embedded. 3. Inconsistent validation. Because the usages - are different, the validation rules are different by usage, which - makes it hard for users to predict what will happen. 4. The fields - are both imprecise and overly precise. Kind is not a precise - mapping to a URL. This can produce ambiguity during interpretation - and require a REST mapping. In most cases, the dependency is - on the group,resource tuple and the version of the actual - struct is irrelevant. 5. We cannot easily change it. Because - this type is embedded in many locations, updates to this type will - affect numerous schemas. Don''t make new APIs embed an underspecified - API type they do not control. Instead of using this type, create - a locally provided and used type that is well-focused on your - reference. For example, ServiceReferences for admission registration: - https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - .' - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_scopedefinitions.yaml b/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_scopedefinitions.yaml deleted file mode 100644 index 26245c6..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_scopedefinitions.yaml +++ /dev/null @@ -1,153 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - name: scopedefinitions.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: ScopeDefinition - listKind: ScopeDefinitionList - plural: scopedefinitions - shortNames: - - scope - singular: scopedefinition - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.definitionRef.name - name: DEFINITION-NAME - type: string - name: v1alpha2 - schema: - openAPIV3Schema: - description: A ScopeDefinition registers a kind of Kubernetes custom resource - as a valid OAM scope kind by referencing its CustomResourceDefinition. The - CRD is used to validate the schema of the scope when it is embedded in an - OAM ApplicationConfiguration. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: A ScopeDefinitionSpec defines the desired state of a ScopeDefinition. - properties: - allowComponentOverlap: - description: AllowComponentOverlap specifies whether an OAM component - may exist in multiple instances of this kind of scope. - type: boolean - definitionRef: - description: Reference to the CustomResourceDefinition that defines - this scope kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be used if - CRD has multiple versions by default it will use the first one - if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM platform - builders - type: object - x-kubernetes-preserve-unknown-fields: true - workloadRefsPath: - description: WorkloadRefsPath indicates if/where a scope accepts workloadRef - objects - type: string - required: - - allowComponentOverlap - - definitionRef - type: object - type: object - served: true - storage: false - subresources: {} - - additionalPrinterColumns: - - jsonPath: .spec.definitionRef.name - name: DEFINITION-NAME - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: A ScopeDefinition registers a kind of Kubernetes custom resource - as a valid OAM scope kind by referencing its CustomResourceDefinition. The - CRD is used to validate the schema of the scope when it is embedded in an - OAM ApplicationConfiguration. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: A ScopeDefinitionSpec defines the desired state of a ScopeDefinition. - properties: - allowComponentOverlap: - description: AllowComponentOverlap specifies whether an OAM component - may exist in multiple instances of this kind of scope. - type: boolean - definitionRef: - description: Reference to the CustomResourceDefinition that defines - this scope kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be used if - CRD has multiple versions by default it will use the first one - if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM platform - builders - type: object - x-kubernetes-preserve-unknown-fields: true - workloadRefsPath: - description: WorkloadRefsPath indicates if/where a scope accepts workloadRef - objects - type: string - required: - - allowComponentOverlap - - definitionRef - type: object - type: object - served: true - storage: true - subresources: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_traitdefinitions.yaml b/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_traitdefinitions.yaml deleted file mode 100644 index 3f33343..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_traitdefinitions.yaml +++ /dev/null @@ -1,595 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - name: traitdefinitions.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: TraitDefinition - listKind: TraitDefinitionList - plural: traitdefinitions - shortNames: - - trait - singular: traitdefinition - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.appliesToWorkloads - name: APPLIES-TO - type: string - - jsonPath: .metadata.annotations.definition\.oam\.dev/description - name: DESCRIPTION - type: string - name: v1alpha2 - schema: - openAPIV3Schema: - description: A TraitDefinition registers a kind of Kubernetes custom resource - as a valid OAM trait kind by referencing its CustomResourceDefinition. The - CRD is used to validate the schema of the trait when it is embedded in an - OAM ApplicationConfiguration. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: A TraitDefinitionSpec defines the desired state of a TraitDefinition. - properties: - appliesToWorkloads: - description: AppliesToWorkloads specifies the list of workload kinds - this trait applies to. Workload kinds are specified in kind.group/version - format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this - field apply to all workload kinds. - items: - type: string - type: array - conflictsWith: - description: 'ConflictsWith specifies the list of traits(CRD name, - Definition name, CRD group) which could not apply to the same workloads - with this trait. Traits that omit this field can work with any other - traits. Example rules: "service" # Trait definition name "services.k8s.io" - # API resource/crd name "*.networking.k8s.io" # API group "labelSelector:foo=bar" - # label selector labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse' - items: - type: string - type: array - definitionRef: - description: Reference to the CustomResourceDefinition that defines - this trait kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be used if - CRD has multiple versions by default it will use the first one - if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM platform - builders - type: object - x-kubernetes-preserve-unknown-fields: true - podDisruptive: - description: PodDisruptive specifies whether using the trait will - cause the pod to restart or not. - type: boolean - revisionEnabled: - description: Revision indicates whether a trait is aware of component - revision - type: boolean - schematic: - description: Schematic defines the data format and template of the - encapsulation of the trait - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template data - of the capability, it will replace the old CUE template - in extension field. Template is a required field if CUE - is defined in Capability Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm module - properties: - release: - description: Release records a Helm release used by a Helm - module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository used by - a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable parameter - of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array of fields - within this workload that will be overwritten by the - value of this parameter. \tAll fields must be of the - same type. Fields are specified as JSON field paths - without a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not a value - for this parameter must be supplied when authoring - an Application. - type: boolean - type: - description: 'ValueType indicates the type of the parameter - value, and only supports basic data types: string, - number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud resources - managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote git repository. - It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference to - Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - status: - description: Status defines the custom health policy and status message - for trait - properties: - customStatus: - description: CustomStatus defines the custom status message that - could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy for - the abstraction - type: string - type: object - workloadRefPath: - description: WorkloadRefPath indicates where/if a trait accepts a - workloadRef object - type: string - type: object - status: - description: TraitDefinitionStatus is the status of TraitDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's - last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from - one status to another. - type: string - status: - description: Status of this condition; is it currently True, - False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains OpenAPI - V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the trait definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the spec of - ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - jsonPath: .spec.appliesToWorkloads - name: APPLIES-TO - type: string - - jsonPath: .metadata.annotations.definition\.oam\.dev/description - name: DESCRIPTION - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: A TraitDefinition registers a kind of Kubernetes custom resource - as a valid OAM trait kind by referencing its CustomResourceDefinition. The - CRD is used to validate the schema of the trait when it is embedded in an - OAM ApplicationConfiguration. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: A TraitDefinitionSpec defines the desired state of a TraitDefinition. - properties: - appliesToWorkloads: - description: AppliesToWorkloads specifies the list of workload kinds - this trait applies to. Workload kinds are specified in kind.group/version - format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this - field apply to all workload kinds. - items: - type: string - type: array - conflictsWith: - description: 'ConflictsWith specifies the list of traits(CRD name, - Definition name, CRD group) which could not apply to the same workloads - with this trait. Traits that omit this field can work with any other - traits. Example rules: "service" # Trait definition name "services.k8s.io" - # API resource/crd name "*.networking.k8s.io" # API group "labelSelector:foo=bar" - # label selector labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse' - items: - type: string - type: array - definitionRef: - description: Reference to the CustomResourceDefinition that defines - this trait kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be used if - CRD has multiple versions by default it will use the first one - if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM platform - builders - type: object - x-kubernetes-preserve-unknown-fields: true - manageWorkload: - description: ManageWorkload defines the trait would be responsible - for creating the workload - type: boolean - podDisruptive: - description: PodDisruptive specifies whether using the trait will - cause the pod to restart or not. - type: boolean - revisionEnabled: - description: Revision indicates whether a trait is aware of component - revision - type: boolean - schematic: - description: Schematic defines the data format and template of the - encapsulation of the trait - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template data - of the capability, it will replace the old CUE template - in extension field. Template is a required field if CUE - is defined in Capability Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm module - properties: - release: - description: Release records a Helm release used by a Helm - module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository used by - a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable parameter - of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array of fields - within this workload that will be overwritten by the - value of this parameter. \tAll fields must be of the - same type. Fields are specified as JSON field paths - without a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not a value - for this parameter must be supplied when authoring - an Application. - type: boolean - type: - description: 'ValueType indicates the type of the parameter - value, and only supports basic data types: string, - number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud resources - managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote git repository. - It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference to - Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - skipRevisionAffect: - description: SkipRevisionAffect defines the update this trait will - not generate a new application Revision - type: boolean - status: - description: Status defines the custom health policy and status message - for trait - properties: - customStatus: - description: CustomStatus defines the custom status message that - could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy for - the abstraction - type: string - type: object - workloadRefPath: - description: WorkloadRefPath indicates where/if a trait accepts a - workloadRef object - type: string - type: object - status: - description: TraitDefinitionStatus is the status of TraitDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's - last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from - one status to another. - type: string - status: - description: Status of this condition; is it currently True, - False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains OpenAPI - V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the spec of - ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_workflowstepdefinitions.yaml b/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_workflowstepdefinitions.yaml deleted file mode 100644 index c6a0d43..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_workflowstepdefinitions.yaml +++ /dev/null @@ -1,250 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - name: workflowstepdefinitions.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: WorkflowStepDefinition - listKind: WorkflowStepDefinitionList - plural: workflowstepdefinitions - shortNames: - - workflowstep - singular: workflowstepdefinition - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: WorkflowStepDefinition is the Schema for the workflowstepdefinitions - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: WorkflowStepDefinitionSpec defines the desired state of WorkflowStepDefinition - properties: - definitionRef: - description: Reference to the CustomResourceDefinition that defines - this trait kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be used if - CRD has multiple versions by default it will use the first one - if not specified - type: string - required: - - name - type: object - schematic: - description: Schematic defines the data format and template of the - encapsulation of the workflow step definition - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template data - of the capability, it will replace the old CUE template - in extension field. Template is a required field if CUE - is defined in Capability Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm module - properties: - release: - description: Release records a Helm release used by a Helm - module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository used by - a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable parameter - of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array of fields - within this workload that will be overwritten by the - value of this parameter. \tAll fields must be of the - same type. Fields are specified as JSON field paths - without a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not a value - for this parameter must be supplied when authoring - an Application. - type: boolean - type: - description: 'ValueType indicates the type of the parameter - value, and only supports basic data types: string, - number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud resources - managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote git repository. - It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference to - Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - type: object - status: - description: WorkflowStepDefinitionStatus is the status of WorkflowStepDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's - last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from - one status to another. - type: string - status: - description: Status of this condition; is it currently True, - False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - configMapRef: - description: ConfigMapRef refer to a ConfigMap which contains OpenAPI - V3 JSON schema of Component parameters. - type: string - latestRevision: - description: LatestRevision of the component definition - properties: - name: - type: string - revision: - format: int64 - type: integer - revisionHash: - description: RevisionHash record the hash value of the spec of - ApplicationRevision object. - type: string - required: - - name - - revision - type: object - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_workloaddefinitions.yaml b/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_workloaddefinitions.yaml deleted file mode 100644 index 394473b..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/crds/core.oam.dev_workloaddefinitions.yaml +++ /dev/null @@ -1,554 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - name: workloaddefinitions.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: WorkloadDefinition - listKind: WorkloadDefinitionList - plural: workloaddefinitions - shortNames: - - workload - singular: workloaddefinition - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.definitionRef.name - name: DEFINITION-NAME - type: string - name: v1alpha2 - schema: - openAPIV3Schema: - description: A WorkloadDefinition registers a kind of Kubernetes custom resource - as a valid OAM workload kind by referencing its CustomResourceDefinition. - The CRD is used to validate the schema of the workload when it is embedded - in an OAM Component. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition. - properties: - childResourceKinds: - description: ChildResourceKinds are the list of GVK of the child resources - this workload generates - items: - description: A ChildResourceKind defines a child Kubernetes resource - kind with a selector - properties: - apiVersion: - description: APIVersion of the child resource - type: string - kind: - description: Kind of the child resource - type: string - selector: - additionalProperties: - type: string - description: Selector to select the child resources that the - workload wants to expose to traits - type: object - required: - - apiVersion - - kind - type: object - type: array - definitionRef: - description: Reference to the CustomResourceDefinition that defines - this workload kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be used if - CRD has multiple versions by default it will use the first one - if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM platform - builders - type: object - x-kubernetes-preserve-unknown-fields: true - podSpecPath: - description: PodSpecPath indicates where/if this workload has K8s - podSpec field if one workload has podSpec, trait can do lot's of - assumption such as port, env, volume fields. - type: string - revisionLabel: - description: RevisionLabel indicates which label for underlying resources(e.g. - pods) of this workload can be used by trait to create resource selectors(e.g. - label selector for pods). - type: string - schematic: - description: Schematic defines the data format and template of the - encapsulation of the workload - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template data - of the capability, it will replace the old CUE template - in extension field. Template is a required field if CUE - is defined in Capability Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm module - properties: - release: - description: Release records a Helm release used by a Helm - module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository used by - a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable parameter - of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array of fields - within this workload that will be overwritten by the - value of this parameter. \tAll fields must be of the - same type. Fields are specified as JSON field paths - without a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not a value - for this parameter must be supplied when authoring - an Application. - type: boolean - type: - description: 'ValueType indicates the type of the parameter - value, and only supports basic data types: string, - number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud resources - managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote git repository. - It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference to - Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - status: - description: Status defines the custom health policy and status message - for workload - properties: - customStatus: - description: CustomStatus defines the custom status message that - could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy for - the abstraction - type: string - type: object - required: - - definitionRef - type: object - status: - description: WorkloadDefinitionStatus is the status of WorkloadDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's - last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from - one status to another. - type: string - status: - description: Status of this condition; is it currently True, - False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - type: object - type: object - served: true - storage: false - subresources: {} - - additionalPrinterColumns: - - jsonPath: .spec.definitionRef.name - name: DEFINITION-NAME - type: string - - jsonPath: .metadata.annotations.definition\.oam\.dev/description - name: DESCRIPTION - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: A WorkloadDefinition registers a kind of Kubernetes custom resource - as a valid OAM workload kind by referencing its CustomResourceDefinition. - The CRD is used to validate the schema of the workload when it is embedded - in an OAM Component. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition. - properties: - childResourceKinds: - description: ChildResourceKinds are the list of GVK of the child resources - this workload generates - items: - description: A ChildResourceKind defines a child Kubernetes resource - kind with a selector - properties: - apiVersion: - description: APIVersion of the child resource - type: string - kind: - description: Kind of the child resource - type: string - selector: - additionalProperties: - type: string - description: Selector to select the child resources that the - workload wants to expose to traits - type: object - required: - - apiVersion - - kind - type: object - type: array - definitionRef: - description: Reference to the CustomResourceDefinition that defines - this workload kind. - properties: - name: - description: Name of the referenced CustomResourceDefinition. - type: string - version: - description: Version indicate which version should be used if - CRD has multiple versions by default it will use the first one - if not specified - type: string - required: - - name - type: object - extension: - description: Extension is used for extension needs by OAM platform - builders - type: object - x-kubernetes-preserve-unknown-fields: true - podSpecPath: - description: PodSpecPath indicates where/if this workload has K8s - podSpec field if one workload has podSpec, trait can do lot's of - assumption such as port, env, volume fields. - type: string - revisionLabel: - description: RevisionLabel indicates which label for underlying resources(e.g. - pods) of this workload can be used by trait to create resource selectors(e.g. - label selector for pods). - type: string - schematic: - description: Schematic defines the data format and template of the - encapsulation of the workload - properties: - cue: - description: CUE defines the encapsulation in CUE format - properties: - template: - description: Template defines the abstraction template data - of the capability, it will replace the old CUE template - in extension field. Template is a required field if CUE - is defined in Capability Definition. - type: string - required: - - template - type: object - helm: - description: A Helm represents resources used by a Helm module - properties: - release: - description: Release records a Helm release used by a Helm - module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - repository: - description: HelmRelease records a Helm repository used by - a Helm module workload. - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - release - - repository - type: object - kube: - description: Kube defines the encapsulation in raw Kubernetes - resource format - properties: - parameters: - description: Parameters defines configurable parameters - items: - description: A KubeParameter defines a configurable parameter - of a component. - properties: - description: - description: Description of this parameter. - type: string - fieldPaths: - description: "FieldPaths specifies an array of fields - within this workload that will be overwritten by the - value of this parameter. \tAll fields must be of the - same type. Fields are specified as JSON field paths - without a leading dot, for example 'spec.replicas'." - items: - type: string - type: array - name: - description: Name of this parameter - type: string - required: - default: false - description: Required specifies whether or not a value - for this parameter must be supplied when authoring - an Application. - type: boolean - type: - description: 'ValueType indicates the type of the parameter - value, and only supports basic data types: string, - number, boolean.' - enum: - - string - - number - - boolean - type: string - required: - - fieldPaths - - name - - type - type: object - type: array - template: - description: Template defines the raw Kubernetes resource - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - terraform: - description: Terraform is the struct to describe cloud resources - managed by Hashicorp Terraform - properties: - configuration: - description: Configuration is Terraform Configuration - type: string - path: - description: Path is the sub-directory of remote git repository. - It's valid when remote is set - type: string - providerRef: - description: ProviderReference specifies the reference to - Provider - properties: - name: - description: Name of the referenced object. - type: string - namespace: - default: default - description: Namespace of the secret. - type: string - required: - - name - type: object - type: - default: hcl - description: Type specifies which Terraform configuration - it is, HCL or JSON syntax - enum: - - hcl - - json - - remote - type: string - required: - - configuration - type: object - type: object - status: - description: Status defines the custom health policy and status message - for workload - properties: - customStatus: - description: CustomStatus defines the custom status message that - could display to user - type: string - healthPolicy: - description: HealthPolicy defines the health check policy for - the abstraction - type: string - type: object - required: - - definitionRef - type: object - status: - description: WorkloadDefinitionStatus is the status of WorkloadDefinition - properties: - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's - last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from - one status to another. - type: string - status: - description: Status of this condition; is it currently True, - False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/vela-system/base/charts/vela-minimal/crds/standard.oam.dev_rollouts.yaml b/manifests/vela-system/base/charts/vela-minimal/crds/standard.oam.dev_rollouts.yaml deleted file mode 100644 index 017ad22..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/crds/standard.oam.dev_rollouts.yaml +++ /dev/null @@ -1,482 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.6.2 - name: rollouts.standard.oam.dev -spec: - group: standard.oam.dev - names: - categories: - - oam - kind: Rollout - listKind: RolloutList - plural: rollouts - shortNames: - - rollout - singular: rollout - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.rolloutTargetSize - name: TARGET - type: string - - jsonPath: .status.upgradedReplicas - name: UPGRADED - type: string - - jsonPath: .status.upgradedReadyReplicas - name: READY - type: string - - jsonPath: .status.batchRollingState - name: BATCH-STATE - type: string - - jsonPath: .status.rollingState - name: ROLLING-STATE - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: Rollout is the Schema for the Rollout API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: RolloutSpec defines how to describe an update between different - compRevision - properties: - componentName: - description: ComponentName specify the component name - type: string - rolloutPlan: - description: RolloutPlan is the details on how to rollout the resources - properties: - batchPartition: - description: All pods in the batches up to the batchPartition - (included) will have the target resource specification while - the rest still have the source resource This is designed for - the operators to manually rollout Default is the the number - of batches which will rollout all the batches - format: int32 - type: integer - canaryMetric: - description: CanaryMetric provides a way for the rollout process - to automatically check certain metrics before complete the process - items: - description: CanaryMetric holds the reference to metrics used - for canary analysis - properties: - interval: - description: Interval represents the windows size - type: string - metricsRange: - description: Range value accepted for this metric - properties: - max: - anyOf: - - type: integer - - type: string - description: Maximum value - x-kubernetes-int-or-string: true - min: - anyOf: - - type: integer - - type: string - description: Minimum value - x-kubernetes-int-or-string: true - type: object - name: - description: Name of the metric - type: string - templateRef: - description: TemplateRef references a metric template object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead - of an entire object, this string should contain a - valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container - that triggered the event) or if no container name - is specified "spec.containers[2]" (container with - index 2 in this pod). This syntax is chosen only to - have some well-defined way of referencing a part of - an object. TODO: this design is not final and this - field is subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this - reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - name - type: object - type: array - numBatches: - description: The number of batches, default = 1 - format: int32 - type: integer - paused: - description: Paused the rollout, default is false - type: boolean - rolloutBatches: - description: The exact distribution among batches. its size has - to be exactly the same as the NumBatches (if set) The total - number cannot exceed the targetSize or the size of the source - resource We will IGNORE the last batch's replica field if it's - a percentage since round errors can lead to inaccurate sum We - highly recommend to leave the last batch's replica field empty - items: - description: RolloutBatch is used to describe how the each batch - rollout should be - properties: - batchRolloutWebhooks: - description: RolloutWebhooks provides a way for the batch - rollout to interact with an external process - items: - description: RolloutWebhook holds the reference to external - checks used for canary analysis - properties: - expectedStatus: - description: ExpectedStatus contains all the expected - http status code that we will accept as success - items: - type: integer - type: array - metadata: - additionalProperties: - type: string - description: Metadata (key-value pairs) for this webhook - type: object - method: - description: Method the HTTP call method, default - is POST - type: string - name: - description: Name of this webhook - type: string - type: - description: Type of this webhook - type: string - url: - description: URL address of this webhook - type: string - required: - - name - - type - - url - type: object - type: array - canaryMetric: - description: CanaryMetric provides a way for the batch rollout - process to automatically check certain metrics before - moving to the next batch - items: - description: CanaryMetric holds the reference to metrics - used for canary analysis - properties: - interval: - description: Interval represents the windows size - type: string - metricsRange: - description: Range value accepted for this metric - properties: - max: - anyOf: - - type: integer - - type: string - description: Maximum value - x-kubernetes-int-or-string: true - min: - anyOf: - - type: integer - - type: string - description: Minimum value - x-kubernetes-int-or-string: true - type: object - name: - description: Name of the metric - type: string - templateRef: - description: TemplateRef references a metric template - object - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object - instead of an entire object, this string should - contain a valid JSON/Go field access statement, - such as desiredState.manifest.containers[2]. - For example, if the object reference is to a - container within a pod, this would take on a - value like: "spec.containers{name}" (where "name" - refers to the name of the container that triggered - the event) or if no container name is specified - "spec.containers[2]" (container with index 2 - in this pod). This syntax is chosen only to - have some well-defined way of referencing a - part of an object. TODO: this design is not - final and this field is subject to change in - the future.' - type: string - kind: - description: 'Kind of the referent. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which - this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - required: - - name - type: object - type: array - instanceInterval: - description: The wait time, in seconds, between instances - upgrades, default = 0 - format: int32 - type: integer - maxUnavailable: - anyOf: - - type: integer - - type: string - description: MaxUnavailable is the max allowed number of - pods that is unavailable during the upgrade. We will mark - the batch as ready as long as there are less or equal - number of pods unavailable than this number. default = - 0 - x-kubernetes-int-or-string: true - podList: - description: The list of Pods to get upgraded it is mutually - exclusive with the Replicas field - items: - type: string - type: array - replicas: - anyOf: - - type: integer - - type: string - description: 'Replicas is the number of pods to upgrade - in this batch it can be an absolute number (ex: 5) or - a percentage of total pods we will ignore the percentage - of the last batch to just fill the gap it is mutually - exclusive with the PodList field' - x-kubernetes-int-or-string: true - type: object - type: array - rolloutStrategy: - description: RolloutStrategy defines strategies for the rollout - plan The default is IncreaseFirstRolloutStrategyType - type: string - rolloutWebhooks: - description: RolloutWebhooks provide a way for the rollout to - interact with an external process - items: - description: RolloutWebhook holds the reference to external - checks used for canary analysis - properties: - expectedStatus: - description: ExpectedStatus contains all the expected http - status code that we will accept as success - items: - type: integer - type: array - metadata: - additionalProperties: - type: string - description: Metadata (key-value pairs) for this webhook - type: object - method: - description: Method the HTTP call method, default is POST - type: string - name: - description: Name of this webhook - type: string - type: - description: Type of this webhook - type: string - url: - description: URL address of this webhook - type: string - required: - - name - - type - - url - type: object - type: array - targetSize: - description: The size of the target resource. The default is the - same as the size of the source resource. - format: int32 - type: integer - type: object - sourceRevisionName: - description: SourceRevisionName contains the name of the componentRevisionName that - we need to upgrade from. it can be empty only when it's the first - time to deploy the application - type: string - targetRevisionName: - description: TargetRevisionName contains the name of the componentRevisionName - that we need to upgrade to. - type: string - required: - - componentName - - rolloutPlan - - targetRevisionName - type: object - status: - description: CompRolloutStatus defines the observed state of rollout - properties: - LastSourceRevision: - description: LastSourceRevision contains the name of the componentRevisionName - that we need to upgrade from. We will restart the rollout if this - is not the same as the spec - type: string - batchRollingState: - description: BatchRollingState only meaningful when the Status is - rolling - type: string - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's - last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from - one status to another. - type: string - status: - description: Status of this condition; is it currently True, - False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - currentBatch: - description: The current batch the rollout is working on/blocked it - starts from 0 - format: int32 - type: integer - lastAppliedPodTemplateIdentifier: - description: lastAppliedPodTemplateIdentifier is a string that uniquely - represent the last pod template each workload type could use different - ways to identify that so we cannot compare between resources We - update this field only after a successful rollout - type: string - lastTargetRevision: - description: LastUpgradedTargetRevision contains the name of the componentRevisionName - that we upgraded to We will restart the rollout if this is not the - same as the spec - type: string - rollingState: - description: RollingState is the Rollout State - type: string - rolloutOriginalSize: - description: RolloutTargetSize is the size of the target resources. - This is determined once the initial spec verification and does not - change until the rollout is restarted - format: int32 - type: integer - rolloutTargetSize: - description: RolloutTargetSize is the size of the target resources. - This is determined once the initial spec verification and does not - change until the rollout is restarted - format: int32 - type: integer - targetGeneration: - description: NewPodTemplateIdentifier is a string that uniquely represent - the new pod template each workload type could use different ways - to identify that so we cannot compare between resources - type: string - upgradedReadyReplicas: - description: UpgradedReadyReplicas is the number of Pods upgraded - by the rollout controller that have a Ready Condition. - format: int32 - type: integer - upgradedReplicas: - description: UpgradedReplicas is the number of Pods upgraded by the - rollout controller - format: int32 - type: integer - required: - - currentBatch - - lastTargetRevision - - rollingState - - upgradedReadyReplicas - - upgradedReplicas - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/NOTES.txt b/manifests/vela-system/base/charts/vela-minimal/templates/NOTES.txt deleted file mode 100644 index 2abe823..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/NOTES.txt +++ /dev/null @@ -1 +0,0 @@ -Welcome to use the KubeVela! Enjoy your shipping application journey! \ No newline at end of file diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/_helpers.tpl b/manifests/vela-system/base/charts/vela-minimal/templates/_helpers.tpl deleted file mode 100644 index 396aee7..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/_helpers.tpl +++ /dev/null @@ -1,73 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "kubevela.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "kubevela.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "kubevela.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "kubevela.labels" -}} -helm.sh/chart: {{ include "kubevela.chart" . }} -{{ include "kubevela.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "kubevela.selectorLabels" -}} -app.kubernetes.io/name: {{ include "kubevela.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{- define "kubevela-apiserver.selectorLabels" -}} -app.kubernetes.io/name: {{ include "kubevela.name" . }}-apiserver -app.kubernetes.io/instance: {{ .Release.Name }}-apiserver -{{- end -}} - -{{- define "kubevela-cluster-gateway.selectorLabels" -}} -app.kubernetes.io/name: {{ include "kubevela.name" . }}-cluster-gateway -app.kubernetes.io/instance: {{ .Release.Name }}-cluster-gateway -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "kubevela.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "kubevela.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrole.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrole.yaml deleted file mode 100644 index 96b0ba3..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrole.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "kubevela.fullname" . }}-admission - annotations: - "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - app: {{ template "kubevela.name" . }}-admission - {{- include "kubevela.labels" . | nindent 4 }} -rules: - - apiGroups: - - admissionregistration.k8s.io - resources: - - validatingwebhookconfigurations - - mutatingwebhookconfigurations - verbs: - - get - - update - - apiGroups: - - apiextensions.k8s.io - resources: - - customresourcedefinitions - verbs: - - get - - update -{{- end }} diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrolebinding.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrolebinding.yaml deleted file mode 100644 index 649bb71..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "kubevela.fullname" . }}-admission - annotations: - "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - app: {{ template "kubevela.name" . }}-admission - {{- include "kubevela.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "kubevela.fullname" . }}-admission -subjects: - - kind: ServiceAccount - name: {{ template "kubevela.fullname" . }}-admission - namespace: {{ .Release.Namespace }} -{{- end }} diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/job-createSecret.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/job-createSecret.yaml deleted file mode 100644 index b62f91d..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/job-createSecret.yaml +++ /dev/null @@ -1,50 +0,0 @@ -{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled (not .Values.admissionWebhooks.certManager.enabled) }} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "kubevela.fullname" . }}-admission-create - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - app: {{ template "kubevela.name" . }}-admission-create - {{- include "kubevela.labels" . | nindent 4 }} -spec: - {{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }} - # Alpha feature since k8s 1.12 - ttlSecondsAfterFinished: 0 - {{- end }} - template: - metadata: - name: {{ template "kubevela.fullname" . }}-admission-create - labels: - app: {{ template "kubevela.name" . }}-admission-create - {{- include "kubevela.labels" . | nindent 8 }} - spec: - containers: - - name: create - image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }} - imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }} - args: - - create - - --host={{ template "kubevela.name" . }}-webhook,{{ template "kubevela.name" . }}-webhook.{{ .Release.Namespace }}.svc - - --namespace={{ .Release.Namespace }} - - --secret-name={{ template "kubevela.fullname" . }}-admission - - --key-name=tls.key - - --cert-name=tls.crt - restartPolicy: OnFailure - serviceAccountName: {{ template "kubevela.fullname" . }}-admission - {{- with .Values.admissionWebhooks.patch.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.admissionWebhooks.patch.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - securityContext: - runAsGroup: 2000 - runAsNonRoot: true - runAsUser: 2000 -{{- end }} diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/job-patchWebhook.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/job-patchWebhook.yaml deleted file mode 100644 index 03744ae..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/job-patchWebhook.yaml +++ /dev/null @@ -1,50 +0,0 @@ -{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled (not .Values.admissionWebhooks.certManager.enabled) }} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "kubevela.fullname" . }}-admission-patch - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - app: {{ template "kubevela.name" . }}-admission-patch - {{- include "kubevela.labels" . | nindent 4 }} -spec: - {{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }} - # Alpha feature since k8s 1.12 - ttlSecondsAfterFinished: 0 - {{- end }} - template: - metadata: - name: {{ template "kubevela.fullname" . }}-admission-patch - labels: - app: {{ template "kubevela.name" . }}-admission-patch - {{- include "kubevela.labels" . | nindent 8 }} - spec: - containers: - - name: patch - image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }} - imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }} - args: - - patch - - --webhook-name={{ template "kubevela.fullname" . }}-admission - - --namespace={{ .Release.Namespace }} - - --secret-name={{ template "kubevela.fullname" . }}-admission - - --patch-failure-policy={{ .Values.admissionWebhooks.failurePolicy }} - - --crds=applications.core.oam.dev - restartPolicy: OnFailure - serviceAccountName: {{ template "kubevela.fullname" . }}-admission - {{- with .Values.admissionWebhooks.patch.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.admissionWebhooks.patch.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - securityContext: - runAsGroup: 2000 - runAsNonRoot: true - runAsUser: 2000 -{{- end }} diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/role.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/role.yaml deleted file mode 100644 index cf3d7dd..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/role.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "kubevela.fullname" . }}-admission - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - app: {{ template "kubevela.name" . }}-admission - {{- include "kubevela.labels" . | nindent 4 }} -rules: - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - - create -{{- end }} diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/rolebinding.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/rolebinding.yaml deleted file mode 100644 index cffdc0f..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/rolebinding.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ template "kubevela.fullname" . }}-admission - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - app: {{ template "kubevela.name" . }}-admission - {{- include "kubevela.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "kubevela.fullname" . }}-admission -subjects: - - kind: ServiceAccount - name: {{ template "kubevela.fullname" . }}-admission - namespace: {{ .Release.Namespace }} -{{- end }} diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/serviceaccount.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/serviceaccount.yaml deleted file mode 100644 index 4e56267..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/job-patch/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if and .Values.admissionWebhooks.enabled .Values.admissionWebhooks.patch.enabled .Values.rbac.create (not .Values.admissionWebhooks.certManager.enabled) }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "kubevela.fullname" . }}-admission - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - app: {{ template "kubevela.name" . }}-admission - {{- include "kubevela.labels" . | nindent 4 }} -{{- end }} diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/mutatingWebhookConfiguration.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/mutatingWebhookConfiguration.yaml deleted file mode 100644 index 4be28e8..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/mutatingWebhookConfiguration.yaml +++ /dev/null @@ -1,122 +0,0 @@ -{{- if .Values.admissionWebhooks.enabled -}} -apiVersion: admissionregistration.k8s.io/v1 -kind: MutatingWebhookConfiguration -metadata: - name: {{ template "kubevela.fullname" . }}-admission - namespace: {{ .Release.Namespace }} - {{- if .Values.admissionWebhooks.certManager.enabled }} - annotations: - cert-manager.io/inject-ca-from: {{ printf "%s/%s-root-cert" .Release.Namespace (include "kubevela.fullname" .) | quote }} - {{- end }} -webhooks: - {{- if eq .Values.OAMSpecVer "all"}} - - clientConfig: - caBundle: Cg== - service: - name: {{ template "kubevela.name" . }}-webhook - namespace: {{ .Release.Namespace }} - path: /mutating-core-oam-dev-v1alpha2-applicationconfigurations - {{- if .Values.admissionWebhooks.patch.enabled }} - failurePolicy: Ignore - {{- else }} - failurePolicy: Fail - {{- end }} - name: mutating.core.oam.dev.v1alpha2.applicationconfigurations - sideEffects: None - rules: - - apiGroups: - - core.oam.dev - apiVersions: - - v1alpha2 - operations: - - CREATE - - UPDATE - resources: - - applicationconfigurations - scope: Namespaced - admissionReviewVersions: - - v1beta1 - - v1 - timeoutSeconds: 5 - - clientConfig: - caBundle: Cg== - service: - name: {{ template "kubevela.name" . }}-webhook - namespace: {{ .Release.Namespace }} - path: /mutating-core-oam-dev-v1alpha2-components - {{- if .Values.admissionWebhooks.patch.enabled }} - failurePolicy: Ignore - {{- else }} - failurePolicy: Fail - {{- end }} - name: mutating.core.oam-dev.v1alpha2.components - sideEffects: None - rules: - - apiGroups: - - core.oam.dev - apiVersions: - - v1alpha2 - operations: - - CREATE - - UPDATE - resources: - - components - scope: Namespaced - admissionReviewVersions: - - v1beta1 - - v1 - timeoutSeconds: 5 - {{- end }} - - clientConfig: - caBundle: Cg== - service: - name: {{ template "kubevela.name" . }}-webhook - namespace: {{ .Release.Namespace }} - path: /mutate-standard-oam-dev-v1alpha1-podspecworkload - {{- if .Values.admissionWebhooks.patch.enabled }} - failurePolicy: Ignore - {{- else }} - failurePolicy: Fail - {{- end }} - name: mcontainerized.kb.io - sideEffects: None - admissionReviewVersions: - - v1beta1 - rules: - - apiGroups: - - standard.oam.dev - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - podspecworkloads - - clientConfig: - caBundle: Cg== - service: - name: {{ template "kubevela.name" . }}-webhook - namespace: {{ .Release.Namespace }} - path: /mutating-core-oam-dev-v1beta1-componentdefinitions - {{- if .Values.admissionWebhooks.patch.enabled }} - failurePolicy: Ignore - {{- else }} - failurePolicy: Fail - {{- end }} - name: mutating.core.oam-dev.v1beta1.componentdefinitions - sideEffects: None - admissionReviewVersions: - - v1beta1 - - v1 - rules: - - apiGroups: - - core.oam.dev - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - componentdefinitions - -{{- end -}} diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/validatingWebhookConfiguration.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/validatingWebhookConfiguration.yaml deleted file mode 100644 index 3eb5d70..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/validatingWebhookConfiguration.yaml +++ /dev/null @@ -1,172 +0,0 @@ -{{- if .Values.admissionWebhooks.enabled -}} -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - name: {{ template "kubevela.fullname" . }}-admission - namespace: {{ .Release.Namespace }} - {{- if .Values.admissionWebhooks.certManager.enabled }} - annotations: - cert-manager.io/inject-ca-from: {{ printf "%s/%s-root-cert" .Release.Namespace (include "kubevela.fullname" .) | quote }} - {{- end }} -webhooks: - {{- if eq .Values.OAMSpecVer "all"}} - - clientConfig: - caBundle: Cg== - service: - name: {{ template "kubevela.name" . }}-webhook - namespace: {{ .Release.Namespace }} - path: /validating-core-oam-dev-v1alpha2-applicationconfigurations - {{- if .Values.admissionWebhooks.patch.enabled }} - failurePolicy: Ignore - {{- else }} - failurePolicy: {{ .Values.admissionWebhooks.failurePolicy }} - {{- end }} - name: validating.core.oam.dev.v1alpha2.applicationconfigurations - sideEffects: None - rules: - - apiGroups: - - core.oam.dev - apiVersions: - - v1alpha2 - operations: - - CREATE - - UPDATE - resources: - - applicationconfigurations - scope: Namespaced - admissionReviewVersions: - - v1beta1 - - v1 - timeoutSeconds: 5 - - clientConfig: - caBundle: Cg== - service: - name: {{ template "kubevela.name" . }}-webhook - namespace: {{ .Release.Namespace }} - path: /validating-core-oam-dev-v1alpha2-components - {{- if .Values.admissionWebhooks.patch.enabled }} - failurePolicy: Ignore - {{- else }} - failurePolicy: {{ .Values.admissionWebhooks.failurePolicy }} - {{- end }} - name: validating.core.oam.dev.v1alpha2.components - sideEffects: None - rules: - - apiGroups: - - core.oam.dev - apiVersions: - - v1alpha2 - operations: - - CREATE - - UPDATE - resources: - - components - scope: Namespaced - admissionReviewVersions: - - v1beta1 - - v1 - timeoutSeconds: 5 - {{- end }} - - clientConfig: - caBundle: Cg== - service: - name: {{ template "kubevela.name" . }}-webhook - namespace: {{ .Release.Namespace }} - path: /validating-core-oam-dev-v1alpha2-traitdefinitions - {{- if .Values.admissionWebhooks.patch.enabled }} - failurePolicy: Ignore - {{- else }} - failurePolicy: {{ .Values.admissionWebhooks.failurePolicy }} - {{- end }} - name: validating.core.oam.dev.v1alpha2.traitdefinitions - sideEffects: None - admissionReviewVersions: - - v1beta1 - - v1 - rules: - - apiGroups: - - core.oam.dev - apiVersions: - - v1alpha2 - operations: - - CREATE - - UPDATE - resources: - - traitdefinitions - scope: Cluster - timeoutSeconds: 5 - - clientConfig: - caBundle: Cg== - service: - name: {{ template "kubevela.name" . }}-webhook - namespace: {{ .Release.Namespace }} - path: /validate-standard-oam-dev-v1alpha1-podspecworkload - failurePolicy: Fail - name: vcontainerized.kb.io - admissionReviewVersions: - - v1beta1 - - v1 - sideEffects: None - rules: - - apiGroups: - - standard.oam.dev - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - podspecworkloads - - clientConfig: - caBundle: Cg== - service: - name: {{ template "kubevela.name" . }}-webhook - namespace: {{ .Release.Namespace }} - path: /validating-core-oam-dev-v1beta1-applications - {{- if .Values.admissionWebhooks.patch.enabled }} - failurePolicy: Ignore - {{- else }} - failurePolicy: {{ .Values.admissionWebhooks.failurePolicy }} - {{- end }} - name: validating.core.oam.dev.v1beta1.applications - admissionReviewVersions: - - v1beta1 - - v1 - sideEffects: None - rules: - - apiGroups: - - core.oam.dev - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - applications - - clientConfig: - caBundle: Cg== - service: - name: {{ template "kubevela.name" . }}-webhook - namespace: {{ .Release.Namespace }} - path: /validating-core-oam-dev-v1beta1-componentdefinitions - {{- if .Values.admissionWebhooks.patch.enabled }} - failurePolicy: Ignore - {{- else }} - failurePolicy: Fail - {{- end }} - name: validating.core.oam-dev.v1beta1.componentdefinitions - sideEffects: None - admissionReviewVersions: - - v1beta1 - - v1 - rules: - - apiGroups: - - core.oam.dev - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - componentdefinitions -{{- end -}} diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/webhookService.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/webhookService.yaml deleted file mode 100644 index ddfb54e..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/admission-webhooks/webhookService.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.admissionWebhooks.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "kubevela.name" . }}-webhook - namespace: {{ .Release.Namespace }} - labels: - {{- include "kubevela.labels" . | nindent 4 }} -spec: - type: {{ .Values.webhookService.type }} - ports: - - port: 443 - targetPort: {{ .Values.webhookService.port }} - protocol: TCP - name: https - selector: - {{ include "kubevela.selectorLabels" . | nindent 6 }} - -{{- end -}} diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/certmanager.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/certmanager.yaml deleted file mode 100644 index a527d1e..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/certmanager.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if and .Values.admissionWebhooks.certManager.enabled -}} - -# The following manifests contain a self-signed issuer CR and a certificate CR. -# More document can be found at https://docs.cert-manager.io -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - name: {{ template "kubevela.fullname" . }}-self-signed-issuer -spec: - selfSigned: {} - ---- -# Generate a CA Certificate used to sign certificates for the webhook -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: {{ template "kubevela.fullname" . }}-root-cert -spec: - secretName: {{ template "kubevela.fullname" . }}-root-cert - duration: 43800h # 5y - issuerRef: - name: {{ template "kubevela.fullname" . }}-self-signed-issuer - commonName: "ca.webhook.kubevela" - isCA: true - ---- -# Create an Issuer that uses the above generated CA certificate to issue certs -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - name: {{ template "kubevela.fullname" . }}-root-issuer - namespace: {{ .Release.Namespace }} -spec: - ca: - secretName: {{ template "kubevela.fullname" . }}-root-cert - ---- -# generate a serving certificate for the apiservices to use -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: {{ template "kubevela.fullname" . }}-admission - namespace: {{ .Release.Namespace }} -spec: - secretName: {{ template "kubevela.fullname" . }}-admission - duration: 8760h # 1y - issuerRef: - name: {{ template "kubevela.fullname" . }}-root-issuer - dnsNames: - - {{ template "kubevela.name" . }}-webhook.{{ .Release.Namespace }}.svc - - {{ template "kubevela.name" . }}-webhook.{{ .Release.Namespace }}.svc.cluster.local - -{{- end }} diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/cluster-gateway.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/cluster-gateway.yaml deleted file mode 100644 index 8170369..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/cluster-gateway.yaml +++ /dev/null @@ -1,191 +0,0 @@ -{{ if .Values.multicluster.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-cluster-gateway - namespace: {{ .Release.Namespace }} - labels: - {{- include "kubevela.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.multicluster.clusterGateway.replicaCount }} - selector: - matchLabels: - {{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "kubevela.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ include "kubevela.fullname" . }}-cluster-gateway - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - args: - - "apiserver" - - "--secure-port={{ .Values.multicluster.clusterGateway.port }}" - - "--secret-namespace={{ .Release.Namespace }}" - - "--feature-gates=APIPriorityAndFairness=false" - {{ if .Values.multicluster.clusterGateway.secureTLS.enabled }} - - "--cert-dir={{ .Values.multicluster.clusterGateway.secureTLS.certPath }}" - {{ end }} - image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }} - imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }} - resources: - {{- toYaml .Values.multicluster.clusterGateway.resources | nindent 12 }} - ports: - - containerPort: {{ .Values.multicluster.clusterGateway.port }} - {{ if .Values.multicluster.clusterGateway.secureTLS.enabled }} - volumeMounts: - - mountPath: {{ .Values.multicluster.clusterGateway.secureTLS.certPath }} - name: tls-cert-vol - readOnly: true - {{- end }} - {{ if .Values.multicluster.clusterGateway.secureTLS.enabled }} - volumes: - - name: tls-cert-vol - secret: - defaultMode: 420 - secretName: {{ template "kubevela.fullname" . }}-cluster-gateway-tls - {{ end }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{ end }} ---- - {{ if .Values.multicluster.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ .Release.Name }}-cluster-gateway-service - namespace: {{ .Release.Namespace }} -spec: - selector: - {{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 4 }} - ports: - - protocol: TCP - port: {{ .Values.multicluster.clusterGateway.port }} - targetPort: {{ .Values.multicluster.clusterGateway.port }} - {{ end }} ---- - {{ if .Values.multicluster.enabled }} -apiVersion: apiregistration.k8s.io/v1 -kind: APIService -metadata: - name: v1alpha1.cluster.core.oam.dev - labels: - api: cluster-extension-apiserver - apiserver: "true" -spec: - version: v1alpha1 - group: cluster.core.oam.dev - groupPriorityMinimum: 2000 - service: - name: {{ .Release.Name }}-cluster-gateway-service - namespace: {{ .Release.Namespace }} - port: {{ .Values.multicluster.clusterGateway.port }} - versionPriority: 10 - insecureSkipTLSVerify: {{ not .Values.multicluster.clusterGateway.secureTLS.enabled }} - {{ if .Values.multicluster.clusterGateway.secureTLS.enabled }} - caBundle: Cg== - {{ end }} - {{ end }} ---- - {{ if and .Values.multicluster.enabled .Values.multicluster.clusterGateway.secureTLS.enabled }} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-create - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - app: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-create - {{- include "kubevela.labels" . | nindent 4 }} -spec: - {{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }} - # Alpha feature since k8s 1.12 - ttlSecondsAfterFinished: 0 - {{- end }} - template: - metadata: - name: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-create - labels: - app: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-create - {{- include "kubevela.labels" . | nindent 8 }} - spec: - containers: - - name: create - image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }} - imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }} - args: - - create - - --host={{ .Release.Name }}-cluster-gateway-service,{{ .Release.Name }}-cluster-gateway-service.{{ .Release.Namespace }}.svc - - --namespace={{ .Release.Namespace }} - - --secret-name={{ template "kubevela.fullname" . }}-cluster-gateway-tls - - --key-name=apiserver.key - - --cert-name=apiserver.crt - restartPolicy: OnFailure - serviceAccountName: {{ template "kubevela.fullname" . }}-admission - securityContext: - runAsGroup: 2000 - runAsNonRoot: true - runAsUser: 2000 - {{ end }} ---- - {{ if and .Values.multicluster.enabled .Values.multicluster.clusterGateway.secureTLS.enabled }} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-patch - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": post-install,post-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded - labels: - app: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-patch - {{- include "kubevela.labels" . | nindent 4 }} -spec: - {{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }} - # Alpha feature since k8s 1.12 - ttlSecondsAfterFinished: 0 - {{- end }} - template: - metadata: - name: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-patch - labels: - app: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-patch - {{- include "kubevela.labels" . | nindent 8 }} - spec: - containers: - - name: patch - image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }} - imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }} - command: - - /patch - args: - - --secret-namespace={{ .Release.Namespace }} - - --secret-name={{ template "kubevela.fullname" . }}-cluster-gateway-tls - restartPolicy: OnFailure - serviceAccountName: {{ include "kubevela.serviceAccountName" . }} - securityContext: - runAsGroup: 2000 - runAsNonRoot: true - runAsUser: 2000 - {{ end }} \ No newline at end of file diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/definitions/autodetect.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/definitions/autodetect.yaml deleted file mode 100644 index 530aa6f..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/definitions/autodetect.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: core.oam.dev/v1beta1 -kind: WorkloadDefinition -metadata: - annotations: - definition.oam.dev/description: "autodetects.core.oam.dev is the default workload type of ComponentDefinition" - name: autodetects.core.oam.dev - namespace: {{.Values.systemDefinitionNamespace}} -spec: - definitionRef: - name: autodetects.core.oam.dev \ No newline at end of file diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/definitions/healthscopes.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/definitions/healthscopes.yaml deleted file mode 100644 index fa3dbbf..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/definitions/healthscopes.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: core.oam.dev/v1beta1 -kind: ScopeDefinition -metadata: - name: healthscopes.core.oam.dev - namespace: {{.Values.systemDefinitionNamespace}} -spec: - workloadRefsPath: spec.workloadRefs - allowComponentOverlap: true - definitionRef: - name: healthscopes.core.oam.dev \ No newline at end of file diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/annotations.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/annotations.yaml deleted file mode 100644 index 34824c0..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/annotations.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/annotations.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add annotations on K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: annotations - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - patch: { - metadata: annotations: { - for k, v in parameter { - "\(k)": v - } - } - spec: template: metadata: annotations: { - for k, v in parameter { - "\(k)": v - } - } - } - parameter: [string]: string - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/apply-application.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/apply-application.yaml deleted file mode 100644 index 62409ab..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/apply-application.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/apply-application.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - definition.oam.dev/description: Apply application for your workflow steps - name: apply-application - namespace: {{.Values.systemDefinitionNamespace}} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - // apply application - output: op.#ApplyApplication & {} - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/apply-object.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/apply-object.yaml deleted file mode 100644 index 74ead0a..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/apply-object.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/apply-object.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - definition.oam.dev/description: Apply raw kubernetes objects for your workflow steps - name: apply-object - namespace: {{.Values.systemDefinitionNamespace}} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - apply: op.#Apply & { - value: parameter.value - cluster: parameter.cluster - } - parameter: { - // +usage=Specify the value of the object - value: {...} - // +usage=Specify the cluster of the object - cluster: *"" | string - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/apply-remaining.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/apply-remaining.yaml deleted file mode 100644 index 41d2401..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/apply-remaining.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/apply-remaining.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - definition.oam.dev/description: Apply remaining components and traits - name: apply-remaining - namespace: {{.Values.systemDefinitionNamespace}} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - // apply remaining components and traits - apply: op.#ApplyRemaining & { - parameter - } - parameter: { - // +usage=Declare the name of the component - exceptions?: [...string] - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/configmap.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/configmap.yaml deleted file mode 100644 index e14beab..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/configmap.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/configmap.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Create/Attach configmaps on K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: configmap - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - patch: spec: template: spec: { - containers: [{ - // +patchKey=name - volumeMounts: [ - for v in parameter.volumes { - { - name: "volume-\(v.name)" - mountPath: v.mountPath - readOnly: v.readOnly - } - }, - ] - }, ...] - // +patchKey=name - volumes: [ - for v in parameter.volumes { - { - name: "volume-\(v.name)" - configMap: name: v.name - } - }, - ] - } - outputs: { - for v in parameter.volumes { - if v.data != _|_ { - "\(v.name)": { - apiVersion: "v1" - kind: "ConfigMap" - metadata: name: v.name - data: v.data - } - } - } - } - parameter: { - // +usage=Specify mounted configmap names and their mount paths in the container - volumes: [...{ - name: string - mountPath: string - readOnly: *false | bool - data?: [string]: string - }] - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/cpuscaler.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/cpuscaler.yaml deleted file mode 100644 index 2c15dc9..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/cpuscaler.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/cpuscaler.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Automatically scale the component based on CPU usage. - name: cpuscaler - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - deployments.apps - schematic: - cue: - template: | - outputs: cpuscaler: { - apiVersion: "autoscaling/v2beta2" - kind: "HorizontalPodAutoscaler" - metadata: name: context.name - spec: { - scaleTargetRef: { - apiVersion: "apps/v1" - kind: "Deployment" - name: context.name - } - minReplicas: parameter.min - maxReplicas: parameter.max - metrics: [{ - type: "Resource" - resource: { - name: "cpu" - target: { - type: "Utilization" - averageUtilization: parameter.cpuUtil - } - } - }] - } - } - parameter: { - - // +usage=Specify the minimal number of replicas to which the autoscaler can scale down - min: *1 | int - - // +usage=Specify the maximum number of of replicas to which the autoscaler can scale up - max: *10 | int - - // +usage=Specify the average cpu utilization, for example, 50 means the CPU usage is 50% - cpuUtil: *50 | int - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/depends-on-app.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/depends-on-app.yaml deleted file mode 100644 index dcea3b2..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/depends-on-app.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/depends-on-app.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - definition.oam.dev/description: check or install depends-on Application - name: depends-on-app - namespace: {{.Values.systemDefinitionNamespace}} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - "encoding/yaml" - ) - - dependsOn: op.#Read & { - value: { - apiVersion: "core.oam.dev/v1beta1" - kind: "Application" - metadata: { - name: parameter.name - namespace: parameter.namespace - } - } - } - load: op.#Steps & { - if dependsOn.err != _|_ && dependsOn.value == _|_ { - configMap: op.#Read & { - value: { - apiVersion: "v1" - kind: "ConfigMap" - metadata: { - name: parameter.name - namespace: parameter.namespace - } - } - } - apply: op.#Apply & { - value: { - yaml.Unmarshal(configMap.value.data[parameter.name]) - } - } - wait: op.#ConditionalWait & { - continue: load.apply.value.status.status == "running" - } - } - - if dependsOn.value != _|_ { - wait: op.#ConditionalWait & { - continue: dependsOn.value.status.status == "running" - } - } - } - parameter: { - // +usage=Specify the name of the dependent Application - name: string - // +usage=Specify the namespace of the dependent Application - namespace: string - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/env.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/env.yaml deleted file mode 100644 index f3a9cc5..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/env.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/env.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: add env on K8s pod for your workload which follows the pod spec in path 'spec.template.' - name: env - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - '*' - schematic: - cue: - template: | - patch: spec: template: spec: { - // +patchKey=name - containers: [{ - name: context.name - // +patchStrategy=retainKeys - env: [ - for k, v in parameter.env { - name: k - value: v - }, - ] - }] - } - parameter: env: [string]: string - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/export2config.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/export2config.yaml deleted file mode 100644 index 4f8d5bb..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/export2config.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/export2config.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - definition.oam.dev/description: Export data to config map for your workflow steps - name: export2config - namespace: {{.Values.systemDefinitionNamespace}} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - apply: op.#Apply & { - value: { - apiVersion: "v1" - kind: "ConfigMap" - metadata: { - name: parameter.configName - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - if parameter.namespace == _|_ { - namespace: context.namespace - } - } - data: parameter.data - } - } - parameter: { - // +usage=Specify the name of the config map - configName: string - // +usage=Specify the namespace of the config map - namespace?: string - // +usage=Specify the data of config map - data: {} - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/export2secret.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/export2secret.yaml deleted file mode 100644 index 0d1262e..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/export2secret.yaml +++ /dev/null @@ -1,47 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/export2secret.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - definition.oam.dev/description: Export data to secret for your workflow steps - name: export2secret - namespace: {{.Values.systemDefinitionNamespace}} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - apply: op.#Apply & { - value: { - apiVersion: "v1" - kind: "Secret" - if parameter.type != _|_ { - type: parameter.type - } - metadata: { - name: parameter.secretName - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - if parameter.namespace == _|_ { - namespace: context.namespace - } - } - stringData: parameter.data - } - } - parameter: { - // +usage=Specify the name of the secret - secretName: string - // +usage=Specify the namespace of the secret - namespace?: string - // +usage=Specify the type of the secret - type?: string - // +usage=Specify the data of secret - data: {} - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/expose.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/expose.yaml deleted file mode 100644 index bc711d7..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/expose.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/expose.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Expose port to enable web traffic for your component. - name: expose - namespace: {{.Values.systemDefinitionNamespace}} -spec: - podDisruptive: false - schematic: - cue: - template: | - outputs: service: { - apiVersion: "v1" - kind: "Service" - metadata: name: context.name - spec: { - selector: "app.oam.dev/component": context.name - ports: [ - for p in parameter.port { - port: p - targetPort: p - }, - ] - type: parameter.type - } - } - parameter: { - // +usage=Specify the exposion ports - port: [...int] - // +usage=Specify what kind of Service you want. options: "ClusterIP","NodePort","LoadBalancer","ExternalName" - type: *"ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName" - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/health.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/health.yaml deleted file mode 100644 index 7f9c4fc..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/health.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# 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 - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/hostalias.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/hostalias.yaml deleted file mode 100644 index 8cf4306..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/hostalias.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/hostalias.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add host aliases on K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: hostalias - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - '*' - podDisruptive: false - schematic: - cue: - template: | - patch: { - // +patchKey=ip - spec: template: spec: hostAliases: parameter.hostAliases - } - parameter: { - // +usage=Specify the hostAliases to add - hostAliases: [...{ - ip: string - hostnames: [...string] - }] - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/ingress-1-20.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/ingress-1-20.yaml deleted file mode 100644 index 46d2363..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/ingress-1-20.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/ingress-1-20.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Enable public web traffic for the component, the ingress API matches K8s v1.20+. - name: ingress-1-20 - namespace: {{.Values.systemDefinitionNamespace}} -spec: - podDisruptive: false - schematic: - cue: - template: | - // trait template can have multiple outputs in one trait - outputs: service: { - apiVersion: "v1" - kind: "Service" - metadata: name: context.name - spec: { - selector: "app.oam.dev/component": context.name - ports: [ - for k, v in parameter.http { - port: v - targetPort: v - }, - ] - } - } - outputs: ingress: { - apiVersion: "networking.k8s.io/v1" - kind: "Ingress" - metadata: { - name: context.name - annotations: "kubernetes.io/ingress.class": parameter.class - } - spec: rules: [{ - host: parameter.domain - http: paths: [ - for k, v in parameter.http { - path: k - pathType: "ImplementationSpecific" - backend: service: { - name: context.name - port: number: v - } - }, - ] - }] - } - parameter: { - // +usage=Specify the domain you want to expose - domain: string - - // +usage=Specify the mapping relationship between the http path and the workload port - http: [string]: int - - // +usage=Specify the class of ingress to use - class: *"nginx" | string - } - status: - customStatus: |- - let igs = context.outputs.ingress.status.loadBalancer.ingress - if igs == _|_ { - message: "No loadBalancer found, visiting by using 'vela port-forward " + context.appName + "'\n" - } - if len(igs) > 0 { - if igs[0].ip != _|_ { - message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host + ", IP: " + igs[0].ip - } - if igs[0].ip == _|_ { - message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host - } - } - healthPolicy: 'isHealth: len(context.outputs.service.spec.clusterIP) > 0' - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/ingress.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/ingress.yaml deleted file mode 100644 index ca0ff97..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/ingress.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/ingress.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Enable public web traffic for the component. - name: ingress - namespace: {{.Values.systemDefinitionNamespace}} -spec: - podDisruptive: false - schematic: - cue: - template: | - // trait template can have multiple outputs in one trait - outputs: service: { - apiVersion: "v1" - kind: "Service" - metadata: name: context.name - spec: { - selector: "app.oam.dev/component": context.name - ports: [ - for k, v in parameter.http { - port: v - targetPort: v - }, - ] - } - } - outputs: ingress: { - apiVersion: "networking.k8s.io/v1beta1" - kind: "Ingress" - metadata: name: context.name - spec: rules: [{ - host: parameter.domain - http: paths: [ - for k, v in parameter.http { - path: k - backend: { - serviceName: context.name - servicePort: v - } - }, - ] - }] - } - parameter: { - // +usage=Specify the domain you want to expose - domain: string - - // +usage=Specify the mapping relationship between the http path and the workload port - http: [string]: int - } - status: - customStatus: |- - let igs = context.outputs.ingress.status.loadBalancer.ingress - if igs == _|_ { - message: "No loadBalancer found, visiting by using 'vela port-forward " + context.appName + "'\n" - } - if len(igs) > 0 { - if igs[0].ip != _|_ { - message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host + ", IP: " + igs[0].ip - } - if igs[0].ip == _|_ { - message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host - } - } - healthPolicy: 'isHealth: len(context.outputs.service.spec.clusterIP) > 0' - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/init-container.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/init-container.yaml deleted file mode 100644 index e74bad8..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/init-container.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/init-container.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: add an init container and use shared volume with pod - name: init-container - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - deployments.apps - podDisruptive: true - schematic: - cue: - template: | - patch: spec: template: spec: { - // +patchKey=name - containers: [{ - name: context.name - // +patchKey=name - volumeMounts: [{ - name: parameter.mountName - mountPath: parameter.appMountPath - }] - }] - initContainers: [{ - name: parameter.name - image: parameter.image - if parameter.cmd != _|_ { - command: parameter.cmd - } - if parameter.args != _|_ { - args: parameter.args - } - - // +patchKey=name - volumeMounts: [{ - name: parameter.mountName - mountPath: parameter.initMountPath - }] - }] - // +patchKey=name - volumes: [{ - name: parameter.mountName - emptyDir: {} - }] - } - parameter: { - // +usage=Specify the name of init container - name: string - - // +usage=Specify the image of init container - image: string - - // +usage=Specify the commands run in the init container - cmd?: [...string] - - // +usage=Specify the args run in the init container - args?: [...string] - - // +usage=Specify the mount name of shared volume - mountName: *"workdir" | string - - // +usage=Specify the mount path of app container - appMountPath: string - - // +usage=Specify the mount path of init container - initMountPath: string - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/labels.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/labels.yaml deleted file mode 100644 index 91b4d82..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/labels.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/labels.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add labels on K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: labels - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - patch: { - metadata: labels: { - for k, v in parameter { - "\(k)": v - } - } - spec: template: metadata: labels: { - for k, v in parameter { - "\(k)": v - } - } - } - parameter: [string]: string - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/lifecycle.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/lifecycle.yaml deleted file mode 100644 index ec7a3e8..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/lifecycle.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/lifecycle.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add lifecycle hooks for the first container of K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: lifecycle - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - patch: spec: template: spec: containers: [{ - lifecycle: { - if parameter.postStart != _|_ { - postStart: parameter.postStart - } - if parameter.preStop != _|_ { - preStop: parameter.preStop - } - } - }, ...] - parameter: { - postStart?: #LifeCycleHandler - preStop?: #LifeCycleHandler - } - #Port: int & >=1 & <=65535 - #LifeCycleHandler: { - exec?: command: [...string] - httpGet?: { - path?: string - port: #Port - host?: string - scheme: *"HTTP" | "HTTPS" - httpHeaders?: [...{ - name: string - value: string - }] - } - tcpSocket?: { - port: #Port - host?: string - } - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/nocalhost.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/nocalhost.yaml deleted file mode 100644 index fc4d1f6..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/nocalhost.yaml +++ /dev/null @@ -1,113 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/nocalhost.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: nocalhost develop configuration. - name: nocalhost - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - import ( - "encoding/json" - ) - - patch: metadata: annotations: { - "dev.nocalhost/application-name": context.appName - "dev.nocalhost/application-namespace": context.namespace - "dev.nocalhost": json.Marshal({ - containers: [ - { - name: context.name - dev: { - if parameter.gitUrl != _|_ { - gitUrl: parameter.gitUrl - } - image: parameter.image - shell: parameter.shell - workDir: parameter.workDir - if parameter.storageClass != _|_ { - storageClass: parameter.storageClass - } - resources: { - limits: parameter.resources.limits - requests: parameter.resources.requests - } - if parameter.persistentVolumeDirs != _|_ { - persistentVolumeDirs: [ - for v in parameter.persistentVolumeDirs { - path: v.path - capacity: v.capacity - }, - ] - } - if parameter.command != _|_ { - command: parameter.command - } - if parameter.debug != _|_ { - debug: parameter.debug - } - hotReload: parameter.hotReload - if parameter.sync != _|_ { - sync: parameter.sync - } - if parameter.env != _|_ { - env: [ - for v in parameter.env { - name: v.name - value: v.value - }, - ] - } - if parameter.portForward != _|_ { - portForward: parameter.portForward - } - } - }, - ] - }) - } - parameter: { - gitUrl?: string - image: string - shell: *"bash" | string - workDir: *"/home/nocalhost-dev" | string - storageClass?: string - command?: { - run?: [...string] - debug?: [...string] - } - debug?: remoteDebugPort?: int - hotReload: *true | bool - sync: { - type: *"send" | string - filePattern?: [...string] - ignoreFilePattern?: [...string] - } - env?: [...{ - name: string - value: string - }] - portForward?: [...string] - persistentVolumeDirs?: [...{ - path: string - capacity: string - }] - resources: { - limits: { - memory: *"2Gi" | string - cpu: *"2" | string - } - requests: { - memory: *"512Mi" | string - cpu: *"0.5" | string - } - } - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/node-affinity.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/node-affinity.yaml deleted file mode 100644 index 874bb57..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/node-affinity.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/node-affinity.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: affinity specify node affinity and toleration on K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: node-affinity - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - patch: spec: template: spec: { - if parameter.affinity != _|_ { - affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: [{ - matchExpressions: [ - for k, v in parameter.affinity { - key: k - operator: "In" - values: v - }, - ]}] - } - if parameter.tolerations != _|_ { - tolerations: [ - for k, v in parameter.tolerations { - effect: "NoSchedule" - key: k - operator: "Equal" - value: v - }] - } - } - parameter: { - affinity?: [string]: [...string] - tolerations?: [string]: string - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/pvc.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/pvc.yaml deleted file mode 100644 index 08cf69d..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/pvc.yaml +++ /dev/null @@ -1,120 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/pvc.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Create a Persistent Volume Claim and mount the PVC as volume to the first container in the pod - name: pvc - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - deployments.apps - podDisruptive: true - schematic: - cue: - template: | - patch: spec: template: spec: { - containers: [{ - if parameter.volumeMode == "Block" { - // +patchKey=name - volumeDevices: [ - for v in parameter.volumesToMount { - { - name: v.name - devicePath: v.devicePath - } - }, - ] - } - if parameter.volumeMode == "Filesystem" { - // +patchKey=name - volumeMounts: [ - for v in parameter.volumesToMount { - { - name: v.name - mountPath: v.mountPath - } - }, - ] - } - }] - - // +patchKey=name - volumes: [ - for v in parameter.volumesToMount { - { - name: v.name - persistentVolumeClaim: claimName: parameter.claimName - } - }, - ] - } - outputs: "\(parameter.claimName)": { - apiVersion: "v1" - kind: "PersistentVolumeClaim" - metadata: name: parameter.claimName - spec: { - accessModes: parameter.accessModes - volumeMode: parameter.volumeMode - if parameter.volumeName != _|_ { - volumeName: parameter.volumeName - } - - if parameter.storageClassName != _|_ { - storageClassName: parameter.storageClassName - } - resources: requests: storage: parameter.resources.requests.storage - if parameter.resources.limits.storage != _|_ { - resources: limits: storage: parameter.resources.limits.storage - } - if parameter.dataSourceRef != _|_ { - dataSourceRef: parameter.dataSourceRef - } - if parameter.dataSource != _|_ { - dataSource: parameter.dataSource - } - if parameter.selector != _|_ { - dataSource: parameter.selector - } - } - } - parameter: { - claimName: string - volumeMode: *"Filesystem" | string - volumeName?: string - accessModes: [...string] - storageClassName?: string - resources: { - requests: storage: =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$" - limits?: storage: =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$" - } - dataSourceRef?: { - name: string - kind: string - apiGroup: string - } - dataSource?: { - name: string - kind: string - apiGroup: string - } - selector?: { - matchLabels?: [string]: string - matchExpressions?: { - key: string - values: [...string] - operator: string - } - } - volumesToMount: [...{ - name: string - if volumeMode == "Block" { - devicePath: string - } - if volumeMode == "Filesystem" { - mountPath: string - } - }] - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/raw.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/raw.yaml deleted file mode 100644 index 7d5c8e7..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/raw.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/raw.cue -apiVersion: core.oam.dev/v1beta1 -kind: ComponentDefinition -metadata: - annotations: - definition.oam.dev/description: raw allow users to specify raw K8s object in properties - name: raw - namespace: {{.Values.systemDefinitionNamespace}} -spec: - schematic: - cue: - template: | - output: parameter - parameter: {} - workload: - type: autodetects.core.oam.dev - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/read-object.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/read-object.yaml deleted file mode 100644 index 95fdad2..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/read-object.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/read-object.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - definition.oam.dev/description: Read objects for your workflow steps - name: read-object - namespace: {{.Values.systemDefinitionNamespace}} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - output: { - if parameter.apiVersion == _|_ && parameter.kind == _|_ { - op.#Read & { - value: { - apiVersion: "core.oam.dev/v1beta1" - kind: "Application" - metadata: { - name: parameter.name - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - } - } - cluster: parameter.cluster - } - } - if parameter.apiVersion != _|_ || parameter.kind != _|_ { - op.#Read & { - value: { - apiVersion: parameter.apiVersion - kind: parameter.kind - metadata: { - name: parameter.name - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - } - } - cluster: parameter.cluster - } - } - } - parameter: { - // +usage=Specify the apiVersion of the object, defaults to core.oam.dev/v1beta1 - apiVersion?: string - // +usage=Specify the kind of the object, defaults to Application - kind?: string - // +usage=Specify the name of the object - name: string - // +usage=Specify the namespace of the object - namespace?: string - // +usage=Specify the cluster of the object - cluster: *"" | string - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/resource.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/resource.yaml deleted file mode 100644 index a96ff7f..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/resource.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/resource.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add resource requests and limits on K8s pod for your workload which follows the pod spec in path 'spec.template.' - name: resource - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - patch: spec: template: spec: containers: [{ - metadata: annotations: "customized-resource": "cpu:\(parameter.cpu) memory:\(parameter.memory)" - resources: { - requests: parameter - limits: parameter - } - }, ...] - parameter: { - // +usage=Specify the amount of cpu to limit - cpu: *1 | number - // +usage=Specify the amount of memory to limit - memory: *"2048Mi" | =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$" - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/rollout.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/rollout.yaml deleted file mode 100644 index e5c360d..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/rollout.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/rollout.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: rollout the component - name: rollout - namespace: {{.Values.systemDefinitionNamespace}} -spec: - manageWorkload: true - schematic: - cue: - template: | - outputs: rollout: { - apiVersion: "standard.oam.dev/v1alpha1" - kind: "Rollout" - metadata: { - name: context.name - namespace: context.namespace - } - spec: { - targetRevisionName: parameter.targetRevision - componentName: context.name - rolloutPlan: { - rolloutStrategy: "IncreaseFirst" - if parameter.rolloutBatches != _|_ { - rolloutBatches: parameter.rolloutBatches - } - targetSize: parameter.targetSize - if parameter["batchPartition"] != _|_ { - batchPartition: parameter.batchPartition - } - } - } - } - parameter: { - targetRevision: *context.revision | string - targetSize: int - rolloutBatches?: [...rolloutBatch] - batchPartition?: int - } - rolloutBatch: replicas: int - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/scaler.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/scaler.yaml deleted file mode 100644 index 53b7807..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/scaler.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/scaler.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Manually scale K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: scaler - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - '*' - podDisruptive: false - schematic: - cue: - template: | - patch: spec: replicas: parameter.replicas - parameter: { - // +usage=Specify the number of workload - replicas: *1 | int - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/service-binding.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/service-binding.yaml deleted file mode 100644 index d4f07e1..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/service-binding.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/service-binding.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Binding secrets of cloud resources to component env - name: service-binding - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - '*' - schematic: - cue: - template: | - patch: spec: template: spec: { - // +patchKey=name - containers: [{ - name: context.name - // +patchKey=name - env: [ - for envName, v in parameter.envMappings { - name: envName - valueFrom: secretKeyRef: { - name: v.secret - if v["key"] != _|_ { - key: v.key - } - if v["key"] == _|_ { - key: envName - } - } - }, - ] - }] - } - parameter: { - // +usage=The mapping of environment variables to secret - envMappings: [string]: #KeySecret - } - #KeySecret: { - key?: string - secret: string - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml deleted file mode 100644 index bee6a72..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/sidecar.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Inject a sidecar container to K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: sidecar - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - patch: { - // +patchKey=name - spec: template: spec: containers: [{ - name: parameter.name - image: parameter.image - if parameter.cmd != _|_ { - command: parameter.cmd - } - if parameter.args != _|_ { - args: parameter.args - } - if parameter["volumes"] != _|_ { - volumeMounts: [ for v in parameter.volumes { - { - mountPath: v.path - name: v.name - } - }] - } - }] - } - parameter: { - // +usage=Specify the name of sidecar container - name: string - - // +usage=Specify the image of sidecar container - image: string - - // +usage=Specify the commands run in the sidecar - cmd?: [...string] - - // +usage=Specify the args in the sidecar - args?: [...string] - - // +usage=Specify the shared volume path - volumes?: [...{ - name: string - path: string - }] - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/task.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/task.yaml deleted file mode 100644 index ce315f1..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/task.yaml +++ /dev/null @@ -1,230 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/task.cue -apiVersion: core.oam.dev/v1beta1 -kind: ComponentDefinition -metadata: - annotations: - definition.oam.dev/description: Describes jobs that run code or a script to completion. - name: task - namespace: {{.Values.systemDefinitionNamespace}} -spec: - schematic: - cue: - template: | - output: { - apiVersion: "batch/v1" - kind: "Job" - spec: { - parallelism: parameter.count - completions: parameter.count - template: spec: { - restartPolicy: parameter.restart - containers: [{ - name: context.name - image: parameter.image - - if parameter["imagePullPolicy"] != _|_ { - imagePullPolicy: parameter.imagePullPolicy - } - - if parameter["cmd"] != _|_ { - command: parameter.cmd - } - - if parameter["env"] != _|_ { - env: parameter.env - } - - if parameter["cpu"] != _|_ { - resources: { - limits: cpu: parameter.cpu - requests: cpu: parameter.cpu - } - } - - if parameter["memory"] != _|_ { - resources: { - limits: memory: parameter.memory - requests: memory: parameter.memory - } - } - - if parameter["volumes"] != _|_ { - volumeMounts: [ for v in parameter.volumes { - { - mountPath: v.mountPath - name: v.name - }}] - } - }] - - if parameter["volumes"] != _|_ { - volumes: [ for v in parameter.volumes { - { - name: v.name - if v.type == "pvc" { - persistentVolumeClaim: claimName: v.claimName - } - if v.type == "configMap" { - configMap: { - defaultMode: v.defaultMode - name: v.cmName - if v.items != _|_ { - items: v.items - } - } - } - if v.type == "secret" { - secret: { - defaultMode: v.defaultMode - secretName: v.secretName - if v.items != _|_ { - items: v.items - } - } - } - if v.type == "emptyDir" { - emptyDir: medium: v.medium - } - }}] - } - - if parameter["imagePullSecrets"] != _|_ { - imagePullSecrets: [ for v in parameter.imagePullSecrets { - name: v - }, - ] - } - - } - } - } - parameter: { - // +usage=Specify number of tasks to run in parallel - // +short=c - count: *1 | int - - // +usage=Which image would you like to use for your service - // +short=i - image: string - - // +usage=Specify image pull policy for your service - imagePullPolicy?: string - - // +usage=Specify image pull secrets for your service - imagePullSecrets?: [...string] - - // +usage=Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never. - restart: *"Never" | string - - // +usage=Commands to run in the container - cmd?: [...string] - - // +usage=Define arguments by using environment variables - env?: [...{ - // +usage=Environment variable name - name: string - // +usage=The value of the environment variable - value?: string - // +usage=Specifies a source the value of this var should come from - valueFrom?: { - // +usage=Selects a key of a secret in the pod's namespace - secretKeyRef: { - // +usage=The name of the secret in the pod's namespace to select from - name: string - // +usage=The key of the secret to select from. Must be a valid secret key - key: string - } - } - }] - - // +usage=Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core) - cpu?: string - - // +usage=Specifies the attributes of the memory resource required for the container. - memory?: string - - // +usage=Declare volumes and volumeMounts - volumes?: [...{ - name: string - mountPath: string - // +usage=Specify volume type, options: "pvc","configMap","secret","emptyDir" - type: "pvc" | "configMap" | "secret" | "emptyDir" - if type == "pvc" { - claimName: string - } - if type == "configMap" { - defaultMode: *420 | int - cmName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - } - if type == "secret" { - defaultMode: *420 | int - secretName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - } - if type == "emptyDir" { - medium: *"" | "Memory" - } - }] - - // +usage=Instructions for assessing whether the container is alive. - livenessProbe?: #HealthProbe - - // +usage=Instructions for assessing whether the container is in a suitable state to serve traffic. - readinessProbe?: #HealthProbe - } - #HealthProbe: { - - // +usage=Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. - exec?: { - // +usage=A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures. - command: [...string] - } - - // +usage=Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. - httpGet?: { - // +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed. - path: string - // +usage=The TCP socket within the container to which the HTTP GET request should be directed. - port: int - httpHeaders?: [...{ - name: string - value: string - }] - } - - // +usage=Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. - tcpSocket?: { - // +usage=The TCP socket within the container that should be probed to assess container health. - port: int - } - - // +usage=Number of seconds after the container is started before the first probe is initiated. - initialDelaySeconds: *0 | int - - // +usage=How often, in seconds, to execute the probe. - periodSeconds: *10 | int - - // +usage=Number of seconds after which the probe times out. - timeoutSeconds: *1 | int - - // +usage=Minimum consecutive successes for the probe to be considered successful after having failed. - successThreshold: *1 | int - - // +usage=Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). - failureThreshold: *3 | int - } - workload: - definition: - apiVersion: batch/v1 - kind: Job - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/volumes.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/volumes.yaml deleted file mode 100644 index 5d037de..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/volumes.yaml +++ /dev/null @@ -1,83 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/volumes.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add volumes on K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: volumes - namespace: {{.Values.systemDefinitionNamespace}} -spec: - appliesToWorkloads: - - deployments.apps - podDisruptive: true - schematic: - cue: - template: | - patch: { - // +patchKey=name - spec: template: spec: volumes: [ - for v in parameter.volumes { - { - name: v.name - if v.type == "pvc" { - persistentVolumeClaim: claimName: v.claimName - } - if v.type == "configMap" { - configMap: { - defaultMode: v.defaultMode - name: v.cmName - if v.items != _|_ { - items: v.items - } - } - } - if v.type == "secret" { - secret: { - defaultMode: v.defaultMode - secretName: v.secretName - if v.items != _|_ { - items: v.items - } - } - } - if v.type == "emptyDir" { - emptyDir: medium: v.medium - } - } - }, - ] - } - parameter: { - // +usage=Declare volumes and volumeMounts - volumes?: [...{ - name: string - // +usage=Specify volume type, options: "pvc","configMap","secret","emptyDir" - type: "pvc" | "configMap" | "secret" | "emptyDir" - if type == "pvc" { - claimName: string - } - if type == "configMap" { - defaultMode: *420 | int - cmName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - } - if type == "secret" { - defaultMode: *420 | int - secretName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - } - if type == "emptyDir" { - medium: *"" | "Memory" - } - }] - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/webhook-notification.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/webhook-notification.yaml deleted file mode 100644 index 9929238..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/webhook-notification.yaml +++ /dev/null @@ -1,195 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/webhook-notification.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - definition.oam.dev/description: Send message to webhook - name: webhook-notification - namespace: {{.Values.systemDefinitionNamespace}} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - "encoding/base64" - ) - - parameter: { - dingding?: { - url: { - address?: string - fromSecret?: { - name: string - key: string - } - } - message: { - text?: *null | { - content: string - } - // +usage=msgType can be text, link, mardown, actionCard, feedCard - msgtype: string - link?: *null | { - text?: string - title?: string - messageUrl?: string - picUrl?: string - } - markdown?: *null | { - text: string - title: string - } - at?: *null | { - atMobiles?: *null | [...string] - isAtAll?: bool - } - actionCard?: *null | { - text: string - title: string - hideAvatar: string - btnOrientation: string - singleTitle: string - singleURL: string - btns: *null | [...*null | { - title: string - actionURL: string - }] - } - feedCard?: *null | { - links: *null | [...*null | { - text?: string - title?: string - messageUrl?: string - picUrl?: string - }] - } - } - } - - slack?: { - url: { - address?: string - fromSecret?: { - name: string - key: string - } - } - message: { - text: string - blocks?: *null | [...block] - attachments?: *null | { - blocks?: *null | [...block] - color?: string - } - thread_ts?: string - mrkdwn?: *true | bool - } - } - } - block: { - type: string - block_id?: string - elements?: [...{ - type: string - action_id?: string - url?: string - value?: string - style?: string - text?: textType - confirm?: { - title: textType - text: textType - confirm: textType - deny: textType - style?: string - } - options?: [...option] - initial_options?: [...option] - placeholder?: textType - initial_date?: string - image_url?: string - alt_text?: string - option_groups?: [...option] - max_selected_items?: int - initial_value?: string - multiline?: bool - min_length?: int - max_length?: int - dispatch_action_config?: trigger_actions_on?: [...string] - initial_time?: string - }] - } - textType: { - type: string - text: string - emoji?: bool - verbatim?: bool - } - option: { - text: textType - value: string - description?: textType - url?: string - } - // send webhook notification - ding: op.#Steps & { - if parameter.dingding != _|_ { - if parameter.dingding.url.address != _|_ { - ding1: op.#DingTalk & { - message: parameter.dingding.message - dingUrl: parameter.dingding.url.address - } - } - if parameter.dingding.url.fromSecret != _|_ && parameter.dingding.url.address == _|_ { - read: op.#Read & { - value: { - apiVersion: "v1" - kind: "Secret" - metadata: { - name: parameter.dingding.url.fromSecret.name - namespace: context.namespace - } - } - } - - decoded: base64.Decode(null, read.value.data[parameter.dingding.url.fromSecret.key]) - stringValue: op.#ConvertString & {bt: decoded} - ding2: op.#DingTalk & { - message: parameter.dingding.message - dingUrl: stringValue.str - } - } - } - } - slack: op.#Steps & { - if parameter.slack != _|_ { - if parameter.slack.url.address != _|_ { - slack1: op.#Slack & { - message: parameter.slack.message - slackUrl: parameter.slack.url.address - } - } - if parameter.slack.url.fromSecret != _|_ && parameter.slack.url.address == _|_ { - read: op.#Read & { - value: { - kind: "Secret" - apiVersion: "v1" - metadata: { - name: parameter.slack.url.fromSecret.name - namespace: context.namespace - } - } - } - - decoded: base64.Decode(null, read.value.data[parameter.slack.url.fromSecret.key]) - stringValue: op.#ConvertString & {bt: decoded} - slack2: op.#Slack & { - message: parameter.slack.message - slackUrl: stringValue.str - } - } - } - } - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/webservice.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/webservice.yaml deleted file mode 100644 index 59beda7..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/webservice.yaml +++ /dev/null @@ -1,255 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/webservice.cue -apiVersion: core.oam.dev/v1beta1 -kind: ComponentDefinition -metadata: - annotations: - definition.oam.dev/description: Describes long-running, scalable, containerized services that have a stable network endpoint to receive external network traffic from customers. - name: webservice - namespace: {{.Values.systemDefinitionNamespace}} -spec: - schematic: - cue: - template: | - output: { - apiVersion: "apps/v1" - kind: "Deployment" - spec: { - selector: matchLabels: "app.oam.dev/component": context.name - - template: { - metadata: labels: { - "app.oam.dev/component": context.name - if parameter.addRevisionLabel { - "app.oam.dev/appRevision": context.appRevision - } - "app.oam.dev/revision": context.revision - } - - spec: { - containers: [{ - name: context.name - image: parameter.image - ports: [{ - containerPort: parameter.port - }] - - if parameter["imagePullPolicy"] != _|_ { - imagePullPolicy: parameter.imagePullPolicy - } - - if parameter["cmd"] != _|_ { - command: parameter.cmd - } - - if parameter["env"] != _|_ { - env: parameter.env - } - - if context["config"] != _|_ { - env: context.config - } - - if parameter["cpu"] != _|_ { - resources: { - limits: cpu: parameter.cpu - requests: cpu: parameter.cpu - } - } - - if parameter["memory"] != _|_ { - resources: { - limits: memory: parameter.memory - requests: memory: parameter.memory - } - } - - if parameter["volumes"] != _|_ { - volumeMounts: [ for v in parameter.volumes { - { - mountPath: v.mountPath - name: v.name - }}] - } - - if parameter["livenessProbe"] != _|_ { - livenessProbe: parameter.livenessProbe - } - - if parameter["readinessProbe"] != _|_ { - readinessProbe: parameter.readinessProbe - } - - }] - - if parameter["imagePullSecrets"] != _|_ { - imagePullSecrets: [ for v in parameter.imagePullSecrets { - name: v - }, - ] - } - - if parameter["volumes"] != _|_ { - volumes: [ for v in parameter.volumes { - { - name: v.name - if v.type == "pvc" { - persistentVolumeClaim: claimName: v.claimName - } - if v.type == "configMap" { - configMap: { - defaultMode: v.defaultMode - name: v.cmName - if v.items != _|_ { - items: v.items - } - } - } - if v.type == "secret" { - secret: { - defaultMode: v.defaultMode - secretName: v.secretName - if v.items != _|_ { - items: v.items - } - } - } - if v.type == "emptyDir" { - emptyDir: medium: v.medium - } - }}] - } - } - } - } - } - parameter: { - // +usage=Which image would you like to use for your service - // +short=i - image: string - - // +usage=Specify image pull policy for your service - imagePullPolicy?: string - - // +usage=Specify image pull secrets for your service - imagePullSecrets?: [...string] - - // +usage=Which port do you want customer traffic sent to - // +short=p - port: *80 | int - - // +ignore - // +usage=If addRevisionLabel is true, the appRevision label will be added to the underlying pods - addRevisionLabel: *false | bool - - // +usage=Commands to run in the container - cmd?: [...string] - - // +usage=Define arguments by using environment variables - env?: [...{ - // +usage=Environment variable name - name: string - // +usage=The value of the environment variable - value?: string - // +usage=Specifies a source the value of this var should come from - valueFrom?: { - // +usage=Selects a key of a secret in the pod's namespace - secretKeyRef: { - // +usage=The name of the secret in the pod's namespace to select from - name: string - // +usage=The key of the secret to select from. Must be a valid secret key - key: string - } - } - }] - - // +usage=Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core) - cpu?: string - - // +usage=Specifies the attributes of the memory resource required for the container. - memory?: string - - // +usage=Declare volumes and volumeMounts - volumes?: [...{ - name: string - mountPath: string - // +usage=Specify volume type, options: "pvc","configMap","secret","emptyDir" - type: "pvc" | "configMap" | "secret" | "emptyDir" - if type == "pvc" { - claimName: string - } - if type == "configMap" { - defaultMode: *420 | int - cmName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - } - if type == "secret" { - defaultMode: *420 | int - secretName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - } - if type == "emptyDir" { - medium: *"" | "Memory" - } - }] - - // +usage=Instructions for assessing whether the container is alive. - livenessProbe?: #HealthProbe - - // +usage=Instructions for assessing whether the container is in a suitable state to serve traffic. - readinessProbe?: #HealthProbe - } - #HealthProbe: { - - // +usage=Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. - exec?: { - // +usage=A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures. - command: [...string] - } - - // +usage=Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. - httpGet?: { - // +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed. - path: string - // +usage=The TCP socket within the container to which the HTTP GET request should be directed. - port: int - httpHeaders?: [...{ - name: string - value: string - }] - } - - // +usage=Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. - tcpSocket?: { - // +usage=The TCP socket within the container that should be probed to assess container health. - port: int - } - - // +usage=Number of seconds after the container is started before the first probe is initiated. - initialDelaySeconds: *0 | int - - // +usage=How often, in seconds, to execute the probe. - periodSeconds: *10 | int - - // +usage=Number of seconds after which the probe times out. - timeoutSeconds: *1 | int - - // +usage=Minimum consecutive successes for the probe to be considered successful after having failed. - successThreshold: *1 | int - - // +usage=Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). - failureThreshold: *3 | int - } - workload: - definition: - apiVersion: apps/v1 - kind: Deployment - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/worker.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/worker.yaml deleted file mode 100644 index 5748fde..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/defwithtemplate/worker.yaml +++ /dev/null @@ -1,234 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/worker.cue -apiVersion: core.oam.dev/v1beta1 -kind: ComponentDefinition -metadata: - annotations: - definition.oam.dev/description: Describes long-running, scalable, containerized services that running at backend. They do NOT have network endpoint to receive external network traffic. - name: worker - namespace: {{.Values.systemDefinitionNamespace}} -spec: - schematic: - cue: - template: | - output: { - apiVersion: "apps/v1" - kind: "Deployment" - spec: { - selector: matchLabels: "app.oam.dev/component": context.name - - template: { - metadata: labels: "app.oam.dev/component": context.name - - spec: { - containers: [{ - name: context.name - image: parameter.image - - if parameter["imagePullPolicy"] != _|_ { - imagePullPolicy: parameter.imagePullPolicy - } - - if parameter["cmd"] != _|_ { - command: parameter.cmd - } - - if parameter["env"] != _|_ { - env: parameter.env - } - - if parameter["cpu"] != _|_ { - resources: { - limits: cpu: parameter.cpu - requests: cpu: parameter.cpu - } - } - - if parameter["memory"] != _|_ { - resources: { - limits: memory: parameter.memory - requests: memory: parameter.memory - } - } - - if parameter["volumes"] != _|_ { - volumeMounts: [ for v in parameter.volumes { - { - mountPath: v.mountPath - name: v.name - }}] - } - - if parameter["livenessProbe"] != _|_ { - livenessProbe: parameter.livenessProbe - } - - if parameter["readinessProbe"] != _|_ { - readinessProbe: parameter.readinessProbe - } - - }] - - if parameter["imagePullSecrets"] != _|_ { - imagePullSecrets: [ for v in parameter.imagePullSecrets { - name: v - }, - ] - } - - if parameter["volumes"] != _|_ { - volumes: [ for v in parameter.volumes { - { - name: v.name - if v.type == "pvc" { - persistentVolumeClaim: claimName: v.claimName - } - if v.type == "configMap" { - configMap: { - defaultMode: v.defaultMode - name: v.cmName - if v.items != _|_ { - items: v.items - } - } - } - if v.type == "secret" { - secret: { - defaultMode: v.defaultMode - secretName: v.secretName - if v.items != _|_ { - items: v.items - } - } - } - if v.type == "emptyDir" { - emptyDir: medium: v.medium - } - }}] - } - } - } - } - } - parameter: { - // +usage=Which image would you like to use for your service - // +short=i - image: string - - // +usage=Specify image pull policy for your service - imagePullPolicy?: string - - // +usage=Specify image pull secrets for your service - imagePullSecrets?: [...string] - - // +usage=Commands to run in the container - cmd?: [...string] - - // +usage=Define arguments by using environment variables - env?: [...{ - // +usage=Environment variable name - name: string - // +usage=The value of the environment variable - value?: string - // +usage=Specifies a source the value of this var should come from - valueFrom?: { - // +usage=Selects a key of a secret in the pod's namespace - secretKeyRef: { - // +usage=The name of the secret in the pod's namespace to select from - name: string - // +usage=The key of the secret to select from. Must be a valid secret key - key: string - } - } - }] - - // +usage=Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core) - cpu?: string - - // +usage=Specifies the attributes of the memory resource required for the container. - memory?: string - - // +usage=Declare volumes and volumeMounts - volumes?: [...{ - name: string - mountPath: string - // +usage=Specify volume type, options: "pvc","configMap","secret","emptyDir" - type: "pvc" | "configMap" | "secret" | "emptyDir" - if type == "pvc" { - claimName: string - } - if type == "configMap" { - defaultMode: *420 | int - cmName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - } - if type == "secret" { - defaultMode: *420 | int - secretName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - } - if type == "emptyDir" { - medium: *"" | "Memory" - } - }] - - // +usage=Instructions for assessing whether the container is alive. - livenessProbe?: #HealthProbe - - // +usage=Instructions for assessing whether the container is in a suitable state to serve traffic. - readinessProbe?: #HealthProbe - } - #HealthProbe: { - - // +usage=Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. - exec?: { - // +usage=A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures. - command: [...string] - } - - // +usage=Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. - httpGet?: { - // +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed. - path: string - // +usage=The TCP socket within the container to which the HTTP GET request should be directed. - port: int - httpHeaders?: [...{ - name: string - value: string - }] - } - - // +usage=Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. - tcpSocket?: { - // +usage=The TCP socket within the container that should be probed to assess container health. - port: int - } - - // +usage=Number of seconds after the container is started before the first probe is initiated. - initialDelaySeconds: *0 | int - - // +usage=How often, in seconds, to execute the probe. - periodSeconds: *10 | int - - // +usage=Number of seconds after which the probe times out. - timeoutSeconds: *1 | int - - // +usage=Minimum consecutive successes for the probe to be considered successful after having failed. - successThreshold: *1 | int - - // +usage=Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). - failureThreshold: *3 | int - } - workload: - definition: - apiVersion: apps/v1 - kind: Deployment - diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/kubevela-apiserver.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/kubevela-apiserver.yaml deleted file mode 100644 index 21baa50..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/kubevela-apiserver.yaml +++ /dev/null @@ -1,68 +0,0 @@ -{{- if .Values.apiServer.enabled -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "kubevela.fullname" . }}-apiserver - namespace: {{ .Release.Namespace }} - labels: - {{- include "kubevela.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.apiServer.replicaCount }} - selector: - matchLabels: - {{- include "kubevela-apiserver.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "kubevela-apiserver.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "kubevela.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ include "kubevela.fullname" . }}-apiserver - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - args: - - "apiserver" - - "--bind-addr=0.0.0.0:{{ .Values.apiServer.port }}" - image: {{ .Values.image.repository }}:{{ .Values.image.tag }} - imagePullPolicy: {{ quote .Values.image.pullPolicy }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - ports: - - containerPort: {{ .Values.apiServer.port }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "kubevela.fullname" . }}-apiserver - namespace: {{ .Release.Namespace }} - labels: - {{- include "kubevela.labels" . | nindent 4 }} -spec: - type: {{ .Values.apiServer.Service.type }} - ports: - - port: 80 - targetPort: {{ .Values.apiServer.port }} - protocol: TCP - name: http - selector: - {{- include "kubevela-apiserver.selectorLabels" . | nindent 6 }} -{{- end -}} \ No newline at end of file diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/kubevela-controller.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/kubevela-controller.yaml deleted file mode 100644 index 3799937..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/kubevela-controller.yaml +++ /dev/null @@ -1,182 +0,0 @@ ---- - -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "kubevela.serviceAccountName" . }} - labels: - {{- include "kubevela.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "kubevela.fullname" . }}:manager-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: "cluster-admin" -subjects: - - kind: ServiceAccount - name: {{ include "kubevela.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - ---- -# permissions to do leader election. -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ include "kubevela.fullname" . }}:leader-election-role -rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ include "kubevela.fullname" . }}:leader-election-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ include "kubevela.fullname" . }}:leader-election-role -subjects: - - kind: ServiceAccount - name: {{ include "kubevela.serviceAccountName" . }} - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "kubevela.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "kubevela.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "kubevela.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "kubevela.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "kubevela.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Release.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - args: - - "--metrics-addr=:8080" - - "--enable-leader-election" - {{ if ne .Values.logFilePath "" }} - - "--log-file-path={{ .Values.logFilePath }}" - - "--log-file-max-size={{ .Values.logFileMaxSize }}" - {{ end }} - {{ if .Values.logDebug }} - - "--log-debug=true" - {{ end }} - {{ if .Values.admissionWebhooks.enabled }} - - "--use-webhook=true" - - "--webhook-port={{ .Values.webhookService.port }}" - - "--webhook-cert-dir={{ .Values.admissionWebhooks.certificate.mountPath }}" - - "--autogen-workload-definition={{ .Values.admissionWebhooks.autoGenWorkloadDefinition }}" - {{ end }} - - "--health-addr=:{{ .Values.healthCheck.port }}" - - "--apply-once-only={{ .Values.applyOnceOnly }}" - {{ if ne .Values.disableCaps "" }} - - "--disable-caps={{ .Values.disableCaps }}" - {{ end }} - - "--system-definition-namespace={{ .Values.systemDefinitionNamespace }}" - - "--application-revision-limit={{ .Values.applicationRevisionLimit }}" - - "--definition-revision-limit={{ .Values.definitionRevisionLimit }}" - - "--oam-spec-ver={{ .Values.OAMSpecVer }}" - {{ if .Values.multicluster.enabled }} - - "--enable-cluster-gateway" - {{ end }} - image: {{ .Values.image.repository }}:{{ .Values.image.tag }} - imagePullPolicy: {{ quote .Values.image.pullPolicy }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{ if .Values.admissionWebhooks.enabled }} - ports: - - containerPort: {{ .Values.webhookService.port }} - name: webhook-server - protocol: TCP - - containerPort: {{ .Values.healthCheck.port }} - name: healthz - protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: healthz - initialDelaySeconds: 30 - periodSeconds: 5 - livenessProbe: - httpGet: - path: /healthz - port: healthz - initialDelaySeconds: 90 - periodSeconds: 5 - volumeMounts: - - mountPath: {{ .Values.admissionWebhooks.certificate.mountPath }} - name: tls-cert-vol - readOnly: true - {{ end }} - {{ if .Values.admissionWebhooks.enabled }} - volumes: - - name: tls-cert-vol - secret: - defaultMode: 420 - secretName: {{ template "kubevela.fullname" . }}-admission - {{ end }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} \ No newline at end of file diff --git a/manifests/vela-system/base/charts/vela-minimal/templates/test/test-application.yaml b/manifests/vela-system/base/charts/vela-minimal/templates/test/test-application.yaml deleted file mode 100644 index a805ce9..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/templates/test/test-application.yaml +++ /dev/null @@ -1,62 +0,0 @@ -apiVersion: core.oam.dev/v1beta1 -kind: Application -metadata: - annotations: - helm.sh/hook: test-success - helm.sh/hook-delete-policy: hook-succeeded - name: helm-test-vela-app -spec: - components: - - name: helm-test-express-server - type: webservice - properties: - image: crccheck/hello-world - port: 8000 - # traits: - # - type: ingress - # properties: - # domain: testsvc.example.com - # http: - # "/": 8000 -# --- -# apiVersion: v1 -# kind: Pod -# metadata: -# name: "{{ .Release.Name }}-application-test" -# annotations: -# "helm.sh/hook": test -# helm.sh/hook-delete-policy: hook-succeeded -# spec: -# serviceAccountName: kubevela-vela-core -# containers: -# - name: {{ .Release.Name }}-application-test -# image: alpine/k8s:1.18.2 -# imagePullPolicy: IfNotPresent -# command: -# - /bin/bash -# - -ec -# - | - -# set -e - -# echo "Waiting application is ready..." - -# echo "waiting for application being Ready" -# kubectl -n vela-system wait --for=condition=Ready applications.core.oam.dev helm-test-vela-app --timeout=3m -# echo "application is Ready" - -# # wait for deploy being created -# echo "waiting for deployment being available" -# kubectl -n vela-system wait --for=condition=available deployments helm-test-express-server --timeout 3m -# echo "deployment being available" - -# # wait for ingress being created -# while ! [ `kubectl -n vela-system get ing helm-test-express-server | grep -v NAME | wc -l` = 1 ]; do -# echo "waiting for ingress being created" -# sleep 1 -# done - - - -# echo "Application and its components are created" -# restartPolicy: Never \ No newline at end of file diff --git a/manifests/vela-system/base/charts/vela-minimal/values.yaml b/manifests/vela-system/base/charts/vela-minimal/values.yaml deleted file mode 100644 index 6f1b6b9..0000000 --- a/manifests/vela-system/base/charts/vela-minimal/values.yaml +++ /dev/null @@ -1,128 +0,0 @@ -# Default values for kubevela. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 -# Valid applyOnceOnly values: true/false/on/off/force -applyOnceOnly: "off" - -disableCaps: "manualscalertrait,containerizedwokrload,envbinding" -image: - repository: oamdev/vela-core - tag: v1.1.8 - pullPolicy: Always - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -resources: - limits: - cpu: 500m - memory: 1Gi - requests: - cpu: 50m - memory: 20Mi - -webhookService: - type: ClusterIP - port: 9443 - -healthCheck: - port: 9440 - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -rbac: - create: true - -admissionWebhooks: - enabled: true - failurePolicy: Fail - certificate: - mountPath: /etc/k8s-webhook-certs - patch: - enabled: true - image: - repository: oamdev/kube-webhook-certgen - tag: v2.3 - pullPolicy: IfNotPresent - affinity: {} - tolerations: [] - certManager: - enabled: false - # If autoGenWorkloadDefinition is true, webhook will auto generated workloadDefinition which componentDefinition refers to - autoGenWorkloadDefinition: true - -#Enable debug logs for development purpose -logDebug: false - -#If non-empty, write log files in this path -logFilePath: "" - -#Defines the maximum size a log file can grow to. Unit is megabytes. -#If the value is 0, the maximum file size is unlimited. -logFileMaxSize: 1024 - -systemDefinitionNamespace: vela-system - -applicationRevisionLimit: 10 - -definitionRevisionLimit: 20 - -# concurrentReconciles is the concurrent reconcile number of the controller -concurrentReconciles: 4 - -# dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready -dependCheckWait: 30s - -# OAMSpecVer is the oam spec version controller want to setup -OAMSpecVer: "minimal" - -apiServer: - enabled: false - port: 8000 - replicaCount: 1 - Service: - type: ClusterIP - -multicluster: - enabled: false - clusterGateway: - replicaCount: 1 - port: 9443 - image: - repository: oamdev/cluster-gateway - tag: v1.1.3 - pullPolicy: Always - resources: - limits: - cpu: 100m - memory: 200Mi - secureTLS: - enabled: true - certPath: /etc/k8s-cluster-gateway-certs \ No newline at end of file diff --git a/manifests/vela-system/base/kustomization.yaml b/manifests/vela-system/base/kustomization.yaml index 85777e4..d774068 100644 --- a/manifests/vela-system/base/kustomization.yaml +++ b/manifests/vela-system/base/kustomization.yaml @@ -3,13 +3,13 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization helmCharts: -- name: vela-minimal - namespace: default - version: 1.1.8 - repo: https://charts.kubevela.net/core - releaseName: kubevela - includeCRDs: true - valuesInline: - admissionWebhooks: - certManager: - enabled: true + - name: vela-core + namespace: vela-system + version: 1.8.0 + repo: https://charts.kubevela.net/core + releaseName: kubevela + includeCRDs: true + # valuesInline: + # admissionWebhooks: + # certManager: + # enabled: true diff --git a/manifests/vela-system/delete-caps.yaml b/manifests/vela-system/delete-caps.yaml index 50d8ed1..c38ecd0 100644 --- a/manifests/vela-system/delete-caps.yaml +++ b/manifests/vela-system/delete-caps.yaml @@ -1,305 +1,643 @@ ###################################### -# delete all TraitDefinition's +# delete all TraitDefinitions ###################################### --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: + namespace: vela-system + name: affinity +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: + namespace: vela-system name: annotations +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: namespace: vela-system + name: command --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: + namespace: vela-system name: configmap +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: namespace: vela-system + name: container-image --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: cpuscaler namespace: vela-system + name: cpuscaler --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: env namespace: vela-system + name: env --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: + namespace: vela-system name: expose +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: namespace: vela-system + name: gateway --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: + namespace: vela-system name: hostalias +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: namespace: vela-system + name: hpa --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: ingress namespace: vela-system + name: ingress --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: ingress-1-20 namespace: vela-system + name: ingress-1-20 --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: + namespace: vela-system name: init-container +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: namespace: vela-system + name: json-merge-patch --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: labels namespace: vela-system + name: json-patch --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: lifecycle namespace: vela-system + name: k8s-update-strategy --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: nocalhost namespace: vela-system + name: labels --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: node-affinity namespace: vela-system + name: lifecycle --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: pvc namespace: vela-system + name: nocalhost +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: + namespace: vela-system + name: node-affinity +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: + namespace: vela-system + name: pure-ingress --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: resource namespace: vela-system + name: pvc --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: rollout namespace: vela-system + name: resource --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: + namespace: vela-system name: scaler +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: namespace: vela-system + name: service-account --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: service-binding namespace: vela-system + name: service-binding --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: + namespace: vela-system name: sidecar +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: namespace: vela-system + name: startup-probe --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: TraitDefinition metadata: - name: volumes namespace: vela-system + name: storage --- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: + namespace: vela-system + name: topologyspreadconstraints +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: TraitDefinition +metadata: + namespace: vela-system + name: volumes ###################################### -# delete all WorkflowStepDefinition's +# delete all WorkflowStepDefinitions ###################################### --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: WorkflowStepDefinition metadata: + namespace: vela-system name: apply-application +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: namespace: vela-system + name: apply-application-in-parallel --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: WorkflowStepDefinition metadata: - annotations: - definition.oam.dev/description: Apply raw kubernetes objects for your workflow - steps - name: apply-object namespace: vela-system + name: apply-component --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: WorkflowStepDefinition metadata: - annotations: - definition.oam.dev/description: Apply remaining components and traits + namespace: vela-system + name: apply-deployment +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: apply-object +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system name: apply-remaining +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: namespace: vela-system + name: apply-terraform-config --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: WorkflowStepDefinition metadata: - annotations: - definition.oam.dev/description: check or install depends-on Application + namespace: vela-system + name: apply-terraform-provider +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: build-push-image +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: check-metrics +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: clean-jobs +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: collect-service-endpoints +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: create-config +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: delete-config +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system name: depends-on-app +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: namespace: vela-system + name: deploy --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: WorkflowStepDefinition metadata: - annotations: - definition.oam.dev/description: Export data to config map for your workflow steps - name: export2config namespace: vela-system + name: deploy-cloud-resource --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: WorkflowStepDefinition metadata: - annotations: - definition.oam.dev/description: Export data to secret for your workflow steps + namespace: vela-system + name: deploy2env +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: deploy2runtime +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: export-data +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: export-service +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: export2config +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system name: export2secret +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: namespace: vela-system + name: generate-jdbc-connection --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: WorkflowStepDefinition metadata: - annotations: - definition.oam.dev/description: Read objects for your workflow steps + namespace: vela-system + name: list-config +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: notification +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: print-message-in-status +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: read-config +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system name: read-object +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: namespace: vela-system + name: request +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: share-cloud-resource +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: step-group +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: suspend --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: WorkflowStepDefinition metadata: - annotations: - definition.oam.dev/description: Send message to webhook - name: webhook-notification namespace: vela-system + name: vela-cli --- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: WorkflowStepDefinition +metadata: + namespace: vela-system + name: webhook ###################################### -# delete all WorkloadDefinition's +# delete all WorkloadDefinitions ###################################### --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: WorkloadDefinition metadata: - name: autodetects.core.oam.dev namespace: vela-system ---- + name: autodetects.core.oam.dev +# --- +# $patch: delete +# apiVersion: core.oam.dev/v1beta1 +# kind: WorkloadDefinition +# metadata: +# namespace: vela-system +# name: daemonsets.apps +# --- +# $patch: delete +# apiVersion: core.oam.dev/v1beta1 +# kind: WorkloadDefinition +# metadata: +# namespace: vela-system +# name: deployments.apps +# --- +# $patch: delete +# apiVersion: core.oam.dev/v1beta1 +# kind: WorkloadDefinition +# metadata: +# namespace: vela-system +# name: jobs.batch ###################################### -# delete all Application's +# delete all ComponentDefinitions ###################################### --- $patch: delete apiVersion: core.oam.dev/v1beta1 -kind: Application +kind: ComponentDefinition metadata: - annotations: - helm.sh/hook: test-success - helm.sh/hook-delete-policy: hook-succeeded - name: helm-test-vela-app + namespace: vela-system + name: cron-task --- -###################################### -# delete all ComponentDefinition's -###################################### +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: ComponentDefinition +metadata: + namespace: vela-system + name: daemon --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: ComponentDefinition metadata: - annotations: - definition.oam.dev/description: raw allow users to specify raw K8s object in properties - name: raw namespace: vela-system + name: k8s-objects --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: ComponentDefinition metadata: - annotations: - definition.oam.dev/description: Describes jobs that run code or a script to completion. - name: task namespace: vela-system + name: raw --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: ComponentDefinition metadata: - annotations: - definition.oam.dev/description: Describes long-running, scalable, containerized - services that have a stable network endpoint to receive external network traffic - from customers. - name: webservice namespace: vela-system + name: ref-objects +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: ComponentDefinition +metadata: + namespace: vela-system + name: task --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: ComponentDefinition metadata: - annotations: - definition.oam.dev/description: Describes long-running, scalable, containerized - services that running at backend. They do NOT have network endpoint to receive - external network traffic. - name: worker namespace: vela-system + name: webservice --- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: ComponentDefinition +metadata: + namespace: vela-system + name: worker ###################################### -# delete all PolicyDefinition's +# delete all PolicyDefinitions ###################################### --- $patch: delete apiVersion: core.oam.dev/v1beta1 kind: PolicyDefinition metadata: - annotations: - definition.oam.dev/description: Apply periodical health checking to the application. + namespace: vela-system + name: apply-once +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: PolicyDefinition +metadata: + namespace: vela-system + name: envbinding +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: PolicyDefinition +metadata: + namespace: vela-system + name: garbage-collect +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: PolicyDefinition +metadata: + namespace: vela-system name: health +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: PolicyDefinition +metadata: + namespace: vela-system + name: override +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: PolicyDefinition +metadata: + namespace: vela-system + name: read-only +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: PolicyDefinition +metadata: + namespace: vela-system + name: replication +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: PolicyDefinition +metadata: namespace: vela-system + name: shared-resource --- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: PolicyDefinition +metadata: + namespace: vela-system + name: take-over +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: PolicyDefinition +metadata: + namespace: vela-system + name: topology ###################################### -# delete all ScopeDefinition's +# delete all ScopeDefinitions ###################################### --- $patch: delete @@ -308,3 +646,16 @@ kind: ScopeDefinition metadata: name: healthscopes.core.oam.dev namespace: vela-system +###################################### +# delete all Applications +###################################### +--- +$patch: delete +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + annotations: + helm.sh/hook: test-success + helm.sh/hook-delete-policy: hook-succeeded + name: helm-test-vela-app + namespace: vela-system diff --git a/manifests/vela-system/kustomization.yaml b/manifests/vela-system/kustomization.yaml index 36f4e1d..50e9457 100644 --- a/manifests/vela-system/kustomization.yaml +++ b/manifests/vela-system/kustomization.yaml @@ -6,4 +6,4 @@ resources: - "./base" patches: - - delete-caps.yaml + - delete-caps.yaml