From f328308d8e2bdcb5443094dcacfdf711801bdd8b Mon Sep 17 00:00:00 2001 From: Somefive Date: Mon, 24 Apr 2023 09:57:30 +0800 Subject: [PATCH] Feat: remove unused crd in chart (#5899) * Feat: remove unused crd in chart Signed-off-by: Somefive * fix test Signed-off-by: Somefive --------- Signed-off-by: Somefive --- Makefile | 5 +- .../v1beta1/resourcetracker_types_test.go | 3 - charts/vela-core/README.md | 20 +- .../crds/core.oam.dev_scopedefinitions.yaml | 146 - .../crds/standard.oam.dev_rollouts.yaml | 477 -- .../templates/definitions/autodetect.yaml | 10 - .../templates/definitions/healthscopes.yaml | 10 - charts/vela-core/values.yaml | 2 +- charts/vela-minimal/.helmignore | 23 - charts/vela-minimal/Chart.yaml | 24 - charts/vela-minimal/README.md | 152 - .../core.oam.dev_applicationrevisions.yaml | 5089 ----------------- .../crds/core.oam.dev_applications.yaml | 1659 ------ .../core.oam.dev_componentdefinitions.yaml | 565 -- .../core.oam.dev_definitionrevisions.yaml | 1336 ----- .../crds/core.oam.dev_healthscopes.yaml | 586 -- .../crds/core.oam.dev_policydefinitions.yaml | 286 - .../crds/core.oam.dev_resourcetrackers.yaml | 187 - .../crds/core.oam.dev_scopedefinitions.yaml | 146 - .../crds/core.oam.dev_traitdefinitions.yaml | 673 --- .../core.oam.dev_workflowstepdefinitions.yaml | 283 - .../core.oam.dev_workloaddefinitions.yaml | 625 -- .../crds/standard.oam.dev_rollouts.yaml | 477 -- charts/vela-minimal/templates/NOTES.txt | 1 - charts/vela-minimal/templates/_helpers.tpl | 79 - .../job-patch/clusterrole.yaml | 28 - .../job-patch/clusterrolebinding.yaml | 20 - .../job-patch/job-createSecret.yaml | 54 - .../job-patch/job-patchWebhook.yaml | 56 - .../admission-webhooks/job-patch/role.yaml | 21 - .../job-patch/rolebinding.yaml | 21 - .../job-patch/serviceaccount.yaml | 13 - .../mutatingWebhookConfiguration.yaml | 148 - .../validatingWebhookConfiguration.yaml | 172 - .../admission-webhooks/webhookService.yaml | 19 - .../vela-minimal/templates/certmanager.yaml | 53 - .../templates/cluster-gateway.yaml | 227 - .../templates/definitions/autodetect.yaml | 10 - .../templates/definitions/healthscopes.yaml | 10 - .../templates/defwithtemplate/affinity.yaml | 194 - .../defwithtemplate/annotations.yaml | 33 - .../apply-application-in-parallel.yaml | 23 - .../defwithtemplate/apply-application.yaml | 24 - .../defwithtemplate/apply-component.yaml | 23 - .../defwithtemplate/apply-deployment.yaml | 56 - .../defwithtemplate/apply-object.yaml | 29 - .../templates/defwithtemplate/apply-once.yaml | 49 - .../defwithtemplate/apply-remaining.yaml | 30 - .../apply-terraform-config.yaml | 91 - .../apply-terraform-provider.yaml | 144 - .../defwithtemplate/bind-cloud-resource.yaml | 39 - .../defwithtemplate/build-push-image.yaml | 158 - .../defwithtemplate/check-metrics.yaml | 59 - .../templates/defwithtemplate/clean-jobs.yaml | 63 - .../collect-service-endpoints.yaml | 102 - .../templates/defwithtemplate/command.yaml | 117 - .../config-image-registry.yaml | 86 - .../templates/defwithtemplate/configmap.yaml | 63 - .../defwithtemplate/container-image.yaml | 82 - .../templates/defwithtemplate/cpuscaler.yaml | 45 - .../defwithtemplate/create-config.yaml | 45 - .../templates/defwithtemplate/cron-task.yaml | 324 -- .../templates/defwithtemplate/daemon.yaml | 582 -- .../defwithtemplate/delete-config.yaml | 35 - .../defwithtemplate/depends-on-app.yaml | 63 - .../deploy-cloud-resource.yaml | 36 - .../templates/defwithtemplate/deploy.yaml | 39 - .../defwithtemplate/deploy2runtime.yaml | 48 - .../templates/defwithtemplate/env.yaml | 108 - .../defwithtemplate/export-data.yaml | 70 - .../defwithtemplate/export-service.yaml | 85 - .../defwithtemplate/export2config.yaml | 46 - .../defwithtemplate/export2secret.yaml | 78 - .../templates/defwithtemplate/expose.yaml | 125 - .../defwithtemplate/garbage-collect.yaml | 44 - .../templates/defwithtemplate/gateway.yaml | 137 - .../generate-jdbc-connection.yaml | 50 - .../templates/defwithtemplate/health.yaml | 34 - .../templates/defwithtemplate/hostalias.yaml | 31 - .../templates/defwithtemplate/hpa.yaml | 110 - .../import-grafana-dashboard.yaml | 41 - .../defwithtemplate/ingress-1-20.yaml | 78 - .../templates/defwithtemplate/ingress.yaml | 71 - .../defwithtemplate/init-container.yaml | 115 - .../defwithtemplate/json-merge-patch.yaml | 22 - .../templates/defwithtemplate/json-patch.yaml | 22 - .../defwithtemplate/k8s-objects.yaml | 26 - .../defwithtemplate/k8s-update-strategy.yaml | 77 - .../templates/defwithtemplate/labels.yaml | 33 - .../templates/defwithtemplate/lifecycle.yaml | 52 - .../defwithtemplate/list-config.yaml | 34 - .../templates/defwithtemplate/nocalhost.yaml | 159 - .../defwithtemplate/node-affinity.yaml | 44 - .../defwithtemplate/notification.yaml | 346 -- .../templates/defwithtemplate/override.yaml | 38 - .../templates/defwithtemplate/patch.yaml | 20 - .../print-message-in-status.yaml | 24 - .../defwithtemplate/pure-ingress.yaml | 60 - .../templates/defwithtemplate/pvc.yaml | 122 - .../templates/defwithtemplate/raw.yaml | 20 - .../defwithtemplate/read-config.yaml | 35 - .../defwithtemplate/read-object.yaml | 63 - .../templates/defwithtemplate/read-only.yaml | 40 - .../defwithtemplate/ref-objects.yaml | 95 - .../register-grafana-datasource.yaml | 51 - .../defwithtemplate/replication.yaml | 20 - .../templates/defwithtemplate/request.yaml | 47 - .../templates/defwithtemplate/resource.yaml | 75 - .../templates/defwithtemplate/scaler.yaml | 24 - .../defwithtemplate/service-account.yaml | 131 - .../defwithtemplate/service-binding.yaml | 51 - .../defwithtemplate/share-cloud-resource.yaml | 42 - .../defwithtemplate/shared-resource.yaml | 40 - .../templates/defwithtemplate/sidecar.yaml | 148 - .../defwithtemplate/startup-probe.yaml | 171 - .../templates/defwithtemplate/step-group.yaml | 17 - .../templates/defwithtemplate/storage.yaml | 362 -- .../templates/defwithtemplate/suspend.yaml | 34 - .../templates/defwithtemplate/take-over.yaml | 40 - .../templates/defwithtemplate/task.yaml | 284 - .../templates/defwithtemplate/topology.yaml | 26 - .../topologyspreadconstraints.yaml | 67 - .../templates/defwithtemplate/vela-cli.yaml | 156 - .../templates/defwithtemplate/volumes.yaml | 85 - .../templates/defwithtemplate/webhook.yaml | 87 - .../templates/defwithtemplate/webservice.yaml | 591 -- .../templates/defwithtemplate/worker.yaml | 448 -- .../templates/kubevela-controller.yaml | 253 - .../templates/test/test-application.yaml | 14 - charts/vela-minimal/values.yaml | 235 - cmd/core/app/options/options.go | 2 +- cmd/core/app/server.go | 6 +- hack/crd/dispatch/dispatch.go | 40 +- .../application_controller_test.go | 26 +- .../v1alpha2/application/revision_test.go | 26 +- test/e2e-test/health_scope_test.go | 2 +- vela-templates/gen_definitions.sh | 2 - 137 files changed, 30 insertions(+), 22526 deletions(-) delete mode 100644 charts/vela-core/crds/core.oam.dev_scopedefinitions.yaml delete mode 100644 charts/vela-core/crds/standard.oam.dev_rollouts.yaml delete mode 100644 charts/vela-core/templates/definitions/autodetect.yaml delete mode 100644 charts/vela-core/templates/definitions/healthscopes.yaml delete mode 100644 charts/vela-minimal/.helmignore delete mode 100644 charts/vela-minimal/Chart.yaml delete mode 100644 charts/vela-minimal/README.md delete mode 100644 charts/vela-minimal/crds/core.oam.dev_applicationrevisions.yaml delete mode 100644 charts/vela-minimal/crds/core.oam.dev_applications.yaml delete mode 100644 charts/vela-minimal/crds/core.oam.dev_componentdefinitions.yaml delete mode 100644 charts/vela-minimal/crds/core.oam.dev_definitionrevisions.yaml delete mode 100644 charts/vela-minimal/crds/core.oam.dev_healthscopes.yaml delete mode 100644 charts/vela-minimal/crds/core.oam.dev_policydefinitions.yaml delete mode 100644 charts/vela-minimal/crds/core.oam.dev_resourcetrackers.yaml delete mode 100644 charts/vela-minimal/crds/core.oam.dev_scopedefinitions.yaml delete mode 100644 charts/vela-minimal/crds/core.oam.dev_traitdefinitions.yaml delete mode 100644 charts/vela-minimal/crds/core.oam.dev_workflowstepdefinitions.yaml delete mode 100644 charts/vela-minimal/crds/core.oam.dev_workloaddefinitions.yaml delete mode 100644 charts/vela-minimal/crds/standard.oam.dev_rollouts.yaml delete mode 100644 charts/vela-minimal/templates/NOTES.txt delete mode 100644 charts/vela-minimal/templates/_helpers.tpl delete mode 100644 charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrole.yaml delete mode 100644 charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrolebinding.yaml delete mode 100644 charts/vela-minimal/templates/admission-webhooks/job-patch/job-createSecret.yaml delete mode 100644 charts/vela-minimal/templates/admission-webhooks/job-patch/job-patchWebhook.yaml delete mode 100644 charts/vela-minimal/templates/admission-webhooks/job-patch/role.yaml delete mode 100644 charts/vela-minimal/templates/admission-webhooks/job-patch/rolebinding.yaml delete mode 100644 charts/vela-minimal/templates/admission-webhooks/job-patch/serviceaccount.yaml delete mode 100644 charts/vela-minimal/templates/admission-webhooks/mutatingWebhookConfiguration.yaml delete mode 100644 charts/vela-minimal/templates/admission-webhooks/validatingWebhookConfiguration.yaml delete mode 100644 charts/vela-minimal/templates/admission-webhooks/webhookService.yaml delete mode 100644 charts/vela-minimal/templates/certmanager.yaml delete mode 100644 charts/vela-minimal/templates/cluster-gateway.yaml delete mode 100644 charts/vela-minimal/templates/definitions/autodetect.yaml delete mode 100644 charts/vela-minimal/templates/definitions/healthscopes.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/affinity.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/annotations.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/apply-application-in-parallel.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/apply-application.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/apply-component.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/apply-deployment.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/apply-object.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/apply-once.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/apply-remaining.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/apply-terraform-config.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/apply-terraform-provider.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/bind-cloud-resource.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/build-push-image.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/check-metrics.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/clean-jobs.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/collect-service-endpoints.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/command.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/config-image-registry.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/configmap.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/container-image.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/cpuscaler.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/create-config.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/cron-task.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/daemon.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/delete-config.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/depends-on-app.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/deploy-cloud-resource.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/deploy.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/deploy2runtime.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/env.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/export-data.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/export-service.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/export2config.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/export2secret.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/expose.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/garbage-collect.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/gateway.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/generate-jdbc-connection.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/health.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/hostalias.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/hpa.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/import-grafana-dashboard.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/ingress-1-20.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/ingress.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/init-container.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/json-merge-patch.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/json-patch.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/k8s-objects.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/k8s-update-strategy.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/labels.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/lifecycle.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/list-config.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/nocalhost.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/node-affinity.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/notification.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/override.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/patch.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/print-message-in-status.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/pure-ingress.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/pvc.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/raw.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/read-config.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/read-object.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/read-only.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/ref-objects.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/register-grafana-datasource.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/replication.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/request.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/resource.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/scaler.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/service-account.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/service-binding.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/share-cloud-resource.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/shared-resource.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/sidecar.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/startup-probe.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/step-group.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/storage.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/suspend.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/take-over.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/task.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/topology.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/topologyspreadconstraints.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/vela-cli.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/volumes.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/webhook.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/webservice.yaml delete mode 100644 charts/vela-minimal/templates/defwithtemplate/worker.yaml delete mode 100644 charts/vela-minimal/templates/kubevela-controller.yaml delete mode 100644 charts/vela-minimal/templates/test/test-application.yaml delete mode 100644 charts/vela-minimal/values.yaml diff --git a/Makefile b/Makefile index a82a3f248..597ffc991 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,7 @@ manifests: installcue kustomize # TODO(yangsoon): kustomize will merge all CRD into a whole file, it may not work if we want patch more than one CRD in this way $(KUSTOMIZE) build config/crd -o config/crd/base/core.oam.dev_applications.yaml ./hack/crd/cleanup.sh - go run ./hack/crd/dispatch/dispatch.go config/crd/base charts/vela-core/crds runtime/ charts/vela-minimal/crds + go run ./hack/crd/dispatch/dispatch.go config/crd/base charts/vela-core/crds rm -f config/crd/base/* ./vela-templates/gen_definitions.sh @@ -132,5 +132,4 @@ def-install: ./hack/utils/installdefinition.sh helm-doc-gen: helmdoc - readme-generator -v charts/vela-core/values.yaml -r charts/vela-core/README.md - readme-generator -v charts/vela-minimal/values.yaml -r charts/vela-minimal/README.md \ No newline at end of file + readme-generator -v charts/vela-core/values.yaml -r charts/vela-core/README.md \ No newline at end of file diff --git a/apis/core.oam.dev/v1beta1/resourcetracker_types_test.go b/apis/core.oam.dev/v1beta1/resourcetracker_types_test.go index 653cdc930..df5ff9768 100644 --- a/apis/core.oam.dev/v1beta1/resourcetracker_types_test.go +++ b/apis/core.oam.dev/v1beta1/resourcetracker_types_test.go @@ -200,11 +200,8 @@ func TestResourceTrackerCompression(t *testing.T) { "../../../charts/vela-core/crds/core.oam.dev_applicationrevisions.yaml", "../../../charts/vela-core/crds/core.oam.dev_applications.yaml", "../../../charts/vela-core/crds/core.oam.dev_definitionrevisions.yaml", - "../../../charts/vela-core/crds/core.oam.dev_healthscopes.yaml", "../../../charts/vela-core/crds/core.oam.dev_traitdefinitions.yaml", "../../../charts/vela-core/crds/core.oam.dev_componentdefinitions.yaml", - "../../../charts/vela-core/crds/core.oam.dev_workloaddefinitions.yaml", - "../../../charts/vela-core/crds/standard.oam.dev_rollouts.yaml", "../../../charts/vela-core/templates/kubevela-controller.yaml", "../../../charts/vela-core/README.md", "../../../pkg/velaql/providers/query/testdata/machinelearning.seldon.io_seldondeployments.yaml", diff --git a/charts/vela-core/README.md b/charts/vela-core/README.md index b3924f8d1..655a1030b 100644 --- a/charts/vela-core/README.md +++ b/charts/vela-core/README.md @@ -38,16 +38,16 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai ### KubeVela core parameters -| Name | Description | Value | -| ----------------------------- | --------------------------------------------------------------------------------------------- | --------- | -| `systemDefinitionNamespace` | System definition namespace, if unspecified, will use built-in variable `.Release.Namespace`. | `nil` | -| `applicationRevisionLimit` | Application revision limit | `2` | -| `definitionRevisionLimit` | Definition revision limit | `2` | -| `concurrentReconciles` | concurrentReconciles is the concurrent reconcile number of the controller | `4` | -| `controllerArgs.reSyncPeriod` | The period for resync the applications | `5m` | -| `OAMSpecVer` | OAMSpecVer is the oam spec version controller want to setup | `v0.3` | -| `disableCaps` | Disable capability | `rollout` | -| `dependCheckWait` | dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready | `30s` | +| Name | Description | Value | +| ----------------------------- | --------------------------------------------------------------------------------------------- | ------ | +| `systemDefinitionNamespace` | System definition namespace, if unspecified, will use built-in variable `.Release.Namespace`. | `nil` | +| `applicationRevisionLimit` | Application revision limit | `2` | +| `definitionRevisionLimit` | Definition revision limit | `2` | +| `concurrentReconciles` | concurrentReconciles is the concurrent reconcile number of the controller | `4` | +| `controllerArgs.reSyncPeriod` | The period for resync the applications | `5m` | +| `OAMSpecVer` | OAMSpecVer is the oam spec version controller want to setup | `v0.3` | +| `disableCaps` | Disable capability | `all` | +| `dependCheckWait` | dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready | `30s` | ### KubeVela workflow parameters diff --git a/charts/vela-core/crds/core.oam.dev_scopedefinitions.yaml b/charts/vela-core/crds/core.oam.dev_scopedefinitions.yaml deleted file mode 100644 index a1a5c614f..000000000 --- a/charts/vela-core/crds/core.oam.dev_scopedefinitions.yaml +++ /dev/null @@ -1,146 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - 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: {} diff --git a/charts/vela-core/crds/standard.oam.dev_rollouts.yaml b/charts/vela-core/crds/standard.oam.dev_rollouts.yaml deleted file mode 100644 index 906d5e64f..000000000 --- a/charts/vela-core/crds/standard.oam.dev_rollouts.yaml +++ /dev/null @@ -1,477 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - 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 - x-kubernetes-map-type: atomic - 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 - x-kubernetes-map-type: atomic - 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: {} diff --git a/charts/vela-core/templates/definitions/autodetect.yaml b/charts/vela-core/templates/definitions/autodetect.yaml deleted file mode 100644 index ff890d1d6..000000000 --- a/charts/vela-core/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: {{ include "systemDefinitionNamespace" . }} -spec: - definitionRef: - name: autodetects.core.oam.dev \ No newline at end of file diff --git a/charts/vela-core/templates/definitions/healthscopes.yaml b/charts/vela-core/templates/definitions/healthscopes.yaml deleted file mode 100644 index 73595f334..000000000 --- a/charts/vela-core/templates/definitions/healthscopes.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: core.oam.dev/v1beta1 -kind: ScopeDefinition -metadata: - name: healthscopes.core.oam.dev - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - workloadRefsPath: spec.workloadRefs - allowComponentOverlap: true - definitionRef: - name: healthscopes.core.oam.dev \ No newline at end of file diff --git a/charts/vela-core/values.yaml b/charts/vela-core/values.yaml index b529e11dc..e77177bad 100644 --- a/charts/vela-core/values.yaml +++ b/charts/vela-core/values.yaml @@ -24,7 +24,7 @@ controllerArgs: OAMSpecVer: "v0.3" ## @param disableCaps Disable capability -disableCaps: "rollout" +disableCaps: "all" ## @param dependCheckWait dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready dependCheckWait: 30s diff --git a/charts/vela-minimal/.helmignore b/charts/vela-minimal/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/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/charts/vela-minimal/Chart.yaml b/charts/vela-minimal/Chart.yaml deleted file mode 100644 index f27625942..000000000 --- a/charts/vela-minimal/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -name: vela-minimal -description: A Helm chart for KubeVela minimal - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: 0.1.0 - -home: https://kubevela.io -icon: https://kubevela.io/img/logo.jpg \ No newline at end of file diff --git a/charts/vela-minimal/README.md b/charts/vela-minimal/README.md deleted file mode 100644 index 4a5ece77c..000000000 --- a/charts/vela-minimal/README.md +++ /dev/null @@ -1,152 +0,0 @@ -
-

- -

- Make shipping applications more enjoyable. -

-
- -![Build status](https://github.com/kubevela/kubevela/workflows/E2E/badge.svg) -[![Go Report Card](https://goreportcard.com/badge/github.com/kubevela/kubevela)](https://goreportcard.com/report/github.com/kubevela/kubevela) -![Docker Pulls](https://img.shields.io/docker/pulls/oamdev/vela-core) -[![codecov](https://codecov.io/gh/kubevela/kubevela/branch/master/graph/badge.svg)](https://codecov.io/gh/kubevela/kubevela) -[![LICENSE](https://img.shields.io/github/license/kubevela/kubevela.svg?style=flat-square)](/LICENSE) -[![Releases](https://img.shields.io/github/release/kubevela/kubevela/all.svg?style=flat-square)](https://github.com/kubevela/kubevela/releases) -[![TODOs](https://img.shields.io/endpoint?url=https://api.tickgit.com/badge?repo=github.com/kubevela/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) -[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4602/badge)](https://bestpractices.coreinfrastructure.org/projects/4602) - -# KubeVela Minimal helm chart - -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 - -## TL;DR - -```bash -helm repo add kubevela https://charts.kubevela.net/core -helm repo update -helm install --create-namespace -n vela-system kubevela kubevela/vela-minimal --wait -``` - -## Prerequisites - -- Kubernetes >= v1.19 && < v1.22 - -## Parameters - -### KubeVela core parameters - -| Name | Description | Value | -| ----------------------------- | --------------------------------------------------------------------------------------------- | -------------------- | -| `systemDefinitionNamespace` | System definition namespace, if unspecified, will use built-in variable `.Release.Namespace`. | `nil` | -| `applicationRevisionLimit` | Application revision limit | `10` | -| `definitionRevisionLimit` | Definition revision limit | `20` | -| `concurrentReconciles` | concurrentReconciles is the concurrent reconcile number of the controller | `4` | -| `controllerArgs.reSyncPeriod` | The period for resync the applications | `5m` | -| `OAMSpecVer` | OAMSpecVer is the oam spec version controller want to setup | `minimal` | -| `disableCaps` | Disable capability | `envbinding,rollout` | -| `dependCheckWait` | dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready | `30s` | - -### KubeVela workflow parameters - -| Name | Description | Value | -| -------------------------------------- | ------------------------------------------------------ | ------- | -| `workflow.enableSuspendOnFailure` | Enable suspend on workflow failure | `false` | -| `workflow.backoff.maxTime.waitState` | The max backoff time of workflow in a wait condition | `60` | -| `workflow.backoff.maxTime.failedState` | The max backoff time of workflow in a failed condition | `300` | -| `workflow.step.errorRetryTimes` | The max retry times of a failed workflow step | `10` | - -### KubeVela controller parameters - -| Name | Description | Value | -| --------------------------- | ------------------------------------ | ------------------ | -| `replicaCount` | KubeVela controller replica count | `1` | -| `imageRegistry` | Image registry | `""` | -| `image.repository` | Image repository | `oamdev/vela-core` | -| `image.tag` | Image tag | `latest` | -| `image.pullPolicy` | Image pull policy | `Always` | -| `resources.limits.cpu` | KubeVela controller's cpu limit | `500m` | -| `resources.limits.memory` | KubeVela controller's memory limit | `1Gi` | -| `resources.requests.cpu` | KubeVela controller's cpu request | `50m` | -| `resources.requests.memory` | KubeVela controller's memory request | `20Mi` | -| `webhookService.type` | KubeVela webhook service type | `ClusterIP` | -| `webhookService.port` | KubeVela webhook service port | `9443` | -| `healthCheck.port` | KubeVela health check port | `9440` | - -### KubeVela controller optimization parameters - -| Name | Description | Value | -| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| `featureGates.applyOnce` | if enabled, the apply-once feature will be applied to all applications, no state-keep and no resource data storage in ResourceTracker | `false` | - -### MultiCluster parameters - -| Name | Description | Value | -| ------------------------------------------------------- | -------------------------------- | -------------------------------- | -| `multicluster.enabled` | Whether to enable multi-cluster | `true` | -| `multicluster.clusterGateway.replicaCount` | ClusterGateway replica count | `1` | -| `multicluster.clusterGateway.port` | ClusterGateway port | `9443` | -| `multicluster.clusterGateway.image.repository` | ClusterGateway image repository | `oamdev/cluster-gateway` | -| `multicluster.clusterGateway.image.tag` | ClusterGateway image tag | `v1.8.0-alpha.3` | -| `multicluster.clusterGateway.image.pullPolicy` | ClusterGateway image pull policy | `IfNotPresent` | -| `multicluster.clusterGateway.resources.requests.cpu` | ClusterGateway cpu request | `50m` | -| `multicluster.clusterGateway.resources.requests.memory` | ClusterGateway memory request | `20Mi` | -| `multicluster.clusterGateway.resources.limits.cpu` | ClusterGateway cpu limit | `500m` | -| `multicluster.clusterGateway.resources.limits.memory` | ClusterGateway memory limit | `200Mi` | -| `multicluster.clusterGateway.secureTLS.enabled` | Whether to enable secure TLS | `true` | -| `multicluster.clusterGateway.secureTLS.certPath` | Path to the certificate file | `/etc/k8s-cluster-gateway-certs` | - -### Test parameters - -| Name | Description | Value | -| --------------------- | ------------------- | -------------------- | -| `test.app.repository` | Test app repository | `oamdev/hello-world` | -| `test.app.tag` | Test app tag | `v1` | -| `test.k8s.repository` | Test k8s repository | `oamdev/alpine-k8s` | -| `test.k8s.tag` | Test k8s tag | `1.18.2` | - -### Common parameters - -| Name | Description | Value | -| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------- | -| `imagePullSecrets` | Image pull secrets | `[]` | -| `nameOverride` | Override name | `""` | -| `fullnameOverride` | Fullname override | `""` | -| `serviceAccount.create` | Specifies whether a service account should be created | `true` | -| `serviceAccount.annotations` | Annotations to add to the service account | `{}` | -| `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | `nil` | -| `nodeSelector` | Node selector | `{}` | -| `tolerations` | Tolerations | `[]` | -| `affinity` | Affinity | `{}` | -| `rbac.create` | Specifies whether a RBAC role should be created | `true` | -| `logDebug` | Enable debug logs for development purpose | `false` | -| `logFilePath` | If non-empty, write log files in this path | `""` | -| `logFileMaxSize` | Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. | `1024` | -| `kubeClient.qps` | The qps for reconcile clients, default is 50 | `50` | -| `kubeClient.burst` | The burst for reconcile clients, default is 100 | `100` | -| `authentication.enabled` | Enable authentication for application | `false` | -| `authentication.withUser` | Application authentication will impersonate as the request User | `false` | -| `authentication.defaultUser` | Application authentication will impersonate as the User if no user provided in Application | `kubevela:vela-core` | -| `authentication.groupPattern` | Application authentication will impersonate as the request Group that matches the pattern | `kubevela:*` | - - diff --git a/charts/vela-minimal/crds/core.oam.dev_applicationrevisions.yaml b/charts/vela-minimal/crds/core.oam.dev_applicationrevisions.yaml deleted file mode 100644 index c38fed1cd..000000000 --- a/charts/vela-minimal/crds/core.oam.dev_applicationrevisions.yaml +++ /dev/null @@ -1,5089 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - 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 - x-kubernetes-map-type: atomic - 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 - x-kubernetes-map-type: atomic - 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: - 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 - x-kubernetes-map-type: atomic - 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. \n 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 - x-kubernetes-map-type: atomic - 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 - policy: - description: PolicyStatus records the status of policy Deprecated - This field is only used by EnvBinding Policy which is deprecated. - items: - description: PolicyStatus records the status of policy Deprecated - properties: - name: - type: string - status: - type: object - x-kubernetes-preserve-unknown-fields: true - type: - type: string - required: - - name - - type - type: object - type: array - services: - description: Services record the status of the application - services - items: - description: ApplicationComponentStatus record the health - status of App component - properties: - cluster: - type: string - env: - type: string - healthy: - type: boolean - message: - type: string - name: - type: string - namespace: - 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. \n - 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 - x-kubernetes-map-type: atomic - 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 an 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. \n 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 - x-kubernetes-map-type: atomic - endTime: - format: date-time - nullable: true - type: string - finished: - type: boolean - message: - type: string - mode: - type: string - startTime: - format: date-time - type: string - status: - description: WorkflowRunPhase is a label for the condition - of a WorkflowRun at the current time - type: string - steps: - items: - description: WorkflowStepStatus record the status of - a workflow step, include step status and subStep status - properties: - firstExecuteTime: - description: FirstExecuteTime is the first time - this step execution. - format: date-time - type: string - id: - type: string - lastExecuteTime: - description: LastExecuteTime is the last time this - step execution. - format: date-time - 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: - items: - description: StepStatus record the base status - of workflow step, which could be workflow step - or subStep - properties: - firstExecuteTime: - description: FirstExecuteTime is the first - time this step execution. - format: date-time - type: string - id: - type: string - lastExecuteTime: - description: LastExecuteTime is the last time - this step execution. - format: date-time - 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: - type: string - required: - - id - type: object - type: array - suspend: - type: boolean - suspendState: - type: string - terminated: - type: boolean - required: - - finished - - 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 - customRegion: - description: Region is cloud provider's region. - It will override the region in the region field - of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether - provisioned cloud resources will be deleted when - CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies - the reference to the secret containing the git - credentials - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies - the namespace and name of a Secret to which any - connection details for this managed resource should - be written. Connection details frequently include - the endpoint, username, and password required - to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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 - customRegion: - description: Region is cloud provider's region. - It will override the region in the region field - of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether - provisioned cloud resources will be deleted when - CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies - the reference to the secret containing the git - credentials - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies - the namespace and name of a Secret to which any - connection details for this managed resource should - be written. Connection details frequently include - the endpoint, username, and password required - to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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 - customRegion: - description: Region is cloud provider's region. - It will override the region in the region field - of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether - provisioned cloud resources will be deleted when - CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies - the reference to the secret containing the git - credentials - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies - the namespace and name of a Secret to which any - connection details for this managed resource should - be written. Connection details frequently include - the endpoint, username, and password required - to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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 - - jsonPath: .metadata.annotations['app\.oam\.dev\/publishVersion'] - name: PUBLISH_VERSION - type: string - - jsonPath: .status.succeeded - name: SUCCEEDED - type: string - 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: - description: InputItem defines an input variable of - WorkflowStep - properties: - from: - type: string - parameterKey: - type: string - required: - - from - type: object - type: array - name: - type: string - outputs: - description: StepOutputs defines output variable of - WorkflowStep - items: - description: OutputItem defines an output variable - of WorkflowStep - 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 - 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: - mode: - description: WorkflowExecuteMode defines the mode of workflow - execution - properties: - steps: - description: Steps is the mode of workflow steps execution - type: string - subSteps: - description: SubSteps is the mode of workflow sub - steps execution - type: string - type: object - ref: - type: string - steps: - items: - description: WorkflowStep defines how to execute a workflow - step. - properties: - dependsOn: - description: DependsOn is the dependency of the - step - items: - type: string - type: array - if: - description: If is the if condition of the step - type: string - inputs: - description: Inputs is the inputs of the step - items: - description: InputItem defines an input variable - of WorkflowStep - properties: - from: - type: string - parameterKey: - type: string - required: - - from - type: object - type: array - meta: - description: Meta is the meta data of the workflow - step. - properties: - alias: - type: string - type: object - mode: - description: Mode is only valid for sub steps, it - defines the mode of the sub steps - nullable: true - type: string - name: - description: Name is the unique name of the workflow - step. - type: string - outputs: - description: Outputs is the outputs of the step - items: - description: OutputItem defines an output variable - of WorkflowStep - properties: - name: - type: string - valueFrom: - type: string - required: - - name - - valueFrom - type: object - type: array - properties: - description: Properties is the properties of the - step - type: object - x-kubernetes-preserve-unknown-fields: true - subSteps: - items: - description: WorkflowStepBase defines the workflow - step base - properties: - dependsOn: - description: DependsOn is the dependency of - the step - items: - type: string - type: array - if: - description: If is the if condition of the - step - type: string - inputs: - description: Inputs is the inputs of the step - items: - description: InputItem defines an input - variable of WorkflowStep - properties: - from: - type: string - parameterKey: - type: string - required: - - from - type: object - type: array - meta: - description: Meta is the meta data of the - workflow step. - properties: - alias: - type: string - type: object - name: - description: Name is the unique name of the - workflow step. - type: string - outputs: - description: Outputs is the outputs of the - step - items: - description: OutputItem defines an output - variable of WorkflowStep - properties: - name: - type: string - valueFrom: - type: string - required: - - name - - valueFrom - type: object - type: array - properties: - description: Properties is the properties - of the step - type: object - x-kubernetes-preserve-unknown-fields: true - timeout: - description: Timeout is the timeout of the - step - type: string - type: - description: Type is the type of the workflow - step. - type: string - required: - - type - type: object - type: array - timeout: - description: Timeout is the timeout of the step - type: string - type: - description: Type is the type of the workflow step. - type: string - required: - - 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: - 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 - x-kubernetes-map-type: atomic - 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. \n 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 - x-kubernetes-map-type: atomic - 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 - policy: - description: PolicyStatus records the status of policy Deprecated - This field is only used by EnvBinding Policy which is deprecated. - items: - description: PolicyStatus records the status of policy Deprecated - properties: - name: - type: string - status: - type: object - x-kubernetes-preserve-unknown-fields: true - type: - type: string - required: - - name - - type - type: object - type: array - services: - description: Services record the status of the application - services - items: - description: ApplicationComponentStatus record the health - status of App component - properties: - cluster: - type: string - env: - type: string - healthy: - type: boolean - message: - type: string - name: - type: string - namespace: - 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. \n - 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 - x-kubernetes-map-type: atomic - 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 an 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. \n 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 - x-kubernetes-map-type: atomic - endTime: - format: date-time - nullable: true - type: string - finished: - type: boolean - message: - type: string - mode: - type: string - startTime: - format: date-time - type: string - status: - description: WorkflowRunPhase is a label for the condition - of a WorkflowRun at the current time - type: string - steps: - items: - description: WorkflowStepStatus record the status of - a workflow step, include step status and subStep status - properties: - firstExecuteTime: - description: FirstExecuteTime is the first time - this step execution. - format: date-time - type: string - id: - type: string - lastExecuteTime: - description: LastExecuteTime is the last time this - step execution. - format: date-time - 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: - items: - description: StepStatus record the base status - of workflow step, which could be workflow step - or subStep - properties: - firstExecuteTime: - description: FirstExecuteTime is the first - time this step execution. - format: date-time - type: string - id: - type: string - lastExecuteTime: - description: LastExecuteTime is the last time - this step execution. - format: date-time - 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: - type: string - required: - - id - type: object - type: array - suspend: - type: boolean - suspendState: - type: string - terminated: - type: boolean - required: - - finished - - mode - - suspend - - terminated - type: object - type: object - type: object - 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 - customRegion: - description: Region is cloud provider's region. - It will override the region in the region field - of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether - provisioned cloud resources will be deleted when - CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies - the reference to the secret containing the git - credentials - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies - the namespace and name of a Secret to which any - connection details for this managed resource should - be written. Connection details frequently include - the endpoint, username, and password required - to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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 - compression: - description: Compression represents the compressed components in apprev - in base64 (if compression is enabled). - properties: - data: - type: string - type: - description: Type the compression type - type: string - type: object - policies: - additionalProperties: - description: Policy is the Schema for the policy 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 - properties: - type: object - x-kubernetes-preserve-unknown-fields: true - type: - type: string - required: - - type - type: object - description: Policies records the external policies - type: object - 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. Only CUE - schematic is supported for now. - 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 - customRegion: - description: Region is cloud provider's region. - It will override the region in the region field - of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether - provisioned cloud resources will be deleted when - CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies - the reference to the secret containing the git - credentials - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies - the namespace and name of a Secret to which any - connection details for this managed resource should - be written. Connection details frequently include - the endpoint, username, and password required - to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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 - 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: PolicyDefinitions records the snapshot of the PolicyDefinitions - related with the created/modified Application - type: object - referredObjects: - description: ReferredObjects records the referred objects used in - the ref-object typed components - items: - description: ReferredObject the referred Kubernetes object - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - type: array - x-kubernetes-preserve-unknown-fields: true - 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 coercion. 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 resource.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 - controlPlaneOnly: - description: ControlPlaneOnly defines which cluster is dispatched - to - type: boolean - 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. Only CUE and Kube schematic - are supported for now. - 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 - customRegion: - description: Region is cloud provider's region. - It will override the region in the region field - of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether - provisioned cloud resources will be deleted when - CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies - the reference to the secret containing the git - credentials - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies - the namespace and name of a Secret to which any - connection details for this managed resource should - be written. Connection details frequently include - the endpoint, username, and password required - to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - required: - - configuration - type: object - type: object - stage: - description: Stage defines the stage information to which - this trait resource processing belongs. Currently, PreDispatch - and PostDispatch are provided, which are used to control - resource pre-process and post-process respectively. - type: string - 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 - workflow: - description: Workflow records the external workflow - 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 - mode: - description: WorkflowExecuteMode defines the mode of workflow - execution - properties: - steps: - description: Steps is the mode of workflow steps execution - type: string - subSteps: - description: SubSteps is the mode of workflow sub steps execution - type: string - type: object - steps: - items: - description: WorkflowStep defines how to execute a workflow - step. - properties: - dependsOn: - description: DependsOn is the dependency of the step - items: - type: string - type: array - if: - description: If is the if condition of the step - type: string - inputs: - description: Inputs is the inputs of the step - items: - description: InputItem defines an input variable of WorkflowStep - properties: - from: - type: string - parameterKey: - type: string - required: - - from - type: object - type: array - meta: - description: Meta is the meta data of the workflow step. - properties: - alias: - type: string - type: object - mode: - description: Mode is only valid for sub steps, it defines - the mode of the sub steps - nullable: true - type: string - name: - description: Name is the unique name of the workflow step. - type: string - outputs: - description: Outputs is the outputs of the step - items: - description: OutputItem defines an output variable of - WorkflowStep - properties: - name: - type: string - valueFrom: - type: string - required: - - name - - valueFrom - type: object - type: array - properties: - description: Properties is the properties of the step - type: object - x-kubernetes-preserve-unknown-fields: true - subSteps: - items: - description: WorkflowStepBase defines the workflow step - base - properties: - dependsOn: - description: DependsOn is the dependency of the step - items: - type: string - type: array - if: - description: If is the if condition of the step - type: string - inputs: - description: Inputs is the inputs of the step - items: - description: InputItem defines an input variable - of WorkflowStep - properties: - from: - type: string - parameterKey: - type: string - required: - - from - type: object - type: array - meta: - description: Meta is the meta data of the workflow - step. - properties: - alias: - type: string - type: object - name: - description: Name is the unique name of the workflow - step. - type: string - outputs: - description: Outputs is the outputs of the step - items: - description: OutputItem defines an output variable - of WorkflowStep - properties: - name: - type: string - valueFrom: - type: string - required: - - name - - valueFrom - type: object - type: array - properties: - description: Properties is the properties of the step - type: object - x-kubernetes-preserve-unknown-fields: true - timeout: - description: Timeout is the timeout of the step - type: string - type: - description: Type is the type of the workflow step. - type: string - required: - - type - type: object - type: array - timeout: - description: Timeout is the timeout of the step - type: string - type: - description: Type is the type of the workflow step. - type: string - required: - - type - type: object - type: array - 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. - Only CUE schematic is supported for now. - 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 - customRegion: - description: Region is cloud provider's region. - It will override the region in the region field - of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether - provisioned cloud resources will be deleted when - CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies - the reference to the secret containing the git - credentials - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies - the namespace and name of a Secret to which any - connection details for this managed resource should - be written. Connection details frequently include - the endpoint, username, and password required - to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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 - customRegion: - description: Region is cloud provider's region. - It will override the region in the region field - of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether - provisioned cloud resources will be deleted when - CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies - the reference to the secret containing the git - credentials - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies - the namespace and name of a Secret to which any - connection details for this managed resource should - be written. Connection details frequently include - the endpoint, username, and password required - to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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 - status: - description: ApplicationRevisionStatus is the status of ApplicationRevision - properties: - succeeded: - description: Succeeded records if the workflow finished running with - success - type: boolean - workflow: - description: Workflow the running status of the 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. \n 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 - x-kubernetes-map-type: atomic - endTime: - format: date-time - nullable: true - type: string - finished: - type: boolean - message: - type: string - mode: - type: string - startTime: - format: date-time - type: string - status: - description: WorkflowRunPhase is a label for the condition of - a WorkflowRun at the current time - type: string - steps: - items: - description: WorkflowStepStatus record the status of a workflow - step, include step status and subStep status - properties: - firstExecuteTime: - description: FirstExecuteTime is the first time this step - execution. - format: date-time - type: string - id: - type: string - lastExecuteTime: - description: LastExecuteTime is the last time this step - execution. - format: date-time - 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: - items: - description: StepStatus record the base status of workflow - step, which could be workflow step or subStep - properties: - firstExecuteTime: - description: FirstExecuteTime is the first time this - step execution. - format: date-time - type: string - id: - type: string - lastExecuteTime: - description: LastExecuteTime is the last time this - step execution. - format: date-time - 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: - type: string - required: - - id - type: object - type: array - suspend: - type: boolean - suspendState: - type: string - terminated: - type: boolean - required: - - finished - - mode - - suspend - - terminated - type: object - workflowContext: - additionalProperties: - type: string - description: Record the context values to the revision. - type: object - required: - - succeeded - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/charts/vela-minimal/crds/core.oam.dev_applications.yaml b/charts/vela-minimal/crds/core.oam.dev_applications.yaml deleted file mode 100644 index cc0927704..000000000 --- a/charts/vela-minimal/crds/core.oam.dev_applications.yaml +++ /dev/null @@ -1,1659 +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.11.3 - name: applications.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: Application - listKind: ApplicationList - plural: applications - shortNames: - - app - - velaapp - 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 - x-kubernetes-map-type: atomic - 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 - x-kubernetes-map-type: atomic - 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: - 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 - x-kubernetes-map-type: atomic - 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. \n 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 - x-kubernetes-map-type: atomic - 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 - policy: - description: PolicyStatus records the status of policy Deprecated - This field is only used by EnvBinding Policy which is deprecated. - items: - description: PolicyStatus records the status of policy Deprecated - properties: - name: - type: string - status: - type: object - x-kubernetes-preserve-unknown-fields: true - type: - type: string - required: - - name - - type - type: object - type: array - services: - description: Services record the status of the application services - items: - description: ApplicationComponentStatus record the health status - of App component - properties: - cluster: - type: string - env: - type: string - healthy: - type: boolean - message: - type: string - name: - type: string - namespace: - 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. \n - 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 - x-kubernetes-map-type: atomic - 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 an 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. \n 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 - x-kubernetes-map-type: atomic - endTime: - format: date-time - nullable: true - type: string - finished: - type: boolean - message: - type: string - mode: - type: string - startTime: - format: date-time - type: string - status: - description: WorkflowRunPhase is a label for the condition of - a WorkflowRun at the current time - type: string - steps: - items: - description: WorkflowStepStatus record the status of a workflow - step, include step status and subStep status - properties: - firstExecuteTime: - description: FirstExecuteTime is the first time this step - execution. - format: date-time - type: string - id: - type: string - lastExecuteTime: - description: LastExecuteTime is the last time this step - execution. - format: date-time - 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: - items: - description: StepStatus record the base status of workflow - step, which could be workflow step or subStep - properties: - firstExecuteTime: - description: FirstExecuteTime is the first time this - step execution. - format: date-time - type: string - id: - type: string - lastExecuteTime: - description: LastExecuteTime is the last time this - step execution. - format: date-time - 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: - type: string - required: - - id - type: object - type: array - suspend: - type: boolean - suspendState: - type: string - terminated: - type: boolean - required: - - finished - - 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: - description: InputItem defines an input variable of WorkflowStep - properties: - from: - type: string - parameterKey: - type: string - required: - - from - type: object - type: array - name: - type: string - outputs: - description: StepOutputs defines output variable of WorkflowStep - items: - description: OutputItem defines an output variable of WorkflowStep - 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 - 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: - mode: - description: WorkflowExecuteMode defines the mode of workflow - execution - properties: - steps: - description: Steps is the mode of workflow steps execution - type: string - subSteps: - description: SubSteps is the mode of workflow sub steps execution - type: string - type: object - ref: - type: string - steps: - items: - description: WorkflowStep defines how to execute a workflow - step. - properties: - dependsOn: - description: DependsOn is the dependency of the step - items: - type: string - type: array - if: - description: If is the if condition of the step - type: string - inputs: - description: Inputs is the inputs of the step - items: - description: InputItem defines an input variable of WorkflowStep - properties: - from: - type: string - parameterKey: - type: string - required: - - from - type: object - type: array - meta: - description: Meta is the meta data of the workflow step. - properties: - alias: - type: string - type: object - mode: - description: Mode is only valid for sub steps, it defines - the mode of the sub steps - nullable: true - type: string - name: - description: Name is the unique name of the workflow step. - type: string - outputs: - description: Outputs is the outputs of the step - items: - description: OutputItem defines an output variable of - WorkflowStep - properties: - name: - type: string - valueFrom: - type: string - required: - - name - - valueFrom - type: object - type: array - properties: - description: Properties is the properties of the step - type: object - x-kubernetes-preserve-unknown-fields: true - subSteps: - items: - description: WorkflowStepBase defines the workflow step - base - properties: - dependsOn: - description: DependsOn is the dependency of the step - items: - type: string - type: array - if: - description: If is the if condition of the step - type: string - inputs: - description: Inputs is the inputs of the step - items: - description: InputItem defines an input variable - of WorkflowStep - properties: - from: - type: string - parameterKey: - type: string - required: - - from - type: object - type: array - meta: - description: Meta is the meta data of the workflow - step. - properties: - alias: - type: string - type: object - name: - description: Name is the unique name of the workflow - step. - type: string - outputs: - description: Outputs is the outputs of the step - items: - description: OutputItem defines an output variable - of WorkflowStep - properties: - name: - type: string - valueFrom: - type: string - required: - - name - - valueFrom - type: object - type: array - properties: - description: Properties is the properties of the step - type: object - x-kubernetes-preserve-unknown-fields: true - timeout: - description: Timeout is the timeout of the step - type: string - type: - description: Type is the type of the workflow step. - type: string - required: - - type - type: object - type: array - timeout: - description: Timeout is the timeout of the step - type: string - type: - description: Type is the type of the workflow step. - type: string - required: - - 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: - 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 - x-kubernetes-map-type: atomic - 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. \n 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 - x-kubernetes-map-type: atomic - 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 - policy: - description: PolicyStatus records the status of policy Deprecated - This field is only used by EnvBinding Policy which is deprecated. - items: - description: PolicyStatus records the status of policy Deprecated - properties: - name: - type: string - status: - type: object - x-kubernetes-preserve-unknown-fields: true - type: - type: string - required: - - name - - type - type: object - type: array - services: - description: Services record the status of the application services - items: - description: ApplicationComponentStatus record the health status - of App component - properties: - cluster: - type: string - env: - type: string - healthy: - type: boolean - message: - type: string - name: - type: string - namespace: - 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. \n - 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 - x-kubernetes-map-type: atomic - 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 an 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. \n 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 - x-kubernetes-map-type: atomic - endTime: - format: date-time - nullable: true - type: string - finished: - type: boolean - message: - type: string - mode: - type: string - startTime: - format: date-time - type: string - status: - description: WorkflowRunPhase is a label for the condition of - a WorkflowRun at the current time - type: string - steps: - items: - description: WorkflowStepStatus record the status of a workflow - step, include step status and subStep status - properties: - firstExecuteTime: - description: FirstExecuteTime is the first time this step - execution. - format: date-time - type: string - id: - type: string - lastExecuteTime: - description: LastExecuteTime is the last time this step - execution. - format: date-time - 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: - items: - description: StepStatus record the base status of workflow - step, which could be workflow step or subStep - properties: - firstExecuteTime: - description: FirstExecuteTime is the first time this - step execution. - format: date-time - type: string - id: - type: string - lastExecuteTime: - description: LastExecuteTime is the last time this - step execution. - format: date-time - 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: - type: string - required: - - id - type: object - type: array - suspend: - type: boolean - suspendState: - type: string - terminated: - type: boolean - required: - - finished - - mode - - suspend - - terminated - type: object - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/charts/vela-minimal/crds/core.oam.dev_componentdefinitions.yaml b/charts/vela-minimal/crds/core.oam.dev_componentdefinitions.yaml deleted file mode 100644 index b188fe8dd..000000000 --- a/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/charts/vela-minimal/crds/core.oam.dev_definitionrevisions.yaml b/charts/vela-minimal/crds/core.oam.dev_definitionrevisions.yaml deleted file mode 100644 index 5eabf66cf..000000000 --- a/charts/vela-minimal/crds/core.oam.dev_definitionrevisions.yaml +++ /dev/null @@ -1,1336 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - 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 - customRegion: - description: Region is cloud provider's region. It - will override the region in the region field of - ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether - provisioned cloud resources will be deleted when - CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies - the reference to the secret containing the git credentials - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies - the namespace and name of a Secret to which any - connection details for this managed resource should - be written. Connection details frequently include - the endpoint, username, and password required to - connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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. Only CUE - schematic is supported for now. - 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 - customRegion: - description: Region is cloud provider's region. It - will override the region in the region field of - ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether - provisioned cloud resources will be deleted when - CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies - the reference to the secret containing the git credentials - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies - the namespace and name of a Secret to which any - connection details for this managed resource should - be written. Connection details frequently include - the endpoint, username, and password required to - connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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 - 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 - 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 resource.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 - controlPlaneOnly: - description: ControlPlaneOnly defines which cluster is dispatched - to - type: boolean - 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. Only CUE and Kube schematic - are supported for now. - 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 - customRegion: - description: Region is cloud provider's region. It - will override the region in the region field of - ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether - provisioned cloud resources will be deleted when - CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies - the reference to the secret containing the git credentials - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies - the namespace and name of a Secret to which any - connection details for this managed resource should - be written. Connection details frequently include - the endpoint, username, and password required to - connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - required: - - configuration - type: object - type: object - stage: - description: Stage defines the stage information to which - this trait resource processing belongs. Currently, PreDispatch - and PostDispatch are provided, which are used to control - resource pre-process and post-process respectively. - type: string - 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. Only - CUE schematic is supported for now. - 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 - customRegion: - description: Region is cloud provider's region. It - will override the region in the region field of - ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether - provisioned cloud resources will be deleted when - CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies - the reference to the secret containing the git credentials - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies - the namespace and name of a Secret to which any - connection details for this managed resource should - be written. Connection details frequently include - the endpoint, username, and password required to - connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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: {} diff --git a/charts/vela-minimal/crds/core.oam.dev_healthscopes.yaml b/charts/vela-minimal/crds/core.oam.dev_healthscopes.yaml deleted file mode 100644 index c35de11e0..000000000 --- a/charts/vela-minimal/crds/core.oam.dev_healthscopes.yaml +++ /dev/null @@ -1,586 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - 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. - \n 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 - x-kubernetes-map-type: atomic - 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. \n 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 - x-kubernetes-map-type: atomic - 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. \n 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 - x-kubernetes-map-type: atomic - 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. \n 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 - x-kubernetes-map-type: atomic - 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. \n 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 - x-kubernetes-map-type: atomic - 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: {} diff --git a/charts/vela-minimal/crds/core.oam.dev_policydefinitions.yaml b/charts/vela-minimal/crds/core.oam.dev_policydefinitions.yaml deleted file mode 100644 index f5a2f9437..000000000 --- a/charts/vela-minimal/crds/core.oam.dev_policydefinitions.yaml +++ /dev/null @@ -1,286 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - name: policydefinitions.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: PolicyDefinition - listKind: PolicyDefinitionList - plural: policydefinitions - shortNames: - - def-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. Only CUE schematic is supported - for now. - 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 - customRegion: - description: Region is cloud provider's region. It will override - the region in the region field of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether provisioned - cloud resources will be deleted when CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies the reference - to the secret containing the git credentials - properties: - name: - description: name is unique within a namespace to reference - a secret resource. - type: string - namespace: - description: namespace defines the space within which - the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the - namespace and name of a Secret to which any connection details - for this managed resource should be written. Connection - details frequently include the endpoint, username, and password - required to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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 - 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: {} diff --git a/charts/vela-minimal/crds/core.oam.dev_resourcetrackers.yaml b/charts/vela-minimal/crds/core.oam.dev_resourcetrackers.yaml deleted file mode 100644 index c92576614..000000000 --- a/charts/vela-minimal/crds/core.oam.dev_resourcetrackers.yaml +++ /dev/null @@ -1,187 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - name: resourcetrackers.core.oam.dev -spec: - group: core.oam.dev - names: - categories: - - oam - kind: ResourceTracker - listKind: ResourceTrackerList - plural: resourcetrackers - shortNames: - - rt - singular: resourcetracker - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .spec.type - name: TYPE - type: string - - jsonPath: .metadata.labels['app\.oam\.dev\/name'] - name: APP - type: string - - jsonPath: .metadata.labels['app\.oam\.dev\/namespace'] - name: APP-NS - type: string - - jsonPath: .spec.applicationGeneration - name: APP-GEN - type: number - 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 - spec: - description: ResourceTrackerSpec define the spec of resourceTracker - properties: - applicationGeneration: - format: int64 - type: integer - compression: - description: ResourceTrackerCompression represents the compressed - components in ResourceTracker. - properties: - data: - type: string - type: - description: Type the compression type - type: string - type: object - managedResources: - items: - description: ManagedResource define the resource to be managed by - ResourceTracker - properties: - apiVersion: - description: API version of the referent. - type: string - cluster: - type: string - component: - type: string - creator: - type: string - deleted: - description: Deleted marks the resource to be deleted - type: boolean - env: - 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 - raw: - type: object - x-kubernetes-preserve-unknown-fields: true - 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 - skipGC: - description: SkipGC marks the resource to skip gc - type: boolean - trait: - 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 - x-kubernetes-map-type: atomic - type: array - type: - description: ResourceTrackerType defines the type of resourceTracker - type: string - required: - - applicationGeneration - type: object - status: - description: ResourceTrackerStatus define the status of resourceTracker - For backward-compatibility - properties: - trackedResources: - description: Deprecated - items: - description: ClusterObjectReference defines the object reference - with cluster. - properties: - apiVersion: - description: API version of the referent. - type: string - cluster: - type: string - 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 - x-kubernetes-map-type: atomic - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/charts/vela-minimal/crds/core.oam.dev_scopedefinitions.yaml b/charts/vela-minimal/crds/core.oam.dev_scopedefinitions.yaml deleted file mode 100644 index a1a5c614f..000000000 --- a/charts/vela-minimal/crds/core.oam.dev_scopedefinitions.yaml +++ /dev/null @@ -1,146 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - 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: {} diff --git a/charts/vela-minimal/crds/core.oam.dev_traitdefinitions.yaml b/charts/vela-minimal/crds/core.oam.dev_traitdefinitions.yaml deleted file mode 100644 index 25f0084b6..000000000 --- a/charts/vela-minimal/crds/core.oam.dev_traitdefinitions.yaml +++ /dev/null @@ -1,673 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - 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 - customRegion: - description: Region is cloud provider's region. It will override - the region in the region field of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether provisioned - cloud resources will be deleted when CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies the reference - to the secret containing the git credentials - properties: - name: - description: name is unique within a namespace to reference - a secret resource. - type: string - namespace: - description: namespace defines the space within which - the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the - namespace and name of a Secret to which any connection details - for this managed resource should be written. Connection - details frequently include the endpoint, username, and password - required to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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 resource.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 - controlPlaneOnly: - description: ControlPlaneOnly defines which cluster is dispatched - to - type: boolean - 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. Only CUE and Kube schematic are supported - for now. - 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 - customRegion: - description: Region is cloud provider's region. It will override - the region in the region field of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether provisioned - cloud resources will be deleted when CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies the reference - to the secret containing the git credentials - properties: - name: - description: name is unique within a namespace to reference - a secret resource. - type: string - namespace: - description: namespace defines the space within which - the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the - namespace and name of a Secret to which any connection details - for this managed resource should be written. Connection - details frequently include the endpoint, username, and password - required to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - required: - - configuration - type: object - type: object - stage: - description: Stage defines the stage information to which this trait - resource processing belongs. Currently, PreDispatch and PostDispatch - are provided, which are used to control resource pre-process and - post-process respectively. - type: string - 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: {} diff --git a/charts/vela-minimal/crds/core.oam.dev_workflowstepdefinitions.yaml b/charts/vela-minimal/crds/core.oam.dev_workflowstepdefinitions.yaml deleted file mode 100644 index a71155fb3..000000000 --- a/charts/vela-minimal/crds/core.oam.dev_workflowstepdefinitions.yaml +++ /dev/null @@ -1,283 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - 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. Only CUE schematic - is supported for now. - 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 - customRegion: - description: Region is cloud provider's region. It will override - the region in the region field of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether provisioned - cloud resources will be deleted when CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies the reference - to the secret containing the git credentials - properties: - name: - description: name is unique within a namespace to reference - a secret resource. - type: string - namespace: - description: namespace defines the space within which - the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the - namespace and name of a Secret to which any connection details - for this managed resource should be written. Connection - details frequently include the endpoint, username, and password - required to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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: {} diff --git a/charts/vela-minimal/crds/core.oam.dev_workloaddefinitions.yaml b/charts/vela-minimal/crds/core.oam.dev_workloaddefinitions.yaml deleted file mode 100644 index 642a89974..000000000 --- a/charts/vela-minimal/crds/core.oam.dev_workloaddefinitions.yaml +++ /dev/null @@ -1,625 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - 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 - customRegion: - description: Region is cloud provider's region. It will override - the region in the region field of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether provisioned - cloud resources will be deleted when CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies the reference - to the secret containing the git credentials - properties: - name: - description: name is unique within a namespace to reference - a secret resource. - type: string - namespace: - description: namespace defines the space within which - the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the - namespace and name of a Secret to which any connection details - for this managed resource should be written. Connection - details frequently include the endpoint, username, and password - required to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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 - customRegion: - description: Region is cloud provider's region. It will override - the region in the region field of ProviderReference - type: string - deleteResource: - default: true - description: DeleteResource will determine whether provisioned - cloud resources will be deleted when CR is deleted - type: boolean - gitCredentialsSecretReference: - description: GitCredentialsSecretReference specifies the reference - to the secret containing the git credentials - properties: - name: - description: name is unique within a namespace to reference - a secret resource. - type: string - namespace: - description: namespace defines the space within which - the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - 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 referenced object. - 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 - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the - namespace and name of a Secret to which any connection details - for this managed resource should be written. Connection - details frequently include the endpoint, username, and password - required to connect to the managed resource. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - type: object - 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: {} diff --git a/charts/vela-minimal/crds/standard.oam.dev_rollouts.yaml b/charts/vela-minimal/crds/standard.oam.dev_rollouts.yaml deleted file mode 100644 index 906d5e64f..000000000 --- a/charts/vela-minimal/crds/standard.oam.dev_rollouts.yaml +++ /dev/null @@ -1,477 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - 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 - x-kubernetes-map-type: atomic - 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 - x-kubernetes-map-type: atomic - 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: {} diff --git a/charts/vela-minimal/templates/NOTES.txt b/charts/vela-minimal/templates/NOTES.txt deleted file mode 100644 index 2abe8235b..000000000 --- a/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/charts/vela-minimal/templates/_helpers.tpl b/charts/vela-minimal/templates/_helpers.tpl deleted file mode 100644 index 4e0d77d21..000000000 --- a/charts/vela-minimal/templates/_helpers.tpl +++ /dev/null @@ -1,79 +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-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 -}} - -{{/* -systemDefinitionNamespace value defaulter -*/}} -{{- define "systemDefinitionNamespace" -}} -{{- if .Values.systemDefinitionNamespace -}} - {{ .Values.systemDefinitionNamespace }} -{{- else -}} - {{ .Release.Namespace }} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrole.yaml b/charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrole.yaml deleted file mode 100644 index 96b0ba33f..000000000 --- a/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/charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrolebinding.yaml b/charts/vela-minimal/templates/admission-webhooks/job-patch/clusterrolebinding.yaml deleted file mode 100644 index 649bb7138..000000000 --- a/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/charts/vela-minimal/templates/admission-webhooks/job-patch/job-createSecret.yaml b/charts/vela-minimal/templates/admission-webhooks/job-patch/job-createSecret.yaml deleted file mode 100644 index 1eec43a72..000000000 --- a/charts/vela-minimal/templates/admission-webhooks/job-patch/job-createSecret.yaml +++ /dev/null @@ -1,54 +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.imageRegistry }}{{ .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.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- 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/charts/vela-minimal/templates/admission-webhooks/job-patch/job-patchWebhook.yaml b/charts/vela-minimal/templates/admission-webhooks/job-patch/job-patchWebhook.yaml deleted file mode 100644 index 9ae5536a9..000000000 --- a/charts/vela-minimal/templates/admission-webhooks/job-patch/job-patchWebhook.yaml +++ /dev/null @@ -1,56 +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.imageRegistry }}{{ .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 }} - {{- if .Values.admissionWebhooks.appConversion.enabled }} - - --crds={"name":"applications.core.oam.dev","conversion":{"strategy":"Webhook","webhook":{"clientConfig":{"service":{"name":"vela-core-webhook","namespace":"vela-system","path":"/convert","port":443}},"conversionReviewVersions":["v1beta1","v1alpha2"]}}} - {{- end }} - restartPolicy: OnFailure - serviceAccountName: {{ template "kubevela.fullname" . }}-admission - {{- with .Values.admissionWebhooks.patch.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- 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/charts/vela-minimal/templates/admission-webhooks/job-patch/role.yaml b/charts/vela-minimal/templates/admission-webhooks/job-patch/role.yaml deleted file mode 100644 index cf3d7dd33..000000000 --- a/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/charts/vela-minimal/templates/admission-webhooks/job-patch/rolebinding.yaml b/charts/vela-minimal/templates/admission-webhooks/job-patch/rolebinding.yaml deleted file mode 100644 index cffdc0f54..000000000 --- a/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/charts/vela-minimal/templates/admission-webhooks/job-patch/serviceaccount.yaml b/charts/vela-minimal/templates/admission-webhooks/job-patch/serviceaccount.yaml deleted file mode 100644 index 4e56267de..000000000 --- a/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/charts/vela-minimal/templates/admission-webhooks/mutatingWebhookConfiguration.yaml b/charts/vela-minimal/templates/admission-webhooks/mutatingWebhookConfiguration.yaml deleted file mode 100644 index 35f3d8c91..000000000 --- a/charts/vela-minimal/templates/admission-webhooks/mutatingWebhookConfiguration.yaml +++ /dev/null @@ -1,148 +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-applications - {{- if .Values.admissionWebhooks.patch.enabled }} - failurePolicy: Ignore - {{- else }} - failurePolicy: Fail - {{- end }} - name: mutating.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: /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/charts/vela-minimal/templates/admission-webhooks/validatingWebhookConfiguration.yaml b/charts/vela-minimal/templates/admission-webhooks/validatingWebhookConfiguration.yaml deleted file mode 100644 index 3eb5d70cc..000000000 --- a/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/charts/vela-minimal/templates/admission-webhooks/webhookService.yaml b/charts/vela-minimal/templates/admission-webhooks/webhookService.yaml deleted file mode 100644 index ddfb54e74..000000000 --- a/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/charts/vela-minimal/templates/certmanager.yaml b/charts/vela-minimal/templates/certmanager.yaml deleted file mode 100644 index a527d1e6e..000000000 --- a/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/charts/vela-minimal/templates/cluster-gateway.yaml b/charts/vela-minimal/templates/cluster-gateway.yaml deleted file mode 100644 index 7a1a0f393..000000000 --- a/charts/vela-minimal/templates/cluster-gateway.yaml +++ /dev/null @@ -1,227 +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,ClientIdentityPenetration={{ .Values.authentication.enabled }}" - {{ if .Values.multicluster.clusterGateway.secureTLS.enabled }} - - "--cert-dir={{ .Values.multicluster.clusterGateway.secureTLS.certPath }}" - {{ end }} - image: {{ .Values.imageRegistry }}{{ .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 }} - affinity: - {{ if .Values.affinity }} - {{- toYaml .Values.affinity | nindent 8 }} - {{ else }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchLabels: - {{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 20 }} - topologyKey: kubernetes.io/hostname - weight: 100 - {{ 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.imageRegistry }}{{ .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.imageRegistry }}{{ .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 }} ---- -{{ if and .Values.multicluster.enabled }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "kubevela.fullname" . }}:cluster-gateway:proxy -rules: - - apiGroups: [ "cluster.core.oam.dev" ] - resources: [ "clustergateways/proxy" ] - verbs: [ "get", "list", "watch", "create", "update", "patch", "delete" ] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ include "kubevela.fullname" . }}:cluster-gateway:proxy -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ include "kubevela.fullname" . }}:cluster-gateway:proxy -subjects: - - kind: Group - name: kubevela:client - apiGroup: rbac.authorization.k8s.io - - kind: ServiceAccount - name: {{ include "kubevela.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -{{ end }} \ No newline at end of file diff --git a/charts/vela-minimal/templates/definitions/autodetect.yaml b/charts/vela-minimal/templates/definitions/autodetect.yaml deleted file mode 100644 index ff890d1d6..000000000 --- a/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: {{ include "systemDefinitionNamespace" . }} -spec: - definitionRef: - name: autodetects.core.oam.dev \ No newline at end of file diff --git a/charts/vela-minimal/templates/definitions/healthscopes.yaml b/charts/vela-minimal/templates/definitions/healthscopes.yaml deleted file mode 100644 index 73595f334..000000000 --- a/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: {{ include "systemDefinitionNamespace" . }} -spec: - workloadRefsPath: spec.workloadRefs - allowComponentOverlap: true - definitionRef: - name: healthscopes.core.oam.dev \ No newline at end of file diff --git a/charts/vela-minimal/templates/defwithtemplate/affinity.yaml b/charts/vela-minimal/templates/defwithtemplate/affinity.yaml deleted file mode 100644 index de11d82b5..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/affinity.yaml +++ /dev/null @@ -1,194 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/affinity.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Affinity specifies affinity and toleration K8s pod for your workload which follows the pod spec in path 'spec.template'. - labels: - custom.definition.oam.dev/ui-hidden: "true" - name: affinity - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - podDisruptive: true - schematic: - cue: - template: | - patch: spec: template: spec: { - if parameter.podAffinity != _|_ { - affinity: podAffinity: { - if parameter.podAffinity.required != _|_ { - requiredDuringSchedulingIgnoredDuringExecution: [ - for k in parameter.podAffinity.required { - if k.labelSelector != _|_ { - labelSelector: k.labelSelector - } - if k.namespace != _|_ { - namespace: k.namespace - } - topologyKey: k.topologyKey - if k.namespaceSelector != _|_ { - namespaceSelector: k.namespaceSelector - } - }] - } - if parameter.podAffinity.preferred != _|_ { - preferredDuringSchedulingIgnoredDuringExecution: [ - for k in parameter.podAffinity.preferred { - weight: k.weight - podAffinityTerm: k.podAffinityTerm - }] - } - } - } - if parameter.podAntiAffinity != _|_ { - affinity: podAntiAffinity: { - if parameter.podAntiAffinity.required != _|_ { - requiredDuringSchedulingIgnoredDuringExecution: [ - for k in parameter.podAntiAffinity.required { - if k.labelSelector != _|_ { - labelSelector: k.labelSelector - } - if k.namespace != _|_ { - namespace: k.namespace - } - topologyKey: k.topologyKey - if k.namespaceSelector != _|_ { - namespaceSelector: k.namespaceSelector - } - }] - } - if parameter.podAntiAffinity.preferred != _|_ { - preferredDuringSchedulingIgnoredDuringExecution: [ - for k in parameter.podAntiAffinity.preferred { - weight: k.weight - podAffinityTerm: k.podAffinityTerm - }] - } - } - } - if parameter.nodeAffinity != _|_ { - affinity: nodeAffinity: { - if parameter.nodeAffinity.required != _|_ { - requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: [ - for k in parameter.nodeAffinity.required.nodeSelectorTerms { - if k.matchExpressions != _|_ { - matchExpressions: k.matchExpressions - } - if k.matchFields != _|_ { - matchFields: k.matchFields - } - }] - } - if parameter.nodeAffinity.preferred != _|_ { - preferredDuringSchedulingIgnoredDuringExecution: [ - for k in parameter.nodeAffinity.preferred { - weight: k.weight - preference: k.preference - }] - } - } - } - 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 - } - }] - } - } - - #labelSelector: { - matchLabels?: [string]: string - matchExpressions?: [...{ - key: string - operator: *"In" | "NotIn" | "Exists" | "DoesNotExist" - values?: [...string] - }] - } - - #podAffinityTerm: { - labelSelector?: #labelSelector - namespaces?: [...string] - topologyKey: string - namespaceSelector?: #labelSelector - } - - #nodeSelecor: { - key: string - operator: *"In" | "NotIn" | "Exists" | "DoesNotExist" | "Gt" | "Lt" - values?: [...string] - } - - #nodeSelectorTerm: { - matchExpressions?: [...#nodeSelecor] - matchFields?: [...#nodeSelecor] - } - - parameter: { - // +usage=Specify the pod affinity scheduling rules - podAffinity?: { - // +usage=Specify the required during scheduling ignored during execution - required?: [...#podAffinityTerm] - // +usage=Specify the preferred during scheduling ignored during execution - preferred?: [...{ - // +usage=Specify weight associated with matching the corresponding podAffinityTerm - weight: int & >=1 & <=100 - // +usage=Specify a set of pods - podAffinityTerm: #podAffinityTerm - }] - } - // +usage=Specify the pod anti-affinity scheduling rules - podAntiAffinity?: { - // +usage=Specify the required during scheduling ignored during execution - required?: [...#podAffinityTerm] - // +usage=Specify the preferred during scheduling ignored during execution - preferred?: [...{ - // +usage=Specify weight associated with matching the corresponding podAffinityTerm - weight: int & >=1 & <=100 - // +usage=Specify a set of pods - podAffinityTerm: #podAffinityTerm - }] - } - // +usage=Specify the node affinity scheduling rules for the pod - nodeAffinity?: { - // +usage=Specify the required during scheduling ignored during execution - required?: { - // +usage=Specify a list of node selector - nodeSelectorTerms: [...#nodeSelectorTerm] - } - // +usage=Specify the preferred during scheduling ignored during execution - preferred?: [...{ - // +usage=Specify weight associated with matching the corresponding nodeSelector - weight: int & >=1 & <=100 - // +usage=Specify a node selector - preference: #nodeSelectorTerm - }] - } - // +usage=Specify tolerant taint - tolerations?: [...{ - key?: string - operator: *"Equal" | "Exists" - value?: string - effect?: "NoSchedule" | "PreferNoSchedule" | "NoExecute" - // +usage=Specify the period of time the toleration - tolerationSeconds?: int - }] - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/annotations.yaml b/charts/vela-minimal/templates/defwithtemplate/annotations.yaml deleted file mode 100644 index 0457ef3ed..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/annotations.yaml +++ /dev/null @@ -1,33 +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 your workload. if it generates pod, add same annotations for generated pods. - name: annotations - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - // +patchStrategy=jsonMergePatch - patch: { - metadata: annotations: { - for k, v in parameter { - (k): v - } - } - if context.output.spec != _|_ && context.output.spec.template != _|_ { - spec: template: metadata: annotations: { - for k, v in parameter { - (k): v - } - } - } - } - parameter: [string]: string | null - diff --git a/charts/vela-minimal/templates/defwithtemplate/apply-application-in-parallel.yaml b/charts/vela-minimal/templates/defwithtemplate/apply-application-in-parallel.yaml deleted file mode 100644 index e95251784..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/apply-application-in-parallel.yaml +++ /dev/null @@ -1,23 +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-in-parallel.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - definition.oam.dev/description: Apply components of an application in parallel for your workflow steps - labels: - custom.definition.oam.dev/deprecated: "true" - custom.definition.oam.dev/scope: Application - custom.definition.oam.dev/ui-hidden: "true" - name: apply-application-in-parallel - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - output: op.#ApplyApplicationInParallel & {} - diff --git a/charts/vela-minimal/templates/defwithtemplate/apply-application.yaml b/charts/vela-minimal/templates/defwithtemplate/apply-application.yaml deleted file mode 100644 index 7c3e56904..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/apply-application.yaml +++ /dev/null @@ -1,24 +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, it has no arguments, should be used for custom steps before or after application applied. - labels: - custom.definition.oam.dev/deprecated: "true" - custom.definition.oam.dev/scope: Application - custom.definition.oam.dev/ui-hidden: "true" - name: apply-application - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - // apply application - output: op.#ApplyApplication & {} - diff --git a/charts/vela-minimal/templates/defwithtemplate/apply-component.yaml b/charts/vela-minimal/templates/defwithtemplate/apply-component.yaml deleted file mode 100644 index 16b73261d..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/apply-component.yaml +++ /dev/null @@ -1,23 +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-component.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Application Delivery - definition.oam.dev/description: Apply a specific component and its corresponding traits in application - labels: - custom.definition.oam.dev/scope: Application - name: apply-component - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - parameter: { - // +usage=Specify the component name to apply - component: string - // +usage=Specify the cluster - cluster: *"" | string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/apply-deployment.yaml b/charts/vela-minimal/templates/defwithtemplate/apply-deployment.yaml deleted file mode 100644 index a6579bde0..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/apply-deployment.yaml +++ /dev/null @@ -1,56 +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-deployment.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Resource Management - definition.oam.dev/alias: "" - definition.oam.dev/description: Apply deployment with specified image and cmd. - name: apply-deployment - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "strconv" - "strings" - "vela/op" - ) - - output: op.#Apply & { - cluster: parameter.cluster - value: { - apiVersion: "apps/v1" - kind: "Deployment" - metadata: { - name: context.stepName - namespace: context.namespace - } - spec: { - selector: matchLabels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)" - replicas: parameter.replicas - template: { - metadata: labels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)" - spec: containers: [{ - name: context.stepName - image: parameter.image - if parameter["cmd"] != _|_ { - command: parameter.cmd - } - }] - } - } - } - } - wait: op.#ConditionalWait & { - continue: output.value.status.readyReplicas == parameter.replicas - } - parameter: { - image: string - replicas: *1 | int - cluster: *"" | string - cmd?: [...string] - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/apply-object.yaml b/charts/vela-minimal/templates/defwithtemplate/apply-object.yaml deleted file mode 100644 index ac9866f9e..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/apply-object.yaml +++ /dev/null @@ -1,29 +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: - custom.definition.oam.dev/category: Resource Management - definition.oam.dev/description: Apply raw kubernetes objects for your workflow steps - name: apply-object - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - apply: op.#Apply & { - value: parameter.value - cluster: parameter.cluster - } - parameter: { - // +usage=Specify Kubernetes native resource object to be applied - value: {...} - // +usage=The cluster you want to apply the resource to, default is the current control plane cluster - cluster: *"" | string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/apply-once.yaml b/charts/vela-minimal/templates/defwithtemplate/apply-once.yaml deleted file mode 100644 index 100e93966..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/apply-once.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/apply-once.cue -apiVersion: core.oam.dev/v1beta1 -kind: PolicyDefinition -metadata: - annotations: - definition.oam.dev/description: Allow configuration drift for applied resources, delivery the resource without continuously reconciliation. - name: apply-once - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - #ApplyOnceStrategy: { - // +usage=When the strategy takes effect,e.g. onUpdate、onStateKeep - affect?: string - // +usage=Specify the path of the resource that allow configuration drift - path: [...string] - } - - #ApplyOncePolicyRule: { - // +usage=Specify how to select the targets of the rule - selector?: #ResourcePolicyRuleSelector - // +usage=Specify the strategy for configuring the resource level configuration drift behaviour - strategy: #ApplyOnceStrategy - } - - #ResourcePolicyRuleSelector: { - // +usage=Select resources by component names - componentNames?: [...string] - // +usage=Select resources by component types - componentTypes?: [...string] - // +usage=Select resources by oamTypes (COMPONENT or TRAIT) - oamTypes?: [...string] - // +usage=Select resources by trait types - traitTypes?: [...string] - // +usage=Select resources by resource types (like Deployment) - resourceTypes?: [...string] - // +usage=Select resources by their names - resourceNames?: [...string] - } - - parameter: { - // +usage=Whether to enable apply-once for the whole application - enable: *false | bool - // +usage=Specify the rules for configuring apply-once policy in resource level - rules?: [...#ApplyOncePolicyRule] - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/apply-remaining.yaml b/charts/vela-minimal/templates/defwithtemplate/apply-remaining.yaml deleted file mode 100644 index aac014cd9..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/apply-remaining.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/apply-remaining.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - definition.oam.dev/description: Apply remaining components and traits - labels: - custom.definition.oam.dev/deprecated: "true" - custom.definition.oam.dev/scope: Application - custom.definition.oam.dev/ui-hidden: "true" - name: apply-remaining - namespace: {{ include "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/charts/vela-minimal/templates/defwithtemplate/apply-terraform-config.yaml b/charts/vela-minimal/templates/defwithtemplate/apply-terraform-config.yaml deleted file mode 100644 index ee1709911..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/apply-terraform-config.yaml +++ /dev/null @@ -1,91 +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-terraform-config.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Terraform - definition.oam.dev/alias: "" - definition.oam.dev/description: Apply terraform configuration in the step - name: apply-terraform-config - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - apply: op.#Apply & { - value: { - apiVersion: "terraform.core.oam.dev/v1beta2" - kind: "Configuration" - metadata: { - name: "\(context.name)-\(context.stepName)" - namespace: context.namespace - } - spec: { - deleteResource: parameter.deleteResource - variable: parameter.variable - forceDelete: parameter.forceDelete - if parameter.source.path != _|_ { - path: parameter.source.path - } - if parameter.source.remote != _|_ { - remote: parameter.source.remote - } - if parameter.source.hcl != _|_ { - hcl: parameter.source.hcl - } - if parameter.providerRef != _|_ { - providerRef: parameter.providerRef - } - if parameter.jobEnv != _|_ { - jobEnv: parameter.jobEnv - } - if parameter.writeConnectionSecretToRef != _|_ { - writeConnectionSecretToRef: parameter.writeConnectionSecretToRef - } - if parameter.region != _|_ { - region: parameter.region - } - } - } - } - check: op.#ConditionalWait & { - continue: apply.value.status != _|_ && apply.value.status.apply != _|_ && apply.value.status.apply.state == "Available" - } - parameter: { - // +usage=specify the source of the terraform configuration - source: close({ - // +usage=directly specify the hcl of the terraform configuration - hcl: string - }) | close({ - // +usage=specify the remote url of the terraform configuration - remote: *"https://github.com/kubevela-contrib/terraform-modules.git" | string - // +usage=specify the path of the terraform configuration - path?: string - }) - // +usage=whether to delete resource - deleteResource: *true | bool - // +usage=the variable in the configuration - variable: {...} - // +usage=this specifies the namespace and name of a secret to which any connection details for this managed resource should be written. - writeConnectionSecretToRef?: { - name: string - namespace: *context.namespace | string - } - // +usage=providerRef specifies the reference to Provider - providerRef?: { - name: string - namespace: *context.namespace | string - } - // +usage=region is cloud provider's region. It will override the region in the region field of providerRef - region?: string - // +usage=the envs for job - jobEnv?: {...} - // +usae=forceDelete will force delete Configuration no matter which state it is or whether it has provisioned some resources - forceDelete: *false | bool - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/apply-terraform-provider.yaml b/charts/vela-minimal/templates/defwithtemplate/apply-terraform-provider.yaml deleted file mode 100644 index e5c42ca1b..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/apply-terraform-provider.yaml +++ /dev/null @@ -1,144 +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-terraform-provider.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Terraform - definition.oam.dev/alias: "" - definition.oam.dev/description: Apply terraform provider config - name: apply-terraform-provider - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - "strings" - ) - - config: op.#CreateConfig & { - name: "\(context.name)-\(context.stepName)" - namespace: context.namespace - template: "terraform-\(parameter.type)" - config: { - name: parameter.name - if parameter.type == "alibaba" { - ALICLOUD_ACCESS_KEY: parameter.accessKey - ALICLOUD_SECRET_KEY: parameter.secretKey - ALICLOUD_REGION: parameter.region - } - if parameter.type == "aws" { - AWS_ACCESS_KEY_ID: parameter.accessKey - AWS_SECRET_ACCESS_KEY: parameter.secretKey - AWS_DEFAULT_REGION: parameter.region - AWS_SESSION_TOKEN: parameter.token - } - if parameter.type == "azure" { - ARM_CLIENT_ID: parameter.clientID - ARM_CLIENT_SECRET: parameter.clientSecret - ARM_SUBSCRIPTION_ID: parameter.subscriptionID - ARM_TENANT_ID: parameter.tenantID - } - if parameter.type == "baidu" { - BAIDUCLOUD_ACCESS_KEY: parameter.accessKey - BAIDUCLOUD_SECRET_KEY: parameter.secretKey - BAIDUCLOUD_REGION: parameter.region - } - if parameter.type == "ec" { - EC_API_KEY: parameter.apiKey - } - if parameter.type == "gcp" { - GOOGLE_CREDENTIALS: parameter.credentials - GOOGLE_REGION: parameter.region - GOOGLE_PROJECT: parameter.project - } - if parameter.type == "tencent" { - TENCENTCLOUD_SECRET_ID: parameter.secretID - TENCENTCLOUD_SECRET_KEY: parameter.secretKey - TENCENTCLOUD_REGION: parameter.region - } - if parameter.type == "ucloud" { - UCLOUD_PRIVATE_KEY: parameter.privateKey - UCLOUD_PUBLIC_KEY: parameter.publicKey - UCLOUD_PROJECT_ID: parameter.projectID - UCLOUD_REGION: parameter.region - } - } - } - read: op.#Read & { - value: { - apiVersion: "terraform.core.oam.dev/v1beta1" - kind: "Provider" - metadata: { - name: parameter.name - namespace: context.namespace - } - } - } - check: op.#ConditionalWait & { - if read.value.status != _|_ { - continue: read.value.status.state == "ready" - } - if read.value.status == _|_ { - continue: false - } - } - providerBasic: { - accessKey: string - secretKey: string - region: string - } - #AlibabaProvider: { - providerBasic - type: "alibaba" - name: *"alibaba-provider" | string - } - #AWSProvider: { - providerBasic - token: *"" | string - type: "aws" - name: *"aws-provider" | string - } - #AzureProvider: { - subscriptionID: string - tenantID: string - clientID: string - clientSecret: string - name: *"azure-provider" | string - } - #BaiduProvider: { - providerBasic - type: "baidu" - name: *"baidu-provider" | string - } - #ECProvider: { - type: "ec" - apiKey: *"" | string - name: *"ec-provider" | string - } - #GCPProvider: { - credentials: string - region: string - project: string - type: "gcp" - name: *"gcp-provider" | string - } - #TencentProvider: { - secretID: string - secretKey: string - region: string - type: "tencent" - name: *"tencent-provider" | string - } - #UCloudProvider: { - publicKey: string - privateKey: string - projectID: string - region: string - type: "ucloud" - name: *"ucloud-provider" | string - } - parameter: *#AlibabaProvider | #AWSProvider | #AzureProvider | #BaiduProvider | #ECProvider | #GCPProvider | #TencentProvider | #UCloudProvider - diff --git a/charts/vela-minimal/templates/defwithtemplate/bind-cloud-resource.yaml b/charts/vela-minimal/templates/defwithtemplate/bind-cloud-resource.yaml deleted file mode 100644 index f91381b4e..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/bind-cloud-resource.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/bind-cloud-resource.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - definition.oam.dev/description: Sync secrets created by terraform component to runtime clusters - name: bind-cloud-resource - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - app: op.#BindCloudResource & { - env: parameter.env - policy: parameter.policy - placements: parameter.placements - // context.namespace indicates the namespace of the app - namespace: context.namespace - // context.namespace indicates the name of the app - name: context.name - } - parameter: { - env: string - // +usage=Declare the location to bind - placements: [...{ - namespace?: string - cluster?: string - }] - // +usage=Declare the name of the env-binding policy, if empty, the first env-binding policy will be used - policy: *"" | string - // +usage=Declare the name of the env in policy - env: string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/build-push-image.yaml b/charts/vela-minimal/templates/defwithtemplate/build-push-image.yaml deleted file mode 100644 index 228a5a67c..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/build-push-image.yaml +++ /dev/null @@ -1,158 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/build-push-image.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: CI Integration - definition.oam.dev/alias: "" - definition.oam.dev/description: Build and push image from git url - name: build-push-image - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - "encoding/json" - "strings" - ) - - url: { - if parameter.context.git != _|_ { - address: strings.TrimPrefix(parameter.context.git, "git://") - value: "git://\(address)#refs/heads/\(parameter.context.branch)" - } - if parameter.context.git == _|_ { - value: parameter.context - } - } - kaniko: op.#Apply & { - value: { - apiVersion: "v1" - kind: "Pod" - metadata: { - name: "\(context.name)-\(context.stepSessionID)-kaniko" - namespace: context.namespace - } - spec: { - containers: [ - { - args: [ - "--dockerfile=\(parameter.dockerfile)", - "--context=\(url.value)", - "--destination=\(parameter.image)", - "--verbosity=\(parameter.verbosity)", - if parameter.platform != _|_ { - "--customPlatform=\(parameter.platform)" - }, - if parameter.buildArgs != _|_ for arg in parameter.buildArgs { - "--build-arg=\(arg)" - }, - ] - image: parameter.kanikoExecutor - name: "kaniko" - if parameter.credentials != _|_ && parameter.credentials.image != _|_ { - volumeMounts: [ - { - mountPath: "/kaniko/.docker/" - name: parameter.credentials.image.name - }, - ] - } - if parameter.credentials != _|_ && parameter.credentials.git != _|_ { - env: [ - { - name: "GIT_TOKEN" - valueFrom: secretKeyRef: { - key: parameter.credentials.git.key - name: parameter.credentials.git.name - } - }, - ] - } - }, - ] - if parameter.credentials != _|_ && parameter.credentials.image != _|_ { - volumes: [ - { - name: parameter.credentials.image.name - secret: { - defaultMode: 420 - items: [ - { - key: parameter.credentials.image.key - path: "config.json" - }, - ] - secretName: parameter.credentials.image.name - } - }, - ] - } - restartPolicy: "Never" - } - } - } - log: op.#Log & { - source: resources: [{ - name: "\(context.name)-\(context.stepSessionID)-kaniko" - namespace: context.namespace - }] - } - read: op.#Read & { - value: { - apiVersion: "v1" - kind: "Pod" - metadata: { - name: "\(context.name)-\(context.stepSessionID)-kaniko" - namespace: context.namespace - } - } - } - wait: op.#ConditionalWait & { - continue: read.value.status != _|_ && read.value.status.phase == "Succeeded" - } - #secret: { - name: string - key: string - } - #git: { - git: string - branch: *"master" | string - } - parameter: { - // +usage=Specify the kaniko executor image, default to oamdev/kaniko-executor:v1.9.1 - kanikoExecutor: *"oamdev/kaniko-executor:v1.9.1" | string - // +usage=Specify the context to build image, you can use context with git and branch or directly specify the context, please refer to https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts - context: #git | string - // +usage=Specify the dockerfile - dockerfile: *"./Dockerfile" | string - // +usage=Specify the image - image: string - // +usage=Specify the platform to build - platform?: string - // +usage=Specify the build args - buildArgs?: [...string] - // +usage=Specify the credentials to access git and image registry - credentials?: { - // +usage=Specify the credentials to access git - git?: { - // +usage=Specify the secret name - name: string - // +usage=Specify the secret key - key: string - } - // +usage=Specify the credentials to access image registry - image?: { - // +usage=Specify the secret name - name: string - // +usage=Specify the secret key - key: *".dockerconfigjson" | string - } - } - // +usage=Specify the verbosity level - verbosity: *"info" | "panic" | "fatal" | "error" | "warn" | "debug" | "trace" - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/check-metrics.yaml b/charts/vela-minimal/templates/defwithtemplate/check-metrics.yaml deleted file mode 100644 index 8ab5e1186..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/check-metrics.yaml +++ /dev/null @@ -1,59 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/check-metrics.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Application Delivery - definition.oam.dev/description: Verify application's metrics - labels: - custom.definition.oam.dev/catalog: Delivery - name: check-metrics - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - check: op.#PromCheck & { - query: parameter.query - metricEndpoint: parameter.metricEndpoint - condition: parameter.condition - stepID: context.stepSessionID - duration: parameter.duration - failDuration: parameter.failDuration - } - - fail: op.#Steps & { - if check.failed != _|_ { - if check.failed == true { - breakWorkflow: op.#Fail & { - message: check.message - } - } - } - } - - wait: op.#ConditionalWait & { - continue: check.result - if check.message != _|_ { - message: check.message - } - } - - parameter: { - // +usage=Query is a raw prometheus query to perform - query: string - // +usage=The HTTP address and port of the prometheus server - metricEndpoint?: "http://prometheus-server.o11y-system.svc:9090" | string - // +usage=Condition is an expression which determines if a measurement is considered successful. eg: >=0.95 - condition: string - // +usage=Duration defines the duration of time required for this step to be considered successful. - duration?: *"5m" | string - // +usage=FailDuration is the duration of time that, if the check fails, will result in the step being marked as failed. - failDuration?: *"2m" | string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/clean-jobs.yaml b/charts/vela-minimal/templates/defwithtemplate/clean-jobs.yaml deleted file mode 100644 index bb4ec260c..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/clean-jobs.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/clean-jobs.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Resource Management - definition.oam.dev/description: clean applied jobs in the cluster - name: clean-jobs - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - parameter: { - labelselector?: {...} - namespace: *context.namespace | string - } - - cleanJobs: op.#Delete & { - value: { - apiVersion: "batch/v1" - kind: "Job" - metadata: { - name: context.name - namespace: parameter.namespace - } - } - filter: { - namespace: parameter.namespace - if parameter.labelselector != _|_ { - matchingLabels: parameter.labelselector - } - if parameter.labelselector == _|_ { - matchingLabels: "workflow.oam.dev/name": context.name - } - } - } - - cleanPods: op.#Delete & { - value: { - apiVersion: "v1" - kind: "pod" - metadata: { - name: context.name - namespace: parameter.namespace - } - } - filter: { - namespace: parameter.namespace - if parameter.labelselector != _|_ { - matchingLabels: parameter.labelselector - } - if parameter.labelselector == _|_ { - matchingLabels: "workflow.oam.dev/name": context.name - } - } - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/collect-service-endpoints.yaml b/charts/vela-minimal/templates/defwithtemplate/collect-service-endpoints.yaml deleted file mode 100644 index 9c7fe22bf..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/collect-service-endpoints.yaml +++ /dev/null @@ -1,102 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/collect-service-endpoints.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Application Delivery - definition.oam.dev/description: Collect service endpoints for the application. - name: collect-service-endpoints - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - "vela/ql" - "strconv" - ) - - collect: ql.#CollectServiceEndpoints & { - app: { - name: *context.name | string - namespace: *context.namespace | string - if parameter.name != _|_ { - name: parameter.name - } - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - filter: { - if parameter.components != _|_ { - components: parameter.components - } - } - } - } @step(1) - - outputs: { - eps_port_name_filtered: *[] | [...] - if parameter.portName == _|_ { - eps_port_name_filtered: collect.list - } - if parameter.portName != _|_ { - eps_port_name_filtered: [ for ep in collect.list if parameter.portName == ep.endpoint.portName {ep}] - } - - eps_port_filtered: *[] | [...] - if parameter.port == _|_ { - eps_port_filtered: eps_port_name_filtered - } - if parameter.port != _|_ { - eps_port_filtered: [ for ep in eps_port_name_filtered if parameter.port == ep.endpoint.port {ep}] - } - eps: eps_port_filtered - endpoints: *[] | [...] - if parameter.outer != _|_ { - tmps: [ for ep in eps { - ep - if ep.endpoint.inner == _|_ { - outer: true - } - if ep.endpoint.inner != _|_ { - outer: !ep.endpoint.inner - } - }] - endpoints: [ for ep in tmps if (!parameter.outer || ep.outer) {ep}] - } - if parameter.outer == _|_ { - endpoints: eps_port_filtered - } - } - - wait: op.#ConditionalWait & { - continue: len(outputs.endpoints) > 0 - } @step(2) - - value: { - if len(outputs.endpoints) > 0 { - endpoint: outputs.endpoints[0].endpoint - _portStr: strconv.FormatInt(endpoint.port, 10) - url: "\(parameter.protocal)://\(endpoint.host):\(_portStr)" - } - } - - parameter: { - // +usage=Specify the name of the application - name?: string - // +usage=Specify the namespace of the application - namespace?: string - // +usage=Filter the component of the endpoints - components?: [...string] - // +usage=Filter the port of the endpoints - port?: int - // +usage=Filter the port name of the endpoints - portName?: string - // +usage=Filter the endpoint that are only outer - outer?: bool - // +usage=The protocal of endpoint url - protocal: *"http" | "https" - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/command.yaml b/charts/vela-minimal/templates/defwithtemplate/command.yaml deleted file mode 100644 index 0de99fe54..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/command.yaml +++ /dev/null @@ -1,117 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/command.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add command on K8s pod for your workload which follows the pod spec in path 'spec.template' - name: command - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - schematic: - cue: - template: | - #PatchParams: { - // +usage=Specify the name of the target container, if not set, use the component name - containerName: *"" | string - // +usage=Specify the command to use in the target container, if not set, it will not be changed - command: *null | [...string] - // +usage=Specify the args to use in the target container, if set, it will override existing args - args: *null | [...string] - // +usage=Specify the args to add in the target container, existing args will be kept, cannot be used with `args` - addArgs: *null | [...string] - // +usage=Specify the existing args to delete in the target container, cannot be used with `args` - delArgs: *null | [...string] - } - PatchContainer: { - _params: #PatchParams - name: _params.containerName - _baseContainers: context.output.spec.template.spec.containers - _matchContainers_: [ for _container_ in _baseContainers if _container_.name == name {_container_}] - _baseContainer: *_|_ | {...} - if len(_matchContainers_) == 0 { - err: "container \(name) not found" - } - if len(_matchContainers_) > 0 { - _baseContainer: _matchContainers_[0] - if _params.command != null { - // +patchStrategy=replace - command: _params.command - } - if (_params.addArgs != null || _params.delArgs != null) && _params.args != null { - err: "cannot set addArgs/delArgs and args at the same time" - } - _delArgs: {...} - if _params.delArgs != null { - _delArgs: {for k in _params.delArgs {(k): ""}} - } - if _params.delArgs == null { - _delArgs: {} - } - _args: [...string] - if _params.args != null { - _args: _params.args - } - if _params.args == null && _baseContainer.args != _|_ { - _args: _baseContainer.args - } - if _params.args == null && _baseContainer.args == _|_ { - _args: [] - } - _argsMap: {for a in _args {(a): ""}} - _addArgs: [...string] - if _params.addArgs != null { - _addArgs: _params.addArgs - } - if _params.addArgs == null { - _addArgs: [] - } - - // +patchStrategy=replace - args: [ for a in _args if _delArgs[a] == _|_ {a}] + [ for a in _addArgs if _delArgs[a] == _|_ && _argsMap[a] == _|_ {a}] - } - } - // +patchStrategy=open - patch: spec: template: spec: { - if parameter.containers == _|_ { - // +patchKey=name - containers: [{ - PatchContainer & {_params: { - if parameter.containerName == "" { - containerName: context.name - } - if parameter.containerName != "" { - containerName: parameter.containerName - } - command: parameter.command - args: parameter.args - addArgs: parameter.addArgs - delArgs: parameter.delArgs - }} - }] - } - if parameter.containers != _|_ { - // +patchKey=name - containers: [ for c in parameter.containers { - if c.containerName == "" { - err: "container name must be set for containers" - } - if c.containerName != "" { - PatchContainer & {_params: c} - } - }] - } - } - - parameter: *#PatchParams | close({ - // +usage=Specify the commands for multiple containers - containers: [...#PatchParams] - }) - - errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}] - diff --git a/charts/vela-minimal/templates/defwithtemplate/config-image-registry.yaml b/charts/vela-minimal/templates/defwithtemplate/config-image-registry.yaml deleted file mode 100644 index dce359e6f..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/config-image-registry.yaml +++ /dev/null @@ -1,86 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/config-image-registry.cue -apiVersion: core.oam.dev/v1beta1 -kind: ComponentDefinition -metadata: - annotations: - alias.config.oam.dev: Image Registry - definition.oam.dev/description: Config information to authenticate image registry - labels: - catalog.config.oam.dev: velacore-config - custom.definition.oam.dev/ui-hidden: "true" - multi-cluster.config.oam.dev: "true" - type.config.oam.dev: image-registry - name: config-image-registry - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "encoding/base64" - "encoding/json" - "strconv" - ) - - output: { - apiVersion: "v1" - kind: "Secret" - metadata: { - name: context.name - namespace: context.namespace - labels: { - "config.oam.dev/catalog": "velacore-config" - "config.oam.dev/type": "image-registry" - "config.oam.dev/multi-cluster": "true" - "config.oam.dev/identifier": parameter.registry - "config.oam.dev/sub-type": "auth" - } - } - if parameter.auth != _|_ { - type: "kubernetes.io/dockerconfigjson" - } - if parameter.auth == _|_ { - type: "Opaque" - } - stringData: { - if parameter.auth != _|_ && parameter.auth.username != _|_ { - ".dockerconfigjson": json.Marshal({ - auths: (parameter.registry): { - username: parameter.auth.username - password: parameter.auth.password - if parameter.auth.email != _|_ { - email: parameter.auth.email - } - auth: base64.Encode(null, (parameter.auth.username + ":" + parameter.auth.password)) - } - }) - } - if parameter.insecure != _|_ { - "insecure-skip-verify": strconv.FormatBool(parameter.insecure) - } - if parameter.useHTTP != _|_ { - "protocol-use-http": strconv.FormatBool(parameter.useHTTP) - } - } - } - parameter: { - // +usage=Image registry FQDN, such as: index.docker.io - registry: string - // +usage=Authenticate the image registry - auth?: { - // +usage=Private Image registry username - username: string - // +usage=Private Image registry password - password: string - // +usage=Private Image registry email - email?: string - } - // +usage=For the registry server that uses the self-signed certificate - insecure?: bool - // +usage=For the registry server that uses the HTTP protocol - useHTTP?: bool - } - workload: - type: autodetects.core.oam.dev - diff --git a/charts/vela-minimal/templates/defwithtemplate/configmap.yaml b/charts/vela-minimal/templates/defwithtemplate/configmap.yaml deleted file mode 100644 index 40fb584f9..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/configmap.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/deprecated/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'. This definition is DEPRECATED, please specify configmap in 'storage' instead. - labels: - custom.definition.oam.dev/deprecated: "true" - name: configmap - namespace: {{ include "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/charts/vela-minimal/templates/defwithtemplate/container-image.yaml b/charts/vela-minimal/templates/defwithtemplate/container-image.yaml deleted file mode 100644 index 0426893c1..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/container-image.yaml +++ /dev/null @@ -1,82 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/container-image.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Set the image of the container. - name: container-image - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - podDisruptive: true - schematic: - cue: - template: | - #PatchParams: { - // +usage=Specify the name of the target container, if not set, use the component name - containerName: *"" | string - // +usage=Specify the image of the container - image: string - // +usage=Specify the image pull policy of the container - imagePullPolicy: *"" | "IfNotPresent" | "Always" | "Never" - } - PatchContainer: { - _params: #PatchParams - name: _params.containerName - _baseContainers: context.output.spec.template.spec.containers - _matchContainers_: [ for _container_ in _baseContainers if _container_.name == name {_container_}] - _baseContainer: *_|_ | {...} - if len(_matchContainers_) == 0 { - err: "container \(name) not found" - } - if len(_matchContainers_) > 0 { - // +patchStrategy=retainKeys - image: _params.image - - if _params.imagePullPolicy != "" { - // +patchStrategy=retainKeys - imagePullPolicy: _params.imagePullPolicy - } - } - } - patch: spec: template: spec: { - if parameter.containers == _|_ { - // +patchKey=name - containers: [{ - PatchContainer & {_params: { - if parameter.containerName == "" { - containerName: context.name - } - if parameter.containerName != "" { - containerName: parameter.containerName - } - image: parameter.image - imagePullPolicy: parameter.imagePullPolicy - }} - }] - } - if parameter.containers != _|_ { - // +patchKey=name - containers: [ for c in parameter.containers { - if c.containerName == "" { - err: "containerName must be set for containers" - } - if c.containerName != "" { - PatchContainer & {_params: c} - } - }] - } - } - - parameter: #PatchParams | close({ - // +usage=Specify the container image for multiple containers - containers: [...#PatchParams] - }) - - errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}] - diff --git a/charts/vela-minimal/templates/defwithtemplate/cpuscaler.yaml b/charts/vela-minimal/templates/defwithtemplate/cpuscaler.yaml deleted file mode 100644 index 795529e4a..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/cpuscaler.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/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: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - schematic: - cue: - template: | - outputs: cpuscaler: { - apiVersion: "autoscaling/v1" - kind: "HorizontalPodAutoscaler" - metadata: name: context.name - spec: { - scaleTargetRef: { - apiVersion: parameter.targetAPIVersion - kind: parameter.targetKind - name: context.name - } - minReplicas: parameter.min - maxReplicas: parameter.max - targetCPUUtilizationPercentage: 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 - // +usage=Specify the apiVersion of scale target - targetAPIVersion: *"apps/v1" | string - // +usage=Specify the kind of scale target - targetKind: *"Deployment" | string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/create-config.yaml b/charts/vela-minimal/templates/defwithtemplate/create-config.yaml deleted file mode 100644 index a99a91b7a..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/create-config.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/create-config.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Config Management - definition.oam.dev/description: Create or update a config - name: create-config - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - deploy: op.#CreateConfig & { - name: parameter.name - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - if parameter.namespace == _|_ { - namespace: context.namespace - } - if parameter.template != _|_ { - template: parameter.template - } - config: parameter.config - } - parameter: { - //+usage=Specify the name of the config. - name: string - - //+usage=Specify the namespace of the config. - namespace?: string - - //+usage=Specify the template of the config. - template?: string - - //+usage=Specify the content of the config. - config: {...} - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/cron-task.yaml b/charts/vela-minimal/templates/defwithtemplate/cron-task.yaml deleted file mode 100644 index ead91038c..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/cron-task.yaml +++ /dev/null @@ -1,324 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/cron-task.cue -apiVersion: core.oam.dev/v1beta1 -kind: ComponentDefinition -metadata: - annotations: - definition.oam.dev/description: Describes cron jobs that run code or a script to completion. - name: cron-task - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - output: { - if context.clusterVersion.minor < 25 { - apiVersion: "batch/v1beta1" - } - if context.clusterVersion.minor >= 25 { - apiVersion: "batch/v1" - } - kind: "CronJob" - spec: { - schedule: parameter.schedule - concurrencyPolicy: parameter.concurrencyPolicy - suspend: parameter.suspend - successfulJobsHistoryLimit: parameter.successfulJobsHistoryLimit - failedJobsHistoryLimit: parameter.failedJobsHistoryLimit - if parameter.startingDeadlineSeconds != _|_ { - startingDeadlineSeconds: parameter.startingDeadlineSeconds - } - jobTemplate: { - metadata: { - labels: { - if parameter.labels != _|_ { - parameter.labels - } - "app.oam.dev/name": context.appName - "app.oam.dev/component": context.name - } - if parameter.annotations != _|_ { - annotations: parameter.annotations - } - } - spec: { - parallelism: parameter.count - completions: parameter.count - if parameter.ttlSecondsAfterFinished != _|_ { - ttlSecondsAfterFinished: parameter.ttlSecondsAfterFinished - } - if parameter.activeDeadlineSeconds != _|_ { - activeDeadlineSeconds: parameter.activeDeadlineSeconds - } - backoffLimit: parameter.backoffLimit - template: { - metadata: { - labels: { - if parameter.labels != _|_ { - parameter.labels - } - "app.oam.dev/name": context.appName - "app.oam.dev/component": context.name - } - if parameter.annotations != _|_ { - annotations: parameter.annotations - } - } - 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 - }, - ] - } - if parameter.hostAliases != _|_ { - hostAliases: [ for v in parameter.hostAliases { - ip: v.ip - hostnames: v.hostnames - }, - ] - } - } - } - } - } - } - } - - parameter: { - // +usage=Specify the labels in the workload - labels?: [string]: string - - // +usage=Specify the annotations in the workload - annotations?: [string]: string - - // +usage=Specify the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron - schedule: string - - // +usage=Specify deadline in seconds for starting the job if it misses scheduled - startingDeadlineSeconds?: int - - // +usage=suspend subsequent executions - suspend: *false | bool - - // +usage=Specifies how to treat concurrent executions of a Job - concurrencyPolicy: *"Allow" | "Allow" | "Forbid" | "Replace" - - // +usage=The number of successful finished jobs to retain - successfulJobsHistoryLimit: *3 | int - - // +usage=The number of failed finished jobs to retain - failedJobsHistoryLimit: *1 | int - - // +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?: "Always" | "Never" | "IfNotPresent" - - // +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=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=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", default to emptyDir - type: *"emptyDir" | "pvc" | "configMap" | "secret" - 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=An optional list of hosts and IPs that will be injected into the pod's hosts file - hostAliases?: [...{ - ip: string - hostnames: [...string] - }] - - // +usage=Limits the lifetime of a Job that has finished - ttlSecondsAfterFinished?: int - - // +usage=The duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it - activeDeadlineSeconds?: int - - // +usage=The number of retries before marking this job failed - backoffLimit: *6 | int - - // +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: - type: autodetects.core.oam.dev - diff --git a/charts/vela-minimal/templates/defwithtemplate/daemon.yaml b/charts/vela-minimal/templates/defwithtemplate/daemon.yaml deleted file mode 100644 index 85c685cf3..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/daemon.yaml +++ /dev/null @@ -1,582 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/daemon.cue -apiVersion: core.oam.dev/v1beta1 -kind: ComponentDefinition -metadata: - annotations: - definition.oam.dev/description: Describes daemonset services in Kubernetes. - name: daemon - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "strconv" - ) - - mountsArray: [ - if parameter.volumeMounts != _|_ && parameter.volumeMounts.pvc != _|_ for v in parameter.volumeMounts.pvc { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.configMap != _|_ for v in parameter.volumeMounts.configMap { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.secret != _|_ for v in parameter.volumeMounts.secret { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.emptyDir != _|_ for v in parameter.volumeMounts.emptyDir { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.hostPath != _|_ for v in parameter.volumeMounts.hostPath { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - ] - - volumesList: [ - if parameter.volumeMounts != _|_ && parameter.volumeMounts.pvc != _|_ for v in parameter.volumeMounts.pvc { - { - name: v.name - persistentVolumeClaim: claimName: v.claimName - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.configMap != _|_ for v in parameter.volumeMounts.configMap { - { - name: v.name - configMap: { - defaultMode: v.defaultMode - name: v.cmName - if v.items != _|_ { - items: v.items - } - } - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.secret != _|_ for v in parameter.volumeMounts.secret { - { - name: v.name - secret: { - defaultMode: v.defaultMode - secretName: v.secretName - if v.items != _|_ { - items: v.items - } - } - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.emptyDir != _|_ for v in parameter.volumeMounts.emptyDir { - { - name: v.name - emptyDir: medium: v.medium - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.hostPath != _|_ for v in parameter.volumeMounts.hostPath { - { - name: v.name - hostPath: path: v.path - } - }, - ] - - 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 - }, - ] - - output: { - apiVersion: "apps/v1" - kind: "DaemonSet" - spec: { - selector: matchLabels: "app.oam.dev/component": context.name - - template: { - metadata: { - labels: { - if parameter.labels != _|_ { - parameter.labels - } - if parameter.addRevisionLabel { - "app.oam.dev/revision": context.revision - } - "app.oam.dev/name": context.appName - "app.oam.dev/component": context.name - } - if parameter.annotations != _|_ { - annotations: parameter.annotations - } - } - - spec: { - containers: [{ - name: context.name - image: parameter.image - if parameter["port"] != _|_ && parameter["ports"] == _|_ { - ports: [{ - containerPort: parameter.port - }] - } - if parameter["ports"] != _|_ { - ports: [ for v in parameter.ports { - { - containerPort: v.port - protocol: v.protocol - if v.name != _|_ { - name: v.name - } - if v.name == _|_ { - name: "port-" + strconv.FormatInt(v.port, 10) - } - }}] - } - - 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"] != _|_ && parameter["volumeMounts"] == _|_ { - volumeMounts: [ for v in parameter.volumes { - { - mountPath: v.mountPath - name: v.name - }}] - } - - if parameter["volumeMounts"] != _|_ { - volumeMounts: mountsArray - } - - if parameter["livenessProbe"] != _|_ { - livenessProbe: parameter.livenessProbe - } - - if parameter["readinessProbe"] != _|_ { - readinessProbe: parameter.readinessProbe - } - - }] - - if parameter["hostAliases"] != _|_ { - // +patchKey=ip - hostAliases: parameter.hostAliases - } - - if parameter["imagePullSecrets"] != _|_ { - imagePullSecrets: [ for v in parameter.imagePullSecrets { - name: v - }, - ] - } - - if parameter["volumes"] != _|_ && parameter["volumeMounts"] == _|_ { - 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["volumeMounts"] != _|_ { - volumes: deDupVolumesArray - } - } - } - } - } - - exposePorts: [ - if parameter.ports != _|_ for v in parameter.ports if v.expose == true { - port: v.port - targetPort: v.port - if v.name != _|_ { - name: v.name - } - if v.name == _|_ { - name: "port-" + strconv.FormatInt(v.port, 10) - } - }, - ] - - outputs: { - if len(exposePorts) != 0 { - webserviceExpose: { - apiVersion: "v1" - kind: "Service" - metadata: name: context.name - spec: { - selector: "app.oam.dev/component": context.name - ports: exposePorts - type: parameter.exposeType - } - } - } - } - - parameter: { - // +usage=Specify the labels in the workload - labels?: [string]: string - - // +usage=Specify the annotations in the workload - annotations?: [string]: string - - // +usage=Which image would you like to use for your service - // +short=i - image: string - - // +usage=Specify image pull policy for your service - imagePullPolicy?: "Always" | "Never" | "IfNotPresent" - - // +usage=Specify image pull secrets for your service - imagePullSecrets?: [...string] - - // +ignore - // +usage=Deprecated field, please use ports instead - // +short=p - port?: int - - // +usage=Which ports do you want customer traffic sent to, defaults to 80 - ports?: [...{ - // +usage=Number of port to expose on the pod's IP address - port: int - // +usage=Name of the port - name?: string - // +usage=Protocol for port. Must be UDP, TCP, or SCTP - protocol: *"TCP" | "UDP" | "SCTP" - // +usage=Specify if the port should be exposed - expose: *false | bool - }] - - // +ignore - // +usage=Specify what kind of Service you want. options: "ClusterIP", "NodePort", "LoadBalancer", "ExternalName" - exposeType: *"ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName" - - // +ignore - // +usage=If addRevisionLabel is true, the revision 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=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=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 - - volumeMounts?: { - // +usage=Mount PVC type volume - pvc?: [...{ - name: string - mountPath: string - // +usage=The name of the PVC - claimName: string - }] - // +usage=Mount ConfigMap type volume - configMap?: [...{ - name: string - mountPath: string - defaultMode: *420 | int - cmName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - }] - // +usage=Mount Secret type volume - secret?: [...{ - name: string - mountPath: string - defaultMode: *420 | int - secretName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - }] - // +usage=Mount EmptyDir type volume - emptyDir?: [...{ - name: string - mountPath: string - medium: *"" | "Memory" - }] - // +usage=Mount HostPath type volume - hostPath?: [...{ - name: string - mountPath: string - mountPropagation?: "None" | "HostToContainer" | "Bidirectional" - path: string - readOnly?: bool - }] - } - - // +usage=Deprecated field, use volumeMounts instead. - volumes?: [...{ - name: string - mountPath: string - // +usage=Specify volume type, options: "pvc","configMap","secret","emptyDir", default to emptyDir - type: *"emptyDir" | "pvc" | "configMap" | "secret" - 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 - - // +usage=Specify the hostAliases to add - hostAliases?: [...{ - ip: string - hostnames: [...string] - }] - } - - #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 - host?: string - scheme?: *"HTTP" | string - 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 - } - status: - customStatus: |- - ready: { - replicas: *0 | int - } & { - if context.output.status.numberReady != _|_ { - replicas: context.output.status.numberReady - } - } - desired: { - replicas: *0 | int - } & { - if context.output.status.desiredNumberScheduled != _|_ { - replicas: context.output.status.desiredNumberScheduled - } - } - message: "Ready:\(ready.replicas)/\(desired.replicas)" - healthPolicy: |- - ready: { - replicas: *0 | int - } & { - if context.output.status.numberReady != _|_ { - replicas: context.output.status.numberReady - } - } - desired: { - replicas: *0 | int - } & { - if context.output.status.desiredNumberScheduled != _|_ { - replicas: context.output.status.desiredNumberScheduled - } - } - current: { - replicas: *0 | int - } & { - if context.output.status.currentNumberScheduled != _|_ { - replicas: context.output.status.currentNumberScheduled - } - } - updated: { - replicas: *0 | int - } & { - if context.output.status.updatedNumberScheduled != _|_ { - replicas: context.output.status.updatedNumberScheduled - } - } - generation: { - metadata: context.output.metadata.generation - observed: *0 | int - } & { - if context.output.status.observedGeneration != _|_ { - observed: context.output.status.observedGeneration - } - } - isHealth: (desired.replicas == ready.replicas) && (desired.replicas == updated.replicas) && (desired.replicas == current.replicas) && (generation.observed == generation.metadata || generation.observed > generation.metadata) - workload: - definition: - apiVersion: apps/v1 - kind: DaemonSet - type: daemonsets.apps - diff --git a/charts/vela-minimal/templates/defwithtemplate/delete-config.yaml b/charts/vela-minimal/templates/defwithtemplate/delete-config.yaml deleted file mode 100644 index d525a438d..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/delete-config.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/delete-config.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Config Management - definition.oam.dev/description: Delete a config - name: delete-config - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - deploy: op.#DeleteConfig & { - name: parameter.name - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - if parameter.namespace == _|_ { - namespace: context.namespace - } - } - parameter: { - //+usage=Specify the name of the config. - name: string - - //+usage=Specify the namespace of the config. - namespace?: string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/depends-on-app.yaml b/charts/vela-minimal/templates/defwithtemplate/depends-on-app.yaml deleted file mode 100644 index f02a539dc..000000000 --- a/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: - custom.definition.oam.dev/category: Application Delivery - definition.oam.dev/description: Wait for the specified Application to complete. - name: depends-on-app - namespace: {{ include "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 != _|_ { - configMap: op.#Read & { - value: { - apiVersion: "v1" - kind: "ConfigMap" - metadata: { - name: parameter.name - namespace: parameter.namespace - } - } - } @step(1) - template: configMap.value.data["application"] - apply: op.#Apply & { - value: yaml.Unmarshal(template) - } @step(2) - wait: op.#ConditionalWait & { - continue: apply.value.status.status == "running" - } @step(3) - } - - if dependsOn.err == _|_ { - 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/charts/vela-minimal/templates/defwithtemplate/deploy-cloud-resource.yaml b/charts/vela-minimal/templates/defwithtemplate/deploy-cloud-resource.yaml deleted file mode 100644 index 7a9c5b5d0..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/deploy-cloud-resource.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/deploy-cloud-resource.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Application Delivery - definition.oam.dev/description: Deploy cloud resource and deliver secret to multi clusters. - labels: - custom.definition.oam.dev/scope: Application - name: deploy-cloud-resource - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - app: op.#DeployCloudResource & { - env: parameter.env - policy: parameter.policy - // context.namespace indicates the namespace of the app - namespace: context.namespace - // context.namespace indicates the name of the app - name: context.name - } - - parameter: { - // +usage=Declare the name of the env-binding policy, if empty, the first env-binding policy will be used - policy: *"" | string - // +usage=Declare the name of the env in policy - env: string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/deploy.yaml b/charts/vela-minimal/templates/defwithtemplate/deploy.yaml deleted file mode 100644 index 2a8a79175..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/deploy.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/deploy.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Application Delivery - definition.oam.dev/description: A powerful and unified deploy step for components multi-cluster delivery with policies. - labels: - custom.definition.oam.dev/scope: Application - name: deploy - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - if parameter.auto == false { - suspend: op.#Suspend & {message: "Waiting approval to the deploy step \"\(context.stepName)\""} - } - deploy: op.#Deploy & { - policies: parameter.policies - parallelism: parameter.parallelism - ignoreTerraformComponent: parameter.ignoreTerraformComponent - } - parameter: { - //+usage=If set to false, the workflow will suspend automatically before this step, default to be true. - auto: *true | bool - //+usage=Declare the policies that used for this deployment. If not specified, the components will be deployed to the hub cluster. - policies: *[] | [...string] - //+usage=Maximum number of concurrent delivered components. - parallelism: *5 | int - //+usage=If set false, this step will apply the components with the terraform workload. - ignoreTerraformComponent: *true | bool - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/deploy2runtime.yaml b/charts/vela-minimal/templates/defwithtemplate/deploy2runtime.yaml deleted file mode 100644 index 31ba57af3..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/deploy2runtime.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/deploy2runtime.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - definition.oam.dev/description: Deploy application to runtime clusters - labels: - custom.definition.oam.dev/deprecated: "true" - custom.definition.oam.dev/scope: Application - custom.definition.oam.dev/ui-hidden: "true" - name: deploy2runtime - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - app: op.#Steps & { - load: op.#Load - clusters: [...string] - if parameter.clusters == _|_ { - listClusters: op.#ListClusters - clusters: listClusters.outputs.clusters - } - if parameter.clusters != _|_ { - clusters: parameter.clusters - } - - apply: op.#Steps & { - for _, cluster_ in clusters { - for name, c in load.value { - "\(cluster_)-\(name)": op.#ApplyComponent & { - value: c - cluster: cluster_ - } - } - } - } - } - parameter: { - // +usage=Declare the runtime clusters to apply, if empty, all runtime clusters will be used - clusters?: [...string] - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/env.yaml b/charts/vela-minimal/templates/defwithtemplate/env.yaml deleted file mode 100644 index 6cf2a696c..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/env.yaml +++ /dev/null @@ -1,108 +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: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - schematic: - cue: - template: | - #PatchParams: { - // +usage=Specify the name of the target container, if not set, use the component name - containerName: *"" | string - // +usage=Specify if replacing the whole environment settings for the container - replace: *false | bool - // +usage=Specify the environment variables to merge, if key already existing, override its value - env: [string]: string - // +usage=Specify which existing environment variables to unset - unset: *[] | [...string] - } - PatchContainer: { - _params: #PatchParams - name: _params.containerName - _delKeys: {for k in _params.unset {(k): ""}} - _baseContainers: context.output.spec.template.spec.containers - _matchContainers_: [ for _container_ in _baseContainers if _container_.name == name {_container_}] - _baseContainer: *_|_ | {...} - if len(_matchContainers_) == 0 { - err: "container \(name) not found" - } - if len(_matchContainers_) > 0 { - _baseContainer: _matchContainers_[0] - _baseEnv: _baseContainer.env - if _baseEnv == _|_ { - // +patchStrategy=replace - env: [ for k, v in _params.env if _delKeys[k] == _|_ { - name: k - value: v - }] - } - if _baseEnv != _|_ { - _baseEnvMap: {for envVar in _baseEnv {(envVar.name): envVar}} - // +patchStrategy=replace - env: [ for envVar in _baseEnv if _delKeys[envVar.name] == _|_ && !_params.replace { - name: envVar.name - if _params.env[envVar.name] != _|_ { - value: _params.env[envVar.name] - } - if _params.env[envVar.name] == _|_ { - if envVar.value != _|_ { - value: envVar.value - } - if envVar.valueFrom != _|_ { - valueFrom: envVar.valueFrom - } - } - }] + [ for k, v in _params.env if _delKeys[k] == _|_ && (_params.replace || _baseEnvMap[k] == _|_) { - name: k - value: v - }] - } - } - } - patch: spec: template: spec: { - if parameter.containers == _|_ { - // +patchKey=name - containers: [{ - PatchContainer & {_params: { - if parameter.containerName == "" { - containerName: context.name - } - if parameter.containerName != "" { - containerName: parameter.containerName - } - replace: parameter.replace - env: parameter.env - unset: parameter.unset - }} - }] - } - if parameter.containers != _|_ { - // +patchKey=name - containers: [ for c in parameter.containers { - if c.containerName == "" { - err: "containerName must be set for containers" - } - if c.containerName != "" { - PatchContainer & {_params: c} - } - }] - } - } - - parameter: *#PatchParams | close({ - // +usage=Specify the environment variables for multiple containers - containers: [...#PatchParams] - }) - - errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}] - diff --git a/charts/vela-minimal/templates/defwithtemplate/export-data.yaml b/charts/vela-minimal/templates/defwithtemplate/export-data.yaml deleted file mode 100644 index d3dc27120..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/export-data.yaml +++ /dev/null @@ -1,70 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/export-data.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Application Delivery - definition.oam.dev/description: Export data to clusters specified by topology. - labels: - custom.definition.oam.dev/scope: Application - name: export-data - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - object: { - apiVersion: "v1" - kind: parameter.kind - metadata: { - name: *context.name | string - namespace: *context.namespace | string - if parameter.name != _|_ { - name: parameter.name - } - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - } - if parameter.kind == "ConfigMap" { - data: parameter.data - } - if parameter.kind == "Secret" { - stringData: parameter.data - } - } @step(1) - - getPlacements: op.#GetPlacementsFromTopologyPolicies & { - policies: *[] | [...string] - if parameter.topology != _|_ { - policies: [parameter.topology] - } - } @step(2) - - apply: op.#Steps & { - for p in getPlacements.placements { - (p.cluster): op.#Apply & { - value: object - cluster: p.cluster - } - } - } @step(3) - - parameter: { - // +usage=Specify the name of the export destination - name?: string - // +usage=Specify the namespace of the export destination - namespace?: string - // +usage=Specify the kind of the export destination - kind: *"ConfigMap" | "Secret" - // +usage=Specify the data to export - data: {} - // +usage=Specify the topology to export - topology?: string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/export-service.yaml b/charts/vela-minimal/templates/defwithtemplate/export-service.yaml deleted file mode 100644 index c361888af..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/export-service.yaml +++ /dev/null @@ -1,85 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/export-service.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Application Delivery - definition.oam.dev/description: Export service to clusters specified by topology. - labels: - custom.definition.oam.dev/scope: Application - name: export-service - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - meta: { - name: *context.name | string - namespace: *context.namespace | string - if parameter.name != _|_ { - name: parameter.name - } - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - } - objects: [{ - apiVersion: "v1" - kind: "Service" - metadata: meta - spec: { - type: "ClusterIP" - ports: [{ - protocol: "TCP" - port: parameter.port - targetPort: parameter.targetPort - }] - } - }, { - apiVersion: "v1" - kind: "Endpoints" - metadata: meta - subsets: [{ - addresses: [{ip: parameter.ip}] - ports: [{port: parameter.targetPort}] - }] - }] @step(1) - - getPlacements: op.#GetPlacementsFromTopologyPolicies & { - policies: *[] | [...string] - if parameter.topology != _|_ { - policies: [parameter.topology] - } - } @step(2) - - apply: op.#Steps & { - for p in getPlacements.placements { - for o in objects { - "\(p.cluster)-\(o.kind)": op.#Apply & { - value: o - cluster: p.cluster - } - } - } - } @step(3) - - parameter: { - // +usage=Specify the name of the export destination - name?: string - // +usage=Specify the namespace of the export destination - namespace?: string - // +usage=Specify the ip to be export - ip: string - // +usage=Specify the port to be used in service - port: int - // +usage=Specify the port to be export - targetPort: int - // +usage=Specify the topology to export - topology?: string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/export2config.yaml b/charts/vela-minimal/templates/defwithtemplate/export2config.yaml deleted file mode 100644 index 1e4b3a668..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/export2config.yaml +++ /dev/null @@ -1,46 +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: - custom.definition.oam.dev/category: Resource Management - definition.oam.dev/description: Export data to specified Kubernetes ConfigMap in your workflow. - name: export2config - namespace: {{ include "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 - } - cluster: parameter.cluster - } - 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: {} - // +usage=Specify the cluster of the config map - cluster: *"" | string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/export2secret.yaml b/charts/vela-minimal/templates/defwithtemplate/export2secret.yaml deleted file mode 100644 index 225318703..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/export2secret.yaml +++ /dev/null @@ -1,78 +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: - custom.definition.oam.dev/category: Resource Management - definition.oam.dev/description: Export data to Kubernetes Secret in your workflow. - name: export2secret - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - "encoding/base64" - "encoding/json" - ) - - secret: op.#Steps & { - data: *parameter.data | {} - if parameter.kind == "docker-registry" && parameter.dockerRegistry != _|_ { - registryData: auths: "\(parameter.dockerRegistry.server)": { - username: parameter.dockerRegistry.username - password: parameter.dockerRegistry.password - auth: base64.Encode(null, "\(parameter.dockerRegistry.username):\(parameter.dockerRegistry.password)") - } - data: ".dockerconfigjson": json.Marshal(registryData) - } - apply: op.#Apply & { - value: { - apiVersion: "v1" - kind: "Secret" - if parameter.type == _|_ && parameter.kind == "docker-registry" { - type: "kubernetes.io/dockerconfigjson" - } - if parameter.type != _|_ { - type: parameter.type - } - metadata: { - name: parameter.secretName - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - if parameter.namespace == _|_ { - namespace: context.namespace - } - } - stringData: data - } - cluster: parameter.cluster - } - } - 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: {} - // +usage=Specify the cluster of the secret - cluster: *"" | string - // +usage=Specify the kind of the secret - kind: *"generic" | "docker-registry" - // +usage=Specify the docker data - dockerRegistry?: { - // +usage=Specify the username of the docker registry - username: string - // +usage=Specify the password of the docker registry - password: string - // +usage=Specify the server of the docker registry - server: *"https://index.docker.io/v1/" | string - } - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/expose.yaml b/charts/vela-minimal/templates/defwithtemplate/expose.yaml deleted file mode 100644 index f0ff4545d..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/expose.yaml +++ /dev/null @@ -1,125 +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: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - podDisruptive: false - schematic: - cue: - template: | - import ( - "strconv" - "strings" - ) - - outputs: service: { - apiVersion: "v1" - kind: "Service" - metadata: name: context.name - metadata: annotations: parameter.annotations - spec: { - if parameter["matchLabels"] == _|_ { - selector: "app.oam.dev/component": context.name - } - if parameter["matchLabels"] != _|_ { - selector: parameter["matchLabels"] - } - - // compatible with the old way - if parameter["port"] != _|_ if parameter["ports"] == _|_ { - ports: [ - for p in parameter.port { - name: "port-" + strconv.FormatInt(p, 10) - port: p - targetPort: p - }, - ] - } - if parameter["ports"] != _|_ { - ports: [ for v in parameter.ports { - port: v.port - targetPort: v.port - if v.name != _|_ { - name: v.name - } - if v.name == _|_ { - _name: "port-" + strconv.FormatInt(v.port, 10) - name: *_name | string - if v.protocol != "TCP" { - name: _name + "-" + strings.ToLower(v.protocol) - } - } - if v.nodePort != _|_ if parameter.type == "NodePort" { - nodePort: v.nodePort - } - if v.protocol != _|_ { - protocol: v.protocol - } - }, - ] - } - type: parameter.type - } - } - parameter: { - // +usage=Deprecated, the old way to specify the exposion ports - port?: [...int] - // +usage=Specify portsyou want customer traffic sent to - ports?: [...{ - // +usage=Number of port to expose on the pod's IP address - port: int - // +usage=Name of the port - name?: string - // +usage=Protocol for port. Must be UDP, TCP, or SCTP - protocol: *"TCP" | "UDP" | "SCTP" - // +usage=exposed node port. Only Valid when exposeType is NodePort - nodePort?: int - }] - // +usage=Specify the annotaions of the exposed service - annotations: [string]: string - matchLabels?: [string]: string - // +usage=Specify what kind of Service you want. options: "ClusterIP","NodePort","LoadBalancer","ExternalName" - type: *"ClusterIP" | "NodePort" | "LoadBalancer" | "ExternalName" - } - stage: PostDispatch - status: - customStatus: |- - message: *"" | string - service: context.outputs.service - if service.spec.type == "ClusterIP" { - message: "ClusterIP: \(service.spec.clusterIP)" - } - if service.spec.type == "LoadBalancer" { - status: service.status - isHealth: *false | bool - if status != _|_ if status.loadBalancer != _|_ if status.loadBalancer.ingress != _|_ if len(status.loadBalancer.ingress) > 0 if status.loadBalancer.ingress[0].ip != _|_ { - isHealth: true - } - if !isHealth { - message: "ExternalIP: Pending" - } - if isHealth { - message: "ExternalIP: \(status.loadBalancer.ingress[0].ip)" - } - } - healthPolicy: |- - service: context.outputs.service - if service.spec.type == "LoadBalancer" { - status: service.status - isHealth: *false | bool - if status != _|_ if status.loadBalancer != _|_ if status.loadBalancer.ingress != _|_ if len(status.loadBalancer.ingress) > 0 if status.loadBalancer.ingress[0].ip != _|_ { - isHealth: true - } - } - if service.spec.type != "LoadBalancer" { - isHealth: true - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/garbage-collect.yaml b/charts/vela-minimal/templates/defwithtemplate/garbage-collect.yaml deleted file mode 100644 index daeb91e9b..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/garbage-collect.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/garbage-collect.cue -apiVersion: core.oam.dev/v1beta1 -kind: PolicyDefinition -metadata: - annotations: - definition.oam.dev/description: Configure the garbage collect behaviour for the application. - name: garbage-collect - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - #GarbageCollectPolicyRule: { - // +usage=Specify how to select the targets of the rule - selector: [...#ResourcePolicyRuleSelector] - // +usage=Specify the strategy for target resource to recycle - strategy: *"onAppUpdate" | "onAppDelete" | "never" - } - - #ResourcePolicyRuleSelector: { - // +usage=Select resources by component names - componentNames?: [...string] - // +usage=Select resources by component types - componentTypes?: [...string] - // +usage=Select resources by oamTypes (COMPONENT or TRAIT) - oamTypes?: [...string] - // +usage=Select resources by trait types - traitTypes?: [...string] - // +usage=Select resources by resource types (like Deployment) - resourceTypes?: [...string] - // +usage=Select resources by their names - resourceNames?: [...string] - } - - parameter: { - // +usage=If is set, outdated versioned resourcetracker will not be recycled automatically, outdated resources will be kept until resourcetracker be deleted manually - keepLegacyResource: *false | bool - // +usage=If is set, continue to execute gc when the workflow fails, by default gc will be executed only after the workflow succeeds - continueOnFailure: *false | bool - // +usage=Specify the list of rules to control gc strategy at resource level, if one resource is controlled by multiple rules, first rule will be used - rules?: [...#GarbageCollectPolicyRule] - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/gateway.yaml b/charts/vela-minimal/templates/defwithtemplate/gateway.yaml deleted file mode 100644 index 238685321..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/gateway.yaml +++ /dev/null @@ -1,137 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/gateway.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: gateway - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - 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 - }, - ] - } - } - - legacyAPI: context.clusterVersion.minor < 19 - outputs: ingress: { - if legacyAPI { - apiVersion: "networking.k8s.io/v1beta1" - } - if !legacyAPI { - apiVersion: "networking.k8s.io/v1" - } - kind: "Ingress" - metadata: { - name: context.name - annotations: { - if !parameter.classInSpec { - "kubernetes.io/ingress.class": parameter.class - } - if parameter.gatewayHost != _|_ { - "ingress.controller/host": parameter.gatewayHost - } - } - } - spec: { - if parameter.classInSpec { - ingressClassName: parameter.class - } - if parameter.secretName != _|_ { - tls: [{ - hosts: [ - parameter.domain, - ] - secretName: parameter.secretName - }] - } - rules: [{ - if parameter.domain != _|_ { - host: parameter.domain - } - http: paths: [ - for k, v in parameter.http { - path: k - pathType: "ImplementationSpecific" - backend: { - if legacyAPI { - serviceName: context.name - servicePort: v - } - if !legacyAPI { - 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 - - // +usage=Set ingress class in '.spec.ingressClassName' instead of 'kubernetes.io/ingress.class' annotation. - classInSpec: *false | bool - - // +usage=Specify the secret name you want to quote to use tls. - secretName?: string - - // +usage=Specify the host of the ingress gateway, which is used to generate the endpoints when the host is empty. - gatewayHost?: string - } - status: - customStatus: |- - if context.outputs.ingress.status.loadBalancer.ingress == _|_ { - message: "No loadBalancer found, visiting by using 'vela port-forward " + context.appName + "'\n" - } - if context.outputs.ingress.status.loadBalancer.ingress != _|_ { - let igs = context.outputs.ingress.status.loadBalancer.ingress - let host = context.outputs.ingress.spec.rules[0].host - if igs[0].ip != _|_ { - if host != _|_ { - message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host + ", IP: " + igs[0].ip - } - if host == _|_ { - message: "Host not specified, visit the cluster or load balancer in front of the cluster with IP: " + igs[0].ip - } - } - if igs[0].ip == _|_ { - if host != _|_ { - message: "Visiting URL: " + context.outputs.ingress.spec.rules[0].host - } - if host == _|_ { - message: "Host not specified, visit the cluster or load balancer in front of the cluster" - } - } - } - healthPolicy: 'isHealth: len(context.outputs.service.spec.clusterIP) > 0' - diff --git a/charts/vela-minimal/templates/defwithtemplate/generate-jdbc-connection.yaml b/charts/vela-minimal/templates/defwithtemplate/generate-jdbc-connection.yaml deleted file mode 100644 index cd9551b4f..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/generate-jdbc-connection.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/generate-jdbc-connection.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Terraform - definition.oam.dev/description: Generate a JDBC connection based on Component of alibaba-rds - name: generate-jdbc-connection - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - "encoding/base64" - ) - - output: op.#Read & { - value: { - apiVersion: "v1" - kind: "Secret" - metadata: { - name: parameter.name - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - } - } - } - dbHost: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_HOST"])} - dbPort: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_PORT"])} - dbName: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_NAME"])} - username: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_USER"])} - password: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_PASSWORD"])} - - env: [ - {name: "url", value: "jdbc://" + dbHost.str + ":" + dbPort.str + "/" + dbName.str + "?characterEncoding=utf8&useSSL=false"}, - {name: "username", value: username.str}, - {name: "password", value: password.str}, - ] - - parameter: { - // +usage=Specify the name of the secret generated by database component - name: string - // +usage=Specify the namespace of the secret generated by database component - namespace?: string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/health.yaml b/charts/vela-minimal/templates/defwithtemplate/health.yaml deleted file mode 100644 index 74bc05421..000000000 --- a/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: {{ include "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/charts/vela-minimal/templates/defwithtemplate/hostalias.yaml b/charts/vela-minimal/templates/defwithtemplate/hostalias.yaml deleted file mode 100644 index 646d01211..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/hostalias.yaml +++ /dev/null @@ -1,31 +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: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - 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/charts/vela-minimal/templates/defwithtemplate/hpa.yaml b/charts/vela-minimal/templates/defwithtemplate/hpa.yaml deleted file mode 100644 index 67a4a3c13..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/hpa.yaml +++ /dev/null @@ -1,110 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/hpa.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Configure k8s HPA for Deployment or Statefulsets - name: hpa - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - podDisruptive: false - schematic: - cue: - template: | - outputs: hpa: { - if context.clusterVersion.minor < 23 { - apiVersion: "autoscaling/v2beta2" - } - if context.clusterVersion.minor >= 23 { - apiVersion: "autoscaling/v2" - } - kind: "HorizontalPodAutoscaler" - metadata: name: context.name - spec: { - scaleTargetRef: { - apiVersion: parameter.targetAPIVersion - kind: parameter.targetKind - name: context.name - } - minReplicas: parameter.min - maxReplicas: parameter.max - metrics: [ - { - type: "Resource" - resource: { - name: "cpu" - target: { - type: parameter.cpu.type - if parameter.cpu.type == "Utilization" { - averageUtilization: parameter.cpu.value - } - if parameter.cpu.type == "AverageValue" { - averageValue: parameter.cpu.value - } - } - } - }, - if parameter.mem != _|_ { - { - type: "Resource" - resource: { - name: "memory" - target: { - type: parameter.mem.type - if parameter.cpu.type == "Utilization" { - averageUtilization: parameter.cpu.value - } - if parameter.cpu.type == "AverageValue" { - averageValue: parameter.cpu.value - } - } - } - } - }, - if parameter.podCustomMetrics != _|_ for m in parameter.podCustomMetrics { - type: "Pods" - pods: { - metric: name: m.name - target: { - type: "AverageValue" - averageValue: m.value - } - } - }, - ] - } - } - 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 apiVersion of scale target - targetAPIVersion: *"apps/v1" | string - // +usage=Specify the kind of scale target - targetKind: *"Deployment" | string - cpu: { - // +usage=Specify resource metrics in terms of percentage("Utilization") or direct value("AverageValue") - type: *"Utilization" | "AverageValue" - // +usage=Specify the value of CPU utilization or averageValue - value: *50 | int - } - mem?: { - // +usage=Specify resource metrics in terms of percentage("Utilization") or direct value("AverageValue") - type: *"Utilization" | "AverageValue" - // +usage=Specify the value of MEM utilization or averageValue - value: *50 | int - } - // +usage=Specify custom metrics of pod type - podCustomMetrics?: [...{ - // +usage=Specify name of custom metrics - name: string - // +usage=Specify target value of custom metrics - value: string - }] - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/import-grafana-dashboard.yaml b/charts/vela-minimal/templates/defwithtemplate/import-grafana-dashboard.yaml deleted file mode 100644 index df92f54d6..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/import-grafana-dashboard.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/import-grafana-dashboard.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Import dashboards to Grafana - labels: - custom.definition.oam.dev/ui-hidden: "true" - name: import-grafana-dashboard - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: [] - conflictsWith: [] - podDisruptive: false - schematic: - cue: - template: | - outputs: registerdatasource: { - apiVersion: "grafana.extension.oam.dev/v1alpha1" - kind: "ImportDashboard" - spec: { - grafana: { - service: parameter.grafanaServiceName - namespace: parameter.grafanaServiceNamespace - credentialSecret: parameter.credentialSecret - credentialSecretNamespace: parameter.credentialSecretNamespace - } - urls: parameter.urls - } - } - parameter: { - grafanaServiceName: string - grafanaServiceNamespace: *"default" | string - credentialSecret: string - credentialSecretNamespace: *"default" | string - urls: [...string] - - } - workloadRefPath: "" - diff --git a/charts/vela-minimal/templates/defwithtemplate/ingress-1-20.yaml b/charts/vela-minimal/templates/defwithtemplate/ingress-1-20.yaml deleted file mode 100644 index 3336ce8ba..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/ingress-1-20.yaml +++ /dev/null @@ -1,78 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/deprecated/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+. - labels: - custom.definition.oam.dev/deprecated: "true" - name: ingress-1-20 - namespace: {{ include "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/charts/vela-minimal/templates/defwithtemplate/ingress.yaml b/charts/vela-minimal/templates/defwithtemplate/ingress.yaml deleted file mode 100644 index 8f228ea20..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/ingress.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/deprecated/ingress.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Enable public web traffic for the component. - labels: - custom.definition.oam.dev/deprecated: "true" - name: ingress - namespace: {{ include "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/charts/vela-minimal/templates/defwithtemplate/init-container.yaml b/charts/vela-minimal/templates/defwithtemplate/init-container.yaml deleted file mode 100644 index 123ee70db..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/init-container.yaml +++ /dev/null @@ -1,115 +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: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - podDisruptive: true - schematic: - cue: - template: | - patch: spec: template: spec: { - // +patchKey=name - containers: [{ - name: context.name - // +patchKey=name - volumeMounts: [{ - name: parameter.mountName - mountPath: parameter.appMountPath - }] - }] - // +patchKey=name - initContainers: [{ - name: parameter.name - image: parameter.image - imagePullPolicy: parameter.imagePullPolicy - if parameter.cmd != _|_ { - command: parameter.cmd - } - if parameter.args != _|_ { - args: parameter.args - } - if parameter["env"] != _|_ { - env: parameter.env - } - - // +patchKey=name - volumeMounts: [{ - name: parameter.mountName - mountPath: parameter.initMountPath - }] + parameter.extraVolumeMounts - }] - // +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 image pull policy for your service - imagePullPolicy: *"IfNotPresent" | "Always" | "Never" - - // +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 env run in the init container - 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 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 - - // +usage=Specify the extra volume mounts for the init container - extraVolumeMounts: [...{ - // +usage=The name of the volume to be mounted - name: string - // +usage=The mountPath for mount in the init container - mountPath: string - }] - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/json-merge-patch.yaml b/charts/vela-minimal/templates/defwithtemplate/json-merge-patch.yaml deleted file mode 100644 index 066e85d9d..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/json-merge-patch.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/json-merge-patch.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Patch the output following Json Merge Patch strategy, following RFC 7396. - labels: - custom.definition.oam.dev/ui-hidden: "true" - name: json-merge-patch - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - parameter: {...} - // +patchStrategy=jsonMergePatch - patch: parameter - diff --git a/charts/vela-minimal/templates/defwithtemplate/json-patch.yaml b/charts/vela-minimal/templates/defwithtemplate/json-patch.yaml deleted file mode 100644 index 973d8caab..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/json-patch.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/json-patch.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Patch the output following Json Patch strategy, following RFC 6902. - labels: - custom.definition.oam.dev/ui-hidden: "true" - name: json-patch - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - parameter: operations: [...{...}] - // +patchStrategy=jsonPatch - patch: parameter - diff --git a/charts/vela-minimal/templates/defwithtemplate/k8s-objects.yaml b/charts/vela-minimal/templates/defwithtemplate/k8s-objects.yaml deleted file mode 100644 index 49bf1e9a6..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/k8s-objects.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/k8s-objects.cue -apiVersion: core.oam.dev/v1beta1 -kind: ComponentDefinition -metadata: - annotations: - definition.oam.dev/description: K8s-objects allow users to specify raw K8s objects in properties - name: k8s-objects - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - output: parameter.objects[0] - - outputs: { - for i, v in parameter.objects { - if i > 0 { - "objects-\(i)": v - } - } - } - parameter: objects: [...{}] - workload: - type: autodetects.core.oam.dev - diff --git a/charts/vela-minimal/templates/defwithtemplate/k8s-update-strategy.yaml b/charts/vela-minimal/templates/defwithtemplate/k8s-update-strategy.yaml deleted file mode 100644 index 3558e9b01..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/k8s-update-strategy.yaml +++ /dev/null @@ -1,77 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/k8s-update-strategy.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/alias: "" - definition.oam.dev/description: Set k8s update strategy for Deployment/DaemonSet/StatefulSet - name: k8s-update-strategy - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - conflictsWith: [] - podDisruptive: false - schematic: - cue: - template: | - patch: spec: { - if parameter.targetKind == "Deployment" && parameter.strategy.type != "OnDelete" { - // +patchStrategy=retainKeys - strategy: { - type: parameter.strategy.type - if parameter.strategy.type == "RollingUpdate" { - rollingUpdate: { - maxSurge: parameter.strategy.rollingStrategy.maxSurge - maxUnavailable: parameter.strategy.rollingStrategy.maxUnavailable - } - } - } - } - - if parameter.targetKind == "StatefulSet" && parameter.strategy.type != "Recreate" { - // +patchStrategy=retainKeys - updateStrategy: { - type: parameter.strategy.type - if parameter.strategy.type == "RollingUpdate" { - rollingUpdate: partition: parameter.strategy.rollingStrategy.partition - } - } - } - - if parameter.targetKind == "DaemonSet" && parameter.strategy.type != "Recreate" { - // +patchStrategy=retainKeys - updateStrategy: { - type: parameter.strategy.type - if parameter.strategy.type == "RollingUpdate" { - rollingUpdate: { - maxSurge: parameter.strategy.rollingStrategy.maxSurge - maxUnavailable: parameter.strategy.rollingStrategy.maxUnavailable - } - } - } - } - - } - parameter: { - // +usage=Specify the apiVersion of target - targetAPIVersion: *"apps/v1" | string - // +usage=Specify the kind of target - targetKind: *"Deployment" | "StatefulSet" | "DaemonSet" - // +usage=Specify the strategy of update - strategy: { - // +usage=Specify the strategy type - type: *"RollingUpdate" | "Recreate" | "OnDelete" - // +usage=Specify the parameters of rollong update strategy - rollingStrategy?: { - maxSurge: *"25%" | string - maxUnavailable: *"25%" | string - partition: *0 | int - } - } - } - workloadRefPath: "" - diff --git a/charts/vela-minimal/templates/defwithtemplate/labels.yaml b/charts/vela-minimal/templates/defwithtemplate/labels.yaml deleted file mode 100644 index 9983fe985..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/labels.yaml +++ /dev/null @@ -1,33 +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 your workload. if it generates pod, add same label for generated pods. - name: labels - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - // +patchStrategy=jsonMergePatch - patch: { - metadata: labels: { - for k, v in parameter { - (k): v - } - } - if context.output.spec != _|_ && context.output.spec.template != _|_ { - spec: template: metadata: labels: { - for k, v in parameter { - (k): v - } - } - } - } - parameter: [string]: string | null - diff --git a/charts/vela-minimal/templates/defwithtemplate/lifecycle.yaml b/charts/vela-minimal/templates/defwithtemplate/lifecycle.yaml deleted file mode 100644 index f0e6f0067..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/lifecycle.yaml +++ /dev/null @@ -1,52 +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 every container of K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: lifecycle - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - 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/charts/vela-minimal/templates/defwithtemplate/list-config.yaml b/charts/vela-minimal/templates/defwithtemplate/list-config.yaml deleted file mode 100644 index 0102c1815..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/list-config.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/list-config.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Config Management - definition.oam.dev/description: List the configs - name: list-config - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - output: op.#ListConfig & { - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - if parameter.namespace == _|_ { - namespace: context.namespace - } - template: parameter.template - } - parameter: { - //+usage=Specify the template of the config. - template: string - //+usage=Specify the namespace of the config. - namespace?: string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/nocalhost.yaml b/charts/vela-minimal/templates/defwithtemplate/nocalhost.yaml deleted file mode 100644 index cef31b7cc..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/nocalhost.yaml +++ /dev/null @@ -1,159 +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. - labels: - custom.definition.oam.dev/ui-hidden: "true" - name: nocalhost - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - podDisruptive: true - schematic: - cue: - template: | - import ( - "encoding/json" - ) - - outputs: nocalhostService: { - apiVersion: "v1" - kind: "Service" - metadata: name: context.name - spec: { - selector: "app.oam.dev/component": context.name - ports: [ - { - port: parameter.port - targetPort: parameter.port - }, - ] - type: "ClusterIP" - } - } - - patch: metadata: annotations: { - "dev.nocalhost/application-name": context.appName - "dev.nocalhost/application-namespace": context.namespace - "dev.nocalhost": json.Marshal({ - name: context.name - serviceType: parameter.serviceType - containers: [ - { - name: context.name - dev: { - if parameter.gitUrl != _|_ { - gitUrl: parameter.gitUrl - } - if parameter.image == "go" { - image: "nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:latest" - } - if parameter.image == "java" { - image: "nocalhost-docker.pkg.coding.net/nocalhost/dev-images/java:latest" - } - if parameter.image == "python" { - image: "nocalhost-docker.pkg.coding.net/nocalhost/dev-images/python:latest" - } - if parameter.image == "node" { - image: "nocalhost-docker.pkg.coding.net/nocalhost/dev-images/node:latest" - } - if parameter.image == "ruby" { - image: "nocalhost-docker.pkg.coding.net/nocalhost/dev-images/ruby:latest" - } - if parameter.image != "go" && parameter.image != "java" && parameter.image != "python" && parameter.image != "node" && parameter.image != "ruby" { - 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 - } - if parameter.portForward == _|_ { - portForward: ["\(parameter.port):\(parameter.port)"] - } - } - }, - ] - }) - } - language: "go" | "java" | "python" | "node" | "ruby" - parameter: { - port: int - serviceType: *"deployment" | string - gitUrl?: string - image: language | string - shell: *"bash" | string - workDir: *"/home/nocalhost-dev" | string - storageClass?: string - command: { - run: *["sh", "run.sh"] | [...string] - debug: *["sh", "debug.sh"] | [...string] - } - debug?: remoteDebugPort?: int - hotReload: *true | bool - sync: { - type: *"send" | string - filePattern: *["./"] | [...string] - ignoreFilePattern: *[".git", ".vscode", ".idea", ".gradle", "build"] | [...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/charts/vela-minimal/templates/defwithtemplate/node-affinity.yaml b/charts/vela-minimal/templates/defwithtemplate/node-affinity.yaml deleted file mode 100644 index 537923172..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/node-affinity.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/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'. - labels: - custom.definition.oam.dev/ui-hidden: "true" - name: node-affinity - namespace: {{ include "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/charts/vela-minimal/templates/defwithtemplate/notification.yaml b/charts/vela-minimal/templates/defwithtemplate/notification.yaml deleted file mode 100644 index 9e70c1b51..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/notification.yaml +++ /dev/null @@ -1,346 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/notification.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: External Integration - definition.oam.dev/description: Send notifications to Email, DingTalk, Slack, Lark or webhook in your workflow. - name: notification - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - "encoding/base64" - ) - - parameter: { - // +usage=Please fulfill its url and message if you want to send Lark messages - lark?: { - // +usage=Specify the the lark url, you can either sepcify it in value or use secretRef - url: close({ - // +usage=the url address content in string - value: string - }) | close({ - secretRef: { - // +usage=name is the name of the secret - name: string - // +usage=key is the key in the secret - key: string - } - }) - // +usage=Specify the message that you want to sent, refer to [Lark messaging](https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN#8b0f2a1b). - message: { - // +usage=msg_type can be text, post, image, interactive, share_chat, share_user, audio, media, file, sticker - msg_type: string - // +usage=content should be json encode string - content: string - } - } - // +usage=Please fulfill its url and message if you want to send DingTalk messages - dingding?: { - // +usage=Specify the the dingding url, you can either sepcify it in value or use secretRef - url: close({ - // +usage=the url address content in string - value: string - }) | close({ - secretRef: { - // +usage=name is the name of the secret - name: string - // +usage=key is the key in the secret - key: string - } - }) - // +usage=Specify the message that you want to sent, refer to [dingtalk messaging](https://developers.dingtalk.com/document/robots/custom-robot-access/title-72m-8ag-pqw) - message: { - // +usage=Specify the message content of dingtalk notification - text?: close({ - content: string - }) - // +usage=msgType can be text, link, mardown, actionCard, feedCard - msgtype: *"text" | "link" | "markdown" | "actionCard" | "feedCard" - #link: { - text?: string - title?: string - messageUrl?: string - picUrl?: string - } - - link?: #link - markdown?: close({ - text: string - title: string - }) - at?: close({ - atMobiles?: [...string] - isAtAll?: bool - }) - actionCard?: close({ - text: string - title: string - hideAvatar: string - btnOrientation: string - singleTitle: string - singleURL: string - btns?: [...close({ - title: string - actionURL: string - })] - }) - feedCard?: close({ - links: [...#link] - }) - } - } - // +usage=Please fulfill its url and message if you want to send Slack messages - slack?: { - // +usage=Specify the the slack url, you can either sepcify it in value or use secretRef - url: close({ - // +usage=the url address content in string - value: string - }) | close({ - secretRef: { - // +usage=name is the name of the secret - name: string - // +usage=key is the key in the secret - key: string - } - }) - // +usage=Specify the message that you want to sent, refer to [slack messaging](https://api.slack.com/reference/messaging/payload) - message: { - // +usage=Specify the message text for slack notification - text: string - blocks?: [...block] - attachments?: close({ - blocks?: [...block] - color?: string - }) - thread_ts?: string - // +usage=Specify the message text format in markdown for slack notification - mrkdwn?: *true | bool - } - } - // +usage=Please fulfill its from, to and content if you want to send email - email?: { - // +usage=Specify the email info that you want to send from - from: { - // +usage=Specify the email address that you want to send from - address: string - // +usage=The alias is the email alias to show after sending the email - alias?: string - // +usage=Specify the password of the email, you can either sepcify it in value or use secretRef - password: close({ - // +usage=the password content in string - value: string - }) | close({ - secretRef: { - // +usage=name is the name of the secret - name: string - // +usage=key is the key in the secret - key: string - } - }) - // +usage=Specify the host of your email - host: string - // +usage=Specify the port of the email host, default to 587 - port: *587 | int - } - // +usage=Specify the email address that you want to send to - to: [...string] - // +usage=Specify the content of the email - content: { - // +usage=Specify the subject of the email - subject: string - // +usage=Specify the context body of the email - body: string - } - } - } - - 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.value != _|_ { - ding1: op.#DingTalk & { - message: parameter.dingding.message - dingUrl: parameter.dingding.url.value - } - } - if parameter.dingding.url.secretRef != _|_ && parameter.dingding.url.value == _|_ { - read: op.#Read & { - value: { - apiVersion: "v1" - kind: "Secret" - metadata: { - name: parameter.dingding.url.secretRef.name - namespace: context.namespace - } - } - } - - stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.dingding.url.secretRef.key])} - ding2: op.#DingTalk & { - message: parameter.dingding.message - dingUrl: stringValue.str - } - } - } - } - - lark: op.#Steps & { - if parameter.lark != _|_ { - if parameter.lark.url.value != _|_ { - lark1: op.#Lark & { - message: parameter.lark.message - larkUrl: parameter.lark.url.value - } - } - if parameter.lark.url.secretRef != _|_ && parameter.lark.url.value == _|_ { - read: op.#Read & { - value: { - apiVersion: "v1" - kind: "Secret" - metadata: { - name: parameter.lark.url.secretRef.name - namespace: context.namespace - } - } - } - - stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.lark.url.secretRef.key])} - lark2: op.#Lark & { - message: parameter.lark.message - larkUrl: stringValue.str - } - } - } - } - - slack: op.#Steps & { - if parameter.slack != _|_ { - if parameter.slack.url.value != _|_ { - slack1: op.#Slack & { - message: parameter.slack.message - slackUrl: parameter.slack.url.value - } - } - if parameter.slack.url.secretRef != _|_ && parameter.slack.url.value == _|_ { - read: op.#Read & { - value: { - kind: "Secret" - apiVersion: "v1" - metadata: { - name: parameter.slack.url.secretRef.name - namespace: context.namespace - } - } - } - - stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.slack.url.secretRef.key])} - slack2: op.#Slack & { - message: parameter.slack.message - slackUrl: stringValue.str - } - } - } - } - - email: op.#Steps & { - if parameter.email != _|_ { - if parameter.email.from.password.value != _|_ { - email1: op.#SendEmail & { - from: { - address: parameter.email.from.address - if parameter.email.from.alias != _|_ { - alias: parameter.email.from.alias - } - password: parameter.email.from.password.value - host: parameter.email.from.host - port: parameter.email.from.port - } - to: parameter.email.to - content: parameter.email.content - } - } - - if parameter.email.from.password.secretRef != _|_ && parameter.email.from.password.value == _|_ { - read: op.#Read & { - value: { - kind: "Secret" - apiVersion: "v1" - metadata: { - name: parameter.email.from.password.secretRef.name - namespace: context.namespace - } - } - } - - stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.email.from.password.secretRef.key])} - email2: op.#SendEmail & { - from: { - address: parameter.email.from.address - if parameter.email.from.alias != _|_ { - alias: parameter.email.from.alias - } - password: stringValue.str - host: parameter.email.from.host - port: parameter.email.from.port - } - to: parameter.email.to - content: parameter.email.content - } - } - } - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/override.yaml b/charts/vela-minimal/templates/defwithtemplate/override.yaml deleted file mode 100644 index 0720011cb..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/override.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/override.cue -apiVersion: core.oam.dev/v1beta1 -kind: PolicyDefinition -metadata: - annotations: - definition.oam.dev/description: Describe the configuration to override when deploying resources, it only works with specified `deploy` step in workflow. - name: override - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - #PatchParams: { - // +usage=Specify the name of the patch component, if empty, all components will be merged - name?: string - // +usage=Specify the type of the patch component. - type?: string - // +usage=Specify the properties to override. - properties?: {...} - // +usage=Specify the traits to override. - traits?: [...{ - // +usage=Specify the type of the trait to be patched. - type: string - // +usage=Specify the properties to override. - properties?: {...} - // +usage=Specify if the trait should be remove, default false - disable: *false | bool - }] - } - - parameter: { - // +usage=Specify the overridden component configuration. - components: [...#PatchParams] - // +usage=Specify a list of component names to use, if empty, all components will be selected. - selector?: [...string] - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/patch.yaml b/charts/vela-minimal/templates/defwithtemplate/patch.yaml deleted file mode 100644 index c37f2f9be..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/patch.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/patch.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Patch the output directly. - name: patch - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - '*' - podDisruptive: true - schematic: - cue: - template: | - parameter: {...} - // +patchStrategy=open - patch: parameter - diff --git a/charts/vela-minimal/templates/defwithtemplate/print-message-in-status.yaml b/charts/vela-minimal/templates/defwithtemplate/print-message-in-status.yaml deleted file mode 100644 index 0b10b988d..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/print-message-in-status.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/print-message-in-status.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Process Control - definition.oam.dev/description: print message in workflow step status - name: print-message-in-status - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - parameter: message: string - - msg: op.#Message & { - message: parameter.message - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/pure-ingress.yaml b/charts/vela-minimal/templates/defwithtemplate/pure-ingress.yaml deleted file mode 100644 index 55f680b34..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/pure-ingress.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/pure-ingress.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Enable public web traffic for the component without creating a Service. - labels: - custom.definition.oam.dev/deprecated: "true" - custom.definition.oam.dev/ui-hidden: "true" - name: pure-ingress - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - '*' - conflictsWith: [] - podDisruptive: false - schematic: - cue: - template: | - 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 + " --route'\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 - } - } - workloadRefPath: "" - diff --git a/charts/vela-minimal/templates/defwithtemplate/pvc.yaml b/charts/vela-minimal/templates/defwithtemplate/pvc.yaml deleted file mode 100644 index 79b240af5..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/pvc.yaml +++ /dev/null @@ -1,122 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/deprecated/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. This definition is DEPRECATED, please specify pvc in 'storage' instead. - labels: - custom.definition.oam.dev/deprecated: "true" - name: pvc - namespace: {{ include "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/charts/vela-minimal/templates/defwithtemplate/raw.yaml b/charts/vela-minimal/templates/defwithtemplate/raw.yaml deleted file mode 100644 index 729cd0bf4..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/raw.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/deprecated/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. This definition is DEPRECATED, please use 'k8s-objects' instead. - labels: - custom.definition.oam.dev/deprecated: "true" - name: raw - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - output: parameter - parameter: {} - workload: - type: autodetects.core.oam.dev - diff --git a/charts/vela-minimal/templates/defwithtemplate/read-config.yaml b/charts/vela-minimal/templates/defwithtemplate/read-config.yaml deleted file mode 100644 index c89818a1a..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/read-config.yaml +++ /dev/null @@ -1,35 +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-config.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Config Management - definition.oam.dev/description: Read a config - name: read-config - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - output: op.#ReadConfig & { - name: parameter.name - if parameter.namespace != _|_ { - namespace: parameter.namespace - } - if parameter.namespace == _|_ { - namespace: context.namespace - } - } - parameter: { - //+usage=Specify the name of the config. - name: string - - //+usage=Specify the namespace of the config. - namespace?: string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/read-object.yaml b/charts/vela-minimal/templates/defwithtemplate/read-object.yaml deleted file mode 100644 index 0f980a949..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/read-object.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/read-object.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Resource Management - definition.oam.dev/description: Read Kubernetes objects from cluster for your workflow steps - name: read-object - namespace: {{ include "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=The namespace of the resource you want to read - namespace?: *"default" | string - // +usage=The cluster you want to apply the resource to, default is the current control plane cluster - cluster: *"" | string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/read-only.yaml b/charts/vela-minimal/templates/defwithtemplate/read-only.yaml deleted file mode 100644 index 0180276bd..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/read-only.yaml +++ /dev/null @@ -1,40 +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-only.cue -apiVersion: core.oam.dev/v1beta1 -kind: PolicyDefinition -metadata: - annotations: - definition.oam.dev/description: Configure the resources to be read-only in the application (no update / state-keep). - name: read-only - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - #PolicyRule: { - // +usage=Specify how to select the targets of the rule - selector: #RuleSelector - } - - #RuleSelector: { - // +usage=Select resources by component names - componentNames?: [...string] - // +usage=Select resources by component types - componentTypes?: [...string] - // +usage=Select resources by oamTypes (COMPONENT or TRAIT) - oamTypes?: [...string] - // +usage=Select resources by trait types - traitTypes?: [...string] - // +usage=Select resources by resource types (like Deployment) - resourceTypes?: [...string] - // +usage=Select resources by their names - resourceNames?: [...string] - } - - parameter: { - // +usage=Specify the list of rules to control read only strategy at resource level. - // The selected resource will be read-only to the current application. If the target resource does - // not exist, error will be raised. - rules?: [...#PolicyRule] - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/ref-objects.yaml b/charts/vela-minimal/templates/defwithtemplate/ref-objects.yaml deleted file mode 100644 index a9ba90708..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/ref-objects.yaml +++ /dev/null @@ -1,95 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/ref-objects.cue -apiVersion: core.oam.dev/v1beta1 -kind: ComponentDefinition -metadata: - annotations: - definition.oam.dev/description: Ref-objects allow users to specify ref objects to use. Notice that this component type have special handle logic. - labels: - custom.definition.oam.dev/ui-hidden: "true" - name: ref-objects - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - #K8sObject: { - // +usage=The resource type for the Kubernetes objects - resource?: string - // +usage=The group name for the Kubernetes objects - group?: string - // +usage=If specified, fetch the Kubernetes objects with the name, exclusive to labelSelector - name?: string - // +usage=If specified, fetch the Kubernetes objects from the namespace. Otherwise, fetch from the application's namespace. - namespace?: string - // +usage=If specified, fetch the Kubernetes objects from the cluster. Otherwise, fetch from the local cluster. - cluster?: string - // +usage=If specified, fetch the Kubernetes objects according to the label selector, exclusive to name - labelSelector?: [string]: string - ... - } - - output: { - if len(parameter.objects) > 0 { - parameter.objects[0] - } - ... - } - - outputs: { - for i, v in parameter.objects { - if i > 0 { - "objects-\(i)": v - } - } - } - parameter: { - // +usage=If specified, application will fetch native Kubernetes objects according to the object description - objects?: [...#K8sObject] - // +usage=If specified, the objects in the urls will be loaded. - urls?: [...string] - } - status: - customStatus: |- - if context.output.apiVersion == "apps/v1" && context.output.kind == "Deployment" { - ready: { - readyReplicas: *0 | int - } & { - if context.output.status.readyReplicas != _|_ { - readyReplicas: context.output.status.readyReplicas - } - } - message: "Ready:\(ready.readyReplicas)/\(context.output.spec.replicas)" - } - if context.output.apiVersion != "apps/v1" || context.output.kind != "Deployment" { - message: "" - } - healthPolicy: |- - if context.output.apiVersion == "apps/v1" && context.output.kind == "Deployment" { - ready: { - updatedReplicas: *0 | int - readyReplicas: *0 | int - replicas: *0 | int - observedGeneration: *0 | int - } & { - if context.output.status.updatedReplicas != _|_ { - updatedReplicas: context.output.status.updatedReplicas - } - if context.output.status.readyReplicas != _|_ { - readyReplicas: context.output.status.readyReplicas - } - if context.output.status.replicas != _|_ { - replicas: context.output.status.replicas - } - if context.output.status.observedGeneration != _|_ { - observedGeneration: context.output.status.observedGeneration - } - } - isHealth: (context.output.spec.replicas == ready.readyReplicas) && (context.output.spec.replicas == ready.updatedReplicas) && (context.output.spec.replicas == ready.replicas) && (ready.observedGeneration == context.output.metadata.generation || ready.observedGeneration > context.output.metadata.generation) - } - if context.output.apiVersion != "apps/v1" || context.output.kind != "Deployment" { - isHealth: true - } - workload: - type: autodetects.core.oam.dev - diff --git a/charts/vela-minimal/templates/defwithtemplate/register-grafana-datasource.yaml b/charts/vela-minimal/templates/defwithtemplate/register-grafana-datasource.yaml deleted file mode 100644 index c67e2815b..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/register-grafana-datasource.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/register-grafana-datasource.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add a datasource to Grafana - labels: - custom.definition.oam.dev/deprecated: "true" - custom.definition.oam.dev/ui-hidden: "true" - name: register-grafana-datasource - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: [] - conflictsWith: [] - podDisruptive: false - schematic: - cue: - template: | - outputs: registerdatasource: { - apiVersion: "grafana.extension.oam.dev/v1alpha1" - kind: "DatasourceRegistration" - spec: { - grafana: { - service: parameter.grafanaServiceName - namespace: parameter.grafanaServiceNamespace - credentialSecret: parameter.credentialSecret - credentialSecretNamespace: parameter.credentialSecretNamespace - } - datasource: { - name: parameter.name - type: parameter.type - access: parameter.access - service: parameter.service - namespace: parameter.namespace - } - } - } - parameter: { - grafanaServiceName: string - grafanaServiceNamespace: *"default" | string - credentialSecret: string - credentialSecretNamespace: string - name: string - type: string - access: *"proxy" | string - service: string - namespace: *"default" | string - } - workloadRefPath: "" - diff --git a/charts/vela-minimal/templates/defwithtemplate/replication.yaml b/charts/vela-minimal/templates/defwithtemplate/replication.yaml deleted file mode 100644 index 42cc562bc..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/replication.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/replication.cue -apiVersion: core.oam.dev/v1beta1 -kind: PolicyDefinition -metadata: - annotations: - definition.oam.dev/description: Describe the configuration to replicate components when deploying resources, it only works with specified `deploy` step in workflow. - name: replication - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - parameter: { - // +usage=Spicify the keys of replication. Every key coresponds to a replication components - keys: [...string] - // +usage=Specify the components which will be replicated. - selector?: [...string] - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/request.yaml b/charts/vela-minimal/templates/defwithtemplate/request.yaml deleted file mode 100644 index 634e32294..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/request.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/request.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: External Intergration - definition.oam.dev/alias: "" - definition.oam.dev/description: Send request to the url - name: request - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - "encoding/json" - ) - - http: op.#HTTPDo & { - method: parameter.method - url: parameter.url - request: { - if parameter.body != _|_ { - body: json.Marshal(parameter.body) - } - if parameter.header != _|_ { - header: parameter.header - } - } - } - fail: op.#Steps & { - if http.response.statusCode > 400 { - requestFail: op.#Fail & { - message: "request of \(parameter.url) is fail: \(http.response.statusCode)" - } - } - } - response: json.Unmarshal(http.response.body) - parameter: { - url: string - method: *"GET" | "POST" | "PUT" | "DELETE" - body?: {...} - header?: [string]: string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/resource.yaml b/charts/vela-minimal/templates/defwithtemplate/resource.yaml deleted file mode 100644 index 5febcf1a0..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/resource.yaml +++ /dev/null @@ -1,75 +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: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - podDisruptive: true - schematic: - cue: - template: | - patch: spec: template: spec: { - // +patchKey=name - containers: [{ - 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 - } - } - } - }] - } - - parameter: { - // +usage=Specify the amount of cpu for requests and limits - cpu?: *1 | number | string - // +usage=Specify the amount of memory for requests and limits - memory?: *"2048Mi" | =~"^([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: *1 | number | string - // +usage=Specify the amount of memory for requests - memory: *"2048Mi" | =~"^([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: *1 | number | string - // +usage=Specify the amount of memory for limits - memory: *"2048Mi" | =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$" - } - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/scaler.yaml b/charts/vela-minimal/templates/defwithtemplate/scaler.yaml deleted file mode 100644 index 5d7aefe90..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/scaler.yaml +++ /dev/null @@ -1,24 +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: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - podDisruptive: false - schematic: - cue: - template: | - parameter: { - // +usage=Specify the number of workload - replicas: *1 | int - } - // +patchStrategy=retainKeys - patch: spec: replicas: parameter.replicas - diff --git a/charts/vela-minimal/templates/defwithtemplate/service-account.yaml b/charts/vela-minimal/templates/defwithtemplate/service-account.yaml deleted file mode 100644 index 5ccc5adec..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/service-account.yaml +++ /dev/null @@ -1,131 +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-account.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Specify serviceAccount for your workload which follows the pod spec in path 'spec.template'. - name: service-account - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - podDisruptive: false - schematic: - cue: - template: | - #Privileges: { - // +usage=Specify the verbs to be allowed for the resource - verbs: [...string] - // +usage=Specify the apiGroups of the resource - apiGroups?: [...string] - // +usage=Specify the resources to be allowed - resources?: [...string] - // +usage=Specify the resourceNames to be allowed - resourceNames?: [...string] - // +usage=Specify the resource url to be allowed - nonResourceURLs?: [...string] - // +usage=Specify the scope of the privileges, default to be namespace scope - scope: *"namespace" | "cluster" - } - parameter: { - // +usage=Specify the name of ServiceAccount - name: string - // +usage=Specify whether to create new ServiceAccount or not - create: *false | bool - // +usage=Specify the privileges of the ServiceAccount, if not empty, RoleBindings(ClusterRoleBindings) will be created - privileges?: [...#Privileges] - } - // +patchStrategy=retainKeys - patch: spec: template: spec: serviceAccountName: parameter.name - - _clusterPrivileges: [ if parameter.privileges != _|_ for p in parameter.privileges if p.scope == "cluster" {p}] - _namespacePrivileges: [ if parameter.privileges != _|_ for p in parameter.privileges if p.scope == "namespace" {p}] - outputs: { - if parameter.create { - "service-account": { - apiVersion: "v1" - kind: "ServiceAccount" - metadata: name: parameter.name - } - } - if parameter.privileges != _|_ { - if len(_clusterPrivileges) > 0 { - "cluster-role": { - apiVersion: "rbac.authorization.k8s.io/v1" - kind: "ClusterRole" - metadata: name: "\(context.namespace):\(parameter.name)" - rules: [ for p in _clusterPrivileges { - verbs: p.verbs - if p.apiGroups != _|_ { - apiGroups: p.apiGroups - } - if p.resources != _|_ { - resources: p.resources - } - if p.resourceNames != _|_ { - resourceNames: p.resourceNames - } - if p.nonResourceURLs != _|_ { - nonResourceURLs: p.nonResourceURLs - } - }] - } - "cluster-role-binding": { - apiVersion: "rbac.authorization.k8s.io/v1" - kind: "ClusterRoleBinding" - metadata: name: "\(context.namespace):\(parameter.name)" - roleRef: { - apiGroup: "rbac.authorization.k8s.io" - kind: "ClusterRole" - name: "\(context.namespace):\(parameter.name)" - } - subjects: [{ - kind: "ServiceAccount" - name: parameter.name - namespace: (context.namespace) - }] - } - } - if len(_namespacePrivileges) > 0 { - role: { - apiVersion: "rbac.authorization.k8s.io/v1" - kind: "Role" - metadata: name: parameter.name - rules: [ for p in _namespacePrivileges { - verbs: p.verbs - if p.apiGroups != _|_ { - apiGroups: p.apiGroups - } - if p.resources != _|_ { - resources: p.resources - } - if p.resourceNames != _|_ { - resourceNames: p.resourceNames - } - if p.nonResourceURLs != _|_ { - nonResourceURLs: p.nonResourceURLs - } - }] - } - "role-binding": { - apiVersion: "rbac.authorization.k8s.io/v1" - kind: "RoleBinding" - metadata: name: parameter.name - roleRef: { - apiGroup: "rbac.authorization.k8s.io" - kind: "Role" - name: parameter.name - } - subjects: [{ - kind: "ServiceAccount" - name: parameter.name - }] - } - } - } - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/service-binding.yaml b/charts/vela-minimal/templates/defwithtemplate/service-binding.yaml deleted file mode 100644 index 08db2c9f6..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/service-binding.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/service-binding.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Binding secrets of cloud resources to component env. This definition is DEPRECATED, please use 'storage' instead. - labels: - custom.definition.oam.dev/ui-hidden: "true" - name: service-binding - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - 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/charts/vela-minimal/templates/defwithtemplate/share-cloud-resource.yaml b/charts/vela-minimal/templates/defwithtemplate/share-cloud-resource.yaml deleted file mode 100644 index 120a53076..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/share-cloud-resource.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/share-cloud-resource.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Application Delivery - definition.oam.dev/description: Sync secrets created by terraform component to runtime clusters so that runtime clusters can share the created cloud resource. - labels: - custom.definition.oam.dev/scope: Application - name: share-cloud-resource - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - app: op.#ShareCloudResource & { - env: parameter.env - policy: parameter.policy - placements: parameter.placements - // context.namespace indicates the namespace of the app - namespace: context.namespace - // context.namespace indicates the name of the app - name: context.name - } - - parameter: { - // +usage=Declare the location to bind - placements: [...{ - namespace?: string - cluster?: string - }] - // +usage=Declare the name of the env-binding policy, if empty, the first env-binding policy will be used - policy: *"" | string - // +usage=Declare the name of the env in policy - env: string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/shared-resource.yaml b/charts/vela-minimal/templates/defwithtemplate/shared-resource.yaml deleted file mode 100644 index 5f5ff1c52..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/shared-resource.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/shared-resource.cue -apiVersion: core.oam.dev/v1beta1 -kind: PolicyDefinition -metadata: - annotations: - definition.oam.dev/description: Configure the resources to be sharable across applications. - name: shared-resource - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - #SharedResourcePolicyRule: { - // +usage=Specify how to select the targets of the rule - selector: [...#ResourcePolicyRuleSelector] - } - - #ResourcePolicyRuleSelector: { - // +usage=Select resources by component names - componentNames?: [...string] - // +usage=Select resources by component types - componentTypes?: [...string] - // +usage=Select resources by oamTypes (COMPONENT or TRAIT) - oamTypes?: [...string] - // +usage=Select resources by trait types - traitTypes?: [...string] - // +usage=Select resources by resource types (like Deployment) - resourceTypes?: [...string] - // +usage=Select resources by their names - resourceNames?: [...string] - } - - parameter: { - // +usage=Specify the list of rules to control shared-resource strategy at resource level. - // The selected resource will be sharable across applications. (That means multiple applications - // can all read it without conflict, but only the first one can write it) - rules?: [...#SharedResourcePolicyRule] - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml b/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml deleted file mode 100644 index 0fc0f083b..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml +++ /dev/null @@ -1,148 +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: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - 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["env"] != _|_ { - env: parameter.env - } - if parameter["volumes"] != _|_ { - volumeMounts: [ for v in parameter.volumes { - { - mountPath: v.path - name: v.name - } - }] - } - if parameter["livenessProbe"] != _|_ { - livenessProbe: parameter.livenessProbe - } - - if parameter["readinessProbe"] != _|_ { - readinessProbe: parameter.readinessProbe - } - }] - } - 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 env in the sidecar - 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 the field reference for env - fieldRef?: { - // +usage=Specify the field path for env - fieldPath: string - } - } - }] - - // +usage=Specify the shared volume path - volumes?: [...{ - name: string - path: 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/charts/vela-minimal/templates/defwithtemplate/startup-probe.yaml b/charts/vela-minimal/templates/defwithtemplate/startup-probe.yaml deleted file mode 100644 index 488ddfd87..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/startup-probe.yaml +++ /dev/null @@ -1,171 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/startup-probe.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add startup probe hooks for the specified container of K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: startup-probe - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - podDisruptive: true - schematic: - cue: - template: | - #StartupProbeParams: { - // +usage=Specify the name of the target container, if not set, use the component name - containerName: *"" | string - // +usage=Number of seconds after the container has started before liveness probes are initiated. Minimum value is 0. - initialDelaySeconds: *0 | int - // +usage=How often, in seconds, to execute the probe. Minimum value is 1. - periodSeconds: *10 | int - // +usage=Number of seconds after which the probe times out. Minimum value is 1. - timeoutSeconds: *1 | int - // +usage=Minimum consecutive successes for the probe to be considered successful after having failed. Minimum value is 1. - successThreshold: *1 | int - // +usage=Minimum consecutive failures for the probe to be considered failed after having succeeded. Minimum value is 1. - failureThreshold: *3 | int - // +usage=Optional duration in seconds the pod needs to terminate gracefully upon probe failure. Set this value longer than the expected cleanup time for your process. - terminationGracePeriodSeconds?: int - // +usage=Instructions for assessing container startup status by executing a command. Either this attribute or the httpGet attribute or the grpc attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with the httpGet attribute and the tcpSocket attribute and the gRPC 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 startup status by executing an HTTP GET request. Either this attribute or the exec attribute or the grpc attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with the exec attribute and the tcpSocket attribute and the gRPC attribute. - httpGet?: { - // +usage=The endpoint, relative to the port, to which the HTTP GET request should be directed. - path?: string - // +usage=The port numer to access on the host or container. - port: int - // +usage=The hostname to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host?: string - // +usage=The Scheme to use for connecting to the host. - scheme?: *"HTTP" | "HTTPS" - // +usage=Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders?: [...{ - // +usage=The header field name - name: string - //+usage=The header field value - value: string - }] - } - // +usage=Instructions for assessing container startup status by probing a gRPC service. Either this attribute or the exec attribute or the grpc attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with the exec attribute and the httpGet attribute and the tcpSocket attribute. - grpc?: { - // +usage=The port number of the gRPC service. - port: int - // +usage=The name of the service to place in the gRPC HealthCheckRequest - service?: string - } - // +usage=Instructions for assessing container startup status by probing a TCP socket. Either this attribute or the exec attribute or the tcpSocket attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with the exec attribute and the httpGet attribute and the gRPC attribute. - tcpSocket?: { - // +usage=Number or name of the port to access on the container. - port: string - // +usage=Host name to connect to, defaults to the pod IP. - host?: string - } - } - PatchContainer: { - _params: #StartupProbeParams - name: _params.containerName - _baseContainers: context.output.spec.template.spec.containers - _matchContainers_: [ for _container_ in _baseContainers if _container_.name == name {_container_}] - if len(_matchContainers_) == 0 { - err: "container \(name) not found" - } - if len(_matchContainers_) > 0 { - startupProbe: { - if _params.exec != _|_ { - exec: _params.exec - } - if _params.httpGet != _|_ { - httpGet: _params.httpGet - } - if _params.grpc != _|_ { - grpc: _params.grpc - } - if _params.tcpSocket != _|_ { - tcpSocket: _params.tcpSocket - } - if _params.initialDelaySeconds != _|_ { - initialDelaySeconds: _params.initialDelaySeconds - } - if _params.periodSeconds != _|_ { - periodSeconds: _params.periodSeconds - } - if _params.tcpSocket != _|_ { - tcpSocket: _params.tcpSocket - } - if _params.timeoutSeconds != _|_ { - timeoutSeconds: _params.timeoutSeconds - } - if _params.successThreshold != _|_ { - successThreshold: _params.successThreshold - } - if _params.failureThreshold != _|_ { - failureThreshold: _params.failureThreshold - } - if _params.terminationGracePeriodSeconds != _|_ { - terminationGracePeriodSeconds: _params.terminationGracePeriodSeconds - } - } - } - } - - patch: spec: template: spec: { - if parameter.probes == _|_ { - // +patchKey=name - containers: [{ - PatchContainer & {_params: { - if parameter.containerName == "" { - containerName: context.name - } - if parameter.containerName != "" { - containerName: parameter.containerName - } - periodSeconds: parameter.periodSeconds - initialDelaySeconds: parameter.initialDelaySeconds - timeoutSeconds: parameter.timeoutSeconds - successThreshold: parameter.successThreshold - failureThreshold: parameter.failureThreshold - terminationGracePeriodSeconds: parameter.terminationGracePeriodSeconds - if parameter.exec != _|_ { - exec: parameter.exec - } - if parameter.httpGet != _|_ { - httpGet: parameter.httpGet - } - if parameter.grpc != _|_ { - grpc: parameter.grpc - } - if parameter.tcpSocket != _|_ { - tcpSocket: parameter.grtcpSocketpc - } - }} - }] - } - if parameter.probes != _|_ { - // +patchKey=name - containers: [ for c in parameter.probes { - if c.name == "" { - err: "containerName must be set when specifying startup probe for multiple containers" - } - if c.name != "" { - PatchContainer & {_params: c} - } - }] - } - } - - parameter: *#StartupProbeParams | close({ - // +usage=Specify the startup probe for multiple containers - probes: [...#StartupProbeParams] - }) - - errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}] - diff --git a/charts/vela-minimal/templates/defwithtemplate/step-group.yaml b/charts/vela-minimal/templates/defwithtemplate/step-group.yaml deleted file mode 100644 index 1caa9b637..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/step-group.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/step-group.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Process Control - definition.oam.dev/description: A special step that you can declare 'subSteps' in it, 'subSteps' is an array containing any step type whose valid parameters do not include the `step-group` step type itself. The sub steps were executed in parallel. - name: step-group - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - // no parameters, the nop only to make the template not empty or it's invalid - nop: {} - diff --git a/charts/vela-minimal/templates/defwithtemplate/storage.yaml b/charts/vela-minimal/templates/defwithtemplate/storage.yaml deleted file mode 100644 index e68ac72b2..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/storage.yaml +++ /dev/null @@ -1,362 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/storage.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add storages on K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: storage - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - podDisruptive: true - schematic: - cue: - template: | - volumesList: [ - if parameter.pvc != _|_ for v in parameter.pvc { - { - name: "pvc-" + v.name - persistentVolumeClaim: claimName: v.name - } - }, - 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.pvc != _|_ for v in parameter.pvc { - if v.volumeMode == "Filesystem" { - { - name: "pvc-" + v.name - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - } - } - }, - 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 - } - } - }, - ] - - volumeDevicesList: *[ - for v in parameter.pvc if v.volumeMode == "Block" { - { - name: "pvc-" + v.name - devicePath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - } - }, - ] | [] - - 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: template: spec: { - // +patchKey=name - volumes: deDupVolumesArray - - containers: [{ - // +patchKey=name - env: envList - // +patchKey=name - volumeDevices: volumeDevicesList - // +patchKey=name - volumeMounts: volumeMountsList - }, ...] - - } - - outputs: { - for v in parameter.pvc { - if v.mountOnly == false { - "pvc-\(v.name)": { - apiVersion: "v1" - kind: "PersistentVolumeClaim" - metadata: name: v.name - spec: { - accessModes: v.accessModes - volumeMode: v.volumeMode - if v.volumeName != _|_ { - volumeName: v.volumeName - } - if v.storageClassName != _|_ { - storageClassName: v.storageClassName - } - - if v.resources.requests.storage == _|_ { - resources: requests: storage: "8Gi" - } - if v.resources.requests.storage != _|_ { - resources: requests: storage: v.resources.requests.storage - } - if v.resources.limits.storage != _|_ { - resources: limits: storage: v.resources.limits.storage - } - if v.dataSourceRef != _|_ { - dataSourceRef: v.dataSourceRef - } - if v.dataSource != _|_ { - dataSource: v.dataSource - } - if v.selector != _|_ { - dataSource: v.selector - } - } - } - } - } - - 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 pvc type storage - pvc?: [...{ - name: string - mountOnly: *false | bool - mountPath: string - subPath?: string - volumeMode: *"Filesystem" | string - volumeName?: string - accessModes: *["ReadWriteOnce"] | [...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 - } - } - }] - - // +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/charts/vela-minimal/templates/defwithtemplate/suspend.yaml b/charts/vela-minimal/templates/defwithtemplate/suspend.yaml deleted file mode 100644 index 1b5236244..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/suspend.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/suspend.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Process Control - definition.oam.dev/description: Suspend the current workflow, it can be resumed by 'vela workflow resume' command. - name: suspend - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - suspend: op.#Suspend & { - if parameter.duration != _|_ { - duration: parameter.duration - } - if parameter.message != _|_ { - message: parameter.message - } - } - - parameter: { - // +usage=Specify the wait duration time to resume workflow such as "30s", "1min" or "2m15s" - duration?: string - // +usage=The suspend message to show - message?: string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/take-over.yaml b/charts/vela-minimal/templates/defwithtemplate/take-over.yaml deleted file mode 100644 index 21caf44c6..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/take-over.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/take-over.cue -apiVersion: core.oam.dev/v1beta1 -kind: PolicyDefinition -metadata: - annotations: - definition.oam.dev/description: Configure the resources to be able to take over when it belongs to no application. - name: take-over - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - #PolicyRule: { - // +usage=Specify how to select the targets of the rule - selector: [...#RuleSelector] - } - - #RuleSelector: { - // +usage=Select resources by component names - componentNames?: [...string] - // +usage=Select resources by component types - componentTypes?: [...string] - // +usage=Select resources by oamTypes (COMPONENT or TRAIT) - oamTypes?: [...string] - // +usage=Select resources by trait types - traitTypes?: [...string] - // +usage=Select resources by resource types (like Deployment) - resourceTypes?: [...string] - // +usage=Select resources by their names - resourceNames?: [...string] - } - - parameter: { - // +usage=Specify the list of rules to control take over strategy at resource level. - // The selected resource will be able to be taken over by the current application when the resource belongs to no - // one. - rules?: [...#PolicyRule] - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/task.yaml b/charts/vela-minimal/templates/defwithtemplate/task.yaml deleted file mode 100644 index bc328c86e..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/task.yaml +++ /dev/null @@ -1,284 +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: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - output: { - apiVersion: "batch/v1" - kind: "Job" - spec: { - parallelism: parameter.count - completions: parameter.count - template: { - metadata: { - labels: { - if parameter.labels != _|_ { - parameter.labels - } - "app.oam.dev/name": context.appName - "app.oam.dev/component": context.name - } - if parameter.annotations != _|_ { - annotations: parameter.annotations - } - } - 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 the labels in the workload - labels?: [string]: string - - // +usage=Specify the annotations in the workload - annotations?: [string]: string - - // +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?: "Always" | "Never" | "IfNotPresent" - - // +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=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=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", default to emptyDir - type: *"emptyDir" | "pvc" | "configMap" | "secret" - 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 - } - status: - customStatus: |- - status: { - active: *0 | int - failed: *0 | int - succeeded: *0 | int - } & { - if context.output.status.active != _|_ { - active: context.output.status.active - } - if context.output.status.failed != _|_ { - failed: context.output.status.failed - } - if context.output.status.succeeded != _|_ { - succeeded: context.output.status.succeeded - } - } - message: "Active/Failed/Succeeded:\(status.active)/\(status.failed)/\(status.succeeded)" - healthPolicy: |- - succeeded: *0 | int - if context.output.status.succeeded != _|_ { - succeeded: context.output.status.succeeded - } - isHealth: succeeded == context.output.spec.parallelism - workload: - definition: - apiVersion: batch/v1 - kind: Job - type: jobs.batch - diff --git a/charts/vela-minimal/templates/defwithtemplate/topology.yaml b/charts/vela-minimal/templates/defwithtemplate/topology.yaml deleted file mode 100644 index 671acdb47..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/topology.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/topology.cue -apiVersion: core.oam.dev/v1beta1 -kind: PolicyDefinition -metadata: - annotations: - definition.oam.dev/description: Describe the destination where components should be deployed to. - name: topology - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - parameter: { - // +usage=Specify the names of the clusters to select. - clusters?: [...string] - // +usage=Specify the label selector for clusters - clusterLabelSelector?: [string]: string - // +usage=Ignore empty cluster error - allowEmpty?: bool - // +usage=Deprecated: Use clusterLabelSelector instead. - clusterSelector?: [string]: string - // +usage=Specify the target namespace to deploy in the selected clusters, default inherit the original namespace. - namespace?: string - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/topologyspreadconstraints.yaml b/charts/vela-minimal/templates/defwithtemplate/topologyspreadconstraints.yaml deleted file mode 100644 index 65d065867..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/topologyspreadconstraints.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/topologyspreadconstraints.cue -apiVersion: core.oam.dev/v1beta1 -kind: TraitDefinition -metadata: - annotations: - definition.oam.dev/description: Add topology spread constraints hooks for every container of K8s pod for your workload which follows the pod spec in path 'spec.template'. - name: topologyspreadconstraints - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - appliesToWorkloads: - - deployments.apps - - statefulsets.apps - - daemonsets.apps - - jobs.batch - podDisruptive: true - schematic: - cue: - template: | - constraintsArray: [ - for v in parameter.constraints { - maxSkew: v.maxSkew - topologyKey: v.topologyKey - whenUnsatisfiable: v.whenUnsatisfiable - labelSelector: v.labelSelector - if v.nodeAffinityPolicy != _|_ { - nodeAffinityPolicy: v.nodeAffinityPolicy - } - if v.nodeTaintsPolicy != _|_ { - nodeTaintsPolicy: v.nodeTaintsPolicy - } - if v.minDomains != _|_ { - minDomains: v.minDomains - } - if v.matchLabelKeys != _|_ { - matchLabelKeys: v.matchLabelKeys - } - }, - ] - patch: spec: template: spec: topologySpreadConstraints: constraintsArray - #labSelector: { - matchLabels?: [string]: string - matchExpressions?: [...{ - key: string - operator: *"In" | "NotIn" | "Exists" | "DoesNotExist" - values?: [...string] - }] - } - parameter: constraints: [...{ - // +usage=Describe the degree to which Pods may be unevenly distributed - maxSkew: int - // +usage=Specify the key of node labels - topologyKey: string - // +usage=Indicate how to deal with a Pod if it doesn't satisfy the spread constraint - whenUnsatisfiable: *"DoNotSchedule" | "ScheduleAnyway" - // +usage: labelSelector to find matching Pods - labelSelector: #labSelector - // +usage=Indicate a minimum number of eligible domains - minDomains?: int - // +usage=A list of pod label keys to select the pods over which spreading will be calculated - matchLabelKeys?: [...string] - // +usage=Indicate how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew - nodeAffinityPolicy?: *"Honor" | "Ignore" - // +usage=Indicate how we will treat node taints when calculating pod topology spread skew - nodeTaintsPolicy?: *"Honor" | "Ignore" - }] - diff --git a/charts/vela-minimal/templates/defwithtemplate/vela-cli.yaml b/charts/vela-minimal/templates/defwithtemplate/vela-cli.yaml deleted file mode 100644 index 5fac64b5d..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/vela-cli.yaml +++ /dev/null @@ -1,156 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/internal/vela-cli.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: Scripts & Commands - definition.oam.dev/description: Run a vela command - name: vela-cli - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - ) - - mountsArray: [ - if parameter.storage != _|_ && parameter.storage.secret != _|_ for v in parameter.storage.secret { - { - name: "secret-" + v.name - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - } - }, - if parameter.storage != _|_ && parameter.storage.hostPath != _|_ for v in parameter.storage.hostPath { - { - name: "hostpath-" + v.name - mountPath: v.mountPath - } - }, - ] - - volumesList: [ - if parameter.storage != _|_ && parameter.storage.secret != _|_ for v in parameter.storage.secret { - { - name: "secret-" + v.name - secret: { - defaultMode: v.defaultMode - secretName: v.secretName - if v.items != _|_ { - items: v.items - } - } - } - if parameter.storage != _|_ && parameter.storage.hostPath != _|_ for v in parameter.storage.hostPath { - { - name: "hostpath-" + v.name - path: v.path - } - } - }, - ] - - 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 - }, - ] - - job: op.#Apply & { - value: { - apiVersion: "batch/v1" - kind: "Job" - metadata: { - name: "\(context.name)-\(context.stepName)-\(context.stepSessionID)" - if parameter.serviceAccountName == "kubevela-vela-core" { - namespace: "vela-system" - } - if parameter.serviceAccountName != "kubevela-vela-core" { - namespace: context.namespace - } - } - spec: { - backoffLimit: 3 - template: { - metadata: labels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)" - spec: { - containers: [ - { - name: "\(context.name)-\(context.stepName)-\(context.stepSessionID)-job" - image: parameter.image - command: parameter.command - volumeMounts: mountsArray - }, - ] - restartPolicy: "Never" - serviceAccount: parameter.serviceAccountName - volumes: deDupVolumesArray - } - } - } - } - } - - log: op.#Log & { - source: resources: [{labelSelector: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"}] - } - - fail: op.#Steps & { - if job.value.status.failed != _|_ { - if job.value.status.failed > 2 { - breakWorkflow: op.#Fail & { - message: "failed to execute vela command" - } - } - } - } - - wait: op.#ConditionalWait & { - continue: job.value.status.succeeded != _|_ && job.value.status.succeeded > 0 - } - - parameter: { - // +usage=Specify the name of the addon. - addonName: string - // +usage=Specify the vela command - command: [...string] - // +usage=Specify the image - image: *"oamdev/vela-cli:v1.6.4" | string - // +usage=specify serviceAccountName want to use - serviceAccountName: *"kubevela-vela-core" | string - storage?: { - // +usage=Mount Secret type storage - secret?: [...{ - name: string - mountPath: string - subPath?: string - defaultMode: *420 | int - secretName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - }] - // +usage=Declare host path type storage - hostPath?: [...{ - name: string - path: string - mountPath: string - type: *"Directory" | "DirectoryOrCreate" | "FileOrCreate" | "File" | "Socket" | "CharDevice" | "BlockDevice" - }] - } - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/volumes.yaml b/charts/vela-minimal/templates/defwithtemplate/volumes.yaml deleted file mode 100644 index 1cb53b3e6..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/volumes.yaml +++ /dev/null @@ -1,85 +0,0 @@ -# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. -# Definition source cue file: vela-templates/definitions/deprecated/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'. This definition is DEPRECATED, please use 'storage' instead. - labels: - custom.definition.oam.dev/deprecated: "true" - name: volumes - namespace: {{ include "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/charts/vela-minimal/templates/defwithtemplate/webhook.yaml b/charts/vela-minimal/templates/defwithtemplate/webhook.yaml deleted file mode 100644 index f34677d46..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/webhook.yaml +++ /dev/null @@ -1,87 +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.cue -apiVersion: core.oam.dev/v1beta1 -kind: WorkflowStepDefinition -metadata: - annotations: - custom.definition.oam.dev/category: External Intergration - definition.oam.dev/description: Send a POST request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default. - name: webhook - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "vela/op" - "encoding/json" - "encoding/base64" - ) - - data: op.#Steps & { - if parameter.data == _|_ { - read: op.#Read & { - value: { - apiVersion: "core.oam.dev/v1beta1" - kind: "Application" - metadata: { - name: context.name - namespace: context.namespace - } - } - } @step(1) - value: json.Marshal(read.value) @step(2) - } - if parameter.data != _|_ { - value: json.Marshal(parameter.data) @step(3) - } - } - webhook: op.#Steps & { - if parameter.url.value != _|_ { - http: op.#HTTPPost & { - url: parameter.url.value - request: { - body: data.value - header: "Content-Type": "application/json" - } - } @step(4) - } - if parameter.url.secretRef != _|_ && parameter.url.value == _|_ { - read: op.#Read & { - value: { - apiVersion: "v1" - kind: "Secret" - metadata: { - name: parameter.url.secretRef.name - namespace: context.namespace - } - } - } @step(5) - - stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.url.secretRef.key])} @step(6) - http: op.#HTTPPost & { - url: stringValue.str - request: { - body: data.value - header: "Content-Type": "application/json" - } - } @step(7) - } - } - - parameter: { - // +usage=Specify the webhook url - url: close({ - value: string - }) | close({ - secretRef: { - // +usage=name is the name of the secret - name: string - // +usage=key is the key in the secret - key: string - } - }) - // +usage=Specify the data you want to send - data?: {...} - } - diff --git a/charts/vela-minimal/templates/defwithtemplate/webservice.yaml b/charts/vela-minimal/templates/defwithtemplate/webservice.yaml deleted file mode 100644 index 7920adbe0..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/webservice.yaml +++ /dev/null @@ -1,591 +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: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - import ( - "strconv" - "strings" - ) - - mountsArray: [ - if parameter.volumeMounts != _|_ && parameter.volumeMounts.pvc != _|_ for v in parameter.volumeMounts.pvc { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.configMap != _|_ for v in parameter.volumeMounts.configMap { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.secret != _|_ for v in parameter.volumeMounts.secret { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.emptyDir != _|_ for v in parameter.volumeMounts.emptyDir { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.hostPath != _|_ for v in parameter.volumeMounts.hostPath { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - ] - - volumesList: [ - if parameter.volumeMounts != _|_ && parameter.volumeMounts.pvc != _|_ for v in parameter.volumeMounts.pvc { - { - name: v.name - persistentVolumeClaim: claimName: v.claimName - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.configMap != _|_ for v in parameter.volumeMounts.configMap { - { - name: v.name - configMap: { - defaultMode: v.defaultMode - name: v.cmName - if v.items != _|_ { - items: v.items - } - } - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.secret != _|_ for v in parameter.volumeMounts.secret { - { - name: v.name - secret: { - defaultMode: v.defaultMode - secretName: v.secretName - if v.items != _|_ { - items: v.items - } - } - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.emptyDir != _|_ for v in parameter.volumeMounts.emptyDir { - { - name: v.name - emptyDir: medium: v.medium - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.hostPath != _|_ for v in parameter.volumeMounts.hostPath { - { - name: v.name - hostPath: path: v.path - } - }, - ] - - 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 - }, - ] - - output: { - apiVersion: "apps/v1" - kind: "Deployment" - spec: { - selector: matchLabels: "app.oam.dev/component": context.name - - template: { - metadata: { - labels: { - if parameter.labels != _|_ { - parameter.labels - } - if parameter.addRevisionLabel { - "app.oam.dev/revision": context.revision - } - "app.oam.dev/name": context.appName - "app.oam.dev/component": context.name - } - if parameter.annotations != _|_ { - annotations: parameter.annotations - } - } - - spec: { - containers: [{ - name: context.name - image: parameter.image - if parameter["port"] != _|_ && parameter["ports"] == _|_ { - ports: [{ - containerPort: parameter.port - }] - } - if parameter["ports"] != _|_ { - ports: [ for v in parameter.ports { - { - containerPort: v.port - protocol: v.protocol - if v.name != _|_ { - name: v.name - } - if v.name == _|_ { - _name: "port-" + strconv.FormatInt(v.port, 10) - name: *_name | string - if v.protocol != "TCP" { - name: _name + "-" + strings.ToLower(v.protocol) - } - } - }}] - } - - if parameter["imagePullPolicy"] != _|_ { - imagePullPolicy: parameter.imagePullPolicy - } - - if parameter["cmd"] != _|_ { - command: parameter.cmd - } - - if parameter["args"] != _|_ { - args: parameter.args - } - - 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"] != _|_ && parameter["volumeMounts"] == _|_ { - volumeMounts: [ for v in parameter.volumes { - { - mountPath: v.mountPath - name: v.name - }}] - } - - if parameter["volumeMounts"] != _|_ { - volumeMounts: mountsArray - } - - if parameter["livenessProbe"] != _|_ { - livenessProbe: parameter.livenessProbe - } - - if parameter["readinessProbe"] != _|_ { - readinessProbe: parameter.readinessProbe - } - - }] - - if parameter["hostAliases"] != _|_ { - // +patchKey=ip - hostAliases: parameter.hostAliases - } - - if parameter["imagePullSecrets"] != _|_ { - imagePullSecrets: [ for v in parameter.imagePullSecrets { - name: v - }, - ] - } - - if parameter["volumes"] != _|_ && parameter["volumeMounts"] == _|_ { - 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["volumeMounts"] != _|_ { - volumes: deDupVolumesArray - } - } - } - } - } - - exposePorts: [ - if parameter.ports != _|_ for v in parameter.ports if v.expose == true { - port: v.port - targetPort: v.port - if v.name != _|_ { - name: v.name - } - if v.name == _|_ { - _name: "port-" + strconv.FormatInt(v.port, 10) - name: *_name | string - if v.protocol != "TCP" { - name: _name + "-" + strings.ToLower(v.protocol) - } - } - if v.nodePort != _|_ && parameter.exposeType == "NodePort" { - nodePort: v.nodePort - } - if v.protocol != _|_ { - protocol: v.protocol - } - }, - ] - - outputs: { - if len(exposePorts) != 0 { - webserviceExpose: { - apiVersion: "v1" - kind: "Service" - metadata: name: context.name - spec: { - selector: "app.oam.dev/component": context.name - ports: exposePorts - type: parameter.exposeType - } - } - } - } - - parameter: { - // +usage=Specify the labels in the workload - labels?: [string]: string - - // +usage=Specify the annotations in the workload - annotations?: [string]: string - - // +usage=Which image would you like to use for your service - // +short=i - image: string - - // +usage=Specify image pull policy for your service - imagePullPolicy?: "Always" | "Never" | "IfNotPresent" - - // +usage=Specify image pull secrets for your service - imagePullSecrets?: [...string] - - // +ignore - // +usage=Deprecated field, please use ports instead - // +short=p - port?: int - - // +usage=Which ports do you want customer traffic sent to, defaults to 80 - ports?: [...{ - // +usage=Number of port to expose on the pod's IP address - port: int - // +usage=Name of the port - name?: string - // +usage=Protocol for port. Must be UDP, TCP, or SCTP - protocol: *"TCP" | "UDP" | "SCTP" - // +usage=Specify if the port should be exposed - expose: *false | bool - // +usage=exposed node port. Only Valid when exposeType is NodePort - nodePort?: int - }] - - // +ignore - // +usage=Specify what kind of Service you want. options: "ClusterIP", "NodePort", "LoadBalancer" - exposeType: *"ClusterIP" | "NodePort" | "LoadBalancer" - - // +ignore - // +usage=If addRevisionLabel is true, the revision label will be added to the underlying pods - addRevisionLabel: *false | bool - - // +usage=Commands to run in the container - cmd?: [...string] - - // +usage=Arguments to the entrypoint - args?: [...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=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=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 - - volumeMounts?: { - // +usage=Mount PVC type volume - pvc?: [...{ - name: string - mountPath: string - subPath?: string - // +usage=The name of the PVC - claimName: string - }] - // +usage=Mount ConfigMap type volume - configMap?: [...{ - name: string - mountPath: string - subPath?: string - defaultMode: *420 | int - cmName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - }] - // +usage=Mount Secret type volume - secret?: [...{ - name: string - mountPath: string - subPath?: string - defaultMode: *420 | int - secretName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - }] - // +usage=Mount EmptyDir type volume - emptyDir?: [...{ - name: string - mountPath: string - subPath?: string - medium: *"" | "Memory" - }] - // +usage=Mount HostPath type volume - hostPath?: [...{ - name: string - mountPath: string - subPath?: string - path: string - }] - } - - // +usage=Deprecated field, use volumeMounts instead. - volumes?: [...{ - name: string - mountPath: string - // +usage=Specify volume type, options: "pvc","configMap","secret","emptyDir", default to emptyDir - type: *"emptyDir" | "pvc" | "configMap" | "secret" - 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 - - // +usage=Specify the hostAliases to add - hostAliases?: [...{ - ip: string - hostnames: [...string] - }] - } - - #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 - host?: string - scheme?: *"HTTP" | string - 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 - } - status: - customStatus: |- - ready: { - readyReplicas: *0 | int - } & { - if context.output.status.readyReplicas != _|_ { - readyReplicas: context.output.status.readyReplicas - } - } - message: "Ready:\(ready.readyReplicas)/\(context.output.spec.replicas)" - healthPolicy: |- - ready: { - updatedReplicas: *0 | int - readyReplicas: *0 | int - replicas: *0 | int - observedGeneration: *0 | int - } & { - if context.output.status.updatedReplicas != _|_ { - updatedReplicas: context.output.status.updatedReplicas - } - if context.output.status.readyReplicas != _|_ { - readyReplicas: context.output.status.readyReplicas - } - if context.output.status.replicas != _|_ { - replicas: context.output.status.replicas - } - if context.output.status.observedGeneration != _|_ { - observedGeneration: context.output.status.observedGeneration - } - } - _isHealth: (context.output.spec.replicas == ready.readyReplicas) && (context.output.spec.replicas == ready.updatedReplicas) && (context.output.spec.replicas == ready.replicas) && (ready.observedGeneration == context.output.metadata.generation || ready.observedGeneration > context.output.metadata.generation) - isHealth: *_isHealth | bool - if context.output.metadata.annotations != _|_ { - if context.output.metadata.annotations["app.oam.dev/disable-health-check"] != _|_ { - isHealth: true - } - } - workload: - definition: - apiVersion: apps/v1 - kind: Deployment - type: deployments.apps - diff --git a/charts/vela-minimal/templates/defwithtemplate/worker.yaml b/charts/vela-minimal/templates/defwithtemplate/worker.yaml deleted file mode 100644 index 32b87eba1..000000000 --- a/charts/vela-minimal/templates/defwithtemplate/worker.yaml +++ /dev/null @@ -1,448 +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. - labels: - custom.definition.oam.dev/ui-hidden: "true" - name: worker - namespace: {{ include "systemDefinitionNamespace" . }} -spec: - schematic: - cue: - template: | - mountsArray: [ - if parameter.volumeMounts != _|_ && parameter.volumeMounts.pvc != _|_ for v in parameter.volumeMounts.pvc { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.configMap != _|_ for v in parameter.volumeMounts.configMap { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.secret != _|_ for v in parameter.volumeMounts.secret { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.emptyDir != _|_ for v in parameter.volumeMounts.emptyDir { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.hostPath != _|_ for v in parameter.volumeMounts.hostPath { - { - mountPath: v.mountPath - if v.subPath != _|_ { - subPath: v.subPath - } - name: v.name - } - }, - ] - - volumesList: [ - if parameter.volumeMounts != _|_ && parameter.volumeMounts.pvc != _|_ for v in parameter.volumeMounts.pvc { - { - name: v.name - persistentVolumeClaim: claimName: v.claimName - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.configMap != _|_ for v in parameter.volumeMounts.configMap { - { - name: v.name - configMap: { - defaultMode: v.defaultMode - name: v.cmName - if v.items != _|_ { - items: v.items - } - } - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.secret != _|_ for v in parameter.volumeMounts.secret { - { - name: v.name - secret: { - defaultMode: v.defaultMode - secretName: v.secretName - if v.items != _|_ { - items: v.items - } - } - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.emptyDir != _|_ for v in parameter.volumeMounts.emptyDir { - { - name: v.name - emptyDir: medium: v.medium - } - }, - - if parameter.volumeMounts != _|_ && parameter.volumeMounts.hostPath != _|_ for v in parameter.volumeMounts.hostPath { - { - name: v.name - hostPath: path: v.path - } - }, - ] - - 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 - }, - ] - - output: { - apiVersion: "apps/v1" - kind: "Deployment" - spec: { - selector: matchLabels: "app.oam.dev/component": context.name - - template: { - metadata: labels: { - "app.oam.dev/name": context.appName - "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"] != _|_ && parameter["volumeMounts"] == _|_ { - volumeMounts: [ for v in parameter.volumes { - { - mountPath: v.mountPath - name: v.name - }}] - } - - if parameter["volumeMounts"] != _|_ { - volumeMounts: mountsArray - } - - 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"] != _|_ && parameter["volumeMounts"] == _|_ { - 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["volumeMounts"] != _|_ { - volumes: deDupVolumesArray - } - } - } - } - } - - 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=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=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 - - volumeMounts?: { - // +usage=Mount PVC type volume - pvc?: [...{ - name: string - mountPath: string - // +usage=The name of the PVC - claimName: string - }] - // +usage=Mount ConfigMap type volume - configMap?: [...{ - name: string - mountPath: string - defaultMode: *420 | int - cmName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - }] - // +usage=Mount Secret type volume - secret?: [...{ - name: string - mountPath: string - defaultMode: *420 | int - secretName: string - items?: [...{ - key: string - path: string - mode: *511 | int - }] - }] - // +usage=Mount EmptyDir type volume - emptyDir?: [...{ - name: string - mountPath: string - medium: *"" | "Memory" - }] - // +usage=Mount HostPath type volume - hostPath?: [...{ - name: string - mountPath: string - path: string - }] - } - - // +usage=Deprecated field, use volumeMounts instead. - volumes?: [...{ - name: string - mountPath: string - // +usage=Specify volume type, options: "pvc","configMap","secret","emptyDir", default to emptyDir - type: *"emptyDir" | "pvc" | "configMap" | "secret" - 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 - } - status: - customStatus: |- - ready: { - readyReplicas: *0 | int - } & { - if context.output.status.readyReplicas != _|_ { - readyReplicas: context.output.status.readyReplicas - } - } - message: "Ready:\(ready.readyReplicas)/\(context.output.spec.replicas)" - healthPolicy: |- - ready: { - updatedReplicas: *0 | int - readyReplicas: *0 | int - replicas: *0 | int - observedGeneration: *0 | int - } & { - if context.output.status.updatedReplicas != _|_ { - updatedReplicas: context.output.status.updatedReplicas - } - if context.output.status.readyReplicas != _|_ { - readyReplicas: context.output.status.readyReplicas - } - if context.output.status.replicas != _|_ { - replicas: context.output.status.replicas - } - if context.output.status.observedGeneration != _|_ { - observedGeneration: context.output.status.observedGeneration - } - } - isHealth: (context.output.spec.replicas == ready.readyReplicas) && (context.output.spec.replicas == ready.updatedReplicas) && (context.output.spec.replicas == ready.replicas) && (ready.observedGeneration == context.output.metadata.generation || ready.observedGeneration > context.output.metadata.generation) - workload: - definition: - apiVersion: apps/v1 - kind: Deployment - type: deployments.apps - diff --git a/charts/vela-minimal/templates/kubevela-controller.yaml b/charts/vela-minimal/templates/kubevela-controller.yaml deleted file mode 100644 index 6af0eeabf..000000000 --- a/charts/vela-minimal/templates/kubevela-controller.yaml +++ /dev/null @@ -1,253 +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: {{ if .Values.authentication.enabled }} {{ include "kubevela.fullname" . }}:manager {{ else }} "cluster-admin" {{ end }} -subjects: - - kind: ServiceAccount - name: {{ include "kubevela.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - -{{ if .Values.authentication.enabled }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ include "kubevela.fullname" . }}:manager -rules: - - apiGroups: ["core.oam.dev", "terraform.core.oam.dev", "prism.oam.dev", "standard.oam.dev"] - resources: ["*"] - verbs: ["*"] - - apiGroups: ["cluster.open-cluster-management.io"] - resources: ["managedclusters"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["users", "groups", "serviceaccounts"] - verbs: ["impersonate"] - - apiGroups: [""] - resources: ["namespaces", "secrets", "services"] - verbs: ["get", "watch", "list"] - - apiGroups: [""] - resources: ["configmaps", "events"] - verbs: ["*"] - - apiGroups: ["apps"] - resources: ["controllerrevisions"] - verbs: ["*"] - - apiGroups: ["apiregistration.k8s.io"] - resources: ["apiservices"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["coordination.k8s.io"] - resources: ["leases"] - verbs: ["*"] - - apiGroups: ["admissionregistration.k8s.io"] - resources: ["mutatingwebhookconfigurations", "validatingwebhookconfigurations"] - verbs: ["get", "list", "watch"] - - apiGroups: ["flowcontrol.apiserver.k8s.io"] - resources: ["prioritylevelconfigurations", "flowschemas"] - verbs: ["get", "list", "watch"] - - apiGroups: ["authorization.k8s.io"] - resources: ["subjectaccessreviews"] - verbs: ["*"] -{{ end }} - ---- -# 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: - controller.oam.dev/name: vela-core - {{- include "kubevela.labels" . | nindent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "kubevela.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "kubevela.selectorLabels" . | nindent 8 }} - annotations: - prometheus.io/path: /metrics - prometheus.io/port: "8080" - prometheus.io/scrape: "true" - 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 }}" - {{ end }} - - "--health-addr=:{{ .Values.healthCheck.port }}" - {{ if ne .Values.disableCaps "" }} - - "--disable-caps={{ .Values.disableCaps }}" - {{ end }} - - "--system-definition-namespace={{ include "systemDefinitionNamespace" . }}" - - "--application-revision-limit={{ .Values.applicationRevisionLimit }}" - - "--definition-revision-limit={{ .Values.definitionRevisionLimit }}" - - "--oam-spec-ver={{ .Values.OAMSpecVer }}" - {{ if .Values.multicluster.enabled }} - - "--enable-cluster-gateway" - {{ end }} - - "--concurrent-reconciles={{ .Values.concurrentReconciles }}" - - "--kube-api-qps={{ .Values.kubeClient.qps }}" - - "--kube-api-burst={{ .Values.kubeClient.burst }}" - - "--max-workflow-wait-backoff-time={{ .Values.workflow.backoff.maxTime.waitState }}" - - "--max-workflow-failed-backoff-time={{ .Values.workflow.backoff.maxTime.failedState }}" - - "--max-workflow-step-error-retry-times={{ .Values.workflow.step.errorRetryTimes }}" - - "--feature-gates=EnableSuspendOnFailure={{- .Values.workflow.enableSuspendOnFailure | toString -}}" - - "--feature-gates=AuthenticateApplication={{- .Values.authentication.enabled | toString -}}" - - "--feature-gates=ApplyOnce={{- .Values.featureGates.applyOnce | toString -}}" - {{ if .Values.authentication.enabled }} - {{ if .Values.authentication.withUser }} - - "--authentication-with-user" - {{ end }} - - "--authentication-default-user={{ .Values.authentication.defaultUser }}" - - "--authentication-group-pattern={{ .Values.authentication.groupPattern }}" - {{ end }} - image: {{ .Values.imageRegistry }}{{ .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 }} - affinity: - {{ if .Values.affinity }} - {{- toYaml .Values.affinity | nindent 8 }} - {{ else }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchLabels: - {{- include "kubevela.selectorLabels" . | nindent 20 }} - topologyKey: kubernetes.io/hostname - weight: 100 - {{ end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} \ No newline at end of file diff --git a/charts/vela-minimal/templates/test/test-application.yaml b/charts/vela-minimal/templates/test/test-application.yaml deleted file mode 100644 index af70ddecd..000000000 --- a/charts/vela-minimal/templates/test/test-application.yaml +++ /dev/null @@ -1,14 +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: {{ .Values.imageRegistry }}{{ .Values.test.app.repository }}:{{ .Values.test.app.tag }} - port: 8000 diff --git a/charts/vela-minimal/values.yaml b/charts/vela-minimal/values.yaml deleted file mode 100644 index 1086342d5..000000000 --- a/charts/vela-minimal/values.yaml +++ /dev/null @@ -1,235 +0,0 @@ -# Default values for kubevela. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -## @section KubeVela core parameters - -## @param systemDefinitionNamespace System definition namespace, if unspecified, will use built-in variable `.Release.Namespace`. -systemDefinitionNamespace: - -## @param applicationRevisionLimit Application revision limit -applicationRevisionLimit: 10 - -## @param definitionRevisionLimit Definition revision limit -definitionRevisionLimit: 20 - -## @param concurrentReconciles concurrentReconciles is the concurrent reconcile number of the controller -concurrentReconciles: 4 - -## @param controllerArgs.reSyncPeriod The period for resync the applications -controllerArgs: - reSyncPeriod: 5m - -## @param OAMSpecVer OAMSpecVer is the oam spec version controller want to setup -OAMSpecVer: "minimal" - -## @param disableCaps Disable capability -disableCaps: "envbinding,rollout" - -## @param dependCheckWait dependCheckWait is the time to wait for ApplicationConfiguration's dependent-resource ready -dependCheckWait: 30s - - -## @section KubeVela workflow parameters - -## @param workflow.enableSuspendOnFailure Enable suspend on workflow failure -## @param workflow.backoff.maxTime.waitState The max backoff time of workflow in a wait condition -## @param workflow.backoff.maxTime.failedState The max backoff time of workflow in a failed condition -## @param workflow.step.errorRetryTimes The max retry times of a failed workflow step -workflow: - enableSuspendOnFailure: false - backoff: - maxTime: - waitState: 60 - failedState: 300 - step: - errorRetryTimes: 10 - - -## @section KubeVela controller parameters - -## @param replicaCount KubeVela controller replica count -replicaCount: 1 - -## @param imageRegistry Image registry -imageRegistry: "" -## @param image.repository Image repository -## @param image.tag Image tag -## @param image.pullPolicy Image pull policy -image: - repository: oamdev/vela-core - tag: latest - pullPolicy: Always - -## @param resources.limits.cpu KubeVela controller's cpu limit -## @param resources.limits.memory KubeVela controller's memory limit -## @param resources.requests.cpu KubeVela controller's cpu request -## @param resources.requests.memory KubeVela controller's memory request -resources: - limits: - cpu: 500m - memory: 1Gi - requests: - cpu: 50m - memory: 20Mi - -## @param webhookService.type KubeVela webhook service type -## @param webhookService.port KubeVela webhook service port -webhookService: - type: ClusterIP - port: 9443 - -## @param healthCheck.port KubeVela health check port -healthCheck: - port: 9440 - -## @section KubeVela controller optimization parameters - -##@param featureGates.applyOnce if enabled, the apply-once feature will be applied to all applications, no state-keep and no resource data storage in ResourceTracker -featureGates: - applyOnce: false - -## @section MultiCluster parameters - -## @param multicluster.enabled Whether to enable multi-cluster -## @param multicluster.clusterGateway.replicaCount ClusterGateway replica count -## @param multicluster.clusterGateway.port ClusterGateway port -## @param multicluster.clusterGateway.image.repository ClusterGateway image repository -## @param multicluster.clusterGateway.image.tag ClusterGateway image tag -## @param multicluster.clusterGateway.image.pullPolicy ClusterGateway image pull policy -## @param multicluster.clusterGateway.resources.requests.cpu ClusterGateway cpu request -## @param multicluster.clusterGateway.resources.requests.memory ClusterGateway memory request -## @param multicluster.clusterGateway.resources.limits.cpu ClusterGateway cpu limit -## @param multicluster.clusterGateway.resources.limits.memory ClusterGateway memory limit -## @param multicluster.clusterGateway.secureTLS.enabled Whether to enable secure TLS -## @param multicluster.clusterGateway.secureTLS.certPath Path to the certificate file -multicluster: - enabled: true - clusterGateway: - replicaCount: 1 - port: 9443 - image: - repository: oamdev/cluster-gateway - tag: v1.8.0-alpha.3 - pullPolicy: IfNotPresent - resources: - requests: - cpu: 50m - memory: 20Mi - limits: - cpu: 500m - memory: 200Mi - secureTLS: - enabled: true - certPath: /etc/k8s-cluster-gateway-certs - - -## @section Test parameters - -## @param test.app.repository Test app repository -## @param test.app.tag Test app tag -## @param test.k8s.repository Test k8s repository -## @param test.k8s.tag Test k8s tag -test: - app: - repository: oamdev/hello-world - tag: v1 - k8s: - repository: oamdev/alpine-k8s - tag: 1.18.2 - - -## @section Common parameters - -## @param imagePullSecrets Image pull secrets -imagePullSecrets: [] -## @param nameOverride Override name -nameOverride: "" -## @param fullnameOverride Fullname override -fullnameOverride: "" - - -## @param serviceAccount.create Specifies whether a service account should be created -## @param serviceAccount.annotations Annotations to add to the service account -## @param serviceAccount.name The name of the service account to use. If not set and create is true, a name is generated using the fullname template -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: - -## @skip podSecurityContext -podSecurityContext: {} - # fsGroup: 2000 - -## @skip securityContext -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -## @param nodeSelector Node selector -nodeSelector: {} - -## @param tolerations Tolerations -tolerations: [] - -## @param affinity Affinity -affinity: {} - -## @param rbac.create Specifies whether a RBAC role should be created -rbac: - create: true - - -## @param logDebug Enable debug logs for development purpose -logDebug: false - -## @param logFilePath If non-empty, write log files in this path -logFilePath: "" - -## @param logFileMaxSize 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 - -## @skip admissionWebhooks -admissionWebhooks: - enabled: true - failurePolicy: Fail - certificate: - mountPath: /etc/k8s-webhook-certs - patch: - enabled: true - image: - repository: oamdev/kube-webhook-certgen - tag: v2.4.1 - pullPolicy: IfNotPresent - nodeSelector: {} - affinity: {} - tolerations: [] - appConversion: - enabled: false - certManager: - enabled: false - revisionHistoryLimit: 3 - -## @param kubeClient.qps The qps for reconcile clients, default is 50 -## @param kubeClient.burst The burst for reconcile clients, default is 100 -kubeClient: - qps: 50 - burst: 100 - -## @param authentication.enabled Enable authentication for application -## @param authentication.withUser Application authentication will impersonate as the request User -## @param authentication.defaultUser Application authentication will impersonate as the User if no user provided in Application -## @param authentication.groupPattern Application authentication will impersonate as the request Group that matches the pattern -authentication: - enabled: false - withUser: false - defaultUser: kubevela:vela-core - groupPattern: kubevela:* diff --git a/cmd/core/app/options/options.go b/cmd/core/app/options/options.go index 58201e26e..6491361fa 100644 --- a/cmd/core/app/options/options.go +++ b/cmd/core/app/options/options.go @@ -90,7 +90,7 @@ func NewCoreOptions() *CoreOptions { IgnoreDefinitionWithoutControllerRequirement: false, }, HealthAddr: ":9440", - DisableCaps: "", + DisableCaps: "all", StorageDriver: "Local", InformerSyncPeriod: 10 * time.Hour, QPS: 50, diff --git a/cmd/core/app/server.go b/cmd/core/app/server.go index 2f4e2a67b..b26258825 100644 --- a/cmd/core/app/server.go +++ b/cmd/core/app/server.go @@ -72,11 +72,9 @@ var ( func NewCoreCommand() *cobra.Command { s := options.NewCoreOptions() cmd := &cobra.Command{ - Use: "vela-core", - Long: `The KubeVela controller manager is a daemon that embeds -the core control loops shipped with KubeVela`, + Use: "vela-core", + Long: `The KubeVela controller manager is a daemon that embeds the core control loops shipped with KubeVela`, RunE: func(cmd *cobra.Command, args []string) error { - return run(signals.SetupSignalHandler(), s) }, SilenceUsage: true, diff --git a/hack/crd/dispatch/dispatch.go b/hack/crd/dispatch/dispatch.go index 86b10e7a0..fdb1deccb 100644 --- a/hack/crd/dispatch/dispatch.go +++ b/hack/crd/dispatch/dispatch.go @@ -25,24 +25,22 @@ import ( ) var ( - oldCRD = map[string]bool{"components": true, "applicationconfigurations": true} - // when controller need to run in runtime cluster, just add them in this map, key=crdName, value=subPath - runtimeCRD = map[string]string{"rollouts": "rollout"} - minimalCRD = map[string]bool{"applicationrevisions": true, "applications": true, "definitionrevisions": true, "healthscopes": true, - "policydefinitions": true, "resourcetrackers": true, "scopedefinitions": true, "traitdefinitions": true, "workflowstepdefinitions": true, - "workloaddefinitions": true, "rollouts": true} + oldCRD = map[string]bool{ + "components": true, + "applicationconfigurations": true, + "scopedefinitions": true, + "rollouts": true, + "healthscopes": true, + "workloaddefinitions": true, + } ) func main() { var dir string var newDir string - var minimalDir string - var runtimeDir string if len(os.Args) > 2 { dir = os.Args[1] newDir = os.Args[2] - runtimeDir = os.Args[3] - minimalDir = os.Args[4] } else { log.Fatal(fmt.Errorf("not enough args")) } @@ -55,22 +53,6 @@ func main() { } } - writeMinimal := func(fileName string, data []byte) { - pathMinimal := fmt.Sprintf("%s/%s", minimalDir, fileName) - /* #nosec */ - if err := os.WriteFile(pathMinimal, data, 0644); err != nil { - log.Fatal(err) - } - } - - writeRuntime := func(subPath, fileName string, data []byte) { - pathRuntime := fmt.Sprintf("%s/%s/charts/crds/%s", runtimeDir, subPath, fileName) - /* #nosec */ - if err := os.WriteFile(pathRuntime, data, 0644); err != nil { - log.Fatal(err) - } - } - err := filepath.Walk(dir, func(path string, info os.FileInfo, _ error) error { if info.IsDir() { return nil @@ -85,12 +67,6 @@ func main() { if oldCRD[resourceName] { return nil } - if minimalCRD[resourceName] { - writeMinimal(info.Name(), data) - } - if subPath, exist := runtimeCRD[resourceName]; exist { - writeRuntime(subPath, info.Name(), data) - } writeNew(info.Name(), data) return nil }) diff --git a/pkg/controller/core.oam.dev/v1alpha2/application/application_controller_test.go b/pkg/controller/core.oam.dev/v1alpha2/application/application_controller_test.go index 94b844a45..e4832814a 100644 --- a/pkg/controller/core.oam.dev/v1alpha2/application/application_controller_test.go +++ b/pkg/controller/core.oam.dev/v1alpha2/application/application_controller_test.go @@ -152,18 +152,15 @@ var _ = Describe("Test Application Controller", func() { appWithTraitAndScope := appWithTrait.DeepCopy() appWithTraitAndScope.SetName("app-with-trait-and-scope") - appWithTraitAndScope.Spec.Components[0].Scopes = map[string]string{"healthscopes.core.oam.dev": "appWithTraitAndScope-default-health"} appWithTraitAndScope.Spec.Components[0].Name = "myweb4" appWithTwoComp := appWithTraitAndScope.DeepCopy() appWithTwoComp.SetName("app-with-two-comp") - appWithTwoComp.Spec.Components[0].Scopes = map[string]string{"healthscopes.core.oam.dev": "app-with-two-comp-default-health"} appWithTwoComp.Spec.Components[0].Name = "myweb5" appWithTwoComp.Spec.Components = append(appWithTwoComp.Spec.Components, common.ApplicationComponent{ Name: "myweb6", Type: "worker", Properties: &runtime.RawExtension{Raw: []byte(`{"cmd":["sleep","1000"],"image":"busybox2","config":"myconfig"}`)}, - Scopes: map[string]string{"healthscopes.core.oam.dev": "app-with-two-comp-default-health"}, }) appWithStorage := &v1beta1.Application{ @@ -395,9 +392,6 @@ var _ = Describe("Test Application Controller", func() { webserverwd := &v1alpha2.ComponentDefinition{} webserverwdJson, _ := yaml.YAMLToJSON([]byte(webComponentDefYaml)) - sd := &v1beta1.ScopeDefinition{} - sdDefJson, _ := yaml.YAMLToJSON([]byte(scopeDefYaml)) - BeforeEach(func() { Expect(json.Unmarshal(cDDefJson, cd)).Should(BeNil()) Expect(k8sClient.Create(ctx, cd.DeepCopy())).Should(SatisfyAny(BeNil(), &util.AlreadyExistMatcher{})) @@ -426,9 +420,6 @@ var _ = Describe("Test Application Controller", func() { Should(SatisfyAny(Succeed(), &util.AlreadyExistMatcher{})) } - Expect(json.Unmarshal(sdDefJson, sd)).Should(BeNil()) - Expect(k8sClient.Create(ctx, sd.DeepCopy())).Should(SatisfyAny(BeNil(), &util.AlreadyExistMatcher{})) - Expect(json.Unmarshal(webserverwdJson, webserverwd)).Should(BeNil()) Expect(k8sClient.Create(ctx, webserverwd.DeepCopy())).Should(SatisfyAny(BeNil(), &util.AlreadyExistMatcher{})) @@ -848,7 +839,7 @@ var _ = Describe("Test Application Controller", func() { Expect(k8sClient.Delete(ctx, app)).Should(BeNil()) }) - It("Test rollout trait all related definition features", func() { + PIt("Test rollout trait all related definition features", func() { rolloutTdDef, err := yaml.YAMLToJSON([]byte(rolloutTraitDefinition)) Expect(err).Should(BeNil()) rolloutTrait := &v1beta1.TraitDefinition{} @@ -925,7 +916,7 @@ var _ = Describe("Test Application Controller", func() { Expect(checkRollout.Spec.TargetRevisionName).Should(BeEquivalentTo("myweb1-v3")) }) - It("Test context revision can be supported by specify externalRevision ", func() { + PIt("Test context revision can be supported by specify externalRevision ", func() { rolloutTdDef, err := yaml.YAMLToJSON([]byte(rolloutTraitDefinition)) Expect(err).Should(BeNil()) rolloutTrait := &v1beta1.TraitDefinition{} @@ -1066,7 +1057,7 @@ var _ = Describe("Test Application Controller", func() { Expect(deploy.Spec.Template.Labels["app.oam.dev/revision"]).Should(BeEquivalentTo(externalRevision)) }) - It("Test rollout trait in workflow", func() { + PIt("Test rollout trait in workflow", func() { rolloutTdDef, err := yaml.YAMLToJSON([]byte(rolloutTraitDefinition)) Expect(err).Should(BeNil()) rolloutTrait := &v1beta1.TraitDefinition{} @@ -4376,17 +4367,6 @@ var _ = Describe("Test Application Controller", func() { }) const ( - scopeDefYaml = `apiVersion: core.oam.dev/v1beta1 -kind: ScopeDefinition -metadata: - name: healthscopes.core.oam.dev - namespace: vela-system -spec: - workloadRefsPath: spec.workloadRefs - allowComponentOverlap: true - definitionRef: - name: healthscopes.core.oam.dev` - componentDefYaml = ` apiVersion: core.oam.dev/v1beta1 kind: ComponentDefinition diff --git a/pkg/controller/core.oam.dev/v1alpha2/application/revision_test.go b/pkg/controller/core.oam.dev/v1alpha2/application/revision_test.go index 4a78325b3..31cbc8f08 100644 --- a/pkg/controller/core.oam.dev/v1alpha2/application/revision_test.go +++ b/pkg/controller/core.oam.dev/v1alpha2/application/revision_test.go @@ -57,7 +57,6 @@ var _ = Describe("test generate revision ", func() { cd := v1beta1.ComponentDefinition{} webCompDef := v1beta1.ComponentDefinition{} wd := v1beta1.WorkloadDefinition{} - sd := v1beta1.ScopeDefinition{} rolloutTd := v1beta1.TraitDefinition{} var handler *AppHandler var comps []*oamtypes.ComponentManifest @@ -78,26 +77,11 @@ var _ = Describe("test generate revision ", func() { cd.ResourceVersion = "" Expect(k8sClient.Create(ctx, &cd)).Should(SatisfyAny(BeNil(), &util.AlreadyExistMatcher{})) - scopeDefJson, _ := yaml.YAMLToJSON([]byte(scopeDefYaml)) - Expect(json.Unmarshal(scopeDefJson, &sd)).Should(BeNil()) - sd.ResourceVersion = "" - Expect(k8sClient.Create(ctx, &sd)).Should(SatisfyAny(BeNil(), &util.AlreadyExistMatcher{})) - webserverCDJson, _ := yaml.YAMLToJSON([]byte(webComponentDefYaml)) Expect(json.Unmarshal(webserverCDJson, &webCompDef)).Should(BeNil()) webCompDef.ResourceVersion = "" Expect(k8sClient.Create(ctx, &webCompDef)).Should(SatisfyAny(BeNil(), &util.AlreadyExistMatcher{})) - workloadDefJson, _ := yaml.YAMLToJSON([]byte(workloadDefYaml)) - Expect(json.Unmarshal(workloadDefJson, &wd)).Should(BeNil()) - wd.ResourceVersion = "" - Expect(k8sClient.Create(ctx, &wd)).Should(SatisfyAny(BeNil(), &util.AlreadyExistMatcher{})) - - rolloutDefJson, _ := yaml.YAMLToJSON([]byte(rolloutTraitDefinition)) - Expect(json.Unmarshal(rolloutDefJson, &rolloutTd)).Should(BeNil()) - rolloutTd.ResourceVersion = "" - Expect(k8sClient.Create(ctx, &rolloutTd)).Should(SatisfyAny(BeNil(), &util.AlreadyExistMatcher{})) - By("Create the Namespace for test") Expect(k8sClient.Create(ctx, &ns)).Should(Succeed()) @@ -114,9 +98,8 @@ var _ = Describe("test generate revision ", func() { Spec: v1beta1.ApplicationSpec{ Components: []common.ApplicationComponent{ { - Type: cd.Name, - Name: "express-server", - Scopes: map[string]string{"healthscopes.core.oam.dev": "myapp-default-health"}, + Type: cd.Name, + Name: "express-server", Properties: &runtime.RawExtension{ Raw: []byte(`{"image": "oamdev/testapp:v1", "cmd": ["node", "server.js"]}`), }, @@ -134,17 +117,13 @@ var _ = Describe("test generate revision ", func() { Spec: v1beta1.ApplicationRevisionSpec{ ApplicationRevisionCompressibleFields: v1beta1.ApplicationRevisionCompressibleFields{ ComponentDefinitions: make(map[string]*v1beta1.ComponentDefinition), - WorkloadDefinitions: make(map[string]v1beta1.WorkloadDefinition), TraitDefinitions: make(map[string]*v1beta1.TraitDefinition), - ScopeDefinitions: make(map[string]v1beta1.ScopeDefinition), }, }, } appRevision1.Spec.Application = app appRevision1.Spec.ComponentDefinitions[cd.Name] = cd.DeepCopy() - appRevision1.Spec.WorkloadDefinitions[wd.Name] = wd appRevision1.Spec.TraitDefinitions[rolloutTd.Name] = rolloutTd.DeepCopy() - appRevision1.Spec.ScopeDefinitions[sd.Name] = sd appRevision2 = *appRevision1.DeepCopy() appRevision2.Name = "appRevision2" @@ -185,7 +164,6 @@ var _ = Describe("test generate revision ", func() { It("Test app revisions with same spec should produce same hash and equal regardless of other fields", func() { // add an annotation to workload Definition wd.SetAnnotations(map[string]string{oam.AnnotationAppRollout: "true"}) - appRevision2.Spec.WorkloadDefinitions[wd.Name] = wd appRevision2.Spec.ComponentDefinitions[cd.Name] = cd.DeepCopy() verifyEqual() diff --git a/test/e2e-test/health_scope_test.go b/test/e2e-test/health_scope_test.go index b69318ddf..07579111e 100644 --- a/test/e2e-test/health_scope_test.go +++ b/test/e2e-test/health_scope_test.go @@ -39,7 +39,7 @@ import ( utilcommon "github.com/oam-dev/kubevela/pkg/utils/common" ) -var _ = Describe("HealthScope", func() { +var _ = PDescribe("HealthScope", func() { ctx := context.Background() var namespace string var ns corev1.Namespace diff --git a/vela-templates/gen_definitions.sh b/vela-templates/gen_definitions.sh index 409676f43..6eab12a8e 100755 --- a/vela-templates/gen_definitions.sh +++ b/vela-templates/gen_definitions.sh @@ -18,7 +18,6 @@ DEPRECATED_DEFINITION_DIR="definitions/deprecated" INTERNAL_DEFINITION_DIR="definitions/internal" REGISTRY_DEFINITION_DIR="definitions/registry" INTERNAL_TEMPLATE_DIR="../charts/vela-core/templates/defwithtemplate" -MINIMAL_TEMPLATE_DIR="../charts/vela-minimal/templates" REGISTRY_TEMPLATE_DIR="registry/auto-gen" OS=$(uname -s | tr '[:upper:]' '[:lower:]') @@ -74,7 +73,6 @@ echo -e "${HEAD_PROMPT}Start generating definitions at ${LIGHTGRAY}${SCRIPT_DIR} echo -ne "${HEAD_PROMPT}${YELLOW}(0/3) Generating internal definitions from ${LIGHTGRAY}${INTERNAL_DEFINITION_DIR}${YELLOW} to ${LIGHTGRAY}${INTERNAL_TEMPLATE_DIR}${YELLOW} ... " export AS_HELM_CHART=true render $INTERNAL_DEFINITION_DIR $INTERNAL_TEMPLATE_DIR -renderMinimal $INTERNAL_TEMPLATE_DIR $MINIMAL_TEMPLATE_DIR # Generate deprecated definitions echo -ne "${GREEN}Generated.\n${HEAD_PROMPT}${YELLOW}(1/3) Generating deprecated definitions from ${LIGHTGRAY}${DEPRECATED_DEFINITION_DIR}${YELLOW} to ${LIGHTGRAY}${INTERNAL_TEMPLATE_DIR}${YELLOW} ... "