mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-28 16:50:29 +00:00
Compare commits
58 Commits
v1.1.5
...
release-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8de36ff295 | ||
|
|
56dfd74ba2 | ||
|
|
c4c00637bd | ||
|
|
493d8bdc5d | ||
|
|
e636d7c48c | ||
|
|
1fafe5f05e | ||
|
|
ed574179d4 | ||
|
|
378ab1b81f | ||
|
|
d16ae2a6f7 | ||
|
|
de5f140b08 | ||
|
|
93faf41ac4 | ||
|
|
1d7ace119d | ||
|
|
44bdf033ad | ||
|
|
69008da5e8 | ||
|
|
514ef7ff03 | ||
|
|
bce3e158ca | ||
|
|
8a9df2dd39 | ||
|
|
9a0ea76210 | ||
|
|
156f165b5c | ||
|
|
fce05bffc5 | ||
|
|
6c0b943dfc | ||
|
|
d83fa47741 | ||
|
|
e8fe203265 | ||
|
|
a075830ae1 | ||
|
|
8ab4634701 | ||
|
|
9838eff9c7 | ||
|
|
476de5e4f1 | ||
|
|
c89d1e1713 | ||
|
|
4e9a7fc82e | ||
|
|
3b62e44ef8 | ||
|
|
066c448c1a | ||
|
|
8de80ebdb2 | ||
|
|
855cbfe3ec | ||
|
|
162534b611 | ||
|
|
6bd5d8e6e2 | ||
|
|
22079aacd3 | ||
|
|
b2329d548d | ||
|
|
9152c15a88 | ||
|
|
73b3d3106b | ||
|
|
237c71d94e | ||
|
|
2200d199f3 | ||
|
|
d083039a32 | ||
|
|
5e6be649c1 | ||
|
|
706a65beae | ||
|
|
d21a337dd7 | ||
|
|
b53f4f4fdd | ||
|
|
24970cd990 | ||
|
|
844f479f54 | ||
|
|
91d336b469 | ||
|
|
516156f32f | ||
|
|
eb5808e4ea | ||
|
|
66f794e9fd | ||
|
|
90f46c57e8 | ||
|
|
95496e55c0 | ||
|
|
3009d02fcd | ||
|
|
df8b60d521 | ||
|
|
6c6e834155 | ||
|
|
cc3d2e28c0 |
10
.github/pr-title-checker-config.json
vendored
Normal file
10
.github/pr-title-checker-config.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"LABEL": {
|
||||
"name": "title-needs-formatting",
|
||||
"color": "EEEEEE"
|
||||
},
|
||||
"CHECKS": {
|
||||
"prefixes": ["Fix: ", "Feat: ", "Docs: ", "Test: ", "Chore: ", "CI: ", "Perf: ", "Refactor: ", "Revert: ", "Style: ", "Test: ", "Backport: ", "Backport",
|
||||
"Fix(", "Feat(", "Docs(", "Test(", "Chore(", "CI(", "Perf(", "Refactor(", "Revert(", "Style(", "Test(", "Backport("]
|
||||
}
|
||||
}
|
||||
22
.github/workflows/commit-lint.yml
vendored
22
.github/workflows/commit-lint.yml
vendored
@@ -1,13 +1,19 @@
|
||||
name: Lint Commit Messages
|
||||
on: [push, pull_request]
|
||||
name: PR Title Checker
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- edited
|
||||
- synchronize
|
||||
- labeled
|
||||
- unlabeled
|
||||
|
||||
jobs:
|
||||
commitlint:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: thehanimo/pr-title-checker@v1.3.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: wagoid/commitlint-github-action@v4
|
||||
with:
|
||||
helpURL: https://github.com/oam-dev/kubevela/blob/master/contribute/create-pull-request.md#commit-message-format
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
pass_on_octokit_error: true
|
||||
configuration_path: ".github/pr-title-checker-config.json"
|
||||
6
.github/workflows/e2e-multicluster-test.yml
vendored
6
.github/workflows/e2e-multicluster-test.yml
vendored
@@ -76,10 +76,16 @@ jobs:
|
||||
- name: Load Image to kind cluster (Hub)
|
||||
run: make kind-load
|
||||
|
||||
- name: Load Image to kind cluster (Worker)
|
||||
run: |
|
||||
make kind-load-runtime-cluster
|
||||
|
||||
- name: Cleanup for e2e tests
|
||||
run: |
|
||||
make e2e-cleanup
|
||||
make e2e-setup-core
|
||||
make
|
||||
make setup-runtime-e2e-cluster
|
||||
|
||||
- name: Run e2e multicluster tests
|
||||
run: make e2e-multicluster-test
|
||||
|
||||
3
.github/workflows/e2e-test.yml
vendored
3
.github/workflows/e2e-test.yml
vendored
@@ -83,6 +83,9 @@ jobs:
|
||||
- name: Run api e2e tests
|
||||
run: make e2e-api-test
|
||||
|
||||
- name: Run addons e2e tests
|
||||
run: make e2e-addon-test
|
||||
|
||||
- name: Run e2e tests
|
||||
run: make e2e-test
|
||||
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -45,4 +45,7 @@ charts/vela-core/crds/_.yaml
|
||||
.vela/
|
||||
|
||||
# check docs
|
||||
git-page/
|
||||
git-page/
|
||||
|
||||
# e2e rollout runtime image build
|
||||
runtime/rollout/e2e/tmp
|
||||
@@ -5,6 +5,10 @@ WORKDIR /workspace
|
||||
# Copy the Go Modules manifests
|
||||
COPY go.mod go.mod
|
||||
COPY go.sum go.sum
|
||||
|
||||
# It's a proxy for CN developer, please unblock it if you have network issue
|
||||
# RUN go env -w GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
# cache deps before building and copying source so that we don't need to re-download as much
|
||||
# and so that source changes don't invalidate our downloaded layer
|
||||
RUN go mod download
|
||||
|
||||
38
Makefile
38
Makefile
@@ -39,6 +39,9 @@ endif
|
||||
VELA_CORE_IMAGE ?= vela-core:latest
|
||||
VELA_CORE_TEST_IMAGE ?= vela-core-test:$(GIT_COMMIT)
|
||||
VELA_RUNTIME_ROLLOUT_IMAGE ?= vela-runtime-rollout:latest
|
||||
VELA_RUNTIME_ROLLOUT_TEST_IMAGE ?= vela-runtime-rollout-test:$(GIT_COMMIT)
|
||||
RUNTIME_CLUSTER_CONFIG ?= /tmp/worker.kubeconfig
|
||||
RUNTIME_CLUSTER_NAME ?= worker
|
||||
|
||||
all: build
|
||||
|
||||
@@ -143,13 +146,16 @@ e2e-setup-core:
|
||||
helm upgrade --install --create-namespace --namespace vela-system --set image.pullPolicy=IfNotPresent --set image.repository=vela-core-test --set applicationRevisionLimit=5 --set dependCheckWait=10s --set image.tag=$(GIT_COMMIT) --set multicluster.enabled=true --wait kubevela ./charts/vela-core
|
||||
kubectl wait --for=condition=Available deployment/kubevela-vela-core -n vela-system --timeout=180s
|
||||
|
||||
setup-runtime-e2e-cluster:
|
||||
helm upgrade --install --create-namespace --namespace vela-system --kubeconfig=$(RUNTIME_CLUSTER_CONFIG) --set image.pullPolicy=IfNotPresent --set image.repository=vela-runtime-rollout-test --set image.tag=$(GIT_COMMIT) --wait vela-rollout ./runtime/rollout/charts
|
||||
|
||||
e2e-setup:
|
||||
helm install kruise https://github.com/openkruise/kruise/releases/download/v0.9.0/kruise-chart.tgz --set featureGates="PreDownloadImageForInPlaceUpdate=true"
|
||||
sh ./hack/e2e/modify_charts.sh
|
||||
helm upgrade --install --create-namespace --namespace vela-system --set image.pullPolicy=IfNotPresent --set image.repository=vela-core-test --set applicationRevisionLimit=5 --set dependCheckWait=10s --set image.tag=$(GIT_COMMIT) --wait kubevela ./charts/vela-core
|
||||
helm upgrade --install --create-namespace --namespace oam-runtime-system --set image.pullPolicy=IfNotPresent --set image.repository=vela-core-test --set dependCheckWait=10s --set image.tag=$(GIT_COMMIT) --wait oam-runtime ./charts/oam-runtime
|
||||
bin/vela addon enable fluxcd
|
||||
bin/vela addon enable terraform
|
||||
bin/vela addon enable terraform-alibaba ALICLOUD_ACCESS_KEY=xxx ALICLOUD_SECRET_KEY=yyy ALICLOUD_REGION=cn-beijing
|
||||
ginkgo version
|
||||
ginkgo -v -r e2e/setup
|
||||
|
||||
@@ -168,6 +174,11 @@ e2e-test:
|
||||
ginkgo -v --skip="rollout related e2e-test." ./test/e2e-test
|
||||
@$(OK) tests pass
|
||||
|
||||
e2e-addon-test:
|
||||
cp bin/vela /tmp/
|
||||
ginkgo -v ./test/e2e-addon-test
|
||||
@$(OK) tests pass
|
||||
|
||||
e2e-rollout-test:
|
||||
ginkgo -v --focus="rollout related e2e-test." ./test/e2e-test
|
||||
@$(OK) tests pass
|
||||
@@ -193,10 +204,12 @@ e2e-cleanup:
|
||||
rm -rf ~/.vela
|
||||
|
||||
image-cleanup:
|
||||
ifneq (, $(shell which docker))
|
||||
# Delete Docker image
|
||||
ifneq ($(shell docker images -q $(VELA_CORE_TEST_IMAGE)),)
|
||||
docker rmi -f $(VELA_CORE_TEST_IMAGE)
|
||||
endif
|
||||
endif
|
||||
|
||||
end-e2e-core:
|
||||
sh ./hack/e2e/end_e2e_core.sh
|
||||
@@ -209,6 +222,12 @@ kind-load:
|
||||
docker build -t $(VELA_CORE_TEST_IMAGE) -f Dockerfile.e2e .
|
||||
kind load docker-image $(VELA_CORE_TEST_IMAGE) || { echo >&2 "kind not installed or error loading image: $(VELA_CORE_TEST_IMAGE)"; exit 1; }
|
||||
|
||||
kind-load-runtime-cluster:
|
||||
/bin/sh hack/e2e/build_runtime_rollout.sh
|
||||
docker build -t $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE) -f runtime/rollout/e2e/Dockerfile.e2e runtime/rollout/e2e/
|
||||
rm -rf runtime/rollout/e2e/tmp
|
||||
kind load docker-image $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE) --name=$(RUNTIME_CLUSTER_NAME) || { echo >&2 "kind not installed or error loading image: $(VELA_RUNTIME_ROLLOUT_TEST_IMAGE)"; exit 1; }
|
||||
|
||||
# Run tests
|
||||
core-test: fmt vet manifests
|
||||
go test ./pkg/... -coverprofile cover.out
|
||||
@@ -240,7 +259,7 @@ core-uninstall: manifests
|
||||
kubectl delete -f charts/vela-core/crds/
|
||||
|
||||
# Generate manifests e.g. CRD, RBAC etc.
|
||||
manifests: installcue kustomize
|
||||
manifests: installcue kustomize addon
|
||||
go generate $(foreach t,pkg apis,./$(t)/...)
|
||||
# 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
|
||||
@@ -248,7 +267,6 @@ manifests: installcue kustomize
|
||||
go run ./hack/crd/dispatch/dispatch.go config/crd/base charts/vela-core/crds charts/oam-runtime/crds runtime/ charts/vela-minimal/crds
|
||||
rm -f config/crd/base/*
|
||||
./vela-templates/gen_definitions.sh
|
||||
go run ./vela-templates/gen_addons.go
|
||||
|
||||
GOLANGCILINT_VERSION ?= v1.38.0
|
||||
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
||||
@@ -258,16 +276,20 @@ HOSTARCH := amd64
|
||||
endif
|
||||
|
||||
golangci:
|
||||
ifeq (, $(shell which golangci-lint))
|
||||
ifneq ($(shell which golangci-lint),)
|
||||
@$(OK) golangci-lint is already installed
|
||||
GOLANGCILINT=$(shell which golangci-lint)
|
||||
else ifeq (, $(shell which $(GOBIN)/golangci-lint))
|
||||
@{ \
|
||||
set -e ;\
|
||||
echo 'installing golangci-lint-$(GOLANGCILINT_VERSION)' ;\
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) $(GOLANGCILINT_VERSION) ;\
|
||||
echo 'Install succeed' ;\
|
||||
echo 'Successfully installed' ;\
|
||||
}
|
||||
GOLANGCILINT=$(GOBIN)/golangci-lint
|
||||
else
|
||||
GOLANGCILINT=$(shell which golangci-lint)
|
||||
@$(OK) golangci-lint is already installed
|
||||
GOLANGCILINT=$(GOBIN)/golangci-lint
|
||||
endif
|
||||
|
||||
.PHONY: staticchecktool
|
||||
@@ -328,3 +350,7 @@ check-license-header:
|
||||
|
||||
def-install:
|
||||
./hack/utils/installdefinition.sh
|
||||
|
||||
# generate addons to auto-gen and charts
|
||||
addon:
|
||||
go run ./vela-templates/gen_addons.go
|
||||
|
||||
@@ -19,13 +19,11 @@ package common
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/oam-dev/terraform-controller/api/v1beta1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
types "github.com/oam-dev/terraform-controller/api/types/crossplane-runtime"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
|
||||
)
|
||||
|
||||
@@ -114,8 +112,10 @@ type Terraform struct {
|
||||
// +kubebuilder:validation:Enum:=hcl;json;remote
|
||||
Type string `json:"type,omitempty"`
|
||||
|
||||
// ProviderReference specifies the reference to Provider
|
||||
ProviderReference *types.Reference `json:"providerRef,omitempty"`
|
||||
// Path is the sub-directory of remote git repository. It's valid when remote is set
|
||||
Path string `json:"path,omitempty"`
|
||||
|
||||
v1beta1.BaseConfigurationSpec `json:",inline"`
|
||||
}
|
||||
|
||||
// A WorkloadTypeDescriptor refer to a Workload Type
|
||||
|
||||
@@ -21,7 +21,6 @@ limitations under the License.
|
||||
package common
|
||||
|
||||
import (
|
||||
crossplane_runtime "github.com/oam-dev/terraform-controller/api/types/crossplane-runtime"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
@@ -559,11 +558,7 @@ func (in *SubStepsStatus) DeepCopy() *SubStepsStatus {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Terraform) DeepCopyInto(out *Terraform) {
|
||||
*out = *in
|
||||
if in.ProviderReference != nil {
|
||||
in, out := &in.ProviderReference, &out.ProviderReference
|
||||
*out = new(crossplane_runtime.Reference)
|
||||
**out = **in
|
||||
}
|
||||
in.BaseConfigurationSpec.DeepCopyInto(&out.BaseConfigurationSpec)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Terraform.
|
||||
|
||||
@@ -20,6 +20,7 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/klog/v2"
|
||||
"sigs.k8s.io/controller-runtime/pkg/conversion"
|
||||
|
||||
@@ -115,10 +116,17 @@ func (app *Application) ConvertFrom(src conversion.Hub) error {
|
||||
}
|
||||
// convert component
|
||||
// `.properties` -> `.settings`
|
||||
|
||||
var compProperties runtime.RawExtension
|
||||
|
||||
if comp.Properties != nil {
|
||||
compProperties = *comp.Properties.DeepCopy()
|
||||
}
|
||||
|
||||
app.Spec.Components = append(app.Spec.Components, ApplicationComponent{
|
||||
Name: comp.Name,
|
||||
WorkloadType: comp.Type,
|
||||
Settings: *comp.Properties.DeepCopy(),
|
||||
Settings: compProperties,
|
||||
Traits: traits,
|
||||
Scopes: scopes,
|
||||
})
|
||||
|
||||
@@ -38,7 +38,8 @@ type WorkflowStepDefinitionSpec struct {
|
||||
type WorkflowStepDefinitionStatus struct {
|
||||
// ConditionedStatus reflects the observed status of a resource
|
||||
condition.ConditionedStatus `json:",inline"`
|
||||
|
||||
// ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters.
|
||||
ConfigMapRef string `json:"configMapRef,omitempty"`
|
||||
// LatestRevision of the component definition
|
||||
// +optional
|
||||
LatestRevision *common.Revision `json:"latestRevision,omitempty"`
|
||||
|
||||
@@ -85,4 +85,5 @@ var DefaultFilterAnnots = []string{
|
||||
oam.AnnotationInplaceUpgrade,
|
||||
oam.AnnotationFilterLabelKeys,
|
||||
oam.AnnotationFilterAnnotationKeys,
|
||||
oam.AnnotationLastAppliedConfiguration,
|
||||
}
|
||||
|
||||
@@ -188,6 +188,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -197,11 +206,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -211,6 +224,22 @@ spec:
|
||||
- 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
|
||||
@@ -468,6 +497,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -477,11 +515,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -491,6 +533,22 @@ spec:
|
||||
- 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
|
||||
|
||||
@@ -193,6 +193,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -202,11 +211,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -216,6 +229,22 @@ spec:
|
||||
- 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
|
||||
@@ -454,6 +483,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -463,11 +501,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -477,6 +519,22 @@ spec:
|
||||
- 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
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- patch
|
||||
|
||||
@@ -126,7 +126,7 @@ spec:
|
||||
{{ end }}
|
||||
- "--system-definition-namespace={{ .Values.systemDefinitionNamespace }}"
|
||||
- "--oam-spec-ver={{ .Values.OAMSpecVer }}"
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ include "oam-runtime.fullname" . }}-test-connection"
|
||||
name: {{ include "oam-runtime.fullname" . }}-test-connection
|
||||
labels:
|
||||
{{- include "oam-runtime.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
@@ -9,7 +9,7 @@ metadata:
|
||||
spec:
|
||||
containers:
|
||||
- name: wget
|
||||
image: busybox
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.test.app.repository }}:{{ .Values.test.app.tag }}
|
||||
command: ['wget']
|
||||
args: ['{{ include "oam-runtime.fullname" . }}:{{ .Values.healthCheck.port }}']
|
||||
restartPolicy: Never
|
||||
@@ -7,6 +7,8 @@ replicaCount: 1
|
||||
applyOnceOnly: "off"
|
||||
|
||||
disableCaps: "all"
|
||||
|
||||
imageRegistry: ""
|
||||
image:
|
||||
repository: oamdev/vela-core
|
||||
tag: latest
|
||||
@@ -68,8 +70,8 @@ admissionWebhooks:
|
||||
patch:
|
||||
enabled: true
|
||||
image:
|
||||
repository: wonderflow/kube-webhook-certgen
|
||||
tag: v2.1
|
||||
repository: oamdev/kube-webhook-certgen
|
||||
tag: v2.3
|
||||
pullPolicy: IfNotPresent
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
@@ -98,4 +100,9 @@ concurrentReconciles: 4
|
||||
dependCheckWait: 30s
|
||||
|
||||
# OAMSpecVer is the oam spec version controller want to setup
|
||||
OAMSpecVer: "v0.2"
|
||||
OAMSpecVer: "v0.2"
|
||||
|
||||
test:
|
||||
app:
|
||||
repository: oamdev/busybox
|
||||
tag: v1
|
||||
@@ -1232,6 +1232,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -1241,11 +1251,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -1255,6 +1270,23 @@ spec:
|
||||
- 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
|
||||
@@ -1635,6 +1667,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -1644,11 +1686,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -1658,6 +1705,23 @@ spec:
|
||||
- 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
|
||||
@@ -1936,6 +2000,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -1945,11 +2019,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -1959,6 +2038,23 @@ spec:
|
||||
- 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
|
||||
@@ -3360,6 +3456,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -3369,11 +3475,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -3383,6 +3494,23 @@ spec:
|
||||
- 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
|
||||
@@ -3656,6 +3784,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -3665,11 +3803,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -3679,6 +3822,23 @@ spec:
|
||||
- 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
|
||||
@@ -4041,6 +4201,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -4050,11 +4220,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -4064,6 +4239,23 @@ spec:
|
||||
- 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
|
||||
@@ -4305,6 +4497,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -4314,11 +4516,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -4328,6 +4535,23 @@ spec:
|
||||
- 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
|
||||
@@ -4371,6 +4595,10 @@ spec:
|
||||
- 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:
|
||||
@@ -4585,6 +4813,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -4594,11 +4832,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -4608,6 +4851,23 @@ spec:
|
||||
- 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
|
||||
|
||||
@@ -179,6 +179,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -188,11 +197,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -202,6 +215,22 @@ spec:
|
||||
- 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
|
||||
@@ -463,6 +492,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -472,11 +510,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -486,6 +528,22 @@ spec:
|
||||
- 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
|
||||
|
||||
@@ -222,6 +222,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -231,11 +241,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It
|
||||
will override the region in the region field of
|
||||
ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -245,6 +260,23 @@ spec:
|
||||
- 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
|
||||
@@ -506,6 +538,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -515,11 +557,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It
|
||||
will override the region in the region field of
|
||||
ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -529,6 +576,23 @@ spec:
|
||||
- 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
|
||||
@@ -783,6 +847,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -792,11 +866,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It
|
||||
will override the region in the region field of
|
||||
ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -806,6 +885,23 @@ spec:
|
||||
- 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
|
||||
@@ -1041,6 +1137,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -1050,11 +1156,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It
|
||||
will override the region in the region field of
|
||||
ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -1064,6 +1175,23 @@ spec:
|
||||
- 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
|
||||
@@ -1107,6 +1235,10 @@ spec:
|
||||
- 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:
|
||||
|
||||
@@ -151,6 +151,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -160,11 +169,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -174,6 +187,22 @@ spec:
|
||||
- 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
|
||||
|
||||
@@ -188,6 +188,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -197,11 +206,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -211,6 +224,22 @@ spec:
|
||||
- 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
|
||||
@@ -468,6 +497,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -477,11 +515,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -491,6 +533,22 @@ spec:
|
||||
- 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
|
||||
|
||||
@@ -148,6 +148,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -157,11 +166,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -171,6 +184,22 @@ spec:
|
||||
- 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
|
||||
@@ -212,6 +241,10 @@ spec:
|
||||
- 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:
|
||||
|
||||
@@ -193,6 +193,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -202,11 +211,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -216,6 +229,22 @@ spec:
|
||||
- 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
|
||||
@@ -454,6 +483,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -463,11 +501,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -477,6 +519,22 @@ spec:
|
||||
- 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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,255 +1,257 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
application: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
kind: Application
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: istio Controller is a Kubernetes Controller for manage
|
||||
traffic.
|
||||
name: istio
|
||||
namespace: istio-system
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appTemplate:
|
||||
spec:
|
||||
components:
|
||||
- name: istio
|
||||
properties:
|
||||
chart: istio
|
||||
repoType: helm
|
||||
url: https://charts.kubevela.net/addons
|
||||
version: 1.11.1
|
||||
type: helm
|
||||
- name: canary-rollout
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
name: canary-rollout
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |-
|
||||
import ("vela/op")
|
||||
components:
|
||||
- name: ns-istio-system
|
||||
properties:
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: istio-system
|
||||
type: raw
|
||||
- name: istio
|
||||
properties:
|
||||
chart: istio
|
||||
repoType: helm
|
||||
url: https://charts.kubevela.net/addons
|
||||
version: 1.11.1
|
||||
type: helm
|
||||
- name: canary-rollout
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
name: canary-rollout
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |-
|
||||
import ("vela/op")
|
||||
|
||||
parameter: {
|
||||
batchPartition: int
|
||||
traffic: weightedTargets: [...{
|
||||
revision: string
|
||||
weight: int
|
||||
parameter: {
|
||||
batchPartition: int
|
||||
traffic: weightedTargets: [...{
|
||||
revision: string
|
||||
weight: int
|
||||
}]
|
||||
}
|
||||
|
||||
comps__: op.#Load
|
||||
compNames__: [ for name, c in comps__.value {name}]
|
||||
comp__: compNames__[0]
|
||||
|
||||
apply: op.#ApplyComponent & {
|
||||
value: comps__.value[comp__]
|
||||
patch: {
|
||||
traits: "rollout": {
|
||||
spec: rolloutPlan: batchPartition: parameter.batchPartition
|
||||
}
|
||||
|
||||
traits: "virtualService": {
|
||||
spec:
|
||||
// +patchStrategy=retainKeys
|
||||
http: [
|
||||
{
|
||||
route: [
|
||||
for i, t in parameter.traffic.weightedTargets {
|
||||
destination: {
|
||||
host: comp__
|
||||
subset: t.revision
|
||||
}
|
||||
weight: t.weight
|
||||
}]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
traits: "destinationRule": {
|
||||
// +patchStrategy=retainKeys
|
||||
spec: {
|
||||
host: comp__
|
||||
subsets: [
|
||||
for i, t in parameter.traffic.weightedTargets {
|
||||
name: t.revision
|
||||
labels: {"app.oam.dev/revision": t.revision}
|
||||
},
|
||||
]}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
applyRemaining: op.#ApplyRemaining & {
|
||||
exceptions: [comp__]
|
||||
}
|
||||
type: raw
|
||||
- name: istio-gateway
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: use istio to manage in-cluster traffic
|
||||
name: istio-gateway
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: "\noutputs: gateway: {\n apiVersion: \"networking.istio.io/v1alpha3\"\n
|
||||
\ kind: \"Gateway\"\n metadata: {\n name: context.name\n
|
||||
\ namespace: context.namespace\n }\n spec: {\n selector:
|
||||
{\n istio: parameter.gateway\n }\n servers: [{\n hosts:
|
||||
parameter.hosts\n port: {\n name: \"http\"\n number:
|
||||
80\n protocol: \"HTTP\"\n }\n }]\n }\n}\n\noutputs:
|
||||
virtualService: {\n apiVersion: \"networking.istio.io/v1alpha3\"\n
|
||||
\ kind: \"VirtualService\"\n metadata: {\n name: context.name\n
|
||||
\ namespace: context.namespace\n }\n spec: {\n gateways:
|
||||
[context.name]\n hosts: parameter.hosts\n http:[{\n match:
|
||||
[ for i, u in parameter.match { uri: u} ]\n route: [{destination:
|
||||
{\n host: context.name\n port: number: parameter.port\n
|
||||
\ }}]\n }]\n }\n}\n\nparameter: {\n hosts: [string]\n
|
||||
\ gateway: *\"ingressgateway\"|string\n match: [...#uri]\n port:
|
||||
int\n}\n\n#uri: {\n exact?: string\n prefix?: string\n} \n"
|
||||
type: raw
|
||||
- name: canary-rollback
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
name: canary-rollback
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |-
|
||||
import ("vela/op")
|
||||
|
||||
parameter: {...}
|
||||
|
||||
comps: op.#Load
|
||||
compNames: [ for name, c in comps.value {name}]
|
||||
firstcomp: compNames[0]
|
||||
|
||||
rolloutObj: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "standard.oam.dev/v1alpha1"
|
||||
kind: "Rollout"
|
||||
metadata: {
|
||||
name: firstcomp
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_sourceRevision: rolloutObj.value.status.LastSourceRevision
|
||||
|
||||
apply: op.#ApplyComponent & {
|
||||
value: comps.value[firstcomp]
|
||||
patch: {
|
||||
traits: "rollout": {
|
||||
spec: {
|
||||
targetRevisionName: _sourceRevision
|
||||
}
|
||||
}
|
||||
|
||||
traits: "virtualService": {
|
||||
spec:
|
||||
// +patchStrategy=retainKeys
|
||||
http: [
|
||||
{
|
||||
route: [{
|
||||
destination: {
|
||||
host: firstcomp
|
||||
subset: _sourceRevision
|
||||
}
|
||||
weight: 100
|
||||
}]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
comps__: op.#Load
|
||||
compNames__: [ for name, c in comps__.value {name}]
|
||||
comp__: compNames__[0]
|
||||
|
||||
apply: op.#ApplyComponent & {
|
||||
value: comps__.value[comp__]
|
||||
patch: {
|
||||
traits: "rollout": {
|
||||
spec: rolloutPlan: batchPartition: parameter.batchPartition
|
||||
}
|
||||
|
||||
traits: "virtualService": {
|
||||
spec:
|
||||
// +patchStrategy=retainKeys
|
||||
http: [
|
||||
{
|
||||
route: [
|
||||
for i, t in parameter.traffic.weightedTargets {
|
||||
destination: {
|
||||
host: comp__
|
||||
subset: t.revision
|
||||
}
|
||||
weight: t.weight
|
||||
}]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
traits: "destinationRule": {
|
||||
// +patchStrategy=retainKeys
|
||||
spec: {
|
||||
host: comp__
|
||||
subsets: [
|
||||
for i, t in parameter.traffic.weightedTargets {
|
||||
name: t.revision
|
||||
labels: {"app.oam.dev/revision": t.revision}
|
||||
},
|
||||
]}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
applyRemaining: op.#ApplyRemaining & {
|
||||
exceptions: [comp__]
|
||||
}
|
||||
type: raw
|
||||
- name: istio-gateway
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: use istio to manage in-cluster traffic
|
||||
name: istio-gateway
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: "\noutputs: gateway: {\n apiVersion: \"networking.istio.io/v1alpha3\"\n
|
||||
\ kind: \"Gateway\"\n metadata: {\n name: context.name\n
|
||||
\ namespace: context.namespace\n }\n spec: {\n selector:
|
||||
{\n istio: parameter.gateway\n }\n servers: [{\n
|
||||
\ hosts: parameter.hosts\n port: {\n name:
|
||||
\"http\"\n number: 80\n protocol: \"HTTP\"\n
|
||||
\ }\n }]\n }\n}\n\noutputs: virtualService: {\n apiVersion:
|
||||
\"networking.istio.io/v1alpha3\"\n kind: \"VirtualService\"\n
|
||||
\ metadata: {\n name: context.name\n namespace:
|
||||
context.namespace\n }\n spec: {\n gateways: [context.name]\n
|
||||
\ hosts: parameter.hosts\n http:[{\n match: [ for
|
||||
i, u in parameter.match { uri: u} ]\n route: [{destination:
|
||||
{\n host: context.name\n port: number: parameter.port\n
|
||||
\ }}]\n }]\n }\n}\n\nparameter: {\n hosts: [string]\n
|
||||
\ gateway: *\"ingressgateway\"|string\n match: [...#uri]\n
|
||||
\ port: int\n}\n\n#uri: {\n exact?: string\n prefix?: string\n}
|
||||
\n"
|
||||
type: raw
|
||||
- name: canary-rollback
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
name: canary-rollback
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |-
|
||||
import ("vela/op")
|
||||
|
||||
parameter: {...}
|
||||
|
||||
comps: op.#Load
|
||||
compNames: [ for name, c in comps.value {name}]
|
||||
firstcomp: compNames[0]
|
||||
|
||||
rolloutObj: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "standard.oam.dev/v1alpha1"
|
||||
kind: "Rollout"
|
||||
metadata: {
|
||||
name: firstcomp
|
||||
namespace: context.namespace
|
||||
}
|
||||
traits: "destinationRule": {
|
||||
// +patchStrategy=retainKeys
|
||||
spec: {
|
||||
host: firstcomp
|
||||
subsets: [
|
||||
{
|
||||
name: _sourceRevision
|
||||
labels: {"app.oam.dev/revision": _sourceRevision}
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_sourceRevision: rolloutObj.value.status.LastSourceRevision
|
||||
|
||||
apply: op.#ApplyComponent & {
|
||||
value: comps.value[firstcomp]
|
||||
patch: {
|
||||
traits: "rollout": {
|
||||
spec: {
|
||||
targetRevisionName: _sourceRevision
|
||||
}
|
||||
}
|
||||
|
||||
traits: "virtualService": {
|
||||
spec:
|
||||
// +patchStrategy=retainKeys
|
||||
http: [
|
||||
{
|
||||
route: [{
|
||||
destination: {
|
||||
host: firstcomp
|
||||
subset: _sourceRevision
|
||||
}
|
||||
weight: 100
|
||||
}]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
traits: "destinationRule": {
|
||||
// +patchStrategy=retainKeys
|
||||
spec: {
|
||||
host: firstcomp
|
||||
subsets: [
|
||||
{
|
||||
name: _sourceRevision
|
||||
labels: {"app.oam.dev/revision": _sourceRevision}
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
applyRemaining: op.#ApplyRemaining & {
|
||||
exceptions: [firstcomp]
|
||||
}
|
||||
type: raw
|
||||
- name: canary-traffic
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: use istio to manage traffic
|
||||
name: canary-traffic
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: "outputs: service: {\n\t\tapiVersion: \"v1\"\n\t\tkind:
|
||||
\ \"Service\"\n\t\tmetadata: name: context.name\n\t\tspec:
|
||||
{\n\t\t\tselector: \"app.oam.dev/component\": context.name\n\t\t\tports:
|
||||
[\n\t\t\t\tfor p in parameter.port {\n\t\t\t\t\tport: p\n\t\t\t\t\ttargetPort:
|
||||
p\n\t\t\t\t},\n\t\t\t]\n\t\t\ttype: \"ClusterIP\"\n\t\t}\n}\n\noutputs:
|
||||
virtualService: {\n apiVersion: \"networking.istio.io/v1alpha3\"\n
|
||||
\ kind: \"VirtualService\"\n metadata: {\n name: context.name\n
|
||||
\ namespace: context.namespace\n }\n spec: {\n hosts:
|
||||
[context.name]\n http: [{route: [\n {destination: {\n
|
||||
\ host: context.name\n port: {number: parameter.port[0]}\n
|
||||
\ }}]}]\n }\n}\n\noutputs: destinationRule: {\n apiVersion:
|
||||
\"networking.istio.io/v1alpha3\"\n kind: \"DestinationRule\"\n
|
||||
\ metadata: {\n name: context.name\n namespace:
|
||||
context.namespace\n }\n spec: {\n host: context.name\n
|
||||
\ subsets: [{\n name: context.revision\n labels:
|
||||
{\"app.oam.dev/revision\": context.revision}\n }]\n }\n}\n\nparameter:
|
||||
{\n port: [int]\n} \n"
|
||||
type: raw
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
dependsOn:
|
||||
- ref:
|
||||
applyRemaining: op.#ApplyRemaining & {
|
||||
exceptions: [firstcomp]
|
||||
}
|
||||
type: raw
|
||||
- name: canary-traffic
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
name: fluxcd
|
||||
namespace: vela-system
|
||||
- ref:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
name: ns-istio-system
|
||||
namespace: vela-system
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: use istio to manage traffic
|
||||
name: canary-traffic
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: "outputs: service: {\n\t\tapiVersion: \"v1\"\n\t\tkind: \"Service\"\n\t\tmetadata:
|
||||
name: context.name\n\t\tspec: {\n\t\t\tselector: \"app.oam.dev/component\":
|
||||
context.name\n\t\t\tports: [\n\t\t\t\tfor p in parameter.port {\n\t\t\t\t\tport:
|
||||
\ p\n\t\t\t\t\ttargetPort: p\n\t\t\t\t},\n\t\t\t]\n\t\t\ttype:
|
||||
\"ClusterIP\"\n\t\t}\n}\n\noutputs: virtualService: {\n apiVersion:
|
||||
\"networking.istio.io/v1alpha3\"\n kind: \"VirtualService\"\n metadata:
|
||||
{\n name: context.name\n namespace: context.namespace\n
|
||||
\ }\n spec: {\n hosts: [context.name]\n http: [{route:
|
||||
[\n {destination: {\n host: context.name\n port:
|
||||
{number: parameter.port[0]}\n }}]}]\n }\n}\n\noutputs: destinationRule:
|
||||
{\n apiVersion: \"networking.istio.io/v1alpha3\"\n kind:
|
||||
\"DestinationRule\"\n metadata: {\n name: context.name\n
|
||||
\ namespace: context.namespace\n }\n spec: {\n
|
||||
\ host: context.name\n subsets: [{\n name:
|
||||
context.revision\n labels: {\"app.oam.dev/revision\": context.revision}\n
|
||||
\ }]\n }\n}\n\nparameter: {\n port: [int]\n} \n"
|
||||
type: raw
|
||||
workflow:
|
||||
steps:
|
||||
- name: checking-depends-on
|
||||
properties:
|
||||
name: fluxcd
|
||||
namespace: vela-system
|
||||
type: depends-on-app
|
||||
- name: apply-ns
|
||||
properties:
|
||||
component: ns-istio-system
|
||||
type: apply-component
|
||||
- name: apply-resources
|
||||
type: apply-remaining
|
||||
status:
|
||||
observedGeneration: 0
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
|
||||
@@ -1,39 +1,38 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
application: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
kind: Application
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: KEDA is a Kubernetes-based Event Driven Autoscaler.
|
||||
name: keda
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appTemplate:
|
||||
spec:
|
||||
components:
|
||||
- name: keda
|
||||
properties:
|
||||
chart: keda
|
||||
repoType: helm
|
||||
url: https://kedacore.github.io/charts
|
||||
type: helm
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
dependsOn:
|
||||
- ref:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
name: fluxcd
|
||||
namespace: vela-system
|
||||
components:
|
||||
- name: keda
|
||||
properties:
|
||||
chart: keda
|
||||
repoType: helm
|
||||
url: https://kedacore.github.io/charts
|
||||
type: helm
|
||||
workflow:
|
||||
steps:
|
||||
- name: checking-depends-on
|
||||
properties:
|
||||
name: fluxcd
|
||||
namespace: vela-system
|
||||
type: depends-on-app
|
||||
- name: apply-resources
|
||||
type: apply-application
|
||||
status:
|
||||
observedGeneration: 0
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
application: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
kind: Application
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kruise is a Kubernetes extended suite for application
|
||||
@@ -10,182 +10,173 @@ data:
|
||||
name: kruise
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appTemplate:
|
||||
spec:
|
||||
components:
|
||||
- name: kruise
|
||||
properties:
|
||||
chart: ./charts/kruise/v0.9.0
|
||||
git:
|
||||
branch: master
|
||||
repoType: git
|
||||
url: https://github.com/openkruise/kruise
|
||||
values:
|
||||
featureGates: PreDownloadImageForInPlaceUpdate=true
|
||||
type: helm
|
||||
- name: cloneset
|
||||
properties:
|
||||
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. If workload type is skipped for any service
|
||||
defined in Appfile, it will be defaulted to `webservice` type.
|
||||
name: cloneset
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: "output: {\n\tapiVersion: \"apps.kruise.io/v1alpha1\"\n\tkind:
|
||||
\ \"CloneSet\"\n\tmetadata: labels: {\n\t\t\"app.oam.dev/component\":
|
||||
context.name\n\t}\n\tspec: {\n\t\tselector: matchLabels: {\n\t\t\t\"app.oam.dev/component\":
|
||||
context.name\n\t\t}\n\n\t\ttemplate: {\n\t\t\tmetadata: labels:
|
||||
{\n\t\t\t\t\"app.oam.dev/component\": context.name\n\t\t\t}\n\n\t\t\tspec:
|
||||
{\n\t\t\t\tcontainers: [{\n\t\t\t\t\tname: context.name\n\t\t\t\t\timage:
|
||||
parameter.image\n\n\t\t\t\t\tif parameter.cmd != _|_ {\n\t\t\t\t\t\tcommand:
|
||||
parameter.cmd\n\t\t\t\t\t}\n\t\t\t\t\tif parameter.args != _|_ {\n\t\t\t\t\t\targs:
|
||||
parameter.args\n\t\t\t\t\t}\n\t\t\t\t\tif parameter.env != _|_ {\n\t\t\t\t\t\tenv:
|
||||
parameter.env\n\t\t\t\t\t}\n\n\t\t\t\t\tif context.config != _|_
|
||||
{\n\t\t\t\t\t\tenv: context.config\n\t\t\t\t\t}\n\n\t\t\t\t\tif
|
||||
parameter[\"imagePullPolicy\"] != _|_ {\n\t\t\t\t\t\timagePullPolicy:
|
||||
parameter.imagePullPolicy\n\t\t\t\t\t}\n\n\t\t\t\t\tports: [{\n\t\t\t\t\t\tcontainerPort:
|
||||
parameter.port\n\t\t\t\t\t}]\n\n\t\t\t\t\tif parameter[\"cpu\"]
|
||||
!= _|_ {\n\t\t\t\t\t\tresources: {\n\t\t\t\t\t\t\tlimits: cpu: parameter.cpu\n\t\t\t\t\t\t\trequests:
|
||||
cpu: parameter.cpu\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif parameter[\"memory\"]
|
||||
!= _|_ {\n\t\t\t\t\t\tresources: {\n\t\t\t\t\t\t\tlimits: memory:
|
||||
\ parameter.memory\n\t\t\t\t\t\t\trequests: memory: parameter.memory\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif
|
||||
parameter[\"livenessProbe\"] != _|_ {\n\t\t\t\t\t\tlivenessProbe:
|
||||
parameter.livenessProbe\n\t\t\t\t\t}\n\n\t\t\t\t\tif parameter[\"readinessProbe\"]
|
||||
!= _|_ {\n\t\t\t\t\t\treadinessProbe: parameter.readinessProbe\n\t\t\t\t\t}\n\n\t\t\t\t\tlifecycle:
|
||||
{\n\t\t\t\t\t\tif parameter.postStart != _|_ {\n\t\t\t\t\t\t\tpostStart:
|
||||
exec: command: parameter.postStart\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif
|
||||
parameter.preStop != _|_ {\n\t\t\t\t\t\t\tpreStop: exec: command:
|
||||
parameter.preStop\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}]\n\t\t\t\tif
|
||||
parameter.hostAliases != _|_ {\n\t\t\t\t\thostAliases: parameter.hostAliases\n\t\t\t\t}\n\t\t\t\tif
|
||||
parameter[\"imagePullSecrets\"] != _|_ {\n\t\t\t\t\timagePullSecrets:
|
||||
[ for v in parameter.imagePullSecrets {name: v}]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif
|
||||
parameter.updateStrategyType != _|_ {\n\t\t\tupdateStrategy: {\n\t\t\t\ttype:
|
||||
parameter.updateStrategyType\n\t\t\t}\n\t\t}\n\t}\n}\nparameter:
|
||||
{\n\t// +usage=Which image would you like to use for your service\n\t//
|
||||
+short=i\n\timage: string\n\n\t// +usage=Specify image pull policy
|
||||
for your service\n\timagePullPolicy?: string\n\n\t// +usage=Specify
|
||||
image pull secrets for your service\n\timagePullSecrets?: [...string]\n\n\t//
|
||||
+usage=Number of CPU units for the service, like `0.5` (0.5 CPU
|
||||
core), `1` (1 CPU core)\n\tcpu?: string\n\n\t// +usage=Specify the
|
||||
amount of memory to limit\n\tmemory?: *\"2048Mi\" | =~\"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$\"\n\n\t//
|
||||
+usage=Commands to run in the container\n\tcmd?: [...string]\n\n\t//
|
||||
+usage=Arguments to the command.\n\targs?: [...string]\n\n\t// +usage=postStart
|
||||
commands will be called immediately after a container is created.\n\tpostStart?:
|
||||
[...string]\n\n\t// +usage=PreStop is called immediately before
|
||||
a container is terminated due to an API request or management event
|
||||
such as liveness/startup probe failure, preemption, resource contention,
|
||||
etc. The handler is not called if the container crashes or exits.
|
||||
The reason for termination is passed to the handler. The Pod's termination
|
||||
grace period countdown begins before the PreStop hooked is executed.
|
||||
Regardless of the outcome of the handler, the container will eventually
|
||||
terminate within the Pod's termination grace period. Other management
|
||||
of the container blocks until the hook completes or until the termination
|
||||
grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks\n\tpreStop?:
|
||||
[...string]\n\n\t// +usage=Which port do you want customer traffic
|
||||
sent to\n\t// +short=p\n\tport: *80 | int\n\n\t// +usage=Define
|
||||
arguments by using environment variables\n\tenv?: [...#ENV]\n\n\t//
|
||||
+usage=Cloneset updateStrategy, candidates are `ReCreate`/`InPlaceIfPossible`/`InPlaceOnly`\n\tupdateStrategyType?:
|
||||
string\n\n\t// +usage=HostAliases is a list of hosts and IPs that
|
||||
will be write into the pod's hosts file\n\thostAliases?: [...{\n\t\thostnames:
|
||||
[...string]\n\t\tip: string\n\t}]\n\n\t// +usage=Instructions for
|
||||
assessing whether the container is alive.\n\tlivenessProbe?: #HealthProbe\n\n\t//
|
||||
+usage=Instructions for assessing whether the container is in a
|
||||
suitable state to serve traffic.\n\treadinessProbe?: #HealthProbe\n}\n\n#ENV:
|
||||
{\n\t// +usage=Environment variable name\n\tname: string\n\t// +usage=The
|
||||
value of the environment variable\n\tvalue?: string\n\t// +usage=Specifies
|
||||
a source the value of this var should come from\n\tvalueFrom?: {\n\t\t//
|
||||
+usage=Selects a key of a secret in the pod's namespace\n\t\tsecretKeyRef:
|
||||
{\n\t\t\t// +usage=The name of the secret in the pod's namespace
|
||||
to select from\n\t\t\tname: string\n\t\t\t// +usage=The key of the
|
||||
secret to select from. Must be a valid secret key\n\t\t\tkey: string\n\t\t}\n\t}\n}\n\n#HealthProbe:
|
||||
{\n\n\t// +usage=Instructions for assessing container health by
|
||||
executing a command. Either this attribute or the httpGet attribute
|
||||
or the tcpSocket attribute MUST be specified. This attribute is
|
||||
mutually exclusive with both the httpGet attribute and the tcpSocket
|
||||
attribute.\n\texec?: {\n\t\t// +usage=A command to be executed inside
|
||||
the container to assess its health. Each space delimited token of
|
||||
the command is a separate array element. Commands exiting 0 are
|
||||
considered to be successful probes, whilst all other exit codes
|
||||
are considered failures.\n\t\tcommand: [...string]\n\t}\n\n\t//
|
||||
+usage=Instructions for assessing container health by executing
|
||||
an HTTP GET request. Either this attribute or the exec attribute
|
||||
or the tcpSocket attribute MUST be specified. This attribute is
|
||||
mutually exclusive with both the exec attribute and the tcpSocket
|
||||
attribute.\n\thttpGet?: {\n\t\t// +usage=The endpoint, relative
|
||||
to the port, to which the HTTP GET request should be directed.\n\t\tpath:
|
||||
string\n\t\t// +usage=The TCP socket within the container to which
|
||||
the HTTP GET request should be directed.\n\t\tport: int\n\t\thttpHeaders?:
|
||||
[...{\n\t\t\tname: string\n\t\t\tvalue: string\n\t\t}]\n\t}\n\n\t//
|
||||
+usage=Instructions for assessing container health by probing a
|
||||
TCP socket. Either this attribute or the exec attribute or the httpGet
|
||||
attribute MUST be specified. This attribute is mutually exclusive
|
||||
with both the exec attribute and the httpGet attribute.\n\ttcpSocket?:
|
||||
{\n\t\t// +usage=The TCP socket within the container that should
|
||||
be probed to assess container health.\n\t\tport: int\n\t}\n\n\t//
|
||||
+usage=Number of seconds after the container is started before the
|
||||
first probe is initiated.\n\tinitialDelaySeconds: *0 | int\n\n\t//
|
||||
+usage=How often, in seconds, to execute the probe.\n\tperiodSeconds:
|
||||
*10 | int\n\n\t// +usage=Number of seconds after which the probe
|
||||
times out.\n\ttimeoutSeconds: *1 | int\n\n\t// +usage=Minimum consecutive
|
||||
successes for the probe to be considered successful after having
|
||||
failed.\n\tsuccessThreshold: *1 | int\n\n\t// +usage=Number of consecutive
|
||||
failures required to determine the container is not alive (liveness
|
||||
probe) or not ready (readiness probe).\n\tfailureThreshold: *3 |
|
||||
int\n} \n"
|
||||
workload:
|
||||
definition:
|
||||
apiVersion: apps.kruise.io/v1alpha1
|
||||
kind: CloneSet
|
||||
type: raw
|
||||
- name: predownloadimage
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
name: predownloadimage
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: "import (\"vela/op\")\nparameter: {\n image: string\n parallel:
|
||||
int\n kvs: [string]: string\n type: *\"Always\" | string\n activeDeadlineSeconds:
|
||||
*1200 | int\n ttlSecondsAfterFinished: *300 | int\n backoffLimit?:
|
||||
int\n timeoutSeconds?: int\n arr: [...string]\n}\n\npullImageJob:
|
||||
op.#Apply & {\n value:{\n apiVersion: \"apps.kruise.io/v1alpha1\"\n
|
||||
\ kind: \"ImagePullJob\"\n metadata: {\n name: \"pull-image-job\"\n
|
||||
\ }\n spec: {\n image: parameter.image\n parallelism:
|
||||
parameter.parallel\n selector: matchLabels: parameter.kvs\n
|
||||
\ completionPolicy: {\n type: parameter.type\n activeDeadlineSeconds:
|
||||
parameter.activeDeadlineSeconds\n ttlSecondsAfterFinished:
|
||||
parameter.ttlSecondsAfterFinished\n }\n pullPolicy: {\n
|
||||
\ if parameter.backoffLimit != _|_ {\n backoffLimit:
|
||||
parameter.backoffLimit\n }\n if parameter.timeoutSeconds
|
||||
!= _|_ {\n timeoutSeconds: parameter.timeoutSeconds\n }\n
|
||||
\ }\n pullSecrets: parameter.arr\n } \n }
|
||||
\ \n} \n"
|
||||
type: raw
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
dependsOn:
|
||||
- ref:
|
||||
components:
|
||||
- name: kruise
|
||||
properties:
|
||||
chart: ./charts/kruise/v0.9.0
|
||||
git:
|
||||
branch: master
|
||||
repoType: git
|
||||
url: https://github.com/openkruise/kruise
|
||||
values:
|
||||
featureGates: PreDownloadImageForInPlaceUpdate=true
|
||||
type: helm
|
||||
- name: cloneset
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
name: fluxcd
|
||||
namespace: vela-system
|
||||
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. If workload type is skipped for any service defined
|
||||
in Appfile, it will be defaulted to `webservice` type.
|
||||
name: cloneset
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: "output: {\n\tapiVersion: \"apps.kruise.io/v1alpha1\"\n\tkind:
|
||||
\ \"CloneSet\"\n\tmetadata: labels: {\n\t\t\"app.oam.dev/component\":
|
||||
context.name\n\t}\n\tspec: {\n\t\tselector: matchLabels: {\n\t\t\t\"app.oam.dev/component\":
|
||||
context.name\n\t\t}\n\n\t\ttemplate: {\n\t\t\tmetadata: labels: {\n\t\t\t\t\"app.oam.dev/component\":
|
||||
context.name\n\t\t\t}\n\n\t\t\tspec: {\n\t\t\t\tcontainers: [{\n\t\t\t\t\tname:
|
||||
\ context.name\n\t\t\t\t\timage: parameter.image\n\n\t\t\t\t\tif parameter.cmd
|
||||
!= _|_ {\n\t\t\t\t\t\tcommand: parameter.cmd\n\t\t\t\t\t}\n\t\t\t\t\tif
|
||||
parameter.args != _|_ {\n\t\t\t\t\t\targs: parameter.args\n\t\t\t\t\t}\n\t\t\t\t\tif
|
||||
parameter.env != _|_ {\n\t\t\t\t\t\tenv: parameter.env\n\t\t\t\t\t}\n\n\t\t\t\t\tif
|
||||
context.config != _|_ {\n\t\t\t\t\t\tenv: context.config\n\t\t\t\t\t}\n\n\t\t\t\t\tif
|
||||
parameter[\"imagePullPolicy\"] != _|_ {\n\t\t\t\t\t\timagePullPolicy:
|
||||
parameter.imagePullPolicy\n\t\t\t\t\t}\n\n\t\t\t\t\tports: [{\n\t\t\t\t\t\tcontainerPort:
|
||||
parameter.port\n\t\t\t\t\t}]\n\n\t\t\t\t\tif parameter[\"cpu\"] != _|_
|
||||
{\n\t\t\t\t\t\tresources: {\n\t\t\t\t\t\t\tlimits: cpu: parameter.cpu\n\t\t\t\t\t\t\trequests:
|
||||
cpu: parameter.cpu\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif parameter[\"memory\"]
|
||||
!= _|_ {\n\t\t\t\t\t\tresources: {\n\t\t\t\t\t\t\tlimits: memory: parameter.memory\n\t\t\t\t\t\t\trequests:
|
||||
memory: parameter.memory\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif
|
||||
parameter[\"livenessProbe\"] != _|_ {\n\t\t\t\t\t\tlivenessProbe: parameter.livenessProbe\n\t\t\t\t\t}\n\n\t\t\t\t\tif
|
||||
parameter[\"readinessProbe\"] != _|_ {\n\t\t\t\t\t\treadinessProbe:
|
||||
parameter.readinessProbe\n\t\t\t\t\t}\n\n\t\t\t\t\tlifecycle: {\n\t\t\t\t\t\tif
|
||||
parameter.postStart != _|_ {\n\t\t\t\t\t\t\tpostStart: exec: command:
|
||||
parameter.postStart\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif parameter.preStop
|
||||
!= _|_ {\n\t\t\t\t\t\t\tpreStop: exec: command: parameter.preStop\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}]\n\t\t\t\tif
|
||||
parameter.hostAliases != _|_ {\n\t\t\t\t\thostAliases: parameter.hostAliases\n\t\t\t\t}\n\t\t\t\tif
|
||||
parameter[\"imagePullSecrets\"] != _|_ {\n\t\t\t\t\timagePullSecrets:
|
||||
[ for v in parameter.imagePullSecrets {name: v}]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif
|
||||
parameter.updateStrategyType != _|_ {\n\t\t\tupdateStrategy: {\n\t\t\t\ttype:
|
||||
parameter.updateStrategyType\n\t\t\t}\n\t\t}\n\t}\n}\nparameter: {\n\t//
|
||||
+usage=Which image would you like to use for your service\n\t// +short=i\n\timage:
|
||||
string\n\n\t// +usage=Specify image pull policy for your service\n\timagePullPolicy?:
|
||||
string\n\n\t// +usage=Specify image pull secrets for your service\n\timagePullSecrets?:
|
||||
[...string]\n\n\t// +usage=Number of CPU units for the service, like
|
||||
`0.5` (0.5 CPU core), `1` (1 CPU core)\n\tcpu?: string\n\n\t// +usage=Specify
|
||||
the amount of memory to limit\n\tmemory?: *\"2048Mi\" | =~\"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$\"\n\n\t//
|
||||
+usage=Commands to run in the container\n\tcmd?: [...string]\n\n\t//
|
||||
+usage=Arguments to the command.\n\targs?: [...string]\n\n\t// +usage=postStart
|
||||
commands will be called immediately after a container is created.\n\tpostStart?:
|
||||
[...string]\n\n\t// +usage=PreStop is called immediately before a container
|
||||
is terminated due to an API request or management event such as liveness/startup
|
||||
probe failure, preemption, resource contention, etc. The handler is
|
||||
not called if the container crashes or exits. The reason for termination
|
||||
is passed to the handler. The Pod's termination grace period countdown
|
||||
begins before the PreStop hooked is executed. Regardless of the outcome
|
||||
of the handler, the container will eventually terminate within the Pod's
|
||||
termination grace period. Other management of the container blocks until
|
||||
the hook completes or until the termination grace period is reached.
|
||||
More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks\n\tpreStop?:
|
||||
[...string]\n\n\t// +usage=Which port do you want customer traffic sent
|
||||
to\n\t// +short=p\n\tport: *80 | int\n\n\t// +usage=Define arguments
|
||||
by using environment variables\n\tenv?: [...#ENV]\n\n\t// +usage=Cloneset
|
||||
updateStrategy, candidates are `ReCreate`/`InPlaceIfPossible`/`InPlaceOnly`\n\tupdateStrategyType?:
|
||||
string\n\n\t// +usage=HostAliases is a list of hosts and IPs that will
|
||||
be write into the pod's hosts file\n\thostAliases?: [...{\n\t\thostnames:
|
||||
[...string]\n\t\tip: string\n\t}]\n\n\t// +usage=Instructions for assessing
|
||||
whether the container is alive.\n\tlivenessProbe?: #HealthProbe\n\n\t//
|
||||
+usage=Instructions for assessing whether the container is in a suitable
|
||||
state to serve traffic.\n\treadinessProbe?: #HealthProbe\n}\n\n#ENV:
|
||||
{\n\t// +usage=Environment variable name\n\tname: string\n\t// +usage=The
|
||||
value of the environment variable\n\tvalue?: string\n\t// +usage=Specifies
|
||||
a source the value of this var should come from\n\tvalueFrom?: {\n\t\t//
|
||||
+usage=Selects a key of a secret in the pod's namespace\n\t\tsecretKeyRef:
|
||||
{\n\t\t\t// +usage=The name of the secret in the pod's namespace to
|
||||
select from\n\t\t\tname: string\n\t\t\t// +usage=The key of the secret
|
||||
to select from. Must be a valid secret key\n\t\t\tkey: string\n\t\t}\n\t}\n}\n\n#HealthProbe:
|
||||
{\n\n\t// +usage=Instructions for assessing container health by executing
|
||||
a command. Either this attribute or the httpGet attribute or the tcpSocket
|
||||
attribute MUST be specified. This attribute is mutually exclusive with
|
||||
both the httpGet attribute and the tcpSocket attribute.\n\texec?: {\n\t\t//
|
||||
+usage=A command to be executed inside the container to assess its health.
|
||||
Each space delimited token of the command is a separate array element.
|
||||
Commands exiting 0 are considered to be successful probes, whilst all
|
||||
other exit codes are considered failures.\n\t\tcommand: [...string]\n\t}\n\n\t//
|
||||
+usage=Instructions for assessing container health by executing an HTTP
|
||||
GET request. Either this attribute or the exec attribute or the tcpSocket
|
||||
attribute MUST be specified. This attribute is mutually exclusive with
|
||||
both the exec attribute and the tcpSocket attribute.\n\thttpGet?: {\n\t\t//
|
||||
+usage=The endpoint, relative to the port, to which the HTTP GET request
|
||||
should be directed.\n\t\tpath: string\n\t\t// +usage=The TCP socket
|
||||
within the container to which the HTTP GET request should be directed.\n\t\tport:
|
||||
int\n\t\thttpHeaders?: [...{\n\t\t\tname: string\n\t\t\tvalue: string\n\t\t}]\n\t}\n\n\t//
|
||||
+usage=Instructions for assessing container health by probing a TCP
|
||||
socket. Either this attribute or the exec attribute or the httpGet attribute
|
||||
MUST be specified. This attribute is mutually exclusive with both the
|
||||
exec attribute and the httpGet attribute.\n\ttcpSocket?: {\n\t\t// +usage=The
|
||||
TCP socket within the container that should be probed to assess container
|
||||
health.\n\t\tport: int\n\t}\n\n\t// +usage=Number of seconds after the
|
||||
container is started before the first probe is initiated.\n\tinitialDelaySeconds:
|
||||
*0 | int\n\n\t// +usage=How often, in seconds, to execute the probe.\n\tperiodSeconds:
|
||||
*10 | int\n\n\t// +usage=Number of seconds after which the probe times
|
||||
out.\n\ttimeoutSeconds: *1 | int\n\n\t// +usage=Minimum consecutive
|
||||
successes for the probe to be considered successful after having failed.\n\tsuccessThreshold:
|
||||
*1 | int\n\n\t// +usage=Number of consecutive failures required to determine
|
||||
the container is not alive (liveness probe) or not ready (readiness
|
||||
probe).\n\tfailureThreshold: *3 | int\n} \n"
|
||||
workload:
|
||||
definition:
|
||||
apiVersion: apps.kruise.io/v1alpha1
|
||||
kind: CloneSet
|
||||
type: raw
|
||||
- name: predownloadimage
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
name: predownloadimage
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: "import (\"vela/op\")\nparameter: {\n image: string\n parallel:
|
||||
int\n kvs: [string]: string\n type: *\"Always\" | string\n activeDeadlineSeconds:
|
||||
*1200 | int\n ttlSecondsAfterFinished: *300 | int\n backoffLimit?:
|
||||
int\n timeoutSeconds?: int\n arr: [...string]\n}\n\npullImageJob:
|
||||
op.#Apply & {\n value:{\n apiVersion: \"apps.kruise.io/v1alpha1\"\n
|
||||
\ kind: \"ImagePullJob\"\n metadata: {\n name: \"pull-image-job\"\n
|
||||
\ }\n spec: {\n image: parameter.image\n parallelism:
|
||||
parameter.parallel\n selector: matchLabels: parameter.kvs\n completionPolicy:
|
||||
{\n type: parameter.type\n activeDeadlineSeconds: parameter.activeDeadlineSeconds\n
|
||||
\ ttlSecondsAfterFinished: parameter.ttlSecondsAfterFinished\n
|
||||
\ }\n pullPolicy: {\n if parameter.backoffLimit != _|_
|
||||
{\n backoffLimit: parameter.backoffLimit\n }\n if
|
||||
parameter.timeoutSeconds != _|_ {\n timeoutSeconds: parameter.timeoutSeconds\n
|
||||
\ }\n }\n pullSecrets: parameter.arr\n } \n
|
||||
\ } \n} \n"
|
||||
type: raw
|
||||
workflow:
|
||||
steps:
|
||||
- name: checking-depends-on
|
||||
properties:
|
||||
name: fluxcd
|
||||
namespace: vela-system
|
||||
type: depends-on-app
|
||||
- name: apply-resources
|
||||
type: apply-application
|
||||
status:
|
||||
observedGeneration: 0
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Create namespace for flux-system
|
||||
name: ns-flux-system
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appTemplate:
|
||||
spec:
|
||||
components:
|
||||
- name: flux-system
|
||||
properties:
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: flux-system
|
||||
type: raw
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
status:
|
||||
observedGeneration: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Create namespace for flux-system
|
||||
addons.oam.dev/name: ns-flux-system
|
||||
labels:
|
||||
addons.oam.dev/type: ns-flux-system
|
||||
name: ns-flux-system
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
@@ -1,40 +0,0 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Create namespace for istio-system
|
||||
name: ns-istio-system
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appTemplate:
|
||||
spec:
|
||||
components:
|
||||
- name: istio-system
|
||||
properties:
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: istio-system
|
||||
type: raw
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
status:
|
||||
observedGeneration: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Create namespace for istio-system
|
||||
addons.oam.dev/name: ns-istio-system
|
||||
labels:
|
||||
addons.oam.dev/type: ns-istio-system
|
||||
name: ns-istio-system
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
@@ -1,128 +0,0 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Preparations that observability need
|
||||
name: observability-asset
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appTemplate:
|
||||
spec:
|
||||
components:
|
||||
- name: observability
|
||||
properties:
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: observability
|
||||
type: raw
|
||||
- name: import-grafana-dashboard
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Import dashboards to Grafana
|
||||
name: import-grafana-dashboard
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: "outputs: registerdatasource: {\n\tapiVersion: \"grafana.extension.oam.dev/v1alpha1\"\n\tkind:
|
||||
\ \"ImportDashboard\"\n\tspec: {\n\t\tgrafana: {\n\t\t\tservice:
|
||||
\ parameter.grafanaServiceName\n\t\t\tnamespace:
|
||||
\ parameter.grafanaServiceNamespace\n\t\t\tcredentialSecret:
|
||||
\ parameter.credentialSecret\n\t\t\tcredentialSecretNamespace:
|
||||
parameter.credentialSecretNamespace\n\t\t}\n\t\turls: parameter.urls\n\t}\n}\nparameter:
|
||||
{\n\tgrafanaServiceName: string\n\tgrafanaServiceNamespace:
|
||||
\ *\"default\" | string\n\tcredentialSecret: string\n\tcredentialSecretNamespace:
|
||||
*\"default\" | string\n\turls: [...string]\n} \n"
|
||||
type: raw
|
||||
- name: pure-ingress
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Enable public web traffic for the component
|
||||
without creating a Service.
|
||||
name: pure-ingress
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: "\noutputs: ingress: {\n\tapiVersion: \"networking.k8s.io/v1beta1\"\n\tkind:
|
||||
\ \"Ingress\"\n\tmetadata:\n\t\tname: context.name\n\tspec:
|
||||
{\n\t\trules: [{\n\t\t\thost: parameter.domain\n\t\t\thttp: {\n\t\t\t\tpaths:
|
||||
[\n\t\t\t\t\tfor k, v in parameter.http {\n\t\t\t\t\t\tpath: k\n\t\t\t\t\t\tbackend:
|
||||
{\n\t\t\t\t\t\t\tserviceName: context.name\n\t\t\t\t\t\t\tservicePort:
|
||||
v\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t]\n\t\t\t}\n\t\t}]\n\t}\n}\n\nparameter:
|
||||
{\n\t// +usage=Specify the domain you want to expose\n\tdomain:
|
||||
string\n\n\t// +usage=Specify the mapping relationship between the
|
||||
http path and the workload port\n\thttp: [string]: int\n}\n"
|
||||
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
|
||||
}
|
||||
}
|
||||
healthPolicy: |
|
||||
isHealth: len(context.outputs.ingress.status.loadBalancer.ingress) > 0
|
||||
type: raw
|
||||
- name: register-grafana-datasource
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Add a datasource to Grafana
|
||||
name: register-grafana-datasource
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: "outputs: registerdatasource: {\n\tapiVersion: \"grafana.extension.oam.dev/v1alpha1\"\n\tkind:
|
||||
\ \"DatasourceRegistration\"\n\tspec: {\n\t\tgrafana: {\n\t\t\tservice:
|
||||
\ parameter.grafanaServiceName\n\t\t\tnamespace:
|
||||
\ parameter.grafanaServiceNamespace\n\t\t\tcredentialSecret:
|
||||
\ parameter.credentialSecret\n\t\t\tcredentialSecretNamespace:
|
||||
parameter.credentialSecretNamespace\n\t\t}\n\t\tdatasource: {\n\t\t\tname:
|
||||
\ parameter.name\n\t\t\ttype: parameter.type\n\t\t\taccess:
|
||||
\ parameter.access\n\t\t\tservice: parameter.service\n\t\t\tnamespace:
|
||||
parameter.namespace\n\t\t}\n\t}\n}\n\nparameter: {\n\tgrafanaServiceName:
|
||||
\ string\n\tgrafanaServiceNamespace: *\"default\" | string\n\tcredentialSecret:
|
||||
\ string\n\tcredentialSecretNamespace: string\n\tname: string\n\ttype:
|
||||
\ string\n\taccess: *\"proxy\"
|
||||
| string\n\tservice: string\n\tnamespace: *\"default\"
|
||||
| string\n}\n"
|
||||
type: raw
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
status:
|
||||
observedGeneration: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Preparations that observability need
|
||||
addons.oam.dev/name: observability-asset
|
||||
labels:
|
||||
addons.oam.dev/type: observability-asset
|
||||
name: observability-asset
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
@@ -1,141 +1,134 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
application: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
kind: Application
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: An out of the box solution for KubeVela observability
|
||||
name: observability
|
||||
namespace: observability
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appTemplate:
|
||||
spec:
|
||||
components:
|
||||
- name: grafana-registration
|
||||
properties:
|
||||
chart: ./chart
|
||||
git:
|
||||
branch: master
|
||||
repoType: git
|
||||
targetNamespace: observability
|
||||
url: https://github.com/oam-dev/grafana-registration
|
||||
values:
|
||||
replicaCount: 1
|
||||
type: helm
|
||||
- name: grafana
|
||||
properties:
|
||||
chart: grafana
|
||||
releaseName: grafana
|
||||
repoType: helm
|
||||
targetNamespace: observability
|
||||
url: https://charts.kubevela.net/addons
|
||||
version: 6.14.1
|
||||
traits:
|
||||
- properties:
|
||||
domain: '[[ index .Args "grafana-domain" ]]'
|
||||
http:
|
||||
/: 80
|
||||
type: pure-ingress
|
||||
- properties:
|
||||
credentialSecret: grafana
|
||||
credentialSecretNamespace: observability
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: observability
|
||||
urls:
|
||||
- https://charts.kubevela.net/addons/dashboards/kubevela_core_logging.json
|
||||
- https://charts.kubevela.net/addons/dashboards/kubevela_core_monitoring.json
|
||||
- https://charts.kubevela.net/addons/dashboards/kubevela_application_logging.json
|
||||
- https://charts.kubevela.net/addons/dashboards/flux2/cluster.json
|
||||
type: import-grafana-dashboard
|
||||
type: helm
|
||||
- name: loki
|
||||
properties:
|
||||
chart: loki-stack
|
||||
releaseName: loki
|
||||
repoType: helm
|
||||
targetNamespace: observability
|
||||
url: https://charts.kubevela.net/addons
|
||||
version: 2.4.1
|
||||
traits:
|
||||
- properties:
|
||||
access: proxy
|
||||
credentialSecret: grafana
|
||||
credentialSecretNamespace: observability
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: observability
|
||||
name: loki
|
||||
namespace: observability
|
||||
service: loki
|
||||
type: loki
|
||||
type: register-grafana-datasource
|
||||
type: helm
|
||||
- name: prometheus-server
|
||||
properties:
|
||||
chart: prometheus
|
||||
releaseName: prometheus
|
||||
repoType: helm
|
||||
targetNamespace: observability
|
||||
url: https://charts.kubevela.net/addons
|
||||
values:
|
||||
alertmanager:
|
||||
persistentVolume:
|
||||
enabled: '[[ index .Args "alertmanager-pvc-enabled" | default "true"
|
||||
]]'
|
||||
size: '[[ index .Args "alertmanager-pvc-size" | default "20Gi" ]]'
|
||||
storageClass: '[[ index .Args "alertmanager-pvc-class" ]]'
|
||||
server:
|
||||
persistentVolume:
|
||||
enabled: '[[ index .Args "server-pvc-enabled" | default "true" ]]'
|
||||
size: '[[ index .Args "server-pvc-size" | default "20Gi" ]]'
|
||||
storageClass: '[[ index .Args "server-pvc-class" ]]'
|
||||
version: 14.4.1
|
||||
traits:
|
||||
- properties:
|
||||
access: proxy
|
||||
credentialSecret: grafana
|
||||
credentialSecretNamespace: observability
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: observability
|
||||
name: prometheus
|
||||
namespace: observability
|
||||
service: prometheus-server
|
||||
type: prometheus
|
||||
type: register-grafana-datasource
|
||||
type: helm
|
||||
- name: kube-state-metrics
|
||||
properties:
|
||||
chart: kube-state-metrics
|
||||
repoType: helm
|
||||
targetNamespace: observability
|
||||
url: https://charts.kubevela.net/addons
|
||||
values:
|
||||
image:
|
||||
repository: oamdev/kube-state-metrics
|
||||
tag: v2.1.0
|
||||
version: 3.4.1
|
||||
type: helm
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
dependsOn:
|
||||
- ref:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
name: fluxcd
|
||||
namespace: vela-system
|
||||
- ref:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
name: observability-asset
|
||||
namespace: vela-system
|
||||
components:
|
||||
- name: grafana-registration
|
||||
properties:
|
||||
chart: ./chart
|
||||
git:
|
||||
branch: master
|
||||
repoType: git
|
||||
targetNamespace: vela-system
|
||||
url: https://github.com/oam-dev/grafana-registration
|
||||
values:
|
||||
replicaCount: 1
|
||||
type: helm
|
||||
- name: grafana
|
||||
properties:
|
||||
chart: grafana
|
||||
releaseName: grafana
|
||||
repoType: helm
|
||||
targetNamespace: vela-system
|
||||
url: https://charts.kubevela.net/addons
|
||||
version: 6.14.1
|
||||
traits:
|
||||
- properties:
|
||||
domain: '[[ index .Args "grafana-domain" ]]'
|
||||
http:
|
||||
/: 80
|
||||
type: pure-ingress
|
||||
- properties:
|
||||
credentialSecret: grafana
|
||||
credentialSecretNamespace: vela-system
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: vela-system
|
||||
urls:
|
||||
- https://charts.kubevela.net/addons/dashboards/kubevela_core_logging.json
|
||||
- https://charts.kubevela.net/addons/dashboards/kubevela_core_monitoring.json
|
||||
- https://charts.kubevela.net/addons/dashboards/kubevela_application_logging.json
|
||||
- https://charts.kubevela.net/addons/dashboards/flux2/cluster.json
|
||||
type: import-grafana-dashboard
|
||||
type: helm
|
||||
- name: loki
|
||||
properties:
|
||||
chart: loki-stack
|
||||
releaseName: loki
|
||||
repoType: helm
|
||||
targetNamespace: vela-system
|
||||
url: https://charts.kubevela.net/addons
|
||||
version: 2.4.1
|
||||
traits:
|
||||
- properties:
|
||||
access: proxy
|
||||
credentialSecret: grafana
|
||||
credentialSecretNamespace: vela-system
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: vela-system
|
||||
name: loki
|
||||
namespace: vela-system
|
||||
service: loki
|
||||
type: loki
|
||||
type: register-grafana-datasource
|
||||
type: helm
|
||||
- name: prometheus-server
|
||||
properties:
|
||||
chart: prometheus
|
||||
releaseName: prometheus
|
||||
repoType: helm
|
||||
targetNamespace: vela-system
|
||||
url: https://charts.kubevela.net/addons
|
||||
values:
|
||||
alertmanager:
|
||||
persistentVolume:
|
||||
enabled: '[[ index .Args "alertmanager-pvc-enabled" | default "true" ]]'
|
||||
size: '[[ index .Args "alertmanager-pvc-size" | default "20Gi" ]]'
|
||||
storageClass: '[[ index .Args "alertmanager-pvc-class" ]]'
|
||||
server:
|
||||
persistentVolume:
|
||||
enabled: '[[ index .Args "server-pvc-enabled" | default "true" ]]'
|
||||
size: '[[ index .Args "server-pvc-size" | default "20Gi" ]]'
|
||||
storageClass: '[[ index .Args "server-pvc-class" ]]'
|
||||
version: 14.4.1
|
||||
traits:
|
||||
- properties:
|
||||
access: proxy
|
||||
credentialSecret: grafana
|
||||
credentialSecretNamespace: vela-system
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: vela-system
|
||||
name: prometheus
|
||||
namespace: vela-system
|
||||
service: prometheus-server
|
||||
type: prometheus
|
||||
type: register-grafana-datasource
|
||||
type: helm
|
||||
- name: kube-state-metrics
|
||||
properties:
|
||||
chart: kube-state-metrics
|
||||
repoType: helm
|
||||
targetNamespace: vela-system
|
||||
url: https://charts.kubevela.net/addons
|
||||
values:
|
||||
image:
|
||||
repository: oamdev/kube-state-metrics
|
||||
tag: v2.1.0
|
||||
version: 3.4.1
|
||||
type: helm
|
||||
workflow:
|
||||
steps:
|
||||
- name: checking-depends-on
|
||||
properties:
|
||||
name: fluxcd
|
||||
namespace: vela-system
|
||||
type: depends-on-app
|
||||
- name: apply-resources
|
||||
type: apply-remaining
|
||||
status:
|
||||
observedGeneration: 0
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
application: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
kind: Application
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Prometheus is an open-source systems monitoring and
|
||||
@@ -10,31 +10,30 @@ data:
|
||||
name: prometheus
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appTemplate:
|
||||
spec:
|
||||
components:
|
||||
- name: prometheus
|
||||
properties:
|
||||
chart: premetheus
|
||||
repoType: helm
|
||||
url: https://prometheus-community.github.io/helm-charts
|
||||
type: helm
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
dependsOn:
|
||||
- ref:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
name: fluxcd
|
||||
namespace: vela-system
|
||||
components:
|
||||
- name: prometheus
|
||||
properties:
|
||||
chart: premetheus
|
||||
repoType: helm
|
||||
url: https://prometheus-community.github.io/helm-charts
|
||||
type: helm
|
||||
workflow:
|
||||
steps:
|
||||
- name: checking-depends-on
|
||||
properties:
|
||||
name: fluxcd
|
||||
namespace: vela-system
|
||||
type: depends-on-app
|
||||
- name: apply-resources
|
||||
type: apply-application
|
||||
status:
|
||||
observedGeneration: 0
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kubernetes Terraform Controller for Alibaba Cloud
|
||||
addons.oam.dev/name: terraform/provider-alibaba
|
||||
name: terraform-provider-alibaba
|
||||
namespace: default
|
||||
spec:
|
||||
appTemplate:
|
||||
apiVersion: v1
|
||||
data:
|
||||
application: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Application
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kubernetes Terraform Controller for Alibaba Cloud
|
||||
addons.oam.dev/name: terraform-alibaba
|
||||
name: terraform-alibaba
|
||||
namespace: vela-system
|
||||
spec:
|
||||
components:
|
||||
- name: alibaba-account-creds
|
||||
- name: alibaba-account-creds-[[ index .Args "providerName" ]]
|
||||
properties:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: alibaba-account-creds
|
||||
name: alibaba-account-creds-[[ index .Args "providerName" ]]
|
||||
namespace: vela-system
|
||||
stringData:
|
||||
credentials: |
|
||||
@@ -24,23 +25,32 @@ spec:
|
||||
securityToken: [[ index .Args "ALICLOUD_SECURITY_TOKEN" ]]
|
||||
type: Opaque
|
||||
type: raw
|
||||
- name: default
|
||||
- name: alibaba-[[ index .Args "providerName" ]]
|
||||
properties:
|
||||
apiVersion: terraform.core.oam.dev/v1beta1
|
||||
kind: Provider
|
||||
metadata:
|
||||
name: default
|
||||
name: '[[ index .Args "providerName" ]]'
|
||||
namespace: default
|
||||
spec:
|
||||
credentials:
|
||||
secretRef:
|
||||
key: credentials
|
||||
name: alibaba-account-creds
|
||||
name: alibaba-account-creds-[[ index .Args "providerName" ]]
|
||||
namespace: vela-system
|
||||
source: Secret
|
||||
provider: alibaba
|
||||
region: '[[ index .Args "ALICLOUD_REGION" ]]'
|
||||
type: raw
|
||||
workflow:
|
||||
steps:
|
||||
- name: ""
|
||||
properties:
|
||||
name: terraform
|
||||
namespace: vela-system
|
||||
type: depends-on-app
|
||||
- name: ""
|
||||
type: apply-application
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
@@ -49,5 +59,12 @@ spec:
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
status:
|
||||
observedGeneration: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kubernetes Terraform Controller for Alibaba Cloud
|
||||
addons.oam.dev/name: terraform-alibaba
|
||||
labels:
|
||||
addons.oam.dev/type: terraform-alibaba
|
||||
name: terraform-alibaba
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
70
charts/vela-core/templates/addons/terraform-aws.yaml
Normal file
70
charts/vela-core/templates/addons/terraform-aws.yaml
Normal file
@@ -0,0 +1,70 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
application: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Application
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kubernetes Terraform Controller for AWS
|
||||
addons.oam.dev/name: terraform-aws
|
||||
name: terraform-aws
|
||||
namespace: vela-system
|
||||
spec:
|
||||
components:
|
||||
- name: aws-account-creds
|
||||
properties:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: aws-account-creds
|
||||
namespace: vela-system
|
||||
stringData:
|
||||
credentials: |
|
||||
awsAccessKeyID: [[ index .Args "AWS_ACCESS_KEY_ID" ]]
|
||||
awsSecretAccessKey: [[ index .Args "AWS_SECRET_ACCESS_KEY" ]]
|
||||
awsSessionToken: [[ index .Args "AWS_SESSION_TOKEN" ]]
|
||||
type: Opaque
|
||||
type: raw
|
||||
- name: aws
|
||||
properties:
|
||||
apiVersion: terraform.core.oam.dev/v1beta1
|
||||
kind: Provider
|
||||
metadata:
|
||||
name: aws
|
||||
namespace: default
|
||||
spec:
|
||||
credentials:
|
||||
secretRef:
|
||||
key: credentials
|
||||
name: aws-account-creds
|
||||
namespace: vela-system
|
||||
source: Secret
|
||||
provider: aws
|
||||
region: '[[ index .Args "AWS_DEFAULT_REGION" ]]'
|
||||
type: raw
|
||||
workflow:
|
||||
steps:
|
||||
- name: ""
|
||||
properties:
|
||||
name: terraform
|
||||
namespace: vela-system
|
||||
type: depends-on-app
|
||||
- name: ""
|
||||
type: apply-application
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kubernetes Terraform Controller for AWS
|
||||
addons.oam.dev/name: terraform-aws
|
||||
labels:
|
||||
addons.oam.dev/type: terraform-aws
|
||||
name: terraform-aws
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
@@ -1,13 +1,14 @@
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kubernetes Terraform Controller for Azure
|
||||
addons.oam.dev/name: terraform/provider-azure
|
||||
name: terraform-provider-azure
|
||||
namespace: default
|
||||
spec:
|
||||
appTemplate:
|
||||
apiVersion: v1
|
||||
data:
|
||||
application: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Application
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kubernetes Terraform Controller for Azure
|
||||
addons.oam.dev/name: terraform-azure
|
||||
name: terraform-azure
|
||||
namespace: vela-system
|
||||
spec:
|
||||
components:
|
||||
- name: azure-account-creds
|
||||
@@ -41,6 +42,15 @@ spec:
|
||||
source: Secret
|
||||
provider: azure
|
||||
type: raw
|
||||
workflow:
|
||||
steps:
|
||||
- name: ""
|
||||
properties:
|
||||
name: terraform
|
||||
namespace: vela-system
|
||||
type: depends-on-app
|
||||
- name: ""
|
||||
type: apply-application
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
@@ -49,5 +59,12 @@ spec:
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
status:
|
||||
observedGeneration: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kubernetes Terraform Controller for Azure
|
||||
addons.oam.dev/name: terraform-azure
|
||||
labels:
|
||||
addons.oam.dev/type: terraform-azure
|
||||
name: terraform-azure
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
@@ -1,59 +1,55 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
application: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
kind: Application
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kubernetes Terraform Controller for Alibaba Cloud
|
||||
addons.oam.dev/name: terraform/provider-alibaba
|
||||
name: terraform-provider-alibaba
|
||||
namespace: default
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appTemplate:
|
||||
spec:
|
||||
components:
|
||||
- name: alibaba-account-creds
|
||||
properties:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
components:
|
||||
- name: alibaba-account-creds
|
||||
properties:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: alibaba-account-creds
|
||||
namespace: vela-system
|
||||
stringData:
|
||||
credentials: |
|
||||
accessKeyID: [[ index .Args "ALICLOUD_ACCESS_KEY" ]]
|
||||
accessKeySecret: [[ index .Args "ALICLOUD_SECRET_KEY" ]]
|
||||
securityToken: [[ index .Args "ALICLOUD_SECURITY_TOKEN" ]]
|
||||
type: Opaque
|
||||
type: raw
|
||||
- name: default
|
||||
properties:
|
||||
apiVersion: terraform.core.oam.dev/v1beta1
|
||||
kind: Provider
|
||||
metadata:
|
||||
name: default
|
||||
namespace: default
|
||||
spec:
|
||||
credentials:
|
||||
secretRef:
|
||||
key: credentials
|
||||
name: alibaba-account-creds
|
||||
namespace: vela-system
|
||||
stringData:
|
||||
credentials: |
|
||||
accessKeyID: [[ index .Args "ALICLOUD_ACCESS_KEY" ]]
|
||||
accessKeySecret: [[ index .Args "ALICLOUD_SECRET_KEY" ]]
|
||||
securityToken: [[ index .Args "ALICLOUD_SECURITY_TOKEN" ]]
|
||||
type: Opaque
|
||||
type: raw
|
||||
- name: default
|
||||
properties:
|
||||
apiVersion: terraform.core.oam.dev/v1beta1
|
||||
kind: Provider
|
||||
metadata:
|
||||
name: default
|
||||
namespace: default
|
||||
spec:
|
||||
credentials:
|
||||
secretRef:
|
||||
key: credentials
|
||||
name: alibaba-account-creds
|
||||
namespace: vela-system
|
||||
source: Secret
|
||||
provider: alibaba
|
||||
region: '[[ index .Args "ALICLOUD_REGION" ]]'
|
||||
type: raw
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
source: Secret
|
||||
provider: alibaba
|
||||
region: '[[ index .Args "ALICLOUD_REGION" ]]'
|
||||
type: raw
|
||||
status:
|
||||
observedGeneration: 0
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
application: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Application
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kubernetes Terraform Controller for AWS
|
||||
addons.oam.dev/name: terraform/provider-aws
|
||||
name: terraform-provider-aws
|
||||
namespace: vela-system
|
||||
spec:
|
||||
components:
|
||||
- name: aws-account-creds
|
||||
properties:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: aws-account-creds
|
||||
namespace: vela-system
|
||||
stringData:
|
||||
credentials: |
|
||||
awsAccessKeyID: [[ index .Args "AWS_ACCESS_KEY_ID" ]]
|
||||
awsSecretAccessKey: [[ index .Args "AWS_SECRET_ACCESS_KEY" ]]
|
||||
awsSessionToken: [[ index .Args "AWS_SESSION_TOKEN" ]]
|
||||
type: Opaque
|
||||
type: raw
|
||||
- name: aws
|
||||
properties:
|
||||
apiVersion: terraform.core.oam.dev/v1beta1
|
||||
kind: Provider
|
||||
metadata:
|
||||
name: aws
|
||||
namespace: default
|
||||
spec:
|
||||
credentials:
|
||||
secretRef:
|
||||
key: credentials
|
||||
name: aws-account-creds
|
||||
namespace: vela-system
|
||||
source: Secret
|
||||
provider: aws
|
||||
region: '[[ index .Args "AWS_DEFAULT_REGION" ]]'
|
||||
type: raw
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kubernetes Terraform Controller for AWS
|
||||
addons.oam.dev/name: terraform/provider-aws
|
||||
labels:
|
||||
addons.oam.dev/type: terraform-provider-aws
|
||||
name: terraform-provider-aws
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
@@ -1,59 +1,55 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
application: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
kind: Application
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kubernetes Terraform Controller for Azure
|
||||
addons.oam.dev/name: terraform/provider-azure
|
||||
name: terraform-provider-azure
|
||||
namespace: default
|
||||
namespace: vela-system
|
||||
spec:
|
||||
appTemplate:
|
||||
spec:
|
||||
components:
|
||||
- name: azure-account-creds
|
||||
properties:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
components:
|
||||
- name: azure-account-creds
|
||||
properties:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: azure-account-creds
|
||||
namespace: vela-system
|
||||
stringData:
|
||||
credentials: |
|
||||
armClientID: [[ index .Args "ARM_CLIENT_ID" ]]
|
||||
armClientSecret: [[ index .Args "ARM_CLIENT_SECRET" ]]
|
||||
armSubscriptionID: [[ index .Args "ARM_SUBSCRIPTION_ID" ]]
|
||||
armTenantID: [[ index .Args "ARM_TENANT_ID" ]]
|
||||
type: Opaque
|
||||
type: raw
|
||||
- name: azure
|
||||
properties:
|
||||
apiVersion: terraform.core.oam.dev/v1beta1
|
||||
kind: Provider
|
||||
metadata:
|
||||
name: azure
|
||||
namespace: default
|
||||
spec:
|
||||
credentials:
|
||||
secretRef:
|
||||
key: credentials
|
||||
name: azure-account-creds
|
||||
namespace: vela-system
|
||||
stringData:
|
||||
credentials: |
|
||||
armClientID: [[ index .Args "ARM_CLIENT_ID" ]]
|
||||
armClientSecret: [[ index .Args "ARM_CLIENT_SECRET" ]]
|
||||
armSubscriptionID: [[ index .Args "ARM_SUBSCRIPTION_ID" ]]
|
||||
armTenantID: [[ index .Args "ARM_TENANT_ID" ]]
|
||||
type: Opaque
|
||||
type: raw
|
||||
- name: azure
|
||||
properties:
|
||||
apiVersion: terraform.core.oam.dev/v1beta1
|
||||
kind: Provider
|
||||
metadata:
|
||||
name: azure
|
||||
namespace: default
|
||||
spec:
|
||||
credentials:
|
||||
secretRef:
|
||||
key: credentials
|
||||
name: azure-account-creds
|
||||
namespace: vela-system
|
||||
source: Secret
|
||||
provider: azure
|
||||
type: raw
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
source: Secret
|
||||
provider: azure
|
||||
type: raw
|
||||
status:
|
||||
observedGeneration: 0
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
rollingState: ""
|
||||
upgradedReadyReplicas: 0
|
||||
upgradedReplicas: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- patch
|
||||
|
||||
@@ -35,7 +35,7 @@ spec:
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
- "--cert-dir={{ .Values.multicluster.clusterGateway.secureTLS.certPath }}"
|
||||
{{ end }}
|
||||
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
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 }}
|
||||
@@ -132,7 +132,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
@@ -175,7 +175,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
|
||||
command:
|
||||
- /patch
|
||||
|
||||
@@ -16,7 +16,13 @@ spec:
|
||||
)
|
||||
|
||||
apply: op.#Apply & {
|
||||
value: parameter
|
||||
value: parameter.value
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the value of the object
|
||||
value: {...}
|
||||
// +usage=Specify the cluster of the object
|
||||
cluster: *"" | string
|
||||
}
|
||||
parameter: {}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ spec:
|
||||
}
|
||||
}
|
||||
load: op.#Steps & {
|
||||
if dependsOn.err != _|_ && dependsOn.value == _|_ {
|
||||
if dependsOn.err != _|_ {
|
||||
configMap: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
@@ -37,18 +37,17 @@ spec:
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
yaml.Unmarshal(configMap.value.data[parameter.name])
|
||||
}
|
||||
}
|
||||
} @step(1)
|
||||
template: configMap.value.data["application"]
|
||||
apply: op.#Apply & {
|
||||
value: yaml.Unmarshal(template)
|
||||
} @step(2)
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: load.apply.value.status.status == "running"
|
||||
}
|
||||
continue: apply.value.status.status == "running"
|
||||
} @step(3)
|
||||
}
|
||||
|
||||
if dependsOn.value != _|_ {
|
||||
if dependsOn.err == _|_ {
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: dependsOn.value.status.status == "running"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/export2config.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Export data to config map for your workflow steps
|
||||
name: export2config
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "ConfigMap"
|
||||
metadata: {
|
||||
name: parameter.configName
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
data: parameter.data
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the name of the config map
|
||||
configName: string
|
||||
// +usage=Specify the namespace of the config map
|
||||
namespace?: string
|
||||
// +usage=Specify the data of config map
|
||||
data: {}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/export2secret.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Export data to secret for your workflow steps
|
||||
name: export2secret
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
if parameter.type != _|_ {
|
||||
type: parameter.type
|
||||
}
|
||||
metadata: {
|
||||
name: parameter.secretName
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
stringData: parameter.data
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the name of the secret
|
||||
secretName: string
|
||||
// +usage=Specify the namespace of the secret
|
||||
namespace?: string
|
||||
// +usage=Specify the type of the secret
|
||||
type?: string
|
||||
// +usage=Specify the data of secret
|
||||
data: {}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# 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
|
||||
name: import-grafana-dashboard
|
||||
namespace: {{.Values.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: ""
|
||||
|
||||
113
charts/vela-core/templates/defwithtemplate/nocalhost.yaml
Normal file
113
charts/vela-core/templates/defwithtemplate/nocalhost.yaml
Normal file
@@ -0,0 +1,113 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/nocalhost.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: nocalhost develop configuration.
|
||||
name: nocalhost
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- '*'
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
patch: metadata: annotations: {
|
||||
"dev.nocalhost/application-name": context.appName
|
||||
"dev.nocalhost/application-namespace": context.namespace
|
||||
"dev.nocalhost": json.Marshal({
|
||||
containers: [
|
||||
{
|
||||
name: context.name
|
||||
dev: {
|
||||
if parameter.gitUrl != _|_ {
|
||||
gitUrl: parameter.gitUrl
|
||||
}
|
||||
image: parameter.image
|
||||
shell: parameter.shell
|
||||
workDir: parameter.workDir
|
||||
if parameter.storageClass != _|_ {
|
||||
storageClass: parameter.storageClass
|
||||
}
|
||||
resources: {
|
||||
limits: parameter.resources.limits
|
||||
requests: parameter.resources.requests
|
||||
}
|
||||
if parameter.persistentVolumeDirs != _|_ {
|
||||
persistentVolumeDirs: [
|
||||
for v in parameter.persistentVolumeDirs {
|
||||
path: v.path
|
||||
capacity: v.capacity
|
||||
},
|
||||
]
|
||||
}
|
||||
if parameter.command != _|_ {
|
||||
command: parameter.command
|
||||
}
|
||||
if parameter.debug != _|_ {
|
||||
debug: parameter.debug
|
||||
}
|
||||
hotReload: parameter.hotReload
|
||||
if parameter.sync != _|_ {
|
||||
sync: parameter.sync
|
||||
}
|
||||
if parameter.env != _|_ {
|
||||
env: [
|
||||
for v in parameter.env {
|
||||
name: v.name
|
||||
value: v.value
|
||||
},
|
||||
]
|
||||
}
|
||||
if parameter.portForward != _|_ {
|
||||
portForward: parameter.portForward
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
})
|
||||
}
|
||||
parameter: {
|
||||
gitUrl?: string
|
||||
image: string
|
||||
shell: *"bash" | string
|
||||
workDir: *"/home/nocalhost-dev" | string
|
||||
storageClass?: string
|
||||
command?: {
|
||||
run?: [...string]
|
||||
debug?: [...string]
|
||||
}
|
||||
debug?: remoteDebugPort?: int
|
||||
hotReload: *true | bool
|
||||
sync: {
|
||||
type: *"send" | string
|
||||
filePattern?: [...string]
|
||||
ignoreFilePattern?: [...string]
|
||||
}
|
||||
env?: [...{
|
||||
name: string
|
||||
value: string
|
||||
}]
|
||||
portForward?: [...string]
|
||||
persistentVolumeDirs?: [...{
|
||||
path: string
|
||||
capacity: string
|
||||
}]
|
||||
resources: {
|
||||
limits: {
|
||||
memory: *"2Gi" | string
|
||||
cpu: *"2" | string
|
||||
}
|
||||
requests: {
|
||||
memory: *"512Mi" | string
|
||||
cpu: *"0.5" | string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
56
charts/vela-core/templates/defwithtemplate/pure-ingress.yaml
Normal file
56
charts/vela-core/templates/defwithtemplate/pure-ingress.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
# 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.
|
||||
name: pure-ingress
|
||||
namespace: {{.Values.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: ""
|
||||
|
||||
62
charts/vela-core/templates/defwithtemplate/read-object.yaml
Normal file
62
charts/vela-core/templates/defwithtemplate/read-object.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/read-object.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Read objects for your workflow steps
|
||||
name: read-object
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
output: {
|
||||
if parameter.apiVersion == _|_ && parameter.kind == _|_ {
|
||||
op.#Read & {
|
||||
value: {
|
||||
apiVersion: "core.oam.dev/v1beta1"
|
||||
kind: "Application"
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
}
|
||||
if parameter.apiVersion != _|_ || parameter.kind != _|_ {
|
||||
op.#Read & {
|
||||
value: {
|
||||
apiVersion: parameter.apiVersion
|
||||
kind: parameter.kind
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the apiVersion of the object, defaults to core.oam.dev/v1beta1
|
||||
apiVersion?: string
|
||||
// +usage=Specify the kind of the object, defaults to Application
|
||||
kind?: string
|
||||
// +usage=Specify the name of the object
|
||||
name: string
|
||||
// +usage=Specify the namespace of the object
|
||||
namespace?: string
|
||||
// +usage=Specify the cluster of the object
|
||||
cluster: *"" | string
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# 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
|
||||
name: register-grafana-datasource
|
||||
namespace: {{.Values.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: ""
|
||||
|
||||
@@ -24,8 +24,10 @@ spec:
|
||||
componentName: context.name
|
||||
rolloutPlan: {
|
||||
rolloutStrategy: "IncreaseFirst"
|
||||
rolloutBatches: parameter.rolloutBatches
|
||||
targetSize: parameter.targetSize
|
||||
if parameter.rolloutBatches != _|_ {
|
||||
rolloutBatches: parameter.rolloutBatches
|
||||
}
|
||||
targetSize: parameter.targetSize
|
||||
if parameter["batchPartition"] != _|_ {
|
||||
batchPartition: parameter.batchPartition
|
||||
}
|
||||
@@ -35,7 +37,7 @@ spec:
|
||||
parameter: {
|
||||
targetRevision: *context.revision | string
|
||||
targetSize: int
|
||||
rolloutBatches: [...rolloutBatch]
|
||||
rolloutBatches?: [...rolloutBatch]
|
||||
batchPartition?: int
|
||||
}
|
||||
rolloutBatch: replicas: int
|
||||
|
||||
@@ -23,6 +23,10 @@ spec:
|
||||
name: context.name
|
||||
image: parameter.image
|
||||
|
||||
if parameter["imagePullPolicy"] != _|_ {
|
||||
imagePullPolicy: parameter.imagePullPolicy
|
||||
}
|
||||
|
||||
if parameter["cmd"] != _|_ {
|
||||
command: parameter.cmd
|
||||
}
|
||||
@@ -85,6 +89,13 @@ spec:
|
||||
}}]
|
||||
}
|
||||
|
||||
if parameter["imagePullSecrets"] != _|_ {
|
||||
imagePullSecrets: [ for v in parameter.imagePullSecrets {
|
||||
name: v
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -97,6 +108,12 @@ spec:
|
||||
// +short=i
|
||||
image: string
|
||||
|
||||
// +usage=Specify image pull policy for your service
|
||||
imagePullPolicy?: string
|
||||
|
||||
// +usage=Specify image pull secrets for your service
|
||||
imagePullSecrets?: [...string]
|
||||
|
||||
// +usage=Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never.
|
||||
restart: *"Never" | string
|
||||
|
||||
|
||||
@@ -13,11 +13,18 @@ spec:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
"encoding/base64"
|
||||
)
|
||||
|
||||
parameter: {
|
||||
dingding?: {
|
||||
url: string
|
||||
url: {
|
||||
address?: string
|
||||
fromSecret?: {
|
||||
name: string
|
||||
key: string
|
||||
}
|
||||
}
|
||||
message: {
|
||||
text?: *null | {
|
||||
content: string
|
||||
@@ -62,7 +69,13 @@ spec:
|
||||
}
|
||||
|
||||
slack?: {
|
||||
url: string
|
||||
url: {
|
||||
address?: string
|
||||
fromSecret?: {
|
||||
name: string
|
||||
key: string
|
||||
}
|
||||
}
|
||||
message: {
|
||||
text: string
|
||||
blocks?: *null | [...block]
|
||||
@@ -84,17 +97,17 @@ spec:
|
||||
url?: string
|
||||
value?: string
|
||||
style?: string
|
||||
text?: text
|
||||
text?: textType
|
||||
confirm?: {
|
||||
title: text
|
||||
text: text
|
||||
confirm: text
|
||||
deny: text
|
||||
title: textType
|
||||
text: textType
|
||||
confirm: textType
|
||||
deny: textType
|
||||
style?: string
|
||||
}
|
||||
options?: [...option]
|
||||
initial_options?: [...option]
|
||||
placeholder?: text
|
||||
placeholder?: textType
|
||||
initial_date?: string
|
||||
image_url?: string
|
||||
alt_text?: string
|
||||
@@ -108,32 +121,74 @@ spec:
|
||||
initial_time?: string
|
||||
}]
|
||||
}
|
||||
text: {
|
||||
textType: {
|
||||
type: string
|
||||
text: string
|
||||
emoji?: bool
|
||||
verbatim?: bool
|
||||
}
|
||||
option: {
|
||||
text: text
|
||||
text: textType
|
||||
value: string
|
||||
description?: text
|
||||
description?: textType
|
||||
url?: string
|
||||
}
|
||||
// send webhook notification
|
||||
ding: {
|
||||
ding: op.#Steps & {
|
||||
if parameter.dingding != _|_ {
|
||||
op.#DingTalk & {
|
||||
message: parameter.dingding.message
|
||||
dingUrl: parameter.dingding.url
|
||||
if parameter.dingding.url.address != _|_ {
|
||||
ding1: op.#DingTalk & {
|
||||
message: parameter.dingding.message
|
||||
dingUrl: parameter.dingding.url.address
|
||||
}
|
||||
}
|
||||
if parameter.dingding.url.fromSecret != _|_ && parameter.dingding.url.address == _|_ {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
metadata: {
|
||||
name: parameter.dingding.url.fromSecret.name
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
decoded: base64.Decode(null, read.value.data[parameter.dingding.url.fromSecret.key])
|
||||
stringValue: op.#ConvertString & {bt: decoded}
|
||||
ding2: op.#DingTalk & {
|
||||
message: parameter.dingding.message
|
||||
dingUrl: stringValue.str
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
slack: {
|
||||
slack: op.#Steps & {
|
||||
if parameter.slack != _|_ {
|
||||
op.#Slack & {
|
||||
message: parameter.slack.message
|
||||
slackUrl: parameter.slack.url
|
||||
if parameter.slack.url.address != _|_ {
|
||||
slack1: op.#Slack & {
|
||||
message: parameter.slack.message
|
||||
slackUrl: parameter.slack.url.address
|
||||
}
|
||||
}
|
||||
if parameter.slack.url.fromSecret != _|_ && parameter.slack.url.address == _|_ {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
kind: "Secret"
|
||||
apiVersion: "v1"
|
||||
metadata: {
|
||||
name: parameter.slack.url.fromSecret.name
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
decoded: base64.Decode(null, read.value.data[parameter.slack.url.fromSecret.key])
|
||||
stringValue: op.#ConvertString & {bt: decoded}
|
||||
slack2: op.#Slack & {
|
||||
message: parameter.slack.message
|
||||
slackUrl: stringValue.str
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ spec:
|
||||
args:
|
||||
- "apiserver"
|
||||
- "--port={{ .Values.apiServer.port }}"
|
||||
image: {{ .Values.apiserverImage.repository }}:{{ .Values.apiserverImage.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.apiserverImage.repository }}:{{ .Values.apiserverImage.tag }}
|
||||
imagePullPolicy: {{ quote .Values.apiserverImage.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
|
||||
@@ -130,7 +130,7 @@ spec:
|
||||
{{ if .Values.multicluster.enabled }}
|
||||
- "--enable-cluster-gateway"
|
||||
{{ end }}
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
|
||||
@@ -10,7 +10,7 @@ spec:
|
||||
- name: helm-test-express-server
|
||||
type: webservice
|
||||
properties:
|
||||
image: crccheck/hello-world
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.test.app.repository }}:{{ .Values.test.app.tag }}
|
||||
port: 8000
|
||||
traits:
|
||||
- type: ingress
|
||||
@@ -30,7 +30,7 @@ spec:
|
||||
serviceAccountName: kubevela-vela-core
|
||||
containers:
|
||||
- name: {{ .Release.Name }}-application-test
|
||||
image: alpine/k8s:1.18.2
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.test.k8s.repository }}:{{ .Values.test.k8s.tag }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/bash
|
||||
|
||||
@@ -7,6 +7,8 @@ replicaCount: 1
|
||||
applyOnceOnly: "off"
|
||||
|
||||
disableCaps: ""
|
||||
|
||||
imageRegistry: ""
|
||||
image:
|
||||
repository: oamdev/vela-core
|
||||
tag: latest
|
||||
@@ -73,7 +75,7 @@ admissionWebhooks:
|
||||
enabled: true
|
||||
image:
|
||||
repository: oamdev/kube-webhook-certgen
|
||||
tag: v2.2
|
||||
tag: v2.3
|
||||
pullPolicy: IfNotPresent
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
@@ -130,4 +132,12 @@ multicluster:
|
||||
memory: 200Mi
|
||||
secureTLS:
|
||||
enabled: true
|
||||
certPath: /etc/k8s-cluster-gateway-certs
|
||||
certPath: /etc/k8s-cluster-gateway-certs
|
||||
|
||||
test:
|
||||
app:
|
||||
repository: oamdev/hello-world
|
||||
tag: v1
|
||||
k8s:
|
||||
repository: oamdev/alpine-k8s
|
||||
tag: 1.18.2
|
||||
@@ -1232,6 +1232,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -1241,11 +1251,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -1255,6 +1270,23 @@ spec:
|
||||
- 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
|
||||
@@ -1635,6 +1667,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -1644,11 +1686,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -1658,6 +1705,23 @@ spec:
|
||||
- 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
|
||||
@@ -1936,6 +2000,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -1945,11 +2019,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -1959,6 +2038,23 @@ spec:
|
||||
- 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
|
||||
@@ -3360,6 +3456,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -3369,11 +3475,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -3383,6 +3494,23 @@ spec:
|
||||
- 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
|
||||
@@ -3656,6 +3784,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -3665,11 +3803,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -3679,6 +3822,23 @@ spec:
|
||||
- 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
|
||||
@@ -4041,6 +4201,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -4050,11 +4220,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -4064,6 +4239,23 @@ spec:
|
||||
- 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
|
||||
@@ -4305,6 +4497,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -4314,11 +4516,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -4328,6 +4535,23 @@ spec:
|
||||
- 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
|
||||
@@ -4371,6 +4595,10 @@ spec:
|
||||
- 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:
|
||||
@@ -4585,6 +4813,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -4594,11 +4832,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region.
|
||||
It will override the region in the region field
|
||||
of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -4608,6 +4851,23 @@ spec:
|
||||
- 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
|
||||
|
||||
@@ -222,6 +222,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -231,11 +241,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It
|
||||
will override the region in the region field of
|
||||
ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -245,6 +260,23 @@ spec:
|
||||
- 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
|
||||
@@ -506,6 +538,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -515,11 +557,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It
|
||||
will override the region in the region field of
|
||||
ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -529,6 +576,23 @@ spec:
|
||||
- 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
|
||||
@@ -783,6 +847,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -792,11 +866,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It
|
||||
will override the region in the region field of
|
||||
ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -806,6 +885,23 @@ spec:
|
||||
- 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
|
||||
@@ -1041,6 +1137,16 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether
|
||||
provisioned cloud resources will be deleted when
|
||||
CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -1050,11 +1156,16 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It
|
||||
will override the region in the region field of
|
||||
ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -1064,6 +1175,23 @@ spec:
|
||||
- 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
|
||||
@@ -1107,6 +1235,10 @@ spec:
|
||||
- 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:
|
||||
|
||||
@@ -151,6 +151,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -160,11 +169,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -174,6 +187,22 @@ spec:
|
||||
- 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
|
||||
|
||||
@@ -188,6 +188,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -197,11 +206,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -211,6 +224,22 @@ spec:
|
||||
- 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
|
||||
@@ -468,6 +497,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -477,11 +515,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -491,6 +533,22 @@ spec:
|
||||
- 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
|
||||
|
||||
@@ -148,6 +148,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -157,11 +166,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -171,6 +184,22 @@ spec:
|
||||
- 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
|
||||
@@ -212,6 +241,10 @@ spec:
|
||||
- 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:
|
||||
|
||||
@@ -193,6 +193,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -202,11 +211,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -216,6 +229,22 @@ spec:
|
||||
- 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
|
||||
@@ -454,6 +483,15 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
deleteResource:
|
||||
default: true
|
||||
description: DeleteResource will determine whether provisioned
|
||||
cloud resources will be deleted when CR is deleted
|
||||
type: boolean
|
||||
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
|
||||
@@ -463,11 +501,15 @@ spec:
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
description: Namespace of the referenced object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
region:
|
||||
description: Region is cloud provider's region. It will override
|
||||
the region in the region field of ProviderReference
|
||||
type: string
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -477,6 +519,22 @@ spec:
|
||||
- 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
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- patch
|
||||
|
||||
@@ -35,7 +35,7 @@ spec:
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
- "--cert-dir={{ .Values.multicluster.clusterGateway.secureTLS.certPath }}"
|
||||
{{ end }}
|
||||
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
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 }}
|
||||
@@ -132,7 +132,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
@@ -175,7 +175,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
|
||||
command:
|
||||
- /patch
|
||||
|
||||
@@ -16,7 +16,13 @@ spec:
|
||||
)
|
||||
|
||||
apply: op.#Apply & {
|
||||
value: parameter
|
||||
value: parameter.value
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the value of the object
|
||||
value: {...}
|
||||
// +usage=Specify the cluster of the object
|
||||
cluster: *"" | string
|
||||
}
|
||||
parameter: {}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ spec:
|
||||
}
|
||||
}
|
||||
load: op.#Steps & {
|
||||
if dependsOn.err != _|_ && dependsOn.value == _|_ {
|
||||
if dependsOn.err != _|_ {
|
||||
configMap: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
@@ -37,18 +37,17 @@ spec:
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
yaml.Unmarshal(configMap.value.data[parameter.name])
|
||||
}
|
||||
}
|
||||
} @step(1)
|
||||
template: configMap.value.data["application"]
|
||||
apply: op.#Apply & {
|
||||
value: yaml.Unmarshal(template)
|
||||
} @step(2)
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: load.apply.value.status.status == "running"
|
||||
}
|
||||
continue: apply.value.status.status == "running"
|
||||
} @step(3)
|
||||
}
|
||||
|
||||
if dependsOn.value != _|_ {
|
||||
if dependsOn.err == _|_ {
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: dependsOn.value.status.status == "running"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/export2config.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Export data to config map for your workflow steps
|
||||
name: export2config
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "ConfigMap"
|
||||
metadata: {
|
||||
name: parameter.configName
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
data: parameter.data
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the name of the config map
|
||||
configName: string
|
||||
// +usage=Specify the namespace of the config map
|
||||
namespace?: string
|
||||
// +usage=Specify the data of config map
|
||||
data: {}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/export2secret.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Export data to secret for your workflow steps
|
||||
name: export2secret
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
if parameter.type != _|_ {
|
||||
type: parameter.type
|
||||
}
|
||||
metadata: {
|
||||
name: parameter.secretName
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
stringData: parameter.data
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the name of the secret
|
||||
secretName: string
|
||||
// +usage=Specify the namespace of the secret
|
||||
namespace?: string
|
||||
// +usage=Specify the type of the secret
|
||||
type?: string
|
||||
// +usage=Specify the data of secret
|
||||
data: {}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
# 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
|
||||
name: import-grafana-dashboard
|
||||
namespace: {{.Values.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: ""
|
||||
|
||||
113
charts/vela-minimal/templates/defwithtemplate/nocalhost.yaml
Normal file
113
charts/vela-minimal/templates/defwithtemplate/nocalhost.yaml
Normal file
@@ -0,0 +1,113 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/nocalhost.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: nocalhost develop configuration.
|
||||
name: nocalhost
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- '*'
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
patch: metadata: annotations: {
|
||||
"dev.nocalhost/application-name": context.appName
|
||||
"dev.nocalhost/application-namespace": context.namespace
|
||||
"dev.nocalhost": json.Marshal({
|
||||
containers: [
|
||||
{
|
||||
name: context.name
|
||||
dev: {
|
||||
if parameter.gitUrl != _|_ {
|
||||
gitUrl: parameter.gitUrl
|
||||
}
|
||||
image: parameter.image
|
||||
shell: parameter.shell
|
||||
workDir: parameter.workDir
|
||||
if parameter.storageClass != _|_ {
|
||||
storageClass: parameter.storageClass
|
||||
}
|
||||
resources: {
|
||||
limits: parameter.resources.limits
|
||||
requests: parameter.resources.requests
|
||||
}
|
||||
if parameter.persistentVolumeDirs != _|_ {
|
||||
persistentVolumeDirs: [
|
||||
for v in parameter.persistentVolumeDirs {
|
||||
path: v.path
|
||||
capacity: v.capacity
|
||||
},
|
||||
]
|
||||
}
|
||||
if parameter.command != _|_ {
|
||||
command: parameter.command
|
||||
}
|
||||
if parameter.debug != _|_ {
|
||||
debug: parameter.debug
|
||||
}
|
||||
hotReload: parameter.hotReload
|
||||
if parameter.sync != _|_ {
|
||||
sync: parameter.sync
|
||||
}
|
||||
if parameter.env != _|_ {
|
||||
env: [
|
||||
for v in parameter.env {
|
||||
name: v.name
|
||||
value: v.value
|
||||
},
|
||||
]
|
||||
}
|
||||
if parameter.portForward != _|_ {
|
||||
portForward: parameter.portForward
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
})
|
||||
}
|
||||
parameter: {
|
||||
gitUrl?: string
|
||||
image: string
|
||||
shell: *"bash" | string
|
||||
workDir: *"/home/nocalhost-dev" | string
|
||||
storageClass?: string
|
||||
command?: {
|
||||
run?: [...string]
|
||||
debug?: [...string]
|
||||
}
|
||||
debug?: remoteDebugPort?: int
|
||||
hotReload: *true | bool
|
||||
sync: {
|
||||
type: *"send" | string
|
||||
filePattern?: [...string]
|
||||
ignoreFilePattern?: [...string]
|
||||
}
|
||||
env?: [...{
|
||||
name: string
|
||||
value: string
|
||||
}]
|
||||
portForward?: [...string]
|
||||
persistentVolumeDirs?: [...{
|
||||
path: string
|
||||
capacity: string
|
||||
}]
|
||||
resources: {
|
||||
limits: {
|
||||
memory: *"2Gi" | string
|
||||
cpu: *"2" | string
|
||||
}
|
||||
requests: {
|
||||
memory: *"512Mi" | string
|
||||
cpu: *"0.5" | string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
# 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.
|
||||
name: pure-ingress
|
||||
namespace: {{.Values.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: ""
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/read-object.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Read objects for your workflow steps
|
||||
name: read-object
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
output: {
|
||||
if parameter.apiVersion == _|_ && parameter.kind == _|_ {
|
||||
op.#Read & {
|
||||
value: {
|
||||
apiVersion: "core.oam.dev/v1beta1"
|
||||
kind: "Application"
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
}
|
||||
if parameter.apiVersion != _|_ || parameter.kind != _|_ {
|
||||
op.#Read & {
|
||||
value: {
|
||||
apiVersion: parameter.apiVersion
|
||||
kind: parameter.kind
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the apiVersion of the object, defaults to core.oam.dev/v1beta1
|
||||
apiVersion?: string
|
||||
// +usage=Specify the kind of the object, defaults to Application
|
||||
kind?: string
|
||||
// +usage=Specify the name of the object
|
||||
name: string
|
||||
// +usage=Specify the namespace of the object
|
||||
namespace?: string
|
||||
// +usage=Specify the cluster of the object
|
||||
cluster: *"" | string
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# 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
|
||||
name: register-grafana-datasource
|
||||
namespace: {{.Values.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: ""
|
||||
|
||||
@@ -24,8 +24,10 @@ spec:
|
||||
componentName: context.name
|
||||
rolloutPlan: {
|
||||
rolloutStrategy: "IncreaseFirst"
|
||||
rolloutBatches: parameter.rolloutBatches
|
||||
targetSize: parameter.targetSize
|
||||
if parameter.rolloutBatches != _|_ {
|
||||
rolloutBatches: parameter.rolloutBatches
|
||||
}
|
||||
targetSize: parameter.targetSize
|
||||
if parameter["batchPartition"] != _|_ {
|
||||
batchPartition: parameter.batchPartition
|
||||
}
|
||||
@@ -35,7 +37,7 @@ spec:
|
||||
parameter: {
|
||||
targetRevision: *context.revision | string
|
||||
targetSize: int
|
||||
rolloutBatches: [...rolloutBatch]
|
||||
rolloutBatches?: [...rolloutBatch]
|
||||
batchPartition?: int
|
||||
}
|
||||
rolloutBatch: replicas: int
|
||||
|
||||
@@ -23,6 +23,10 @@ spec:
|
||||
name: context.name
|
||||
image: parameter.image
|
||||
|
||||
if parameter["imagePullPolicy"] != _|_ {
|
||||
imagePullPolicy: parameter.imagePullPolicy
|
||||
}
|
||||
|
||||
if parameter["cmd"] != _|_ {
|
||||
command: parameter.cmd
|
||||
}
|
||||
@@ -85,6 +89,13 @@ spec:
|
||||
}}]
|
||||
}
|
||||
|
||||
if parameter["imagePullSecrets"] != _|_ {
|
||||
imagePullSecrets: [ for v in parameter.imagePullSecrets {
|
||||
name: v
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -97,6 +108,12 @@ spec:
|
||||
// +short=i
|
||||
image: string
|
||||
|
||||
// +usage=Specify image pull policy for your service
|
||||
imagePullPolicy?: string
|
||||
|
||||
// +usage=Specify image pull secrets for your service
|
||||
imagePullSecrets?: [...string]
|
||||
|
||||
// +usage=Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never.
|
||||
restart: *"Never" | string
|
||||
|
||||
|
||||
@@ -13,11 +13,18 @@ spec:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
"encoding/base64"
|
||||
)
|
||||
|
||||
parameter: {
|
||||
dingding?: {
|
||||
url: string
|
||||
url: {
|
||||
address?: string
|
||||
fromSecret?: {
|
||||
name: string
|
||||
key: string
|
||||
}
|
||||
}
|
||||
message: {
|
||||
text?: *null | {
|
||||
content: string
|
||||
@@ -62,7 +69,13 @@ spec:
|
||||
}
|
||||
|
||||
slack?: {
|
||||
url: string
|
||||
url: {
|
||||
address?: string
|
||||
fromSecret?: {
|
||||
name: string
|
||||
key: string
|
||||
}
|
||||
}
|
||||
message: {
|
||||
text: string
|
||||
blocks?: *null | [...block]
|
||||
@@ -84,17 +97,17 @@ spec:
|
||||
url?: string
|
||||
value?: string
|
||||
style?: string
|
||||
text?: text
|
||||
text?: textType
|
||||
confirm?: {
|
||||
title: text
|
||||
text: text
|
||||
confirm: text
|
||||
deny: text
|
||||
title: textType
|
||||
text: textType
|
||||
confirm: textType
|
||||
deny: textType
|
||||
style?: string
|
||||
}
|
||||
options?: [...option]
|
||||
initial_options?: [...option]
|
||||
placeholder?: text
|
||||
placeholder?: textType
|
||||
initial_date?: string
|
||||
image_url?: string
|
||||
alt_text?: string
|
||||
@@ -108,32 +121,74 @@ spec:
|
||||
initial_time?: string
|
||||
}]
|
||||
}
|
||||
text: {
|
||||
textType: {
|
||||
type: string
|
||||
text: string
|
||||
emoji?: bool
|
||||
verbatim?: bool
|
||||
}
|
||||
option: {
|
||||
text: text
|
||||
text: textType
|
||||
value: string
|
||||
description?: text
|
||||
description?: textType
|
||||
url?: string
|
||||
}
|
||||
// send webhook notification
|
||||
ding: {
|
||||
ding: op.#Steps & {
|
||||
if parameter.dingding != _|_ {
|
||||
op.#DingTalk & {
|
||||
message: parameter.dingding.message
|
||||
dingUrl: parameter.dingding.url
|
||||
if parameter.dingding.url.address != _|_ {
|
||||
ding1: op.#DingTalk & {
|
||||
message: parameter.dingding.message
|
||||
dingUrl: parameter.dingding.url.address
|
||||
}
|
||||
}
|
||||
if parameter.dingding.url.fromSecret != _|_ && parameter.dingding.url.address == _|_ {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
metadata: {
|
||||
name: parameter.dingding.url.fromSecret.name
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
decoded: base64.Decode(null, read.value.data[parameter.dingding.url.fromSecret.key])
|
||||
stringValue: op.#ConvertString & {bt: decoded}
|
||||
ding2: op.#DingTalk & {
|
||||
message: parameter.dingding.message
|
||||
dingUrl: stringValue.str
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
slack: {
|
||||
slack: op.#Steps & {
|
||||
if parameter.slack != _|_ {
|
||||
op.#Slack & {
|
||||
message: parameter.slack.message
|
||||
slackUrl: parameter.slack.url
|
||||
if parameter.slack.url.address != _|_ {
|
||||
slack1: op.#Slack & {
|
||||
message: parameter.slack.message
|
||||
slackUrl: parameter.slack.url.address
|
||||
}
|
||||
}
|
||||
if parameter.slack.url.fromSecret != _|_ && parameter.slack.url.address == _|_ {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
kind: "Secret"
|
||||
apiVersion: "v1"
|
||||
metadata: {
|
||||
name: parameter.slack.url.fromSecret.name
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
decoded: base64.Decode(null, read.value.data[parameter.slack.url.fromSecret.key])
|
||||
stringValue: op.#ConvertString & {bt: decoded}
|
||||
slack2: op.#Slack & {
|
||||
message: parameter.slack.message
|
||||
slackUrl: stringValue.str
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ spec:
|
||||
args:
|
||||
- "apiserver"
|
||||
- "--bind-addr=0.0.0.0:{{ .Values.apiServer.port }}"
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
|
||||
@@ -132,7 +132,7 @@ spec:
|
||||
{{ if .Values.multicluster.enabled }}
|
||||
- "--enable-cluster-gateway"
|
||||
{{ end }}
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
|
||||
@@ -10,53 +10,5 @@ spec:
|
||||
- name: helm-test-express-server
|
||||
type: webservice
|
||||
properties:
|
||||
image: crccheck/hello-world
|
||||
image: {{ .Values.imageRegistry }}{{ .Values.test.app.repository }}:{{ .Values.test.app.tag }}
|
||||
port: 8000
|
||||
# traits:
|
||||
# - type: ingress
|
||||
# properties:
|
||||
# domain: testsvc.example.com
|
||||
# http:
|
||||
# "/": 8000
|
||||
# ---
|
||||
# apiVersion: v1
|
||||
# kind: Pod
|
||||
# metadata:
|
||||
# name: "{{ .Release.Name }}-application-test"
|
||||
# annotations:
|
||||
# "helm.sh/hook": test
|
||||
# helm.sh/hook-delete-policy: hook-succeeded
|
||||
# spec:
|
||||
# serviceAccountName: kubevela-vela-core
|
||||
# containers:
|
||||
# - name: {{ .Release.Name }}-application-test
|
||||
# image: alpine/k8s:1.18.2
|
||||
# imagePullPolicy: IfNotPresent
|
||||
# command:
|
||||
# - /bin/bash
|
||||
# - -ec
|
||||
# - |
|
||||
|
||||
# set -e
|
||||
|
||||
# echo "Waiting application is ready..."
|
||||
|
||||
# echo "waiting for application being Ready"
|
||||
# kubectl -n vela-system wait --for=condition=Ready applications.core.oam.dev helm-test-vela-app --timeout=3m
|
||||
# echo "application is Ready"
|
||||
|
||||
# # wait for deploy being created
|
||||
# echo "waiting for deployment being available"
|
||||
# kubectl -n vela-system wait --for=condition=available deployments helm-test-express-server --timeout 3m
|
||||
# echo "deployment being available"
|
||||
|
||||
# # wait for ingress being created
|
||||
# while ! [ `kubectl -n vela-system get ing helm-test-express-server | grep -v NAME | wc -l` = 1 ]; do
|
||||
# echo "waiting for ingress being created"
|
||||
# sleep 1
|
||||
# done
|
||||
|
||||
|
||||
|
||||
# echo "Application and its components are created"
|
||||
# restartPolicy: Never
|
||||
@@ -7,6 +7,8 @@ replicaCount: 1
|
||||
applyOnceOnly: "off"
|
||||
|
||||
disableCaps: "manualscalertrait,containerizedwokrload,envbinding"
|
||||
|
||||
imageRegistry: ""
|
||||
image:
|
||||
repository: oamdev/vela-core
|
||||
tag: latest
|
||||
@@ -69,7 +71,7 @@ admissionWebhooks:
|
||||
enabled: true
|
||||
image:
|
||||
repository: oamdev/kube-webhook-certgen
|
||||
tag: v2.2
|
||||
tag: v2.3
|
||||
pullPolicy: IfNotPresent
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
@@ -125,4 +127,9 @@ multicluster:
|
||||
memory: 200Mi
|
||||
secureTLS:
|
||||
enabled: true
|
||||
certPath: /etc/k8s-cluster-gateway-certs
|
||||
certPath: /etc/k8s-cluster-gateway-certs
|
||||
|
||||
test:
|
||||
app:
|
||||
repository: oamdev/hello-world
|
||||
tag: v1
|
||||
@@ -32,6 +32,7 @@ import (
|
||||
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
"k8s.io/klog/v2"
|
||||
"k8s.io/klog/v2/klogr"
|
||||
ctrl "sigs.k8s.io/controller-runtime"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
"sigs.k8s.io/controller-runtime/pkg/healthz"
|
||||
@@ -43,6 +44,7 @@ import (
|
||||
oamv1alpha2 "github.com/oam-dev/kubevela/pkg/controller/core.oam.dev/v1alpha2"
|
||||
"github.com/oam-dev/kubevela/pkg/controller/utils"
|
||||
"github.com/oam-dev/kubevela/pkg/cue/packages"
|
||||
_ "github.com/oam-dev/kubevela/pkg/monitor/metrics"
|
||||
"github.com/oam-dev/kubevela/pkg/multicluster"
|
||||
"github.com/oam-dev/kubevela/pkg/oam"
|
||||
"github.com/oam-dev/kubevela/pkg/oam/discoverymapper"
|
||||
@@ -111,6 +113,8 @@ func main() {
|
||||
flag.StringVar(&storageDriver, "storage-driver", "Local", "Application file save to the storage driver")
|
||||
flag.DurationVar(&syncPeriod, "informer-re-sync-interval", 60*time.Minute,
|
||||
"controller shared informer lister full re-sync period")
|
||||
flag.DurationVar(&commonconfig.ReconcileTimeout, "reconcile-timeout", time.Minute*3,
|
||||
"the timeout for controller reconcile")
|
||||
flag.StringVar(&oam.SystemDefinitonNamespace, "system-definition-namespace", "vela-system", "define the namespace of the system-level definition")
|
||||
flag.IntVar(&controllerArgs.ConcurrentReconciles, "concurrent-reconciles", 4, "concurrent-reconciles is the concurrent reconcile number of the controller. The default value is 4")
|
||||
flag.Float64Var(&qps, "kube-api-qps", 50, "the qps for reconcile clients. Low qps may lead to low throughput. High qps may give stress to api-server. Raise this value if concurrent-reconciles is set to be high.")
|
||||
@@ -192,7 +196,7 @@ func main() {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
ctrl.SetLogger(klogr.New())
|
||||
mgr, err := ctrl.NewManager(restConfig, ctrl.Options{
|
||||
Scheme: scheme,
|
||||
MetricsBindAddress: metricsAddr,
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
const Configuration = {
|
||||
/*
|
||||
* Resolve and load @commitlint/config-conventional from node_modules.
|
||||
* Referenced packages must be installed
|
||||
*/
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
/*
|
||||
* Any rules defined here will override rules from @commitlint/config-conventional
|
||||
*/
|
||||
rules: {
|
||||
'type-enum': [
|
||||
2,
|
||||
'always',
|
||||
[
|
||||
'Build',
|
||||
'Chore',
|
||||
'CI',
|
||||
'Docs',
|
||||
'Feat',
|
||||
'Fix',
|
||||
'Perf',
|
||||
'Refactor',
|
||||
'Revert',
|
||||
'Style',
|
||||
'Test',
|
||||
],
|
||||
],
|
||||
'type-case': [2, 'never', 'lower-case'],
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = Configuration;
|
||||
@@ -22,6 +22,7 @@
|
||||
| disable-caps | string | "" | To be disabled builtin capability list. |
|
||||
| storage-driver | string | Local | Application file save to the storage driver |
|
||||
| informer-re-sync-interval | time | 1h | Controller shared informer lister full re-sync period, the interval between two routinely reconciles for one CR (like Application) if no changes made to it. |
|
||||
| reconcile-timeout | time | 3m | The timeout for controller reconcile. |
|
||||
| system-definition-namespace | string | vela-system | define the namespace of the system-level definition |
|
||||
| concurrent-reconciles | int | 4 | The concurrent reconcile number of the controller. You can increase the degree of concurrency if a large number of CPU cores are provided to the controller. |
|
||||
| kube-api-qps | int | 50 | The qps for reconcile k8s clients. Increase it if you have high concurrency. A small number might restrict the requests to the api-server which may cause a long waiting queue when there are a large number of inflight requests. Try to avoid setting it too high since it will cause large burden on apiserver. |
|
||||
@@ -39,4 +40,4 @@
|
||||
| Medium | < 500 | < 5,000 | < 30,000 | 4 | 500 | 800 | 1 | 2Gi |
|
||||
| Large | < 1,000 | < 12,000 | < 72,000 | 4 | 800 | 1,000 | 2 | 4Gi |
|
||||
|
||||
> For details, read KubeVela Performance Test Report
|
||||
> For details, read KubeVela Performance Test Report
|
||||
|
||||
157
docs/examples/nocalhost/nocalhost.yaml
Normal file
157
docs/examples/nocalhost/nocalhost.yaml
Normal file
@@ -0,0 +1,157 @@
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: bookinfo
|
||||
spec:
|
||||
components:
|
||||
- name: productpage
|
||||
type: webservice
|
||||
properties:
|
||||
image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/productpage:latest
|
||||
port: 9080
|
||||
traits:
|
||||
- type: expose
|
||||
properties:
|
||||
port:
|
||||
- 9080
|
||||
- type: nocalhost
|
||||
properties:
|
||||
gitUrl: https://github.com/nocalhost/bookinfo-productpage.git
|
||||
image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/python:3.7.7-slim-productpage-with-pydevd
|
||||
shell: "bash"
|
||||
workDir: "/opt/work"
|
||||
resources:
|
||||
limits:
|
||||
memory: 1Gi
|
||||
cpu: "1"
|
||||
requests:
|
||||
memory: 512Mi
|
||||
cpu: "0.5"
|
||||
debug:
|
||||
remoteDebugPort: 9009
|
||||
hotReload: true
|
||||
sync:
|
||||
type: send
|
||||
filePattern:
|
||||
- ./
|
||||
ignoreFilePattern:
|
||||
- .git
|
||||
- .idea
|
||||
command:
|
||||
run:
|
||||
- sh
|
||||
- run.sh
|
||||
debug:
|
||||
- sh
|
||||
- debug.sh
|
||||
env:
|
||||
- name: "foo"
|
||||
value: "bar"
|
||||
portForward:
|
||||
- 39080:9080
|
||||
|
||||
- name: authors
|
||||
type: webservice
|
||||
properties:
|
||||
image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/authors:latest
|
||||
port: 9080
|
||||
traits:
|
||||
- type: expose
|
||||
properties:
|
||||
port:
|
||||
- 9080
|
||||
- type: nocalhost
|
||||
properties:
|
||||
gitUrl: https://github.com/nocalhost/bookinfo-authors.git
|
||||
image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/golang:latest
|
||||
command:
|
||||
run:
|
||||
- sh
|
||||
- run.sh
|
||||
debug:
|
||||
- sh
|
||||
- debug.sh
|
||||
debug:
|
||||
remoteDebugPort: 9009
|
||||
|
||||
- name: details
|
||||
type: webservice
|
||||
properties:
|
||||
image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/details:latest
|
||||
port: 9080
|
||||
traits:
|
||||
- type: expose
|
||||
properties:
|
||||
port:
|
||||
- 9080
|
||||
- type: nocalhost
|
||||
properties:
|
||||
gitUrl: https://github.com/nocalhost/bookinfo-details.git
|
||||
image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/ruby:2.7.1-slim
|
||||
command:
|
||||
run:
|
||||
- sh
|
||||
- run.sh
|
||||
debug:
|
||||
- sh
|
||||
- debug.sh
|
||||
sync:
|
||||
filePattern:
|
||||
- ./
|
||||
ignoreFilePattern:
|
||||
- .git
|
||||
- .idea
|
||||
|
||||
- name: ratings
|
||||
type: webservice
|
||||
properties:
|
||||
image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/ratings:latest
|
||||
port: 9080
|
||||
traits:
|
||||
- type: expose
|
||||
properties:
|
||||
port:
|
||||
- 9080
|
||||
- type: nocalhost
|
||||
properties:
|
||||
gitUrl: https://github.com/nocalhost/bookinfo-ratings.git
|
||||
image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/node:12.18.1-slim
|
||||
command:
|
||||
run:
|
||||
- sh
|
||||
- run.sh
|
||||
debug:
|
||||
- sh
|
||||
- debug.sh
|
||||
|
||||
- name: reviews
|
||||
type: webservice
|
||||
properties:
|
||||
image: nocalhost-docker.pkg.coding.net/nocalhost/bookinfo/reviews:latest
|
||||
port: 9080
|
||||
traits:
|
||||
- type: expose
|
||||
properties:
|
||||
port:
|
||||
- 9080
|
||||
- type: nocalhost
|
||||
properties:
|
||||
gitUrl: https://github.com/nocalhost/bookinfo-reviews.git
|
||||
image: nocalhost-docker.pkg.coding.net/nocalhost/dev-images/java:latest
|
||||
command:
|
||||
run:
|
||||
- sh
|
||||
- run.sh
|
||||
debug:
|
||||
- sh
|
||||
- debug.sh
|
||||
debug:
|
||||
remoteDebugPort: 5005
|
||||
sync:
|
||||
filePattern:
|
||||
- ./
|
||||
ignoreFilePattern:
|
||||
- .git
|
||||
- .idea
|
||||
- .gradle
|
||||
- build
|
||||
@@ -1,4 +1,4 @@
|
||||
This repo is the source artifacts for addon `observability`.
|
||||
|
||||
- All .cue files are source artifacts from definition of [observability-asset](../../../vela-templates/addons/observability-asset).
|
||||
- `initializer-observability.yaml` will help developer [observability](../../../vela-templates/addons/observability).
|
||||
- All files in definitions are source artifacts which is now built-in in `vela-core` helm chart.
|
||||
- `application-observability.yaml` will help developer [observability](../../../vela-templates/addons/observability).
|
||||
|
||||
130
docs/examples/obervability/application-observability.yaml
Normal file
130
docs/examples/obervability/application-observability.yaml
Normal file
@@ -0,0 +1,130 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: observability
|
||||
spec: { }
|
||||
|
||||
---
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Application
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: "An out of the box solution for KubeVela observability"
|
||||
name: grafana
|
||||
namespace: observability
|
||||
spec:
|
||||
components:
|
||||
# install grafana datasource registration chart
|
||||
- name: grafana-registration-release
|
||||
type: helm
|
||||
properties:
|
||||
repoType: git
|
||||
url: https://github.com/oam-dev/grafana-registration
|
||||
git:
|
||||
branch: master
|
||||
chart: ./chart
|
||||
targetNamespace: observability
|
||||
values:
|
||||
replicaCount: 1
|
||||
|
||||
# install Grafana
|
||||
- name: grafana
|
||||
properties:
|
||||
chart: grafana
|
||||
version: 6.14.1
|
||||
repoType: helm
|
||||
# original url: https://grafana.github.io/helm-charts
|
||||
url: https://charts.kubevela.net/addons
|
||||
targetNamespace: observability
|
||||
releaseName: grafana
|
||||
type: helm
|
||||
traits:
|
||||
- type: pure-ingress
|
||||
properties:
|
||||
domain: grafana.c58136db32cbc44cca364bf1cf7f90519.cn-hongkong.alicontainer.com
|
||||
http:
|
||||
"/": 80
|
||||
- type: import-grafana-dashboard
|
||||
properties:
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: observability
|
||||
credentialSecret: grafana
|
||||
credentialSecretNamespace: observability
|
||||
urls:
|
||||
- "https://charts.kubevela.net/addons/dashboards/kubevela_core_logging.json"
|
||||
- "https://charts.kubevela.net/addons/dashboards/kubevela_core_monitoring.json"
|
||||
- "https://charts.kubevela.net/addons/dashboards/flux2/cluster.json"
|
||||
- "https://charts.kubevela.net/addons/dashboards/kubevela_application_logging.json"
|
||||
|
||||
# install loki
|
||||
- name: loki
|
||||
type: helm
|
||||
properties:
|
||||
chart: loki-stack
|
||||
version: 2.4.1
|
||||
repoType: helm
|
||||
# original url: https://grafana.github.io/helm-charts
|
||||
url: https://charts.kubevela.net/addons
|
||||
targetNamespace: observability
|
||||
releaseName: loki
|
||||
traits:
|
||||
- type: register-grafana-datasource # register loki datasource to Grafana
|
||||
properties:
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: observability
|
||||
credentialSecret: grafana
|
||||
credentialSecretNamespace: observability
|
||||
name: loki
|
||||
service: loki
|
||||
namespace: observability
|
||||
type: loki
|
||||
access: proxy
|
||||
|
||||
# install Prometheus
|
||||
- name: prometheus-server
|
||||
type: helm
|
||||
properties:
|
||||
chart: prometheus
|
||||
version: 14.4.1
|
||||
repoType: helm
|
||||
# original url: https://prometheus-community.github.io/helm-charts
|
||||
url: https://charts.kubevela.net/addons
|
||||
targetNamespace: observability
|
||||
releaseName: prometheus
|
||||
values:
|
||||
alertmanager:
|
||||
persistentVolume:
|
||||
storageClass: "alicloud-disk-available"
|
||||
size: "20Gi"
|
||||
server:
|
||||
persistentVolume:
|
||||
storageClass: "alicloud-disk-available"
|
||||
size: "20Gi"
|
||||
|
||||
traits:
|
||||
- type: register-grafana-datasource # register Prometheus datasource to Grafana
|
||||
properties:
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: observability
|
||||
credentialSecret: grafana
|
||||
credentialSecretNamespace: observability
|
||||
name: prometheus
|
||||
service: prometheus-server
|
||||
namespace: observability
|
||||
type: prometheus
|
||||
access: proxy
|
||||
|
||||
# install kube-state-metrics
|
||||
- name: kube-state-metrics
|
||||
type: helm
|
||||
properties:
|
||||
chart: kube-state-metrics
|
||||
version: 3.4.1
|
||||
repoType: helm
|
||||
# original url: https://prometheus-community.github.io/helm-charts
|
||||
url: https://charts.kubevela.net/addons
|
||||
targetNamespace: observability
|
||||
values:
|
||||
image:
|
||||
repository: oamdev/kube-state-metrics
|
||||
tag: v2.1.0
|
||||
@@ -1,159 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: observability
|
||||
spec: { }
|
||||
|
||||
---
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
metadata:
|
||||
name: grafana
|
||||
namespace: observability
|
||||
spec:
|
||||
appTemplate:
|
||||
spec:
|
||||
components:
|
||||
# install grafana datasource registration chart
|
||||
- name: grafana-registration-release
|
||||
properties:
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2beta1
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: grafana-registration-release
|
||||
namespace: observability
|
||||
spec:
|
||||
chart:
|
||||
spec:
|
||||
chart: ./chart
|
||||
interval: 1m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: grafana-registration-repo
|
||||
namespace: observability
|
||||
interval: 5m
|
||||
values:
|
||||
replicaCount: 1
|
||||
type: raw
|
||||
- name: grafana-registration-repo
|
||||
properties:
|
||||
apiVersion: source.toolkit.fluxcd.io/v1beta1
|
||||
kind: GitRepository
|
||||
metadata:
|
||||
name: grafana-registration-repo
|
||||
namespace: observability
|
||||
spec:
|
||||
interval: 5m
|
||||
ref:
|
||||
branch: master
|
||||
url: https://github.com/oam-dev/grafana-registration
|
||||
type: raw
|
||||
|
||||
# install Grafana
|
||||
- name: grafana
|
||||
properties:
|
||||
chart: grafana
|
||||
version: 6.14.1
|
||||
repoType: helm
|
||||
# original url: https://grafana.github.io/helm-charts
|
||||
url: https://charts.kubevela.net/addons
|
||||
targetNamespace: observability
|
||||
releaseName: grafana
|
||||
type: helm
|
||||
traits:
|
||||
- type: pure-ingress
|
||||
properties:
|
||||
domain: grafana.cf7223b8abedc4691b7eccfe3c675850a.cn-hongkong.alicontainer.com
|
||||
http:
|
||||
"/": 80
|
||||
- type: import-grafana-dashboard
|
||||
properties:
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: observability
|
||||
credentialSecret: grafana
|
||||
credentialSecretNamespace: observability
|
||||
urls:
|
||||
- "https://charts.kubevela.net/addons/dashboards/kubevela_core_logging.json"
|
||||
- "https://charts.kubevela.net/addons/dashboards/kubevela_core_monitoring.json"
|
||||
- "https://charts.kubevela.net/addons/dashboards/flux2/cluster.json"
|
||||
- "https://charts.kubevela.net/addons/dashboards/kubevela_application_logging.json"
|
||||
|
||||
# install loki
|
||||
- name: loki
|
||||
type: helm
|
||||
properties:
|
||||
chart: loki-stack
|
||||
version: 2.4.1
|
||||
repoType: helm
|
||||
# original url: https://grafana.github.io/helm-charts
|
||||
url: https://charts.kubevela.net/addons
|
||||
targetNamespace: observability
|
||||
releaseName: loki
|
||||
traits:
|
||||
- type: register-grafana-datasource # register loki datasource to Grafana
|
||||
properties:
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: observability
|
||||
credentialSecret: grafana
|
||||
credentialSecretNamespace: observability
|
||||
name: loki
|
||||
service: loki
|
||||
namespace: observability
|
||||
type: loki
|
||||
access: proxy
|
||||
|
||||
# install Prometheus
|
||||
- name: prometheus-server
|
||||
type: helm
|
||||
properties:
|
||||
chart: prometheus
|
||||
version: 14.4.1
|
||||
repoType: helm
|
||||
# original url: https://prometheus-community.github.io/helm-charts
|
||||
url: https://charts.kubevela.net/addons
|
||||
targetNamespace: observability
|
||||
releaseName: prometheus
|
||||
values:
|
||||
alertmanager:
|
||||
persistentVolume:
|
||||
storageClass: "alicloud-disk-available"
|
||||
size: "20Gi"
|
||||
server:
|
||||
persistentVolume:
|
||||
storageClass: "alicloud-disk-available"
|
||||
size: "20Gi"
|
||||
|
||||
traits:
|
||||
- type: register-grafana-datasource # register Prometheus datasource to Grafana
|
||||
properties:
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: observability
|
||||
credentialSecret: grafana
|
||||
credentialSecretNamespace: observability
|
||||
name: prometheus
|
||||
service: prometheus-server
|
||||
namespace: observability
|
||||
type: prometheus
|
||||
access: proxy
|
||||
|
||||
# install kube-state-metrics
|
||||
- name: kube-state-metrics
|
||||
type: helm
|
||||
properties:
|
||||
chart: kube-state-metrics
|
||||
version: 3.4.1
|
||||
repoType: helm
|
||||
# original url: https://prometheus-community.github.io/helm-charts
|
||||
url: https://charts.kubevela.net/addons
|
||||
targetNamespace: observability
|
||||
values:
|
||||
image:
|
||||
repository: oamdev/kube-state-metrics
|
||||
tag: v2.1.0
|
||||
|
||||
dependsOn:
|
||||
- ref:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
name: fluxcd
|
||||
namespace: vela-system
|
||||
@@ -1,21 +0,0 @@
|
||||
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]
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: app-ask-sample
|
||||
spec:
|
||||
components:
|
||||
- name: sample-ask
|
||||
type: alibaba-ask
|
||||
properties:
|
||||
name: kubevela
|
||||
|
||||
writeConnectionSecretToRef:
|
||||
name: ask-conn
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user