mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-26 15:54:08 +00:00
Compare commits
149 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c66f5f103f | ||
|
|
e6779f6906 | ||
|
|
a48b74d4be | ||
|
|
2da80af3c4 | ||
|
|
7bf5e17262 | ||
|
|
53a6d54b73 | ||
|
|
bcd072507b | ||
|
|
ae075e6cb6 | ||
|
|
b2127ee4fa | ||
|
|
a865c85d05 | ||
|
|
ab2d2750f2 | ||
|
|
99411a7f01 | ||
|
|
f9b218919a | ||
|
|
83b26349c7 | ||
|
|
2c64d04417 | ||
|
|
ef653ebeb4 | ||
|
|
305403ff8b | ||
|
|
eebcc6c6ae | ||
|
|
298ce69593 | ||
|
|
1e21a01320 | ||
|
|
042485124a | ||
|
|
49a91ca4c5 | ||
|
|
a2ad91f2f5 | ||
|
|
5364e53e50 | ||
|
|
811c783a00 | ||
|
|
22bf2e4c3a | ||
|
|
ee0a73b5b7 | ||
|
|
ddb6285b19 | ||
|
|
3a310f0402 | ||
|
|
6771c688dd | ||
|
|
61a12b0916 | ||
|
|
360c19cf2d | ||
|
|
11103b31bb | ||
|
|
a8adaefc78 | ||
|
|
b4c7ed1773 | ||
|
|
2e12ea9bd8 | ||
|
|
0a9518f583 | ||
|
|
e6668ac390 | ||
|
|
2be5b20c6d | ||
|
|
4f2ed4f59e | ||
|
|
2d8c8efe08 | ||
|
|
89c697ca87 | ||
|
|
4379a46a79 | ||
|
|
d933af022c | ||
|
|
60435e42a5 | ||
|
|
55e746cc7a | ||
|
|
48002641b9 | ||
|
|
c1e6ded23d | ||
|
|
cafb55256f | ||
|
|
b60c16a4be | ||
|
|
8407c0bf4d | ||
|
|
76527421d7 | ||
|
|
a151d17fde | ||
|
|
4ff4afde51 | ||
|
|
fbac93665d | ||
|
|
36c7b9ec5b | ||
|
|
d0e8418c4a | ||
|
|
291f9d139e | ||
|
|
9a766467a3 | ||
|
|
c9b2c99dbf | ||
|
|
0a3244f590 | ||
|
|
12361c133e | ||
|
|
c590853f37 | ||
|
|
17c17fcfc6 | ||
|
|
0e8ffd717f | ||
|
|
8d8447ad94 | ||
|
|
e8d051a532 | ||
|
|
c1ebe9db24 | ||
|
|
3d29df3a52 | ||
|
|
324bbe5e57 | ||
|
|
8e172091f6 | ||
|
|
e73655a8b2 | ||
|
|
ce70f9f57f | ||
|
|
215c4e0752 | ||
|
|
d93d8626c0 | ||
|
|
b66f2995a5 | ||
|
|
cad21c5138 | ||
|
|
af01349f28 | ||
|
|
445db3b276 | ||
|
|
7ed34b675d | ||
|
|
537f19f06b | ||
|
|
6cbdbe84b2 | ||
|
|
2ba7480a41 | ||
|
|
7d827182e6 | ||
|
|
da5b32f1a8 | ||
|
|
8b1ce6937f | ||
|
|
a79c96fa46 | ||
|
|
faa445255d | ||
|
|
f270c5901b | ||
|
|
19bcfdd8df | ||
|
|
e0eded58e5 | ||
|
|
873a19e9e0 | ||
|
|
579f7427fa | ||
|
|
65402bd926 | ||
|
|
ae724b2a9a | ||
|
|
5730d08396 | ||
|
|
c451d74cfd | ||
|
|
4ed40bebe3 | ||
|
|
e29f22a7b3 | ||
|
|
426aa7af34 | ||
|
|
f8ac24db27 | ||
|
|
493e255d78 | ||
|
|
32b6502e74 | ||
|
|
02f79a5cd9 | ||
|
|
ecef32a7f3 | ||
|
|
e59374bb7d | ||
|
|
cec16cc1a4 | ||
|
|
1776859631 | ||
|
|
f5c2c85381 | ||
|
|
7a42c743d7 | ||
|
|
d4277f644e | ||
|
|
f130d1d922 | ||
|
|
1a6d2be6d0 | ||
|
|
2d1edbb16d | ||
|
|
7a139b554f | ||
|
|
6bf4a2c1f7 | ||
|
|
9f6812414d | ||
|
|
7310cc1363 | ||
|
|
161bab7d62 | ||
|
|
332fd4753e | ||
|
|
4e010d7bae | ||
|
|
1ce8722e25 | ||
|
|
cd153e8ce5 | ||
|
|
2cea51e5e9 | ||
|
|
75a972516d | ||
|
|
25bc43ae39 | ||
|
|
068e9d97c4 | ||
|
|
e9981b6e20 | ||
|
|
0781937100 | ||
|
|
75eab7bdde | ||
|
|
d24e282e67 | ||
|
|
0c7048b2a0 | ||
|
|
9780ce3bef | ||
|
|
cb790bfc13 | ||
|
|
73be37b73b | ||
|
|
950411dbe8 | ||
|
|
5fcc2ad9f7 | ||
|
|
cc8a1d3bde | ||
|
|
1f6d4d2345 | ||
|
|
6719e8af3a | ||
|
|
5d17fb3a7f | ||
|
|
08f1ff99cf | ||
|
|
44262f03de | ||
|
|
2145afe4e1 | ||
|
|
60cd8ef7de | ||
|
|
8fb64fcb19 | ||
|
|
8fc192bfac | ||
|
|
c4380dbe06 | ||
|
|
01f7357525 |
36
.github/CODEOWNERS
vendored
Normal file
36
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
# This file is a github code protect rule follow the codeowners https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners#example-of-a-codeowners-file
|
||||
|
||||
* @hongchaodeng @wonderflow @leejanee
|
||||
design/ @hongchaodeng @resouer @wonderflow
|
||||
|
||||
# Owner of CUE
|
||||
pkg/cue @leejanee @FogDong
|
||||
pkg/stdlib @leejanee @FogDong
|
||||
|
||||
# Owner of Workflow
|
||||
pkg/workflow @leejanee @FogDong
|
||||
|
||||
# Owner of rollout
|
||||
pkg/controller/common/rollout/ @wangyikewxgm @wonderflow
|
||||
pkg/controller/core.oam.dev/v1alpha2/applicationrollout @wangyikewxgm @wonderflow
|
||||
pkg/controller/standard.oam.dev/v1alpha1/rollout @wangyikewxgm @wonderflow
|
||||
runtime/rollout @wangyikewxgm @wonderflow
|
||||
|
||||
# Owner of definition controller
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/workflow/workflowstepdefinition @yangsoon @Somefive
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/policies/policydefinition @yangsoon @Somefive
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/components/componentdefinition @yangsoon @zzxwill
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/traits/traitdefinition @yangsoon @zzxwill
|
||||
|
||||
# Owner of health scope controller
|
||||
pkg/controller/core.oam.dev/v1alpha2/core/scopes/healthscope @captainroy-hy @zzxwill
|
||||
|
||||
# Owner of vela templates
|
||||
vela-templates/ @Somefive @barnettZQG @wonderflow
|
||||
|
||||
# Owner of vela CLI
|
||||
references/cli/ @Somefive @zzxwill
|
||||
|
||||
# Owner of vela APIServer
|
||||
pkg/apiserver/ @barnettZQG @yangsoon
|
||||
|
||||
1
.github/comment.userlist
vendored
1
.github/comment.userlist
vendored
@@ -11,3 +11,4 @@ wangyuan249
|
||||
chivalryq
|
||||
FogDong
|
||||
leejanee
|
||||
barnettZQG
|
||||
13
.github/workflows/commit-lint.yml
vendored
Normal file
13
.github/workflows/commit-lint.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: Lint Commit Messages
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
commitlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
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
|
||||
103
.github/workflows/e2e-multicluster-test.yml
vendored
Normal file
103
.github/workflows/e2e-multicluster-test.yml
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
name: E2E MultiCluster Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
workflow_dispatch: {}
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.16'
|
||||
GOLANGCI_VERSION: 'v1.38'
|
||||
KIND_VERSION: 'v0.7.0'
|
||||
|
||||
jobs:
|
||||
|
||||
detect-noop:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
noop: ${{ steps.noop.outputs.should_skip }}
|
||||
steps:
|
||||
- name: Detect No-op Changes
|
||||
id: noop
|
||||
uses: fkirc/skip-duplicate-actions@v3.3.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
|
||||
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
|
||||
concurrent_skipping: false
|
||||
|
||||
e2e-multi-cluster-tests:
|
||||
runs-on: aliyun
|
||||
needs: detect-noop
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
|
||||
steps:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
go get -v -t -d ./...
|
||||
|
||||
- name: Setup Kind
|
||||
uses: engineerd/setup-kind@v0.5.0
|
||||
with:
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
skipClusterCreation: true
|
||||
|
||||
- name: Setup Kind Cluster (Worker)
|
||||
run: |
|
||||
kind delete cluster --name worker
|
||||
kind create cluster --image kindest/node:v1.18.15@sha256:5c1b980c4d0e0e8e7eb9f36f7df525d079a96169c8a8f20d8bd108c0d0889cc4 --name worker
|
||||
kubectl version
|
||||
kubectl cluster-info
|
||||
kind get kubeconfig --name worker --internal > /tmp/worker.kubeconfig
|
||||
kind get kubeconfig --name worker > /tmp/worker.client.kubeconfig
|
||||
|
||||
- name: Setup Kind Cluster (Hub)
|
||||
run: |
|
||||
kind delete cluster
|
||||
kind create cluster --image kindest/node:v1.18.15@sha256:5c1b980c4d0e0e8e7eb9f36f7df525d079a96169c8a8f20d8bd108c0d0889cc4
|
||||
kubectl version
|
||||
kubectl cluster-info
|
||||
|
||||
- name: Load Image to kind cluster (Hub)
|
||||
run: make kind-load
|
||||
|
||||
- name: Cleanup for e2e tests
|
||||
run: |
|
||||
make e2e-cleanup
|
||||
make e2e-setup-core
|
||||
|
||||
- name: Run e2e multicluster tests
|
||||
run: make e2e-multicluster-test
|
||||
|
||||
- name: Stop kubevela, get profile
|
||||
run: make end-e2e-core
|
||||
|
||||
- name: Upload coverage report
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: /tmp/e2e-profile.out,/tmp/e2e_multicluster_test.out
|
||||
flags: e2e-multicluster-test
|
||||
name: codecov-umbrella
|
||||
|
||||
- name: Clean e2e profile
|
||||
run: rm /tmp/e2e-profile.out
|
||||
|
||||
- name: Cleanup image
|
||||
if: ${{ always() }}
|
||||
run: make image-cleanup
|
||||
7
.github/workflows/e2e-rollout-test.yml
vendored
7
.github/workflows/e2e-rollout-test.yml
vendored
@@ -80,13 +80,6 @@ jobs:
|
||||
helm lint ./charts/vela-core
|
||||
helm test -n vela-system kubevela --timeout 5m
|
||||
|
||||
- name: Wait for e2e preparation ready
|
||||
run: |
|
||||
timeout 60 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:38081/api/components)" != "200" ]]; do sleep 5; done' || false
|
||||
|
||||
- name: Run api e2e tests
|
||||
run: make e2e-api-test
|
||||
|
||||
- name: Run e2e tests
|
||||
run: make e2e-rollout-test
|
||||
|
||||
|
||||
4
.github/workflows/e2e-test.yml
vendored
4
.github/workflows/e2e-test.yml
vendored
@@ -80,10 +80,6 @@ jobs:
|
||||
helm lint ./charts/vela-core
|
||||
helm test -n vela-system kubevela --timeout 5m
|
||||
|
||||
- name: Wait for e2e preparation ready
|
||||
run: |
|
||||
timeout 60 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:38081/api/components)" != "200" ]]; do sleep 5; done' || false
|
||||
|
||||
- name: Run api e2e tests
|
||||
run: make e2e-api-test
|
||||
|
||||
|
||||
4
.github/workflows/registry.yml
vendored
4
.github/workflows/registry.yml
vendored
@@ -85,6 +85,7 @@ jobs:
|
||||
env:
|
||||
HELM_CHARTS_DIR: charts
|
||||
HELM_CHART: charts/vela-core
|
||||
MINIMAL_HELM_CHART: charts/vela-minimal
|
||||
LEGACY_HELM_CHART: legacy/charts/vela-core-legacy
|
||||
OAM_RUNTIME_HELM_CHART: charts/oam-runtime
|
||||
VELA_ROLLOUT_HELM_CHART: runtime/rollout/charts
|
||||
@@ -128,11 +129,13 @@ jobs:
|
||||
chart_version=${current_repo_tag}-nightly-build
|
||||
fi
|
||||
sed -i "s/latest/${image_tag}/g" $HELM_CHART/values.yaml
|
||||
sed -i "s/latest/${image_tag}/g" $MINIMAL_HELM_CHART/values.yaml
|
||||
sed -i "s/latest/${image_tag}/g" $LEGACY_HELM_CHART/values.yaml
|
||||
sed -i "s/latest/${image_tag}/g" $OAM_RUNTIME_HELM_CHART/values.yaml
|
||||
sed -i "s/latest/${image_tag}/g" $VELA_ROLLOUT_HELM_CHART/values.yaml
|
||||
chart_smever=${chart_version#"v"}
|
||||
sed -i "s/0.1.0/$chart_smever/g" $HELM_CHART/Chart.yaml
|
||||
sed -i "s/0.1.0/$chart_smever/g" $MINIMAL_HELM_CHART/Chart.yaml
|
||||
sed -i "s/0.1.0/$chart_smever/g" $LEGACY_HELM_CHART/Chart.yaml
|
||||
sed -i "s/0.1.0/$chart_smever/g" $OAM_RUNTIME_HELM_CHART/Chart.yaml
|
||||
sed -i "s/0.1.0/$chart_smever/g" $VELA_ROLLOUT_HELM_CHART/Chart.yaml
|
||||
@@ -153,6 +156,7 @@ jobs:
|
||||
- name: Package helm charts
|
||||
run: |
|
||||
helm package $HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm package $MINIMAL_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm package $LEGACY_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm package $OAM_RUNTIME_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
helm package $VELA_ROLLOUT_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
|
||||
|
||||
7
.github/workflows/sync-api.yml
vendored
7
.github/workflows/sync-api.yml
vendored
@@ -11,10 +11,10 @@ jobs:
|
||||
sync-core-api:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Set up Go 1.14
|
||||
- name: Set up Go 1.16
|
||||
uses: actions/setup-go@v1
|
||||
env:
|
||||
GO_VERSION: '1.14'
|
||||
GO_VERSION: '1.16'
|
||||
GOLANGCI_VERSION: 'v1.38'
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
@@ -33,4 +33,5 @@ jobs:
|
||||
VERSION: ${{ steps.get_version.outputs.VERSION }}
|
||||
COMMIT_ID: ${{ github.sha }}
|
||||
run: |
|
||||
bash ./hack/apis/sync.sh
|
||||
bash ./hack/apis/clientgen.sh
|
||||
bash ./hack/apis/sync.sh
|
||||
|
||||
12
.gitignore
vendored
12
.gitignore
vendored
@@ -44,17 +44,5 @@ charts/vela-core/crds/_.yaml
|
||||
|
||||
.vela/
|
||||
|
||||
# Dashboard
|
||||
node_modules/
|
||||
.eslintcache
|
||||
references/dashboard/dist/
|
||||
references/dashboard/package-lock.json
|
||||
references/dashboard/src/.umi/
|
||||
package-lock.json
|
||||
references/dashboard/src/.umi-production/
|
||||
|
||||
# Swagger: generate Restful API
|
||||
references/apiserver/docs/index.html
|
||||
|
||||
# check docs
|
||||
git-page/
|
||||
@@ -22,75 +22,6 @@ You can contribute to KubeVela in several ways. Here are some examples:
|
||||
|
||||
For more ways to contribute, check out the [Open Source Guides](https://opensource.guide/how-to-contribute/).
|
||||
|
||||
### Commit Conventions
|
||||
|
||||
KubeVela follows the [conventional-commits](https://www.conventionalcommits.org/en/v1.0.0/) and [commit messages best practices](https://chris.beams.io/posts/git-commit/) to improve better history information.
|
||||
|
||||
The commit message should be structured as follows:
|
||||
|
||||
```
|
||||
<type>[optional scope]: <subject>
|
||||
|
||||
[optional body]
|
||||
```
|
||||
|
||||
#### Examples:
|
||||
|
||||
Commit message with scope:
|
||||
|
||||
```
|
||||
Feat(lang): add polish language
|
||||
```
|
||||
|
||||
Commit message with no body:
|
||||
|
||||
```
|
||||
Docs: correct spelling of CHANGELOG
|
||||
```
|
||||
|
||||
Commit message with multi-paragraph body:
|
||||
|
||||
```
|
||||
Fix: correct minor typos in code
|
||||
|
||||
see the issue for details
|
||||
|
||||
on typos fixed.
|
||||
|
||||
Reviewed-by: Z
|
||||
Refs #133
|
||||
```
|
||||
|
||||
#### `<type>` (required)
|
||||
|
||||
Type is required to better capture the area of the commit, based on the [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines).
|
||||
|
||||
We capitalize the `<type>` to make sure the subject line is capitalized. `<type>` can be one of the following:
|
||||
|
||||
* **Feat**: A new feature
|
||||
* **Fix**: A bug fix
|
||||
* **Docs**: Documentation only changes
|
||||
* **Build**: Changes that affect the build system or external dependencies
|
||||
* **Style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
||||
* **Refactor**: A code change that neither fixes a bug nor adds a feature
|
||||
* **Perf**: A code change that improves performance
|
||||
* **Test**: Adding missing or correcting existing tests
|
||||
* **Chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
|
||||
|
||||
#### `<scope>` (optional)
|
||||
|
||||
Scope is optional, it may be provided to a commit’s type, to provide additional contextual information and is contained within parenthesis, it is could be anything specifying place of the commit change. Github issue link is
|
||||
also a valid scope. For example: Fix(cli), Feat(api), Fix(#233), etc.
|
||||
|
||||
You can use `*` when the change affects more than a single scope.
|
||||
|
||||
#### `<subject>` (required)
|
||||
|
||||
The subject MUST immediately follow the colon and space after the type/scope prefix. The description is a short summary of the code changes, e.g., "Fix: array parsing issue when multiple spaces were contained in string", instead of "Fix: bug".
|
||||
|
||||
#### `<body>` (optional)
|
||||
|
||||
A longer commit body may be provided after the short subject, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.
|
||||
|
||||
### Report bugs
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ ARG VERSION
|
||||
ARG GITVERSION
|
||||
|
||||
RUN apk add gcc musl-dev libc-dev ;\
|
||||
GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
|
||||
go test -c -o manager-${TARGETARCH} -cover -covermode=atomic -coverpkg ./... .
|
||||
|
||||
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
|
||||
|
||||
73
Makefile
73
Makefile
@@ -58,32 +58,11 @@ vela-cli:
|
||||
kubectl-vela:
|
||||
$(GOBUILD_ENV) go build -o bin/kubectl-vela -a -ldflags $(LDFLAGS) ./cmd/plugin/main.go
|
||||
|
||||
dashboard-build:
|
||||
cd references/dashboard && npm install && cd ..
|
||||
|
||||
doc-gen:
|
||||
rm -r docs/en/cli/*
|
||||
go run hack/docgen/gen.go
|
||||
|
||||
PWD := $(shell pwd)
|
||||
docs-build:
|
||||
docker run -it -v $(PWD)/docs/sidebars.js:/workspace/kubevela.io/sidebars.js \
|
||||
-v $(PWD)/docs/en:/workspace/kubevela.io/docs \
|
||||
oamdev/vela-webtool:v1 -t build
|
||||
|
||||
docs-start:
|
||||
docker run -it -p 3000:3000 -v $(PWD)/docs/sidebars.js:/workspace/kubevela.io/sidebars.js \
|
||||
-v $(PWD)/docs/en:/workspace/kubevela.io/docs \
|
||||
oamdev/vela-webtool:v1 -t start
|
||||
|
||||
api-gen:
|
||||
swag init -g references/apiserver/route.go --output references/apiserver/docs
|
||||
swagger-codegen generate -l html2 -i references/apiserver/docs/swagger.yaml -o references/apiserver/docs
|
||||
mv references/apiserver/docs/index.html docs/en/developers/references/restful-api/
|
||||
|
||||
generate-source:
|
||||
go run hack/frontend/source.go
|
||||
|
||||
PWD := $(shell pwd)
|
||||
cross-build:
|
||||
rm -rf _bin
|
||||
go get github.com/mitchellh/gox@v0.4.0
|
||||
@@ -113,16 +92,21 @@ compress:
|
||||
)
|
||||
|
||||
# Run against the configured Kubernetes cluster in ~/.kube/config
|
||||
run: fmt vet
|
||||
go run ./cmd/core/main.go
|
||||
run:
|
||||
go run ./cmd/core/main.go --application-revision-limit 5
|
||||
|
||||
run-apiserver:
|
||||
go run ./cmd/apiserver/main.go
|
||||
|
||||
# Run go fmt against code
|
||||
fmt: goimports installcue
|
||||
go fmt ./...
|
||||
$(GOIMPORTS) -local github.com/oam-dev/kubevela -w $$(go list -f {{.Dir}} ./...)
|
||||
$(CUE) fmt ./vela-templates/definitions/internal/
|
||||
$(CUE) fmt ./vela-templates/definitions/registry/
|
||||
|
||||
$(CUE) fmt ./vela-templates/definitions/internal/*
|
||||
$(CUE) fmt ./vela-templates/definitions/registry/*
|
||||
$(CUE) fmt ./pkg/stdlib/pkgs/*
|
||||
$(CUE) fmt ./pkg/stdlib/op.cue
|
||||
$(CUE) fmt ./pkg/workflow/tasks/template/static/*
|
||||
# Run go vet against code
|
||||
vet:
|
||||
go vet ./...
|
||||
@@ -154,13 +138,18 @@ docker-build-runtime-rollout:
|
||||
docker-push:
|
||||
docker push $(VELA_CORE_IMAGE)
|
||||
|
||||
e2e-setup-core:
|
||||
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) --set multicluster.enabled=true --wait kubevela ./charts/vela-core
|
||||
kubectl wait --for=condition=Available deployment/kubevela-vela-core -n vela-system --timeout=180s
|
||||
|
||||
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 ocm-cluster-manager
|
||||
bin/vela addon enable terraform
|
||||
ginkgo version
|
||||
ginkgo -v -r e2e/setup
|
||||
|
||||
@@ -168,13 +157,10 @@ e2e-setup:
|
||||
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=vela-core,app.kubernetes.io/instance=kubevela -n vela-system --timeout=600s
|
||||
kubectl wait --for=condition=Ready pod -l app=source-controller -n flux-system --timeout=600s
|
||||
kubectl wait --for=condition=Ready pod -l app=helm-controller -n flux-system --timeout=600s
|
||||
kubectl wait --for=condition=Ready pod -l app=cluster-manager -n open-cluster-management --timeout=600s
|
||||
bin/vela dashboard &
|
||||
|
||||
e2e-api-test:
|
||||
# Run e2e test
|
||||
ginkgo -v -skipPackage capability,setup,apiserver,application -r e2e
|
||||
ginkgo -v -r e2e/apiserver
|
||||
ginkgo -v -skipPackage capability,setup,application -r e2e
|
||||
ginkgo -v -r e2e/application
|
||||
|
||||
e2e-test:
|
||||
@@ -186,6 +172,10 @@ e2e-rollout-test:
|
||||
ginkgo -v --focus="rollout related e2e-test." ./test/e2e-test
|
||||
@$(OK) tests pass
|
||||
|
||||
e2e-multicluster-test:
|
||||
go test -v -coverpkg=./... -coverprofile=/tmp/e2e_multicluster_test.out ./test/e2e-multicluster-test
|
||||
@$(OK) tests pass
|
||||
|
||||
compatibility-test: vet lint staticcheck generate-compatibility-testdata
|
||||
# Run compatibility test with old crd
|
||||
COMPATIBILITY_TEST=TRUE go test -race ./pkg/...
|
||||
@@ -208,6 +198,9 @@ ifneq ($(shell docker images -q $(VELA_CORE_TEST_IMAGE)),)
|
||||
docker rmi -f $(VELA_CORE_TEST_IMAGE)
|
||||
endif
|
||||
|
||||
end-e2e-core:
|
||||
sh ./hack/e2e/end_e2e_core.sh
|
||||
|
||||
end-e2e:
|
||||
sh ./hack/e2e/end_e2e.sh
|
||||
|
||||
@@ -252,13 +245,12 @@ manifests: installcue kustomize
|
||||
# TODO(yangsoon): kustomize will merge all CRD into a whole file, it may not work if we want patch more than one CRD in this way
|
||||
$(KUSTOMIZE) build config/crd -o config/crd/base/core.oam.dev_applications.yaml
|
||||
./hack/crd/cleanup.sh
|
||||
go run ./hack/crd/dispatch/dispatch.go config/crd/base charts/vela-core/crds charts/oam-runtime/crds runtime/
|
||||
go run hack/crd/update.go charts/vela-core/crds/standard.oam.dev_podspecworkloads.yaml
|
||||
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 --addons-path=./vela-templates/addons --store-path=./charts/vela-core/templates/addons
|
||||
go run ./vela-templates/gen_addons.go
|
||||
|
||||
GOLANGCILINT_VERSION ?= v1.31.0
|
||||
GOLANGCILINT_VERSION ?= v1.38.0
|
||||
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
||||
HOSTARCH := $(shell uname -m)
|
||||
ifeq ($(HOSTARCH),x86_64)
|
||||
@@ -331,15 +323,8 @@ else
|
||||
KUSTOMIZE=$(shell which kustomize)
|
||||
endif
|
||||
|
||||
start-dashboard:
|
||||
go run references/cmd/apiserver/main.go &
|
||||
cd references/dashboard && npm install && npm start && cd ..
|
||||
|
||||
swagger-gen:
|
||||
$(GOBIN)/swag init -g apiserver/route.go -d pkg/ -o references/apiserver/docs/
|
||||
|
||||
check-license-header:
|
||||
./hack/licence/header-check.sh
|
||||
|
||||
check-install-def:
|
||||
def-install:
|
||||
./hack/utils/installdefinition.sh
|
||||
|
||||
@@ -28,7 +28,7 @@ KubeVela is a modern application platform that makes deploying and managing appl
|
||||
|
||||
- [Introduction](https://kubevela.io/docs)
|
||||
- [Installation](https://kubevela.io/docs/install)
|
||||
- [Design Your First Deployment Plan](https://kubevela.io/docs/end-user/application)
|
||||
- [Design Your First Deployment Plan](https://kubevela.io/docs/quick-start)
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -39,6 +39,9 @@ Full documentation is available on the [KubeVela website](https://kubevela.io/).
|
||||
- Slack: [CNCF Slack](https://slack.cncf.io/) #kubevela channel (*English*)
|
||||
- Gitter: [oam-dev](https://gitter.im/oam-dev/community) (*English*)
|
||||
- [DingTalk Group](https://page.dingtalk.com/wow/dingtalk/act/en-home): `23310022` (*Chinese*)
|
||||
- Wechat Group (*Chinese*): Broker wechat to add you into the user group.
|
||||
|
||||
<img src="https://static.kubevela.net/images/barnett-wechat.jpg" width="200" />
|
||||
- Bi-weekly Community Call: [Meeting Notes](https://docs.google.com/document/d/1nqdFEyULekyksFHtFvgvFAYE-0AMHKoS3RMnaKsarjs)
|
||||
|
||||
## Talks and Conferences
|
||||
|
||||
@@ -20,6 +20,8 @@ import (
|
||||
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"
|
||||
@@ -107,8 +109,11 @@ type Terraform struct {
|
||||
|
||||
// Type specifies which Terraform configuration it is, HCL or JSON syntax
|
||||
// +kubebuilder:default:=hcl
|
||||
// +kubebuilder:validation:Enum:=hcl;json
|
||||
// +kubebuilder:validation:Enum:=hcl;json;remote
|
||||
Type string `json:"type,omitempty"`
|
||||
|
||||
// ProviderReference specifies the reference to Provider
|
||||
ProviderReference *types.Reference `json:"providerRef,omitempty"`
|
||||
}
|
||||
|
||||
// A WorkloadTypeDescriptor refer to a Workload Type
|
||||
@@ -163,23 +168,44 @@ type ApplicationPhase string
|
||||
const (
|
||||
// ApplicationRollingOut means the app is in the middle of rolling out
|
||||
ApplicationRollingOut ApplicationPhase = "rollingOut"
|
||||
// ApplicationStarting means the app is preparing for reconcile
|
||||
ApplicationStarting ApplicationPhase = "starting"
|
||||
// ApplicationRendering means the app is rendering
|
||||
ApplicationRendering ApplicationPhase = "rendering"
|
||||
// ApplicationPolicyGenerating means the app is generating policies
|
||||
ApplicationPolicyGenerating ApplicationPhase = "generatingPolicy"
|
||||
// ApplicationRunningWorkflow means the app is running workflow
|
||||
ApplicationRunningWorkflow ApplicationPhase = "runningWorkflow"
|
||||
// ApplicationWorkflowSuspending means the app's workflow is suspending
|
||||
ApplicationWorkflowSuspending ApplicationPhase = "workflowSuspending"
|
||||
// ApplicationWorkflowTerminated means the app's workflow is terminated
|
||||
ApplicationWorkflowTerminated ApplicationPhase = "workflowTerminated"
|
||||
// ApplicationWorkflowFinished means the app's workflow is finished
|
||||
ApplicationWorkflowFinished ApplicationPhase = "workflowFinished"
|
||||
// ApplicationRunning means the app finished rendering and applied result to the cluster
|
||||
ApplicationRunning ApplicationPhase = "running"
|
||||
// ApplicationHealthChecking means the app finished rendering and applied result to the cluster, but still unhealthy
|
||||
ApplicationHealthChecking ApplicationPhase = "healthChecking"
|
||||
// ApplicationUnhealthy means the app finished rendering and applied result to the cluster, but still unhealthy
|
||||
ApplicationUnhealthy ApplicationPhase = "unhealthy"
|
||||
)
|
||||
|
||||
// WorkflowState is a string that mark the workflow state
|
||||
type WorkflowState string
|
||||
|
||||
const (
|
||||
// WorkflowStateTerminated means workflow is terminated manually, and it won't be started unless the spec changed.
|
||||
WorkflowStateTerminated WorkflowState = "terminated"
|
||||
// WorkflowStateSuspended means workflow is suspended manually, and it can be resumed.
|
||||
WorkflowStateSuspended WorkflowState = "suspended"
|
||||
// WorkflowStateFinished means workflow is running successfully, all steps finished.
|
||||
WorkflowStateFinished WorkflowState = "finished"
|
||||
// WorkflowStateExecuting means workflow is still running or waiting some steps.
|
||||
WorkflowStateExecuting WorkflowState = "executing"
|
||||
)
|
||||
|
||||
// ApplicationComponentStatus record the health status of App component
|
||||
type ApplicationComponentStatus struct {
|
||||
Name string `json:"name"`
|
||||
Env string `json:"env,omitempty"`
|
||||
// WorkloadDefinition is the definition of a WorkloadDefinition, such as deployments/apps.v1
|
||||
WorkloadDefinition WorkloadGVK `json:"workloadDefinition,omitempty"`
|
||||
Healthy bool `json:"healthy"`
|
||||
@@ -213,14 +239,27 @@ type RawComponent struct {
|
||||
|
||||
// WorkflowStepStatus record the status of a workflow step
|
||||
type WorkflowStepStatus struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Phase WorkflowStepPhase `json:"phase,omitempty"`
|
||||
// A human readable message indicating details about why the workflowStep is in this state.
|
||||
Message string `json:"message,omitempty"`
|
||||
// A brief CamelCase message indicating details about why the workflowStep is in this state.
|
||||
Reason string `json:"reason,omitempty"`
|
||||
ResourceRef corev1.ObjectReference `json:"resourceRef,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
SubSteps *SubStepsStatus `json:"subSteps,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowSubStepStatus record the status of a workflow step
|
||||
type WorkflowSubStepStatus struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Phase WorkflowStepPhase `json:"phase,omitempty"`
|
||||
// A human readable message indicating details about why the workflowStep is in this state.
|
||||
Message string `json:"message,omitempty"`
|
||||
// A brief CamelCase message indicating details about why the workflowStep is in this state.
|
||||
Reason string `json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
// AppStatus defines the observed state of Application
|
||||
@@ -252,18 +291,30 @@ type AppStatus struct {
|
||||
// LatestRevision of the application configuration it generates
|
||||
// +optional
|
||||
LatestRevision *Revision `json:"latestRevision,omitempty"`
|
||||
|
||||
// AppliedResources record the resources that the workflow step apply.
|
||||
AppliedResources []ClusterObjectReference `json:"appliedResources,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowStatus record the status of workflow
|
||||
type WorkflowStatus struct {
|
||||
AppRevision string `json:"appRevision,omitempty"`
|
||||
StepIndex int `json:"stepIndex,omitempty"`
|
||||
Suspend bool `json:"suspend"`
|
||||
Terminated bool `json:"terminated"`
|
||||
ContextBackend *corev1.ObjectReference `json:"contextBackend"`
|
||||
AppRevision string `json:"appRevision,omitempty"`
|
||||
Mode WorkflowMode `json:"mode"`
|
||||
|
||||
Suspend bool `json:"suspend"`
|
||||
Terminated bool `json:"terminated"`
|
||||
|
||||
ContextBackend *corev1.ObjectReference `json:"contextBackend,omitempty"`
|
||||
Steps []WorkflowStepStatus `json:"steps,omitempty"`
|
||||
}
|
||||
|
||||
// SubStepsStatus record the status of workflow steps.
|
||||
type SubStepsStatus struct {
|
||||
StepIndex int `json:"stepIndex,omitempty"`
|
||||
Mode WorkflowMode `json:"mode,omitempty"`
|
||||
Steps []WorkflowSubStepStatus `json:"steps,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowStepPhase describes the phase of a workflow step.
|
||||
type WorkflowStepPhase string
|
||||
|
||||
@@ -296,6 +347,16 @@ const (
|
||||
WorkflowStepType DefinitionType = "WorkflowStep"
|
||||
)
|
||||
|
||||
// WorkflowMode describes the mode of workflow
|
||||
type WorkflowMode string
|
||||
|
||||
const (
|
||||
// WorkflowModeDAG describes the DAG mode of workflow
|
||||
WorkflowModeDAG WorkflowMode = "DAG"
|
||||
// WorkflowModeStep describes the step by step mode of workflow
|
||||
WorkflowModeStep WorkflowMode = "StepByStep"
|
||||
)
|
||||
|
||||
// AppRolloutStatus defines the observed state of AppRollout
|
||||
type AppRolloutStatus struct {
|
||||
v1alpha1.RolloutStatus `json:",inline"`
|
||||
@@ -325,6 +386,10 @@ type ApplicationComponent struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Properties runtime.RawExtension `json:"properties,omitempty"`
|
||||
|
||||
DependsOn []string `json:"dependsOn,omitempty"`
|
||||
Inputs StepInputs `json:"inputs,omitempty"`
|
||||
Outputs StepOutputs `json:"outputs,omitempty"`
|
||||
|
||||
// Traits define the trait of one component, the type must be array to keep the order.
|
||||
Traits []ApplicationTrait `json:"traits,omitempty"`
|
||||
|
||||
@@ -334,6 +399,22 @@ type ApplicationComponent struct {
|
||||
Scopes map[string]string `json:"scopes,omitempty"`
|
||||
}
|
||||
|
||||
// StepOutputs defines output variable of WorkflowStep
|
||||
type StepOutputs []outputItem
|
||||
|
||||
// StepInputs defines variable input of WorkflowStep
|
||||
type StepInputs []inputItem
|
||||
|
||||
type inputItem struct {
|
||||
ParameterKey string `json:"parameterKey"`
|
||||
From string `json:"from"`
|
||||
}
|
||||
|
||||
type outputItem struct {
|
||||
ValueFrom string `json:"valueFrom"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// ClusterSelector defines the rules to select a Cluster resource.
|
||||
// Either name or labels is needed.
|
||||
type ClusterSelector struct {
|
||||
@@ -359,3 +440,20 @@ type ClusterPlacement struct {
|
||||
// Distribution defines the replica distribution of an AppRevision to a cluster.
|
||||
Distribution Distribution `json:"distribution,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceCreatorRole defines the resource creator.
|
||||
type ResourceCreatorRole string
|
||||
|
||||
const (
|
||||
// PolicyResourceCreator create the policy resource.
|
||||
PolicyResourceCreator ResourceCreatorRole = "policy"
|
||||
// WorkflowResourceCreator create the resource in workflow.
|
||||
WorkflowResourceCreator ResourceCreatorRole = "workflow"
|
||||
)
|
||||
|
||||
// ClusterObjectReference defines the object reference with cluster.
|
||||
type ClusterObjectReference struct {
|
||||
Cluster string `json:"cluster,omitempty"`
|
||||
Creator ResourceCreatorRole `json:"creator,omitempty"`
|
||||
corev1.ObjectReference `json:",inline"`
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ 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"
|
||||
)
|
||||
|
||||
@@ -72,6 +73,11 @@ func (in *AppStatus) DeepCopyInto(out *AppStatus) {
|
||||
*out = new(Revision)
|
||||
**out = **in
|
||||
}
|
||||
if in.AppliedResources != nil {
|
||||
in, out := &in.AppliedResources, &out.AppliedResources
|
||||
*out = make([]ClusterObjectReference, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus.
|
||||
@@ -88,6 +94,21 @@ func (in *AppStatus) DeepCopy() *AppStatus {
|
||||
func (in *ApplicationComponent) DeepCopyInto(out *ApplicationComponent) {
|
||||
*out = *in
|
||||
in.Properties.DeepCopyInto(&out.Properties)
|
||||
if in.DependsOn != nil {
|
||||
in, out := &in.DependsOn, &out.DependsOn
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Inputs != nil {
|
||||
in, out := &in.Inputs, &out.Inputs
|
||||
*out = make(StepInputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Outputs != nil {
|
||||
in, out := &in.Outputs, &out.Outputs
|
||||
*out = make(StepOutputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Traits != nil {
|
||||
in, out := &in.Traits, &out.Traits
|
||||
*out = make([]ApplicationTrait, len(*in))
|
||||
@@ -208,6 +229,22 @@ func (in *ChildResourceKind) DeepCopy() *ChildResourceKind {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterObjectReference) DeepCopyInto(out *ClusterObjectReference) {
|
||||
*out = *in
|
||||
out.ObjectReference = in.ObjectReference
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterObjectReference.
|
||||
func (in *ClusterObjectReference) DeepCopy() *ClusterObjectReference {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ClusterObjectReference)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ClusterPlacement) DeepCopyInto(out *ClusterPlacement) {
|
||||
*out = *in
|
||||
@@ -403,7 +440,7 @@ func (in *Schematic) DeepCopyInto(out *Schematic) {
|
||||
if in.Terraform != nil {
|
||||
in, out := &in.Terraform, &out.Terraform
|
||||
*out = new(Terraform)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,9 +469,72 @@ func (in *Status) DeepCopy() *Status {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in StepInputs) DeepCopyInto(out *StepInputs) {
|
||||
{
|
||||
in := &in
|
||||
*out = make(StepInputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepInputs.
|
||||
func (in StepInputs) DeepCopy() StepInputs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(StepInputs)
|
||||
in.DeepCopyInto(out)
|
||||
return *out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in StepOutputs) DeepCopyInto(out *StepOutputs) {
|
||||
{
|
||||
in := &in
|
||||
*out = make(StepOutputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepOutputs.
|
||||
func (in StepOutputs) DeepCopy() StepOutputs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(StepOutputs)
|
||||
in.DeepCopyInto(out)
|
||||
return *out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SubStepsStatus) DeepCopyInto(out *SubStepsStatus) {
|
||||
*out = *in
|
||||
if in.Steps != nil {
|
||||
in, out := &in.Steps, &out.Steps
|
||||
*out = make([]WorkflowSubStepStatus, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubStepsStatus.
|
||||
func (in *SubStepsStatus) DeepCopy() *SubStepsStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(SubStepsStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Terraform.
|
||||
@@ -458,7 +558,9 @@ func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus) {
|
||||
if in.Steps != nil {
|
||||
in, out := &in.Steps, &out.Steps
|
||||
*out = make([]WorkflowStepStatus, len(*in))
|
||||
copy(*out, *in)
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -475,7 +577,11 @@ func (in *WorkflowStatus) DeepCopy() *WorkflowStatus {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowStepStatus) DeepCopyInto(out *WorkflowStepStatus) {
|
||||
*out = *in
|
||||
out.ResourceRef = in.ResourceRef
|
||||
if in.SubSteps != nil {
|
||||
in, out := &in.SubSteps, &out.SubSteps
|
||||
*out = new(SubStepsStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepStatus.
|
||||
@@ -488,6 +594,21 @@ func (in *WorkflowStepStatus) DeepCopy() *WorkflowStepStatus {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowSubStepStatus) DeepCopyInto(out *WorkflowSubStepStatus) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowSubStepStatus.
|
||||
func (in *WorkflowSubStepStatus) DeepCopy() *WorkflowSubStepStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowSubStepStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadGVK) DeepCopyInto(out *WorkloadGVK) {
|
||||
*out = *in
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
@@ -31,8 +32,11 @@ const (
|
||||
// OCMEngine represents Open-Cluster-Management multi-cluster management solution
|
||||
OCMEngine ClusterManagementEngine = "ocm"
|
||||
|
||||
// LocalEngine represents single cluster ClusterManagerEngine
|
||||
LocalEngine ClusterManagementEngine = "local"
|
||||
// SingleClusterEngine represents single cluster ClusterManagerEngine
|
||||
SingleClusterEngine ClusterManagementEngine = "single-cluster"
|
||||
|
||||
// ClusterGatewayEngine represents multi-cluster management solution with cluster-gateway
|
||||
ClusterGatewayEngine ClusterManagementEngine = "cluster-gateway"
|
||||
)
|
||||
|
||||
// EnvBindingPhase is a label for the condition of a EnvBinding at the current time
|
||||
@@ -72,10 +76,16 @@ type EnvPlacement struct {
|
||||
NamespaceSelector *NamespaceSelector `json:"namespaceSelector,omitempty"`
|
||||
}
|
||||
|
||||
// EnvSelector defines which components should this env contains
|
||||
type EnvSelector struct {
|
||||
Components []string `json:"components,omitempty"`
|
||||
}
|
||||
|
||||
// EnvConfig is the configuration for different environments.
|
||||
type EnvConfig struct {
|
||||
Name string `json:"name"`
|
||||
Placement EnvPlacement `json:"placement,omitempty"`
|
||||
Selector *EnvSelector `json:"selector,omitempty"`
|
||||
Patch EnvPatch `json:"patch"`
|
||||
}
|
||||
|
||||
@@ -124,7 +134,10 @@ type EnvBindingStatus struct {
|
||||
|
||||
Phase EnvBindingPhase `json:"phase,omitempty"`
|
||||
|
||||
ClusterDecisions []ClusterDecision `json:"cluster_decisions,omitempty"`
|
||||
ClusterDecisions []ClusterDecision `json:"clusterDecisions,omitempty"`
|
||||
|
||||
// ResourceTracker record the status of the ResourceTracker
|
||||
ResourceTracker *corev1.ObjectReference `json:"resourceTracker,omitempty"`
|
||||
}
|
||||
|
||||
// EnvBinding is the Schema for the EnvBinding API
|
||||
|
||||
116
apis/core.oam.dev/v1alpha1/workflow_types.go
Normal file
116
apis/core.oam.dev/v1alpha1/workflow_types.go
Normal file
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
Copyright 2021. The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
|
||||
)
|
||||
|
||||
// WorkflowStepPhase describes the phase of a workflow step.
|
||||
type WorkflowStepPhase string
|
||||
|
||||
const (
|
||||
// WorkflowStepPhaseSucceeded will make the controller run the next step.
|
||||
WorkflowStepPhaseSucceeded WorkflowStepPhase = "succeeded"
|
||||
// WorkflowStepPhaseFailed will make the controller stop the workflow and report error in `message`.
|
||||
WorkflowStepPhaseFailed WorkflowStepPhase = "failed"
|
||||
// WorkflowStepPhaseTerminated will make the controller terminate the workflow.
|
||||
WorkflowStepPhaseTerminated WorkflowStepPhase = "terminated"
|
||||
// WorkflowStepPhaseSuspending will make the controller suspend the workflow.
|
||||
WorkflowStepPhaseSuspending WorkflowStepPhase = "suspending"
|
||||
// WorkflowStepPhaseRunning will make the controller continue the workflow.
|
||||
WorkflowStepPhaseRunning WorkflowStepPhase = "running"
|
||||
)
|
||||
|
||||
// WorkflowStep defines how to execute a workflow step.
|
||||
type WorkflowStep struct {
|
||||
// Name is the unique name of the workflow step.
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Properties runtime.RawExtension `json:"properties,omitempty"`
|
||||
Inputs common.StepInputs `json:"inputs,omitempty"`
|
||||
Outputs common.StepOutputs `json:"outputs,omitempty"`
|
||||
}
|
||||
|
||||
// A WorkflowSpec defines the desired state of a Workflow.
|
||||
type WorkflowSpec struct {
|
||||
Steps []WorkflowStep `json:"steps,omitempty"`
|
||||
}
|
||||
|
||||
// A WorkflowStatus is the status of Workflow
|
||||
type WorkflowStatus struct {
|
||||
// ConditionedStatus reflects the observed status of a resource
|
||||
condition.ConditionedStatus `json:",inline"`
|
||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||
StepIndex int `json:"stepIndex,omitempty"`
|
||||
Suspend bool `json:"suspend"`
|
||||
Terminated bool `json:"terminated"`
|
||||
ContextBackend *corev1.ObjectReference `json:"contextBackend"`
|
||||
Steps []WorkflowStepStatus `json:"steps,omitempty"`
|
||||
}
|
||||
|
||||
// WorkflowStepStatus record the status of a workflow step
|
||||
type WorkflowStepStatus struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Phase WorkflowStepPhase `json:"phase,omitempty"`
|
||||
// A human readable message indicating details about why the workflowStep is in this state.
|
||||
Message string `json:"message,omitempty"`
|
||||
// A brief CamelCase message indicating details about why the workflowStep is in this state.
|
||||
Reason string `json:"reason,omitempty"`
|
||||
ResourceRef corev1.ObjectReference `json:"resourceRef,omitempty"`
|
||||
}
|
||||
|
||||
// Workflow is the Schema for the Workflow API
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=workflow
|
||||
// +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.phase`
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
type Workflow struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec WorkflowSpec `json:"spec,omitempty"`
|
||||
Status WorkflowStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// WorkflowList contains a list of Workflow.
|
||||
type WorkflowList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []Workflow `json:"items"`
|
||||
}
|
||||
|
||||
// SetConditions set condition for Workflow
|
||||
func (w *Workflow) SetConditions(c ...condition.Condition) {
|
||||
w.Status.SetConditions(c...)
|
||||
}
|
||||
|
||||
// GetCondition gets condition from Workflow
|
||||
func (w *Workflow) GetCondition(conditionType condition.ConditionType) condition.Condition {
|
||||
return w.Status.GetCondition(conditionType)
|
||||
}
|
||||
@@ -21,6 +21,7 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
@@ -168,6 +169,11 @@ func (in *EnvBindingStatus) DeepCopyInto(out *EnvBindingStatus) {
|
||||
*out = make([]ClusterDecision, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.ResourceTracker != nil {
|
||||
in, out := &in.ResourceTracker, &out.ResourceTracker
|
||||
*out = new(v1.ObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvBindingStatus.
|
||||
@@ -184,6 +190,11 @@ func (in *EnvBindingStatus) DeepCopy() *EnvBindingStatus {
|
||||
func (in *EnvConfig) DeepCopyInto(out *EnvConfig) {
|
||||
*out = *in
|
||||
in.Placement.DeepCopyInto(&out.Placement)
|
||||
if in.Selector != nil {
|
||||
in, out := &in.Selector, &out.Selector
|
||||
*out = new(EnvSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
in.Patch.DeepCopyInto(&out.Patch)
|
||||
}
|
||||
|
||||
@@ -244,6 +255,26 @@ func (in *EnvPlacement) DeepCopy() *EnvPlacement {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EnvSelector) DeepCopyInto(out *EnvSelector) {
|
||||
*out = *in
|
||||
if in.Components != nil {
|
||||
in, out := &in.Components, &out.Components
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvSelector.
|
||||
func (in *EnvSelector) DeepCopy() *EnvSelector {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EnvSelector)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector) {
|
||||
*out = *in
|
||||
@@ -265,3 +296,152 @@ func (in *NamespaceSelector) DeepCopy() *NamespaceSelector {
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Workflow) DeepCopyInto(out *Workflow) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workflow.
|
||||
func (in *Workflow) DeepCopy() *Workflow {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Workflow)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Workflow) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowList) DeepCopyInto(out *WorkflowList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Workflow, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowList.
|
||||
func (in *WorkflowList) DeepCopy() *WorkflowList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *WorkflowList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowSpec) DeepCopyInto(out *WorkflowSpec) {
|
||||
*out = *in
|
||||
if in.Steps != nil {
|
||||
in, out := &in.Steps, &out.Steps
|
||||
*out = make([]WorkflowStep, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowSpec.
|
||||
func (in *WorkflowSpec) DeepCopy() *WorkflowSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus) {
|
||||
*out = *in
|
||||
in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus)
|
||||
if in.ContextBackend != nil {
|
||||
in, out := &in.ContextBackend, &out.ContextBackend
|
||||
*out = new(v1.ObjectReference)
|
||||
**out = **in
|
||||
}
|
||||
if in.Steps != nil {
|
||||
in, out := &in.Steps, &out.Steps
|
||||
*out = make([]WorkflowStepStatus, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStatus.
|
||||
func (in *WorkflowStatus) DeepCopy() *WorkflowStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowStep) DeepCopyInto(out *WorkflowStep) {
|
||||
*out = *in
|
||||
in.Properties.DeepCopyInto(&out.Properties)
|
||||
if in.Inputs != nil {
|
||||
in, out := &in.Inputs, &out.Inputs
|
||||
*out = make(common.StepInputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Outputs != nil {
|
||||
in, out := &in.Outputs, &out.Outputs
|
||||
*out = make(common.StepOutputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStep.
|
||||
func (in *WorkflowStep) DeepCopy() *WorkflowStep {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowStep)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkflowStepStatus) DeepCopyInto(out *WorkflowStepStatus) {
|
||||
*out = *in
|
||||
out.ResourceRef = in.ResourceRef
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepStatus.
|
||||
func (in *WorkflowStepStatus) DeepCopy() *WorkflowStepStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkflowStepStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// ApplicationContextSpec is the spec of ApplicationContext
|
||||
type ApplicationContextSpec struct {
|
||||
// ApplicationRevisionName points to the snapshot of an Application with all its closure
|
||||
ApplicationRevisionName string `json:"applicationRevisionName"`
|
||||
}
|
||||
|
||||
// ApplicationContext is the Schema for the ApplicationContext API
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:shortName=appcontext,categories={oam}
|
||||
// +kubebuilder:subresource:status
|
||||
type ApplicationContext struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec ApplicationContextSpec `json:"spec,omitempty"`
|
||||
// we need to reuse the AC status
|
||||
Status ApplicationConfigurationStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// ApplicationContextList contains a list of ApplicationContext
|
||||
// +kubebuilder:object:root=true
|
||||
type ApplicationContextList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []ApplicationContext `json:"items"`
|
||||
}
|
||||
@@ -87,6 +87,7 @@ type HealthScopeStatus struct {
|
||||
// AppHealthCondition represents health condition of an application
|
||||
type AppHealthCondition struct {
|
||||
AppName string `json:"appName"`
|
||||
EnvName string `json:"envName,omitempty"`
|
||||
Components []*WorkloadHealthCondition `json:"components,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -85,14 +85,6 @@ var (
|
||||
ApplicationConfigurationGroupVersionKind = SchemeGroupVersion.WithKind(ApplicationConfigurationKind)
|
||||
)
|
||||
|
||||
// ApplicationContext type metadata.
|
||||
var (
|
||||
ApplicationContextKind = reflect.TypeOf(ApplicationContext{}).Name()
|
||||
ApplicationContextGroupKind = schema.GroupKind{Group: Group, Kind: ApplicationContextKind}.String()
|
||||
ApplicationContextKindAPIVersion = ApplicationContextKind + "." + SchemeGroupVersion.String()
|
||||
ApplicationContextGroupVersionKind = SchemeGroupVersion.WithKind(ApplicationContextKind)
|
||||
)
|
||||
|
||||
// ContainerizedWorkload type metadata.
|
||||
var (
|
||||
ContainerizedWorkloadKind = reflect.TypeOf(ContainerizedWorkload{}).Name()
|
||||
@@ -154,5 +146,4 @@ func init() {
|
||||
SchemeBuilder.Register(&Application{}, &ApplicationList{})
|
||||
SchemeBuilder.Register(&AppRollout{}, &AppRolloutList{})
|
||||
SchemeBuilder.Register(&ApplicationRevision{}, &ApplicationRevisionList{})
|
||||
SchemeBuilder.Register(&ApplicationContext{}, &ApplicationContextList{})
|
||||
}
|
||||
|
||||
@@ -428,80 +428,6 @@ func (in *ApplicationConfigurationStatus) DeepCopy() *ApplicationConfigurationSt
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ApplicationContext) DeepCopyInto(out *ApplicationContext) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Spec = in.Spec
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationContext.
|
||||
func (in *ApplicationContext) DeepCopy() *ApplicationContext {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ApplicationContext)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ApplicationContext) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ApplicationContextList) DeepCopyInto(out *ApplicationContextList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ApplicationContext, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationContextList.
|
||||
func (in *ApplicationContextList) DeepCopy() *ApplicationContextList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ApplicationContextList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ApplicationContextList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ApplicationContextSpec) DeepCopyInto(out *ApplicationContextSpec) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationContextSpec.
|
||||
func (in *ApplicationContextSpec) DeepCopy() *ApplicationContextSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ApplicationContextSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ApplicationList) DeepCopyInto(out *ApplicationList) {
|
||||
*out = *in
|
||||
|
||||
@@ -156,6 +156,8 @@ type AppDeploymentStatus struct {
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:categories={oam},shortName=appdeploy
|
||||
// +kubebuilder:subresource:status
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type AppDeployment struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
@@ -166,6 +168,7 @@ type AppDeployment struct {
|
||||
|
||||
// AppDeploymentList contains a list of AppDeployment
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type AppDeploymentList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
@@ -25,8 +25,17 @@ import (
|
||||
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
|
||||
)
|
||||
|
||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
||||
const (
|
||||
// TypeHealthy application are believed to be determined as healthy by a health scope.
|
||||
TypeHealthy condition.ConditionType = "Healthy"
|
||||
)
|
||||
|
||||
// Reasons an application is or is not healthy
|
||||
const (
|
||||
ReasonHealthy condition.ConditionReason = "AllComponentsHealthy"
|
||||
ReasonUnhealthy condition.ConditionReason = "UnhealthyOrUnknownComponents"
|
||||
ReasonHealthCheckErr condition.ConditionReason = "HealthCheckeError"
|
||||
)
|
||||
|
||||
// AppPolicy defines a global policy for all components in the app.
|
||||
type AppPolicy struct {
|
||||
@@ -48,27 +57,13 @@ type WorkflowStep struct {
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
Properties runtime.RawExtension `json:"properties,omitempty"`
|
||||
|
||||
Inputs StepInputs `json:"inputs,omitempty"`
|
||||
DependsOn []string `json:"dependsOn,omitempty"`
|
||||
|
||||
Outputs StepOutputs `json:"outputs,omitempty"`
|
||||
Inputs common.StepInputs `json:"inputs,omitempty"`
|
||||
|
||||
Outputs common.StepOutputs `json:"outputs,omitempty"`
|
||||
}
|
||||
|
||||
type inputItem struct {
|
||||
ParameterKey string `json:"parameterKey"`
|
||||
From string `json:"from"`
|
||||
}
|
||||
|
||||
// StepInputs defines variable input of WorkflowStep
|
||||
type StepInputs []inputItem
|
||||
|
||||
type outputItem struct {
|
||||
ExportKey string `json:"exportKey"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// StepOutputs defines output variable of WorkflowStep
|
||||
type StepOutputs []outputItem
|
||||
|
||||
// Workflow defines workflow steps and other attributes
|
||||
type Workflow struct {
|
||||
Steps []WorkflowStep `json:"steps,omitempty"`
|
||||
@@ -110,6 +105,8 @@ type ApplicationSpec struct {
|
||||
// +kubebuilder:printcolumn:name="HEALTHY",type=boolean,JSONPath=`.status.services[*].healthy`
|
||||
// +kubebuilder:printcolumn:name="STATUS",type=string,JSONPath=`.status.services[*].message`
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type Application struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
@@ -121,6 +118,7 @@ type Application struct {
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// ApplicationList contains a list of Application
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type ApplicationList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
@@ -43,14 +43,25 @@ type ApplicationRevisionSpec struct {
|
||||
// ScopeDefinitions records the snapshot of the scopeDefinitions related with the created/modified Application
|
||||
ScopeDefinitions map[string]ScopeDefinition `json:"scopeDefinitions,omitempty"`
|
||||
|
||||
// PolicyDefinitions records the snapshot of the PolicyDefinitions related with the created/modified Application
|
||||
PolicyDefinitions map[string]PolicyDefinition `json:"policyDefinitions,omitempty"`
|
||||
|
||||
// WorkflowStepDefinitions records the snapshot of the WorkflowStepDefinitions related with the created/modified Application
|
||||
WorkflowStepDefinitions map[string]WorkflowStepDefinition `json:"workflowStepDefinitions,omitempty"`
|
||||
|
||||
// ScopeGVK records the apiVersion to GVK mapping
|
||||
ScopeGVK map[string]metav1.GroupVersionKind `json:"scopeGVK,omitempty"`
|
||||
|
||||
// Components records the rendered components from Application, it will contains the whole K8s CR of workload in it.
|
||||
// +deprecated
|
||||
Components []common.RawComponent `json:"components,omitempty"`
|
||||
|
||||
// ApplicationConfiguration records the rendered applicationConfiguration from Application,
|
||||
// it will contains the whole K8s CR of trait and the reference component in it.
|
||||
// +kubebuilder:validation:EmbeddedResource
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
ApplicationConfiguration runtime.RawExtension `json:"applicationConfiguration"`
|
||||
// +deprecated
|
||||
ApplicationConfiguration runtime.RawExtension `json:"applicationConfiguration,omitempty"`
|
||||
|
||||
// ResourcesConfigMap references the ConfigMap that's generated to contain all final rendered resources.
|
||||
ResourcesConfigMap corev1.LocalObjectReference `json:"resourcesConfigMap,omitempty"`
|
||||
@@ -62,6 +73,8 @@ type ApplicationRevisionSpec struct {
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:resource:categories={oam},shortName=apprev
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type ApplicationRevision struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
@@ -72,6 +85,7 @@ type ApplicationRevision struct {
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// ApplicationRevisionList contains a list of ApplicationRevision
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type ApplicationRevisionList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
@@ -61,6 +61,8 @@ type AppRolloutSpec struct {
|
||||
// +kubebuilder:printcolumn:name="BATCH-STATE",type=string,JSONPath=`.status.batchRollingState`
|
||||
// +kubebuilder:printcolumn:name="ROLLING-STATE",type=string,JSONPath=`.status.rollingState`
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type AppRollout struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
@@ -71,6 +73,7 @@ type AppRollout struct {
|
||||
|
||||
// AppRolloutList contains a list of AppRollout
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type AppRolloutList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
@@ -41,6 +41,8 @@ type ClusterStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// Cluster is the Schema for the clusters API
|
||||
type Cluster struct {
|
||||
@@ -52,6 +54,7 @@ type Cluster struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ClusterList contains a list of Cluster
|
||||
type ClusterList struct {
|
||||
|
||||
@@ -76,6 +76,8 @@ type ComponentDefinitionStatus struct {
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:printcolumn:name="WORKLOAD-KIND",type=string,JSONPath=".spec.workload.definition.kind"
|
||||
// +kubebuilder:printcolumn:name="DESCRIPTION",type=string,JSONPath=".metadata.annotations.definition\\.oam\\.dev/description"
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type ComponentDefinition struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
@@ -95,6 +97,7 @@ func (cd *ComponentDefinition) GetCondition(conditionType condition.ConditionTyp
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ComponentDefinitionList contains a list of ComponentDefinition
|
||||
type ComponentDefinitionList struct {
|
||||
|
||||
@@ -73,6 +73,8 @@ type WorkloadDefinitionStatus struct {
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="DEFINITION-NAME",type=string,JSONPath=".spec.definitionRef.name"
|
||||
// +kubebuilder:printcolumn:name="DESCRIPTION",type=string,JSONPath=".metadata.annotations.definition\\.oam\\.dev/description"
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type WorkloadDefinition struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
@@ -94,6 +96,7 @@ func (wd *WorkloadDefinition) GetCondition(conditionType condition.ConditionType
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// WorkloadDefinitionList contains a list of WorkloadDefinition.
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type WorkloadDefinitionList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
@@ -179,6 +182,8 @@ type TraitDefinitionStatus struct {
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="APPLIES-TO",type=string,JSONPath=".spec.appliesToWorkloads"
|
||||
// +kubebuilder:printcolumn:name="DESCRIPTION",type=string,JSONPath=".metadata.annotations.definition\\.oam\\.dev/description"
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type TraitDefinition struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
@@ -198,6 +203,7 @@ func (td *TraitDefinition) GetCondition(conditionType condition.ConditionType) c
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// TraitDefinitionList contains a list of TraitDefinition.
|
||||
type TraitDefinitionList struct {
|
||||
@@ -233,6 +239,8 @@ type ScopeDefinitionSpec struct {
|
||||
// +kubebuilder:printcolumn:JSONPath=".spec.definitionRef.name",name=DEFINITION-NAME,type=string
|
||||
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=scope
|
||||
// +kubebuilder:storageversion
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type ScopeDefinition struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
@@ -241,6 +249,7 @@ type ScopeDefinition struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ScopeDefinitionList contains a list of ScopeDefinition.
|
||||
type ScopeDefinitionList struct {
|
||||
@@ -251,6 +260,8 @@ type ScopeDefinitionList struct {
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// An ResourceTracker represents a tracker for track cross namespace resources
|
||||
// +kubebuilder:resource:scope=Cluster,categories={oam},shortName=tracker
|
||||
@@ -267,6 +278,7 @@ type ResourceTrackerStatus struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ResourceTrackerList contains a list of ResourceTracker
|
||||
type ResourceTrackerList struct {
|
||||
|
||||
@@ -53,6 +53,8 @@ type DefinitionRevisionSpec struct {
|
||||
// +kubebuilder:printcolumn:name="REVISION",type=integer,JSONPath=".spec.revision"
|
||||
// +kubebuilder:printcolumn:name="HASH",type=string,JSONPath=".spec.revisionHash"
|
||||
// +kubebuilder:printcolumn:name="TYPE",type=string,JSONPath=".spec.definitionType"
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type DefinitionRevision struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
@@ -61,6 +63,7 @@ type DefinitionRevision struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// DefinitionRevisionList contains a list of DefinitionRevision
|
||||
type DefinitionRevisionList struct {
|
||||
|
||||
@@ -69,6 +69,8 @@ type InitializerStatus struct {
|
||||
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=init
|
||||
// +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.status`
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type Initializer struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
@@ -78,6 +80,7 @@ type Initializer struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// InitializerList contains a list of Initializer.
|
||||
type InitializerList struct {
|
||||
|
||||
@@ -32,6 +32,10 @@ type PolicyDefinitionSpec struct {
|
||||
// Schematic defines the data format and template of the encapsulation of the policy definition
|
||||
// +optional
|
||||
Schematic *common.Schematic `json:"schematic,omitempty"`
|
||||
|
||||
// ManageHealthCheck means the policy will handle health checking and skip application controller
|
||||
// built-in health checking.
|
||||
ManageHealthCheck bool `json:"manageHealthCheck,omitempty"`
|
||||
}
|
||||
|
||||
// PolicyDefinitionStatus is the status of PolicyDefinition
|
||||
@@ -60,6 +64,8 @@ func (d *PolicyDefinition) GetCondition(conditionType condition.ConditionType) c
|
||||
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=policy
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:subresource:status
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type PolicyDefinition struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
@@ -69,6 +75,7 @@ type PolicyDefinition struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// PolicyDefinitionList contains a list of PolicyDefinition
|
||||
type PolicyDefinitionList struct {
|
||||
|
||||
@@ -35,6 +35,9 @@ var (
|
||||
|
||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
||||
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
|
||||
|
||||
// AddToScheme is a global function that registers this API group & version to a scheme
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// ComponentDefinition type metadata.
|
||||
@@ -165,3 +168,8 @@ func init() {
|
||||
SchemeBuilder.Register(&ResourceTracker{}, &ResourceTrackerList{})
|
||||
SchemeBuilder.Register(&Initializer{}, &InitializerList{})
|
||||
}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
@@ -60,6 +60,8 @@ func (d *WorkflowStepDefinition) GetCondition(conditionType condition.ConditionT
|
||||
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=workflowstep
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:subresource:status
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
type WorkflowStepDefinition struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
@@ -69,6 +71,7 @@ type WorkflowStepDefinition struct {
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// WorkflowStepDefinitionList contains a list of WorkflowStepDefinition
|
||||
type WorkflowStepDefinitionList struct {
|
||||
|
||||
@@ -21,7 +21,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
@@ -404,6 +405,27 @@ func (in *ApplicationRevisionSpec) DeepCopyInto(out *ApplicationRevisionSpec) {
|
||||
(*out)[key] = *val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.PolicyDefinitions != nil {
|
||||
in, out := &in.PolicyDefinitions, &out.PolicyDefinitions
|
||||
*out = make(map[string]PolicyDefinition, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = *val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.WorkflowStepDefinitions != nil {
|
||||
in, out := &in.WorkflowStepDefinitions, &out.WorkflowStepDefinitions
|
||||
*out = make(map[string]WorkflowStepDefinition, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = *val.DeepCopy()
|
||||
}
|
||||
}
|
||||
if in.ScopeGVK != nil {
|
||||
in, out := &in.ScopeGVK, &out.ScopeGVK
|
||||
*out = make(map[string]v1.GroupVersionKind, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Components != nil {
|
||||
in, out := &in.Components, &out.Components
|
||||
*out = make([]common.RawComponent, len(*in))
|
||||
@@ -1126,7 +1148,7 @@ func (in *ResourceTrackerStatus) DeepCopyInto(out *ResourceTrackerStatus) {
|
||||
*out = *in
|
||||
if in.TrackedResources != nil {
|
||||
in, out := &in.TrackedResources, &out.TrackedResources
|
||||
*out = make([]v1.ObjectReference, len(*in))
|
||||
*out = make([]corev1.ObjectReference, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
@@ -1220,44 +1242,6 @@ func (in *ScopeDefinitionSpec) DeepCopy() *ScopeDefinitionSpec {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in StepInputs) DeepCopyInto(out *StepInputs) {
|
||||
{
|
||||
in := &in
|
||||
*out = make(StepInputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepInputs.
|
||||
func (in StepInputs) DeepCopy() StepInputs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(StepInputs)
|
||||
in.DeepCopyInto(out)
|
||||
return *out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in StepOutputs) DeepCopyInto(out *StepOutputs) {
|
||||
{
|
||||
in := &in
|
||||
*out = make(StepOutputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepOutputs.
|
||||
func (in StepOutputs) DeepCopy() StepOutputs {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(StepOutputs)
|
||||
in.DeepCopyInto(out)
|
||||
return *out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Traffic) DeepCopyInto(out *Traffic) {
|
||||
*out = *in
|
||||
@@ -1467,14 +1451,19 @@ func (in *Workflow) DeepCopy() *Workflow {
|
||||
func (in *WorkflowStep) DeepCopyInto(out *WorkflowStep) {
|
||||
*out = *in
|
||||
in.Properties.DeepCopyInto(&out.Properties)
|
||||
if in.DependsOn != nil {
|
||||
in, out := &in.DependsOn, &out.DependsOn
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Inputs != nil {
|
||||
in, out := &in.Inputs, &out.Inputs
|
||||
*out = make(StepInputs, len(*in))
|
||||
*out = make(common.StepInputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Outputs != nil {
|
||||
in, out := &in.Outputs, &out.Outputs
|
||||
*out = make(StepOutputs, len(*in))
|
||||
*out = make(common.StepOutputs, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ limitations under the License.
|
||||
// NOTE(@wonderflow) We don't remove existing CRDs here, because the crd folders contain not only auto generated.
|
||||
|
||||
// Generate deepcopy methodsets and CRD manifests
|
||||
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:crdVersions=v1 output:artifacts:config=../config/crd/base
|
||||
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:crdVersions=v1,generateEmbeddedObjectMeta=true output:artifacts:config=../config/crd/base
|
||||
|
||||
// Generate legacy_support for K8s 1.12~1.15 versions CRD manifests
|
||||
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd output:artifacts:config=../legacy/charts/vela-core-legacy/crds
|
||||
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:generateEmbeddedObjectMeta=true output:artifacts:config=../legacy/charts/vela-core-legacy/crds
|
||||
//go:generate go run ../legacy/convert/main.go ../legacy/charts/vela-core-legacy/crds
|
||||
|
||||
package apis
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
|
||||
|
||||
"github.com/oam-dev/kubevela/pkg/oam"
|
||||
)
|
||||
|
||||
// PodSpecWorkloadSpec defines the desired state of PodSpecWorkload
|
||||
type PodSpecWorkloadSpec struct {
|
||||
// Replicas is the desired number of replicas of the given podSpec.
|
||||
// These are replicas in the sense that they are instantiations of the same podSpec.
|
||||
// If unspecified, defaults to 1.
|
||||
Replicas *int32 `json:"replicas,omitempty"`
|
||||
|
||||
// PodSpec describes the pods that will be created,
|
||||
// we omit the meta part as it will be exactly the same as the PodSpecWorkload
|
||||
PodSpec v1.PodSpec `json:"podSpec"`
|
||||
}
|
||||
|
||||
// PodSpecWorkloadStatus defines the observed state of PodSpecWorkload
|
||||
type PodSpecWorkloadStatus struct {
|
||||
condition.ConditionedStatus `json:",inline"`
|
||||
|
||||
// Resources managed by this workload.
|
||||
Resources []v1.ObjectReference `json:"resources,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// PodSpecWorkload is the Schema for the PodSpec API
|
||||
// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/autoscaling/v1.Scale
|
||||
// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale
|
||||
// +kubebuilder:resource:categories={oam}
|
||||
// +kubebuilder:subresource:status
|
||||
type PodSpecWorkload struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec PodSpecWorkloadSpec `json:"spec,omitempty"`
|
||||
Status PodSpecWorkloadStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
// PodSpecWorkloadList contains a list of PodSpecWorkload
|
||||
type PodSpecWorkloadList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []PodSpecWorkload `json:"items"`
|
||||
}
|
||||
|
||||
var _ oam.Workload = &PodSpecWorkload{}
|
||||
|
||||
// SetConditions set condition for this CR
|
||||
func (in *PodSpecWorkload) SetConditions(c ...condition.Condition) {
|
||||
in.Status.SetConditions(c...)
|
||||
}
|
||||
|
||||
// GetCondition set condition for this CR
|
||||
func (in *PodSpecWorkload) GetCondition(c condition.ConditionType) condition.Condition {
|
||||
return in.Status.GetCondition(c)
|
||||
}
|
||||
@@ -32,5 +32,4 @@ var (
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&Rollout{}, &RolloutList{})
|
||||
SchemeBuilder.Register(&PodSpecWorkload{}, &PodSpecWorkloadList{})
|
||||
}
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
Copyright 2021 The KubeVela Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
|
||||
|
||||
"github.com/oam-dev/kubevela/pkg/oam"
|
||||
)
|
||||
|
||||
// RolloutTraitSpec defines the desired state of RolloutTrait
|
||||
type RolloutTraitSpec struct {
|
||||
// TargetRef references a target resource that contains the newer version
|
||||
// of the software. We assumed that new resource already exists.
|
||||
// This is the only resource we work on if the resource is a stateful resource (cloneset/statefulset)
|
||||
TargetRef corev1.ObjectReference `json:"targetRef"`
|
||||
|
||||
// SourceRef references the list of resources that contains the older version
|
||||
// of the software. We assume that it's the first time to deploy when we cannot find any source.
|
||||
// +optional
|
||||
SourceRef []corev1.ObjectReference `json:"sourceRef,omitempty"`
|
||||
|
||||
// RolloutPlan is the details on how to rollout the resources
|
||||
RolloutPlan RolloutPlan `json:"rolloutPlan"`
|
||||
}
|
||||
|
||||
// RolloutTrait is the Schema for the RolloutTrait API
|
||||
// +kubebuilder:object:root=true
|
||||
// +genclient
|
||||
// +kubebuilder:resource:categories={oam}
|
||||
// +kubebuilder:subresource:status
|
||||
type RolloutTrait struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec RolloutTraitSpec `json:"spec,omitempty"`
|
||||
Status RolloutStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// RolloutTraitList contains a list of RolloutTrait
|
||||
// +kubebuilder:object:root=true
|
||||
// +genclient
|
||||
type RolloutTraitList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []RolloutTrait `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&RolloutTrait{}, &RolloutTraitList{})
|
||||
}
|
||||
|
||||
var _ oam.Trait = &RolloutTrait{}
|
||||
|
||||
// SetConditions for set CR condition
|
||||
func (tr *RolloutTrait) SetConditions(c ...condition.Condition) {
|
||||
tr.Status.SetConditions(c...)
|
||||
}
|
||||
|
||||
// GetCondition for get CR condition
|
||||
func (tr *RolloutTrait) GetCondition(c condition.ConditionType) condition.Condition {
|
||||
return tr.Status.GetCondition(c)
|
||||
}
|
||||
|
||||
// GetWorkloadReference of this MetricsTrait.
|
||||
func (tr *RolloutTrait) GetWorkloadReference() corev1.ObjectReference {
|
||||
return tr.Spec.TargetRef
|
||||
}
|
||||
|
||||
// SetWorkloadReference of this MetricsTrait.
|
||||
func (tr *RolloutTrait) SetWorkloadReference(r corev1.ObjectReference) {
|
||||
tr.Spec.TargetRef = r
|
||||
}
|
||||
@@ -92,107 +92,6 @@ func (in *MetricsExpectedRange) DeepCopy() *MetricsExpectedRange {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodSpecWorkload) DeepCopyInto(out *PodSpecWorkload) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpecWorkload.
|
||||
func (in *PodSpecWorkload) DeepCopy() *PodSpecWorkload {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodSpecWorkload)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *PodSpecWorkload) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodSpecWorkloadList) DeepCopyInto(out *PodSpecWorkloadList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]PodSpecWorkload, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpecWorkloadList.
|
||||
func (in *PodSpecWorkloadList) DeepCopy() *PodSpecWorkloadList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodSpecWorkloadList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *PodSpecWorkloadList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodSpecWorkloadSpec) DeepCopyInto(out *PodSpecWorkloadSpec) {
|
||||
*out = *in
|
||||
if in.Replicas != nil {
|
||||
in, out := &in.Replicas, &out.Replicas
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
in.PodSpec.DeepCopyInto(&out.PodSpec)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpecWorkloadSpec.
|
||||
func (in *PodSpecWorkloadSpec) DeepCopy() *PodSpecWorkloadSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodSpecWorkloadSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PodSpecWorkloadStatus) DeepCopyInto(out *PodSpecWorkloadStatus) {
|
||||
*out = *in
|
||||
in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus)
|
||||
if in.Resources != nil {
|
||||
in, out := &in.Resources, &out.Resources
|
||||
*out = make([]v1.ObjectReference, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpecWorkloadStatus.
|
||||
func (in *PodSpecWorkloadStatus) DeepCopy() *PodSpecWorkloadStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PodSpecWorkloadStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Rollout) DeepCopyInto(out *Rollout) {
|
||||
*out = *in
|
||||
@@ -380,87 +279,6 @@ func (in *RolloutStatus) DeepCopy() *RolloutStatus {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RolloutTrait) DeepCopyInto(out *RolloutTrait) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutTrait.
|
||||
func (in *RolloutTrait) DeepCopy() *RolloutTrait {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RolloutTrait)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *RolloutTrait) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RolloutTraitList) DeepCopyInto(out *RolloutTraitList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]RolloutTrait, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutTraitList.
|
||||
func (in *RolloutTraitList) DeepCopy() *RolloutTraitList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RolloutTraitList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *RolloutTraitList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RolloutTraitSpec) DeepCopyInto(out *RolloutTraitSpec) {
|
||||
*out = *in
|
||||
out.TargetRef = in.TargetRef
|
||||
if in.SourceRef != nil {
|
||||
in, out := &in.SourceRef, &out.SourceRef
|
||||
*out = make([]v1.ObjectReference, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
in.RolloutPlan.DeepCopyInto(&out.RolloutPlan)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutTraitSpec.
|
||||
func (in *RolloutTraitSpec) DeepCopy() *RolloutTraitSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RolloutTraitSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RolloutWebhook) DeepCopyInto(out *RolloutWebhook) {
|
||||
*out = *in
|
||||
|
||||
@@ -162,6 +162,7 @@ type Capability struct {
|
||||
Center string `json:"center,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Category CapabilityCategory `json:"category,omitempty"`
|
||||
|
||||
// trait only
|
||||
|
||||
@@ -36,9 +36,4 @@ type ComponentManifest struct {
|
||||
// Release, Git Repo or anything that can package and run a workload.
|
||||
PackagedWorkloadResources []*unstructured.Unstructured
|
||||
PackagedTraitResources map[string][]*unstructured.Unstructured
|
||||
|
||||
// InsertConfigNotReady is true indicates the ComponentManifest is not ready to apply for insertSecret and configs
|
||||
// it's possible for some of the component not ready while others are ready, we should not block all of them if only
|
||||
// part is not ready
|
||||
InsertConfigNotReady bool
|
||||
}
|
||||
|
||||
@@ -38,13 +38,14 @@ const (
|
||||
|
||||
// event message for Application
|
||||
const (
|
||||
MessageParsed = "Parsed successfully"
|
||||
MessageRendered = "Rendered successfully"
|
||||
MessageRevisioned = "Revisioned successfully"
|
||||
MessageApplied = "Applied successfully"
|
||||
MessageHealthCheck = "Health checked healthy"
|
||||
MessageDeployed = "Deployed successfully"
|
||||
MessageRollout = "Rollout successfully"
|
||||
MessageParsed = "Parsed successfully"
|
||||
MessageRendered = "Rendered successfully"
|
||||
MessageRevisioned = "Revisioned successfully"
|
||||
MessageApplied = "Applied successfully"
|
||||
MessageWorkflowFinished = "Workflow finished"
|
||||
MessageHealthCheck = "Health checked healthy"
|
||||
MessageDeployed = "Deployed successfully"
|
||||
MessageRollout = "Rollout successfully"
|
||||
|
||||
MessageFailedParse = "fail to parse application, err: %v"
|
||||
MessageFailedRender = "fail to render application, err: %v"
|
||||
|
||||
@@ -16,6 +16,8 @@ limitations under the License.
|
||||
|
||||
package types
|
||||
|
||||
import "github.com/oam-dev/kubevela/pkg/oam"
|
||||
|
||||
const (
|
||||
// DefaultKubeVelaNS defines the default KubeVela namespace in Kubernetes
|
||||
DefaultKubeVelaNS = "vela-system"
|
||||
@@ -45,12 +47,13 @@ const (
|
||||
StatusStaging = "Staging"
|
||||
)
|
||||
|
||||
// EnvMeta stores the info for app environment
|
||||
// Config contains key/value pairs
|
||||
type Config map[string]string
|
||||
|
||||
// EnvMeta stores the namespace for app environment
|
||||
type EnvMeta struct {
|
||||
Name string `json:"name"`
|
||||
Namespace string `json:"namespace"`
|
||||
Email string `json:"email,omitempty"`
|
||||
Domain string `json:"domain,omitempty"`
|
||||
|
||||
Current string `json:"current,omitempty"`
|
||||
}
|
||||
@@ -71,3 +74,15 @@ const (
|
||||
// TypePlugin defines one category used in Kubectl Plugin
|
||||
TypePlugin = "Plugin Command"
|
||||
)
|
||||
|
||||
// LabelArg is the argument `label` of a definition
|
||||
const LabelArg = "label"
|
||||
|
||||
// DefaultFilterAnnots are annotations that won't pass to workload or trait
|
||||
var DefaultFilterAnnots = []string{
|
||||
oam.AnnotationAppRollout,
|
||||
oam.AnnotationRollingComponent,
|
||||
oam.AnnotationInplaceUpgrade,
|
||||
oam.AnnotationFilterLabelKeys,
|
||||
oam.AnnotationFilterAnnotationKeys,
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: applicationconfigurations.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: components.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: containerizedworkloads.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -354,9 +354,13 @@ spec:
|
||||
description: CPU required by this container.
|
||||
properties:
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required CPU count. 1.0 represents one
|
||||
CPU core.
|
||||
type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- required
|
||||
type: object
|
||||
@@ -386,8 +390,12 @@ spec:
|
||||
description: GPU required by this container.
|
||||
properties:
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required GPU count.
|
||||
type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- required
|
||||
type: object
|
||||
@@ -395,8 +403,12 @@ spec:
|
||||
description: Memory required by this container.
|
||||
properties:
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required memory.
|
||||
type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- required
|
||||
type: object
|
||||
@@ -420,8 +432,12 @@ spec:
|
||||
disk needs to be mounted.
|
||||
type: boolean
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required disk space.
|
||||
type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- required
|
||||
type: object
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: healthscopes.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -402,6 +402,8 @@ spec:
|
||||
- healthStatus
|
||||
type: object
|
||||
type: array
|
||||
envName:
|
||||
type: string
|
||||
required:
|
||||
- appName
|
||||
type: object
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: manualscalertraits.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: scopedefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: traitdefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -188,6 +188,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -195,6 +209,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
@@ -453,6 +468,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -460,6 +489,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: workloaddefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -193,6 +193,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -200,6 +214,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
@@ -439,6 +454,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -446,6 +475,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
|
||||
@@ -18,6 +18,7 @@ metadata:
|
||||
spec:
|
||||
secretName: {{ template "oam-runtime.fullname" . }}-root-cert
|
||||
duration: 43800h # 5y
|
||||
revisionHistoryLimit: {{ .Values.admissionWebhooks.certManager.revisionHistoryLimit }}
|
||||
issuerRef:
|
||||
name: {{ template "oam-runtime.fullname" . }}-self-signed-issuer
|
||||
commonName: "ca.webhook.oam-runtime"
|
||||
@@ -44,6 +45,7 @@ metadata:
|
||||
spec:
|
||||
secretName: {{ template "oam-runtime.fullname" . }}-admission
|
||||
duration: 8760h # 1y
|
||||
revisionHistoryLimit: {{ .Values.admissionWebhooks.certManager.revisionHistoryLimit }}
|
||||
issuerRef:
|
||||
name: {{ template "oam-runtime.fullname" . }}-root-issuer
|
||||
dnsNames:
|
||||
|
||||
@@ -75,6 +75,7 @@ admissionWebhooks:
|
||||
tolerations: []
|
||||
certManager:
|
||||
enabled: false
|
||||
revisionHistoryLimit: 3
|
||||
# If autoGenWorkloadDefinition is true, webhook will auto generated workloadDefinition which componentDefinition refers to
|
||||
autoGenWorkloadDefinition: true
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: appdeployments.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
|
||||
@@ -1,446 +0,0 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
name: applicationcontexts.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: ApplicationContext
|
||||
listKind: ApplicationContextList
|
||||
plural: applicationcontexts
|
||||
shortNames:
|
||||
- appcontext
|
||||
singular: applicationcontext
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: ApplicationContext is the Schema for the ApplicationContext API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: ApplicationContextSpec is the spec of ApplicationContext
|
||||
properties:
|
||||
applicationRevisionName:
|
||||
description: ApplicationRevisionName points to the snapshot of an
|
||||
Application with all its closure
|
||||
type: string
|
||||
required:
|
||||
- applicationRevisionName
|
||||
type: object
|
||||
status:
|
||||
description: we need to reuse the AC status
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
dependency:
|
||||
description: DependencyStatus represents the observed state of the
|
||||
dependency of an ApplicationConfiguration.
|
||||
properties:
|
||||
unsatisfied:
|
||||
items:
|
||||
description: UnstaifiedDependency describes unsatisfied dependency
|
||||
flow between one pair of objects.
|
||||
properties:
|
||||
from:
|
||||
description: DependencyFromObject represents the object
|
||||
that dependency data comes from.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead
|
||||
of an entire object, this string should contain a
|
||||
valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container
|
||||
that triggered the event) or if no container name
|
||||
is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only to
|
||||
have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this
|
||||
field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this
|
||||
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
reason:
|
||||
type: string
|
||||
to:
|
||||
description: DependencyToObject represents the object that
|
||||
dependency data goes to.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead
|
||||
of an entire object, this string should contain a
|
||||
valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container
|
||||
that triggered the event) or if no container name
|
||||
is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only to
|
||||
have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this
|
||||
field is subject to change in the future.'
|
||||
type: string
|
||||
fieldPaths:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this
|
||||
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- from
|
||||
- reason
|
||||
- to
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
historyWorkloads:
|
||||
description: HistoryWorkloads will record history but still working
|
||||
revision workloads.
|
||||
items:
|
||||
description: HistoryWorkload contain the old component revision
|
||||
that are still running
|
||||
properties:
|
||||
revision:
|
||||
description: Revision of this workload
|
||||
type: string
|
||||
workloadRef:
|
||||
description: Reference to running workload.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead
|
||||
of an entire object, this string should contain a valid
|
||||
JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that
|
||||
triggered the event) or if no container name is specified
|
||||
"spec.containers[2]" (container with index 2 in this pod).
|
||||
This syntax is chosen only to have some well-defined way
|
||||
of referencing a part of an object. TODO: this design
|
||||
is not final and this field is subject to change in the
|
||||
future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
type: array
|
||||
observedGeneration:
|
||||
description: The generation observed by the appConfig controller.
|
||||
format: int64
|
||||
type: integer
|
||||
rollingStatus:
|
||||
description: RollingStatus indicates what phase are we in the rollout
|
||||
phase
|
||||
type: string
|
||||
status:
|
||||
description: Status is a place holder for a customized controller
|
||||
to fill if it needs a single place to summarize the status of the
|
||||
entire application
|
||||
type: string
|
||||
workloads:
|
||||
description: Workloads created by this ApplicationConfiguration.
|
||||
items:
|
||||
description: A WorkloadStatus represents the status of a workload.
|
||||
properties:
|
||||
appliedComponentRevision:
|
||||
description: AppliedComponentRevision indicates the applied
|
||||
component revision name of this workload
|
||||
type: string
|
||||
componentName:
|
||||
description: ComponentName that produced this workload.
|
||||
type: string
|
||||
componentRevisionName:
|
||||
description: ComponentRevisionName of current component
|
||||
type: string
|
||||
dependencyUnsatisfied:
|
||||
description: DependencyUnsatisfied notify does the workload
|
||||
has dependency unsatisfied
|
||||
type: boolean
|
||||
scopes:
|
||||
description: Scopes associated with this workload.
|
||||
items:
|
||||
description: A WorkloadScope represents a scope associated
|
||||
with a workload and its status
|
||||
properties:
|
||||
scopeRef:
|
||||
description: Reference to a scope created by an ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object
|
||||
instead of an entire object, this string should
|
||||
contain a valid JSON/Go field access statement,
|
||||
such as desiredState.manifest.containers[2]. For
|
||||
example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container
|
||||
that triggered the event) or if no container name
|
||||
is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only
|
||||
to have some well-defined way of referencing a part
|
||||
of an object. TODO: this design is not final and
|
||||
this field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this
|
||||
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: Status is a place holder for a customized
|
||||
controller to fill if it needs a single place to summarize
|
||||
the status of the scope
|
||||
type: string
|
||||
required:
|
||||
- scopeRef
|
||||
type: object
|
||||
type: array
|
||||
status:
|
||||
description: Status is a place holder for a customized controller
|
||||
to fill if it needs a single place to summarize the entire
|
||||
status of the workload
|
||||
type: string
|
||||
traits:
|
||||
description: Traits associated with this workload.
|
||||
items:
|
||||
description: A WorkloadTrait represents a trait associated
|
||||
with a workload and its status
|
||||
properties:
|
||||
appliedGeneration:
|
||||
description: AppliedGeneration indicates the generation
|
||||
observed by the appConfig controller. The same field
|
||||
is also recorded in the annotations of traits. A trait
|
||||
is possible to be deleted from cluster after created.
|
||||
This field is useful to track the observed generation
|
||||
of traits after they are deleted.
|
||||
format: int64
|
||||
type: integer
|
||||
dependencyUnsatisfied:
|
||||
description: DependencyUnsatisfied notify does the trait
|
||||
has dependency unsatisfied
|
||||
type: boolean
|
||||
message:
|
||||
description: Message will allow controller to leave some
|
||||
additional information for this trait
|
||||
type: string
|
||||
status:
|
||||
description: Status is a place holder for a customized
|
||||
controller to fill if it needs a single place to summarize
|
||||
the status of the trait
|
||||
type: string
|
||||
traitRef:
|
||||
description: Reference to a trait created by an ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object
|
||||
instead of an entire object, this string should
|
||||
contain a valid JSON/Go field access statement,
|
||||
such as desiredState.manifest.containers[2]. For
|
||||
example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container
|
||||
that triggered the event) or if no container name
|
||||
is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only
|
||||
to have some well-defined way of referencing a part
|
||||
of an object. TODO: this design is not final and
|
||||
this field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this
|
||||
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- traitRef
|
||||
type: object
|
||||
type: array
|
||||
workloadRef:
|
||||
description: Reference to a workload created by an ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead
|
||||
of an entire object, this string should contain a valid
|
||||
JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that
|
||||
triggered the event) or if no container name is specified
|
||||
"spec.containers[2]" (container with index 2 in this pod).
|
||||
This syntax is chosen only to have some well-defined way
|
||||
of referencing a part of an object. TODO: this design
|
||||
is not final and this field is subject to change in the
|
||||
future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@ kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
cert-manager.io/inject-ca-from: vela-system/kubevela-vela-core-root-cert
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: applications.core.oam.dev
|
||||
spec:
|
||||
conversion:
|
||||
@@ -335,6 +335,39 @@ spec:
|
||||
status:
|
||||
description: AppStatus defines the observed state of Application
|
||||
properties:
|
||||
appliedResources:
|
||||
description: AppliedResources record the resources that the workflow step apply.
|
||||
items:
|
||||
description: ClusterObjectReference defines the object reference with cluster.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
cluster:
|
||||
type: string
|
||||
creator:
|
||||
description: ResourceCreatorRole defines the resource creator.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
components:
|
||||
description: Components record the related Components created by Application Controller
|
||||
items:
|
||||
@@ -516,6 +549,8 @@ spec:
|
||||
items:
|
||||
description: ApplicationComponentStatus record the health status of App component
|
||||
properties:
|
||||
env:
|
||||
type: string
|
||||
healthy:
|
||||
type: boolean
|
||||
message:
|
||||
@@ -613,12 +648,15 @@ spec:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
stepIndex:
|
||||
type: integer
|
||||
mode:
|
||||
description: WorkflowMode describes the mode of workflow
|
||||
type: string
|
||||
steps:
|
||||
items:
|
||||
description: WorkflowStepStatus record the status of a workflow step
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
message:
|
||||
description: A human readable message indicating details about why the workflowStep is in this state.
|
||||
type: string
|
||||
@@ -630,33 +668,42 @@ spec:
|
||||
reason:
|
||||
description: A brief CamelCase message indicating details about why the workflowStep is in this state.
|
||||
type: string
|
||||
resourceRef:
|
||||
description: 'ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don''t make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .'
|
||||
subSteps:
|
||||
description: SubStepsStatus record the status of workflow steps.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
mode:
|
||||
description: WorkflowMode describes the mode of workflow
|
||||
type: string
|
||||
stepIndex:
|
||||
type: integer
|
||||
steps:
|
||||
items:
|
||||
description: WorkflowSubStepStatus record the status of a workflow step
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
message:
|
||||
description: A human readable message indicating details about why the workflowStep is in this state.
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
phase:
|
||||
description: WorkflowStepPhase describes the phase of a workflow step.
|
||||
type: string
|
||||
reason:
|
||||
description: A brief CamelCase message indicating details about why the workflowStep is in this state.
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
type: array
|
||||
suspend:
|
||||
@@ -664,7 +711,7 @@ spec:
|
||||
terminated:
|
||||
type: boolean
|
||||
required:
|
||||
- contextBackend
|
||||
- mode
|
||||
- suspend
|
||||
- terminated
|
||||
type: object
|
||||
@@ -713,11 +760,41 @@ spec:
|
||||
items:
|
||||
description: ApplicationComponent describe the component of application
|
||||
properties:
|
||||
dependsOn:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
externalRevision:
|
||||
description: ExternalRevision specified the component revisionName
|
||||
type: string
|
||||
inputs:
|
||||
description: StepInputs defines variable input of WorkflowStep
|
||||
items:
|
||||
properties:
|
||||
from:
|
||||
type: string
|
||||
parameterKey:
|
||||
type: string
|
||||
required:
|
||||
- from
|
||||
- parameterKey
|
||||
type: object
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
outputs:
|
||||
description: StepOutputs defines output variable of WorkflowStep
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
valueFrom:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- valueFrom
|
||||
type: object
|
||||
type: array
|
||||
properties:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
@@ -1001,6 +1078,10 @@ spec:
|
||||
items:
|
||||
description: WorkflowStep defines how to execute a workflow step.
|
||||
properties:
|
||||
dependsOn:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
inputs:
|
||||
description: StepInputs defines variable input of WorkflowStep
|
||||
items:
|
||||
@@ -1021,13 +1102,13 @@ spec:
|
||||
description: StepOutputs defines output variable of WorkflowStep
|
||||
items:
|
||||
properties:
|
||||
exportKey:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
valueFrom:
|
||||
type: string
|
||||
required:
|
||||
- exportKey
|
||||
- name
|
||||
- valueFrom
|
||||
type: object
|
||||
type: array
|
||||
properties:
|
||||
@@ -1047,6 +1128,39 @@ spec:
|
||||
status:
|
||||
description: AppStatus defines the observed state of Application
|
||||
properties:
|
||||
appliedResources:
|
||||
description: AppliedResources record the resources that the workflow step apply.
|
||||
items:
|
||||
description: ClusterObjectReference defines the object reference with cluster.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
cluster:
|
||||
type: string
|
||||
creator:
|
||||
description: ResourceCreatorRole defines the resource creator.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
components:
|
||||
description: Components record the related Components created by Application Controller
|
||||
items:
|
||||
@@ -1228,6 +1342,8 @@ spec:
|
||||
items:
|
||||
description: ApplicationComponentStatus record the health status of App component
|
||||
properties:
|
||||
env:
|
||||
type: string
|
||||
healthy:
|
||||
type: boolean
|
||||
message:
|
||||
@@ -1325,12 +1441,15 @@ spec:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
stepIndex:
|
||||
type: integer
|
||||
mode:
|
||||
description: WorkflowMode describes the mode of workflow
|
||||
type: string
|
||||
steps:
|
||||
items:
|
||||
description: WorkflowStepStatus record the status of a workflow step
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
message:
|
||||
description: A human readable message indicating details about why the workflowStep is in this state.
|
||||
type: string
|
||||
@@ -1342,33 +1461,42 @@ spec:
|
||||
reason:
|
||||
description: A brief CamelCase message indicating details about why the workflowStep is in this state.
|
||||
type: string
|
||||
resourceRef:
|
||||
description: 'ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". Those cannot be well described when embedded. 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple and the version of the actual struct is irrelevant. 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type will affect numerous schemas. Don''t make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .'
|
||||
subSteps:
|
||||
description: SubStepsStatus record the status of workflow steps.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
mode:
|
||||
description: WorkflowMode describes the mode of workflow
|
||||
type: string
|
||||
stepIndex:
|
||||
type: integer
|
||||
steps:
|
||||
items:
|
||||
description: WorkflowSubStepStatus record the status of a workflow step
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
message:
|
||||
description: A human readable message indicating details about why the workflowStep is in this state.
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
phase:
|
||||
description: WorkflowStepPhase describes the phase of a workflow step.
|
||||
type: string
|
||||
reason:
|
||||
description: A brief CamelCase message indicating details about why the workflowStep is in this state.
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
type: array
|
||||
suspend:
|
||||
@@ -1376,7 +1504,7 @@ spec:
|
||||
terminated:
|
||||
type: boolean
|
||||
required:
|
||||
- contextBackend
|
||||
- mode
|
||||
- suspend
|
||||
- terminated
|
||||
type: object
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: approllouts.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: clusters.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: componentdefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -179,6 +179,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -186,6 +200,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
@@ -448,6 +463,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -455,6 +484,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: containerizedworkloads.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -354,9 +354,13 @@ spec:
|
||||
description: CPU required by this container.
|
||||
properties:
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required CPU count. 1.0 represents one
|
||||
CPU core.
|
||||
type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- required
|
||||
type: object
|
||||
@@ -386,8 +390,12 @@ spec:
|
||||
description: GPU required by this container.
|
||||
properties:
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required GPU count.
|
||||
type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- required
|
||||
type: object
|
||||
@@ -395,8 +403,12 @@ spec:
|
||||
description: Memory required by this container.
|
||||
properties:
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required memory.
|
||||
type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- required
|
||||
type: object
|
||||
@@ -420,8 +432,12 @@ spec:
|
||||
disk needs to be mounted.
|
||||
type: boolean
|
||||
required:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Required disk space.
|
||||
type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- required
|
||||
type: object
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: definitionrevisions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -66,6 +66,23 @@ spec:
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
finalizers:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
type: object
|
||||
spec:
|
||||
description: ComponentDefinitionSpec defines the desired state
|
||||
@@ -205,6 +222,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference
|
||||
to Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -212,6 +243,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
@@ -337,6 +369,23 @@ spec:
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
finalizers:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
type: object
|
||||
spec:
|
||||
description: PolicyDefinitionSpec defines the desired state of
|
||||
@@ -357,6 +406,11 @@ spec:
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
manageHealthCheck:
|
||||
description: ManageHealthCheck means the policy will handle
|
||||
health checking and skip application controller built-in
|
||||
health checking.
|
||||
type: boolean
|
||||
schematic:
|
||||
description: Schematic defines the data format and template
|
||||
of the encapsulation of the policy definition
|
||||
@@ -452,6 +506,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference
|
||||
to Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -459,6 +527,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
@@ -546,6 +615,23 @@ spec:
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
finalizers:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
type: object
|
||||
spec:
|
||||
description: A TraitDefinitionSpec defines the desired state of
|
||||
@@ -697,6 +783,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference
|
||||
to Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -704,6 +804,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
@@ -808,6 +909,23 @@ spec:
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
finalizers:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
type: object
|
||||
spec:
|
||||
description: WorkflowStepDefinitionSpec defines the desired state
|
||||
@@ -923,6 +1041,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference
|
||||
to Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -930,6 +1062,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: envbindings.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -73,12 +73,44 @@ spec:
|
||||
description: ApplicationComponent describe the component
|
||||
of application
|
||||
properties:
|
||||
dependsOn:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
externalRevision:
|
||||
description: ExternalRevision specified the component
|
||||
revisionName
|
||||
type: string
|
||||
inputs:
|
||||
description: StepInputs defines variable input of
|
||||
WorkflowStep
|
||||
items:
|
||||
properties:
|
||||
from:
|
||||
type: string
|
||||
parameterKey:
|
||||
type: string
|
||||
required:
|
||||
- from
|
||||
- parameterKey
|
||||
type: object
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
outputs:
|
||||
description: StepOutputs defines output variable of
|
||||
WorkflowStep
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
valueFrom:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- valueFrom
|
||||
type: object
|
||||
type: array
|
||||
properties:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
@@ -150,6 +182,15 @@ spec:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
selector:
|
||||
description: EnvSelector defines which components should this
|
||||
env contains
|
||||
properties:
|
||||
components:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- patch
|
||||
@@ -176,7 +217,7 @@ spec:
|
||||
status:
|
||||
description: A EnvBindingStatus is the status of EnvBinding
|
||||
properties:
|
||||
cluster_decisions:
|
||||
clusterDecisions:
|
||||
items:
|
||||
description: ClusterDecision recorded the mapping of environment
|
||||
and cluster
|
||||
@@ -228,6 +269,42 @@ spec:
|
||||
description: EnvBindingPhase is a label for the condition of a EnvBinding
|
||||
at the current time
|
||||
type: string
|
||||
resourceTracker:
|
||||
description: ResourceTracker record the status of the ResourceTracker
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead of
|
||||
an entire object, this string should contain a valid JSON/Go
|
||||
field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within
|
||||
a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax is chosen
|
||||
only to have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this field is
|
||||
subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: healthscopes.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -402,6 +402,8 @@ spec:
|
||||
- healthStatus
|
||||
type: object
|
||||
type: array
|
||||
envName:
|
||||
type: string
|
||||
required:
|
||||
- appName
|
||||
type: object
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: initializers.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -63,6 +63,23 @@ spec:
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
finalizers:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
type: object
|
||||
spec:
|
||||
description: ApplicationSpec is the spec of Application
|
||||
@@ -72,12 +89,43 @@ spec:
|
||||
description: ApplicationComponent describe the component
|
||||
of application
|
||||
properties:
|
||||
dependsOn:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
externalRevision:
|
||||
description: ExternalRevision specified the component
|
||||
revisionName
|
||||
type: string
|
||||
inputs:
|
||||
description: StepInputs defines variable input of WorkflowStep
|
||||
items:
|
||||
properties:
|
||||
from:
|
||||
type: string
|
||||
parameterKey:
|
||||
type: string
|
||||
required:
|
||||
- from
|
||||
- parameterKey
|
||||
type: object
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
outputs:
|
||||
description: StepOutputs defines output variable of
|
||||
WorkflowStep
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
valueFrom:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- valueFrom
|
||||
type: object
|
||||
type: array
|
||||
properties:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
@@ -466,6 +514,10 @@ spec:
|
||||
description: WorkflowStep defines how to execute a workflow
|
||||
step.
|
||||
properties:
|
||||
dependsOn:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
inputs:
|
||||
description: StepInputs defines variable input of
|
||||
WorkflowStep
|
||||
@@ -489,13 +541,13 @@ spec:
|
||||
of WorkflowStep
|
||||
items:
|
||||
properties:
|
||||
exportKey:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
valueFrom:
|
||||
type: string
|
||||
required:
|
||||
- exportKey
|
||||
- name
|
||||
- valueFrom
|
||||
type: object
|
||||
type: array
|
||||
properties:
|
||||
@@ -515,6 +567,55 @@ spec:
|
||||
status:
|
||||
description: AppStatus defines the observed state of Application
|
||||
properties:
|
||||
appliedResources:
|
||||
description: AppliedResources record the resources that the workflow
|
||||
step apply.
|
||||
items:
|
||||
description: ClusterObjectReference defines the object reference
|
||||
with cluster.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
cluster:
|
||||
type: string
|
||||
creator:
|
||||
description: ResourceCreatorRole defines the resource
|
||||
creator.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead
|
||||
of an entire object, this string should contain a
|
||||
valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container
|
||||
that triggered the event) or if no container name
|
||||
is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only to
|
||||
have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this
|
||||
field is subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this
|
||||
reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
components:
|
||||
description: Components record the related Components created
|
||||
by Application Controller
|
||||
@@ -791,6 +892,8 @@ spec:
|
||||
description: ApplicationComponentStatus record the health
|
||||
status of App component
|
||||
properties:
|
||||
env:
|
||||
type: string
|
||||
healthy:
|
||||
type: boolean
|
||||
message:
|
||||
@@ -982,13 +1085,16 @@ spec:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
stepIndex:
|
||||
type: integer
|
||||
mode:
|
||||
description: WorkflowMode describes the mode of workflow
|
||||
type: string
|
||||
steps:
|
||||
items:
|
||||
description: WorkflowStepStatus record the status of
|
||||
a workflow step
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
message:
|
||||
description: A human readable message indicating
|
||||
details about why the workflowStep is in this
|
||||
@@ -1005,83 +1111,50 @@ spec:
|
||||
details about why the workflowStep is in this
|
||||
state.
|
||||
type: string
|
||||
resourceRef:
|
||||
description: 'ObjectReference contains enough information
|
||||
to let you inspect or modify the referred object.
|
||||
--- New uses of this type are discouraged because
|
||||
of difficulty describing its usage when embedded
|
||||
in APIs. 1. Ignored fields. It includes many
|
||||
fields which are not generally honored. For instance,
|
||||
ResourceVersion and FieldPath are both very rarely
|
||||
valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual
|
||||
usage. In most embedded usages, there are particular restrictions
|
||||
like, "must refer only to types A and B" or "UID
|
||||
not honored" or "name must be restricted". Those
|
||||
cannot be well described when embedded. 3. Inconsistent
|
||||
validation. Because the usages are different,
|
||||
the validation rules are different by usage, which
|
||||
makes it hard for users to predict what will happen. 4.
|
||||
The fields are both imprecise and overly precise. Kind
|
||||
is not a precise mapping to a URL. This can produce
|
||||
ambiguity during interpretation and require
|
||||
a REST mapping. In most cases, the dependency
|
||||
is on the group,resource tuple and the version
|
||||
of the actual struct is irrelevant. 5. We cannot
|
||||
easily change it. Because this type is embedded
|
||||
in many locations, updates to this type will
|
||||
affect numerous schemas. Don''t make new APIs
|
||||
embed an underspecified API type they do not control.
|
||||
Instead of using this type, create a locally provided
|
||||
and used type that is well-focused on your reference.
|
||||
For example, ServiceReferences for admission registration:
|
||||
https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
subSteps:
|
||||
description: SubStepsStatus record the status of
|
||||
workflow steps.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an
|
||||
object instead of an entire object, this string
|
||||
should contain a valid JSON/Go field access
|
||||
statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to
|
||||
a container within a pod, this would take
|
||||
on a value like: "spec.containers{name}" (where
|
||||
"name" refers to the name of the container
|
||||
that triggered the event) or if no container
|
||||
name is specified "spec.containers[2]" (container
|
||||
with index 2 in this pod). This syntax is
|
||||
chosen only to have some well-defined way
|
||||
of referencing a part of an object. TODO:
|
||||
this design is not final and this field is
|
||||
subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info:
|
||||
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More
|
||||
info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which
|
||||
this reference is made, if any. More info:
|
||||
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info:
|
||||
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
mode:
|
||||
description: WorkflowMode describes the mode
|
||||
of workflow
|
||||
type: string
|
||||
stepIndex:
|
||||
type: integer
|
||||
steps:
|
||||
items:
|
||||
description: WorkflowSubStepStatus record
|
||||
the status of a workflow step
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
message:
|
||||
description: A human readable message
|
||||
indicating details about why the workflowStep
|
||||
is in this state.
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
phase:
|
||||
description: WorkflowStepPhase describes
|
||||
the phase of a workflow step.
|
||||
type: string
|
||||
reason:
|
||||
description: A brief CamelCase message
|
||||
indicating details about why the workflowStep
|
||||
is in this state.
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
type: array
|
||||
suspend:
|
||||
@@ -1089,7 +1162,7 @@ spec:
|
||||
terminated:
|
||||
type: boolean
|
||||
required:
|
||||
- contextBackend
|
||||
- mode
|
||||
- suspend
|
||||
- terminated
|
||||
type: object
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: manualscalertraits.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: policydefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -54,6 +54,10 @@ spec:
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
manageHealthCheck:
|
||||
description: ManageHealthCheck means the policy will handle health
|
||||
checking and skip application controller built-in health checking.
|
||||
type: boolean
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the policy definition
|
||||
@@ -147,6 +151,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -154,6 +172,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: resourcetrackers.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: scopedefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: traitdefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -188,6 +188,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -195,6 +209,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
@@ -453,6 +468,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -460,6 +489,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
|
||||
352
charts/vela-core/crds/core.oam.dev_workflows.yaml
Normal file
352
charts/vela-core/crds/core.oam.dev_workflows.yaml
Normal file
@@ -0,0 +1,352 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: workflows.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
names:
|
||||
categories:
|
||||
- oam
|
||||
kind: Workflow
|
||||
listKind: WorkflowList
|
||||
plural: workflows
|
||||
shortNames:
|
||||
- workflow
|
||||
singular: workflow
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.phase
|
||||
name: PHASE
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: AGE
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Workflow is the Schema for the Workflow API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: A WorkflowSpec defines the desired state of a Workflow.
|
||||
properties:
|
||||
steps:
|
||||
items:
|
||||
description: WorkflowStep defines how to execute a workflow step.
|
||||
properties:
|
||||
inputs:
|
||||
description: StepInputs defines variable input of WorkflowStep
|
||||
items:
|
||||
properties:
|
||||
from:
|
||||
type: string
|
||||
parameterKey:
|
||||
type: string
|
||||
required:
|
||||
- from
|
||||
- parameterKey
|
||||
type: object
|
||||
type: array
|
||||
name:
|
||||
description: Name is the unique name of the workflow step.
|
||||
type: string
|
||||
outputs:
|
||||
description: StepOutputs defines output variable of WorkflowStep
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
valueFrom:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- valueFrom
|
||||
type: object
|
||||
type: array
|
||||
properties:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
status:
|
||||
description: A WorkflowStatus is the status of Workflow
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions of the resource.
|
||||
items:
|
||||
description: A Condition that may apply to a resource.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime is the last time this condition
|
||||
transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A Message containing details about this condition's
|
||||
last transition from one status to another, if any.
|
||||
type: string
|
||||
reason:
|
||||
description: A Reason for this condition's last transition from
|
||||
one status to another.
|
||||
type: string
|
||||
status:
|
||||
description: Status of this condition; is it currently True,
|
||||
False, or Unknown?
|
||||
type: string
|
||||
type:
|
||||
description: Type of this condition. At most one of each condition
|
||||
type may apply to a resource at any point in time.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
contextBackend:
|
||||
description: 'ObjectReference contains enough information to let you
|
||||
inspect or modify the referred object. --- New uses of this type
|
||||
are discouraged because of difficulty describing its usage when
|
||||
embedded in APIs. 1. Ignored fields. It includes many fields which
|
||||
are not generally honored. For instance, ResourceVersion and FieldPath
|
||||
are both very rarely valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual usage. In most
|
||||
embedded usages, there are particular restrictions like, "must
|
||||
refer only to types A and B" or "UID not honored" or "name must
|
||||
be restricted". Those cannot be well described when embedded. 3.
|
||||
Inconsistent validation. Because the usages are different, the
|
||||
validation rules are different by usage, which makes it hard for
|
||||
users to predict what will happen. 4. The fields are both imprecise
|
||||
and overly precise. Kind is not a precise mapping to a URL. This
|
||||
can produce ambiguity during interpretation and require a REST
|
||||
mapping. In most cases, the dependency is on the group,resource
|
||||
tuple and the version of the actual struct is irrelevant. 5.
|
||||
We cannot easily change it. Because this type is embedded in many
|
||||
locations, updates to this type will affect numerous schemas. Don''t
|
||||
make new APIs embed an underspecified API type they do not control.
|
||||
Instead of using this type, create a locally provided and used type
|
||||
that is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead of
|
||||
an entire object, this string should contain a valid JSON/Go
|
||||
field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within
|
||||
a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax is chosen
|
||||
only to have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this field is
|
||||
subject to change in the future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
observedGeneration:
|
||||
format: int64
|
||||
type: integer
|
||||
stepIndex:
|
||||
type: integer
|
||||
steps:
|
||||
items:
|
||||
description: WorkflowStepStatus record the status of a workflow
|
||||
step
|
||||
properties:
|
||||
message:
|
||||
description: A human readable message indicating details about
|
||||
why the workflowStep is in this state.
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
phase:
|
||||
description: WorkflowStepPhase describes the phase of a workflow
|
||||
step.
|
||||
type: string
|
||||
reason:
|
||||
description: A brief CamelCase message indicating details about
|
||||
why the workflowStep is in this state.
|
||||
type: string
|
||||
resourceRef:
|
||||
description: 'ObjectReference contains enough information to
|
||||
let you inspect or modify the referred object. --- New uses
|
||||
of this type are discouraged because of difficulty describing
|
||||
its usage when embedded in APIs. 1. Ignored fields. It includes
|
||||
many fields which are not generally honored. For instance,
|
||||
ResourceVersion and FieldPath are both very rarely valid in
|
||||
actual usage. 2. Invalid usage help. It is impossible to
|
||||
add specific help for individual usage. In most embedded
|
||||
usages, there are particular restrictions like, "must
|
||||
refer only to types A and B" or "UID not honored" or "name
|
||||
must be restricted". Those cannot be well described when
|
||||
embedded. 3. Inconsistent validation. Because the usages
|
||||
are different, the validation rules are different by usage,
|
||||
which makes it hard for users to predict what will happen. 4.
|
||||
The fields are both imprecise and overly precise. Kind is
|
||||
not a precise mapping to a URL. This can produce ambiguity during
|
||||
interpretation and require a REST mapping. In most cases,
|
||||
the dependency is on the group,resource tuple and the
|
||||
version of the actual struct is irrelevant. 5. We cannot
|
||||
easily change it. Because this type is embedded in many locations,
|
||||
updates to this type will affect numerous schemas. Don''t
|
||||
make new APIs embed an underspecified API type they do not
|
||||
control. Instead of using this type, create a locally provided
|
||||
and used type that is well-focused on your reference. For
|
||||
example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
.'
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: 'If referring to a piece of an object instead
|
||||
of an entire object, this string should contain a valid
|
||||
JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container
|
||||
within a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that
|
||||
triggered the event) or if no container name is specified
|
||||
"spec.containers[2]" (container with index 2 in this pod).
|
||||
This syntax is chosen only to have some well-defined way
|
||||
of referencing a part of an object. TODO: this design
|
||||
is not final and this field is subject to change in the
|
||||
future.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
type:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
suspend:
|
||||
type: boolean
|
||||
terminated:
|
||||
type: boolean
|
||||
required:
|
||||
- contextBackend
|
||||
- suspend
|
||||
- terminated
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Workflow defines workflow steps and other attributes
|
||||
properties:
|
||||
steps:
|
||||
items:
|
||||
description: WorkflowStep defines how to execute a workflow step.
|
||||
properties:
|
||||
dependsOn:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
inputs:
|
||||
description: StepInputs defines variable input of WorkflowStep
|
||||
items:
|
||||
properties:
|
||||
from:
|
||||
type: string
|
||||
parameterKey:
|
||||
type: string
|
||||
required:
|
||||
- from
|
||||
- parameterKey
|
||||
type: object
|
||||
type: array
|
||||
name:
|
||||
description: Name is the unique name of the workflow step.
|
||||
type: string
|
||||
outputs:
|
||||
description: StepOutputs defines output variable of WorkflowStep
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
valueFrom:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- valueFrom
|
||||
type: object
|
||||
type: array
|
||||
properties:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
served: true
|
||||
storage: false
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: workflowstepdefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -148,6 +148,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -155,6 +169,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: workloaddefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -193,6 +193,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -200,6 +214,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
@@ -439,6 +454,20 @@ spec:
|
||||
configuration:
|
||||
description: Configuration is Terraform Configuration
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderReference specifies the reference to
|
||||
Provider
|
||||
properties:
|
||||
name:
|
||||
description: Name of the referenced object.
|
||||
type: string
|
||||
namespace:
|
||||
default: default
|
||||
description: Namespace of the secret.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type:
|
||||
default: hcl
|
||||
description: Type specifies which Terraform configuration
|
||||
@@ -446,6 +475,7 @@ spec:
|
||||
enum:
|
||||
- hcl
|
||||
- json
|
||||
- remote
|
||||
type: string
|
||||
required:
|
||||
- configuration
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.2.4
|
||||
controller-gen.kubebuilder.io/version: v0.6.2
|
||||
name: rollouts.standard.oam.dev
|
||||
spec:
|
||||
group: standard.oam.dev
|
||||
|
||||
@@ -51,6 +51,16 @@ app.kubernetes.io/name: {{ include "kubevela.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "kubevela-apiserver.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "kubevela.name" . }}-apiserver
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}-apiserver
|
||||
{{- end -}}
|
||||
|
||||
{{- define "kubevela-cluster-gateway.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "kubevela.name" . }}-cluster-gateway
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}-cluster-gateway
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
|
||||
@@ -5963,7 +5963,10 @@ data:
|
||||
+usage=Chart version\n\tversion: *\"*\" | string\n\t// +usage=The
|
||||
namespace for helm chart, optional\n\ttargetNamespace?: string\n\t//
|
||||
+usage=The release name\n\treleaseName?: string\n\t// +usage=Chart
|
||||
values\n\tvalues?: #nestedmap\n}\n\n#nestedmap: {\n\t...\n} \n"
|
||||
values\n\tvalues?: #nestedmap\n}\n\n#nestedmap: {\n\t...\n}\n"
|
||||
status:
|
||||
healthPolicy: 'isHealth: len(context.outputs.release.status.conditions)
|
||||
!= 0 && context.outputs.release.status.conditions[0]["status"]=="True"'
|
||||
workload:
|
||||
type: autodetects.core.oam.dev
|
||||
type: raw
|
||||
@@ -5982,7 +5985,11 @@ data:
|
||||
template: "patch: {\n\tspec: {\n\t\tpatchesJson6902: parameter.patchesJson\n\t}\n}\n\nparameter:
|
||||
{\n\t// +usage=A list of JSON6902 patch.\n\tpatchesJson: [...#jsonPatchItem]\n}\n\n//
|
||||
+usage=Contains a JSON6902 patch\n#jsonPatchItem: {\n\ttarget: #selector\n\tpatch:
|
||||
{\n\t\top: string\n\t\tpath: string\n\t\tvalue?: string\n\t}\n}\n\n//
|
||||
[...{\n\t\t// +usage=operation to perform\n\t\top: string | \"add\"
|
||||
| \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\"\n\t\t//
|
||||
+usage=operate path e.g. /foo/bar\n\t\tpath: string\n\t\t// +usage=specify
|
||||
source path when op is copy/move\n\t\tfrom?: string\n\t\t// +usage=specify
|
||||
opraation value when op is test/add/replace\n\t\tvalue?: string\n\t}]\n}\n\n//
|
||||
+usage=Selector specifies a set of resources\n#selector: {\n\tgroup?:
|
||||
\ string\n\tversion?: string\n\tkind?: string\n\tnamespace?:
|
||||
\ string\n\tname?: string\n\tannotationSelector?:
|
||||
@@ -6025,26 +6032,86 @@ data:
|
||||
schematic:
|
||||
cue:
|
||||
template: "output: {\n\tapiVersion: \"kustomize.toolkit.fluxcd.io/v1beta1\"\n\tkind:
|
||||
\ \"Kustomization\"\n\tmetadata: {\n\t\tname: context.name\n\t}\n\tspec:
|
||||
{\n\t\tinterval: parameter.pullInterval\n\t\tsourceRef: {\n\t\t\tif
|
||||
parameter.repoType == \"git\" {\n\t\t\t\tkind: \"GitRepository\"\n\t\t\t}\n\t\t\tif
|
||||
\ \"Kustomization\"\n\tmetadata: {\n\t\tname: context.name\n
|
||||
\ namespace: context.namespace\n\t}\n\tspec: {\n\t\tinterval:
|
||||
parameter.pullInterval\n\t\tsourceRef: {\n\t\t\tif parameter.repoType
|
||||
== \"git\" {\n\t\t\t\tkind: \"GitRepository\"\n\t\t\t}\n\t\t\tif
|
||||
parameter.repoType == \"oss\" {\n\t\t\t\tkind: \"Bucket\"\n\t\t\t}\n\t\t\tname:
|
||||
\ context.name\n\t\t\tnamespace: context.namespace\n\t\t}\n\t\tpath:
|
||||
\ parameter.path\n\t\tprune: true\n\t\tvalidation: \"client\"\n\t}\n}\n\noutputs:
|
||||
repo:{\n\tapiVersion: \"source.toolkit.fluxcd.io/v1beta1\"\n\tmetadata:
|
||||
{\n\t\tname: context.name\n\t}\n\tif parameter.repoType == \"git\"
|
||||
{\n\t\tkind: \"GitRepository\"\n\t\tspec: {\n\t\t\turl: parameter.url\n\t\t\tif
|
||||
parameter.git.branch != _|_ {\n\t\t\t\tref: branch: parameter.git.branch\n\t\t\t}\n\t\t\t_secret\n\t\t\t_sourceCommonArgs\n\t\t}\n\t}\n\tif
|
||||
parameter.repoType == \"oss\" {\n\t\tkind: \"Bucket\"\n\t\tspec:
|
||||
{\n\t\t\tendpoint: parameter.url\n\t\t\tbucketName: parameter.oss.bucketName\n\t\t\tprovider:
|
||||
\ parameter.oss.provider\n\t\t\tif parameter.oss.region != _|_
|
||||
{\n\t\t\t\tregion: parameter.oss.region\n\t\t\t}\n\t\t\t_secret\n\t\t\t_sourceCommonArgs\n\t\t}\n\t}\n}\n\n_secret:
|
||||
{\n repo: {\n\t apiVersion: \"source.toolkit.fluxcd.io/v1beta1\"\n\t
|
||||
\ metadata: {\n\t\t name: context.name\n namespace: context.namespace\n\t
|
||||
\ }\n\t if parameter.repoType == \"git\" {\n\t\t kind: \"GitRepository\"\n\t\t
|
||||
\ spec: {\n\t\t\t url: parameter.url\n\t\t\t if parameter.git.branch
|
||||
!= _|_ {\n\t\t\t\t ref: branch: parameter.git.branch\n\t\t\t }\n\t\t\t
|
||||
\ _secret\n\t\t\t _sourceCommonArgs\n\t\t }\n\t }\n\t if parameter.repoType
|
||||
== \"oss\" {\n\t\t kind: \"Bucket\"\n\t\t spec: {\n\t\t\t endpoint:
|
||||
\ parameter.url\n\t\t\t bucketName: parameter.oss.bucketName\n\t\t\t
|
||||
\ provider: parameter.oss.provider\n\t\t\t if parameter.oss.region
|
||||
!= _|_ {\n\t\t\t\t region: parameter.oss.region\n\t\t\t }\n\t\t\t
|
||||
\ _secret\n\t\t\t _sourceCommonArgs\n\t\t }\n\t }\n }\n\n if
|
||||
parameter.imageRepository != _|_ {\n imageRepo: {\n apiVersion:
|
||||
\"image.toolkit.fluxcd.io/v1beta1\"\n kind: \"ImageRepository\"\n\t
|
||||
\ metadata: {\n\t\t name: context.name\n namespace:
|
||||
context.namespace\n\t }\n spec: {\n image: parameter.imageRepository.image\n
|
||||
\ interval: parameter.pullInterval\n if parameter.imageRepository.secretRef
|
||||
!= _|_ {\n secretRef: name: parameter.imageRepository.secretRef\n
|
||||
\ }\n }\n }\n\n imagePolicy: {\n apiVersion:
|
||||
\"image.toolkit.fluxcd.io/v1beta1\"\n kind: \"ImagePolicy\"\n\t
|
||||
\ metadata: {\n\t\t name: context.name\n namespace:
|
||||
context.namespace\n\t }\n spec: {\n imageRepositoryRef:
|
||||
name: context.name\n policy: parameter.imageRepository.policy\n
|
||||
\ if parameter.imageRepository.filterTags != _|_ {\n filterTags:
|
||||
parameter.imageRepository.filterTags\n }\n }\n }\n\n
|
||||
\ imageUpdate: {\n apiVersion: \"image.toolkit.fluxcd.io/v1beta1\"\n
|
||||
\ kind: \"ImageUpdateAutomation\"\n\t metadata: {\n\t\t name:
|
||||
context.name\n namespace: context.namespace\n\t }\n spec:
|
||||
{\n interval: parameter.pullInterval\n sourceRef:
|
||||
{\n kind: \"GitRepository\"\n name: context.name\n
|
||||
\ }\n git: {\n checkout: ref: branch: parameter.git.branch\n
|
||||
\ commit: {\n author: {\n email:
|
||||
\"kubevelabot@users.noreply.github.com\"\n name: \"kubevelabot\"\n
|
||||
\ }\n if parameter.imageRepository.commitMessage
|
||||
!= _|_ {\n messageTemplate: \"Update image automatically.\\n\"
|
||||
+ parameter.imageRepository.commitMessage\n }\n if
|
||||
parameter.imageRepository.commitMessage == _|_ {\n messageTemplate:
|
||||
\"Update image automatically.\"\n }\n }\n push:
|
||||
branch: parameter.git.branch\n }\n update: {\n path:\tparameter.path\n
|
||||
\ strategy: \"Setters\"\n }\n }\n }\n }\n}\n\n_secret:
|
||||
{\n\tif parameter.secretRef != _|_ {\n\t\tsecretRef: {\n\t\t\tname:
|
||||
parameter.secretRef\n\t\t}\n\t}\n}\n\n_sourceCommonArgs: {\n\tinterval:
|
||||
parameter.pullInterval\n\tif parameter.timeout != _|_ {\n\t\ttimeout:
|
||||
parameter.timeout\n\t}\n}\n\nparameter: {\n\trepoType: *\"git\"
|
||||
| \"oss\"\n\t// +usage=The interval at which to check for repository/bucket
|
||||
and relese updates, default to 5m\n\tpullInterval: *\"5m\" | string\n\t//
|
||||
| \"oss\"\n // +usage=The image repository for automatically update
|
||||
image to git\n imageRepository?: {\n // +usage=The image url\n
|
||||
\ image: string\n // +usage=The name of the secret containing
|
||||
authentication credentials\n secretRef?: string\n // +usage=Policy
|
||||
gives the particulars of the policy to be followed in selecting
|
||||
the most recent image.\n policy: {\n // +usage=Alphabetical
|
||||
set of rules to use for alphabetical ordering of the tags.\n alphabetical?:
|
||||
{\n // +usage=Order specifies the sorting order of the tags.\n
|
||||
\ // +usage=Given the letters of the alphabet as tags, ascending
|
||||
order would select Z, and descending order would select A.\n order?:
|
||||
\"asc\" | \"desc\"\n }\n // +usage=Numerical set of rules
|
||||
to use for numerical ordering of the tags.\n numerical?: {\n
|
||||
\ // +usage=Order specifies the sorting order of the tags.\n
|
||||
\ // +usage=Given the integer values from 0 to 9 as tags,
|
||||
ascending order would select 9, and descending order would select
|
||||
0.\n order: \"asc\" | \"desc\"\n }\n // +usage=SemVer
|
||||
gives a semantic version range to check against the tags available.\n
|
||||
\ semver?: {\n // +usage=Range gives a semver range for
|
||||
the image tag; the highest version within the range that's a tag
|
||||
yields the latest image.\n range: string\n }\n }\n
|
||||
\ // +usage=FilterTags enables filtering for only a subset of
|
||||
tags based on a set of rules. If no rules are provided, all the
|
||||
tags from the repository will be ordered and compared.\n filterTags?:
|
||||
{\n // +usage=Extract allows a capture group to be extracted
|
||||
from the specified regular expression pattern, useful before tag
|
||||
evaluation.\n extract?: string\n // +usage=Pattern specifies
|
||||
a regular expression pattern used to filter for image tags.\n pattern?:
|
||||
string\n }\n // +usage=The image url\n commitMessage?:
|
||||
string\n }\n\t// +usage=The interval at which to check for repository/bucket
|
||||
and release updates, default to 5m\n\tpullInterval: *\"5m\" | string\n\t//
|
||||
+usage=The Git or Helm repository URL, OSS endpoint, accept HTTP/S
|
||||
or SSH address as git url,\n\turl: string\n\t// +usage=The name
|
||||
of the secret containing authentication credentials\n\tsecretRef?:
|
||||
@@ -6101,6 +6168,7 @@ metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Flux is a set of continuous and progressive delivery
|
||||
solutions for Kubernetes
|
||||
addons.oam.dev/name: fluxcd
|
||||
labels:
|
||||
addons.oam.dev/type: fluxcd
|
||||
name: fluxcd
|
||||
|
||||
262
charts/vela-core/templates/addons/istio.yaml
Normal file
262
charts/vela-core/templates/addons/istio.yaml
Normal file
@@ -0,0 +1,262 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Initializer
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: istio Controller is a Kubernetes Controller for manage
|
||||
traffic.
|
||||
name: istio
|
||||
namespace: istio-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")
|
||||
|
||||
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
|
||||
}]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
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:
|
||||
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
|
||||
status:
|
||||
observedGeneration: 0
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: istio Controller is a Kubernetes Controller for manage
|
||||
traffic.
|
||||
addons.oam.dev/name: istio
|
||||
labels:
|
||||
addons.oam.dev/type: istio
|
||||
name: istio
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
@@ -38,6 +38,7 @@ kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: KEDA is a Kubernetes-based Event Driven Autoscaler.
|
||||
addons.oam.dev/name: keda
|
||||
labels:
|
||||
addons.oam.dev/type: keda
|
||||
name: keda
|
||||
|
||||
@@ -23,7 +23,7 @@ data:
|
||||
values:
|
||||
featureGates: PreDownloadImageForInPlaceUpdate=true
|
||||
type: helm
|
||||
- name: cloneset-service
|
||||
- name: cloneset
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: ComponentDefinition
|
||||
@@ -33,7 +33,7 @@ data:
|
||||
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-service
|
||||
name: cloneset
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
@@ -58,14 +58,14 @@ data:
|
||||
\ 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\tif
|
||||
parameter[\"imagePullSecrets\"] != _|_ {\n\t\t\t\t\t\timagePullSecrets:
|
||||
[ for v in parameter.imagePullSecrets {name: v}]\n\t\t\t\t\t}\n\n\t\t\t\t\tlifecycle:
|
||||
!= _|_ {\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}\n\t\t}\n\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//
|
||||
@@ -191,6 +191,7 @@ metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Kruise is a Kubernetes extended suite for application
|
||||
automations
|
||||
addons.oam.dev/name: kruise
|
||||
labels:
|
||||
addons.oam.dev/type: kruise
|
||||
name: kruise
|
||||
|
||||
@@ -33,6 +33,7 @@ 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
|
||||
|
||||
40
charts/vela-core/templates/addons/ns-istio-system.yaml
Normal file
40
charts/vela-core/templates/addons/ns-istio-system.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
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}}
|
||||
@@ -25,7 +25,7 @@ data:
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Add a datasource to Grafana
|
||||
definition.oam.dev/description: Import dashboards to Grafana
|
||||
name: import-grafana-dashboard
|
||||
namespace: vela-system
|
||||
spec:
|
||||
@@ -121,6 +121,7 @@ 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
|
||||
|
||||
@@ -29,7 +29,7 @@ data:
|
||||
releaseName: grafana
|
||||
repoType: helm
|
||||
targetNamespace: observability
|
||||
url: https://grafana.github.io/helm-charts
|
||||
url: https://charts.kubevela.net/addons
|
||||
version: 6.14.1
|
||||
traits:
|
||||
- properties:
|
||||
@@ -43,8 +43,10 @@ data:
|
||||
grafanaServiceName: grafana
|
||||
grafanaServiceNamespace: observability
|
||||
urls:
|
||||
- https://raw.githubusercontent.com/oam-dev/grafana-registration/master/dashboards/kubevela_core_logging.json
|
||||
- https://raw.githubusercontent.com/oam-dev/grafana-registration/master/dashboards/kubevela_core_monitoring.json
|
||||
- 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
|
||||
@@ -53,7 +55,7 @@ data:
|
||||
releaseName: loki
|
||||
repoType: helm
|
||||
targetNamespace: observability
|
||||
url: https://grafana.github.io/helm-charts
|
||||
url: https://charts.kubevela.net/addons
|
||||
version: 2.4.1
|
||||
traits:
|
||||
- properties:
|
||||
@@ -74,7 +76,7 @@ data:
|
||||
releaseName: prometheus
|
||||
repoType: helm
|
||||
targetNamespace: observability
|
||||
url: https://prometheus-community.github.io/helm-charts
|
||||
url: https://charts.kubevela.net/addons
|
||||
values:
|
||||
alertmanager:
|
||||
persistentVolume:
|
||||
@@ -106,7 +108,7 @@ data:
|
||||
chart: kube-state-metrics
|
||||
repoType: helm
|
||||
targetNamespace: observability
|
||||
url: https://prometheus-community.github.io/helm-charts
|
||||
url: https://charts.kubevela.net/addons
|
||||
values:
|
||||
image:
|
||||
repository: oamdev/kube-state-metrics
|
||||
@@ -138,6 +140,7 @@ kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: An out of the box solution for KubeVela observability
|
||||
addons.oam.dev/name: observability
|
||||
labels:
|
||||
addons.oam.dev/type: observability
|
||||
name: observability
|
||||
|
||||
@@ -517,6 +517,7 @@ metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: ocm-cluster-manager can deploy an OCM hub cluster
|
||||
environment.
|
||||
addons.oam.dev/name: ocm-cluster-manager
|
||||
labels:
|
||||
addons.oam.dev/type: ocm-cluster-manager
|
||||
name: ocm-cluster-manager
|
||||
|
||||
@@ -40,6 +40,7 @@ metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Prometheus is an open-source systems monitoring and
|
||||
alerting toolkit
|
||||
addons.oam.dev/name: prometheus
|
||||
labels:
|
||||
addons.oam.dev/type: prometheus
|
||||
name: prometheus
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
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:
|
||||
spec:
|
||||
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
|
||||
source: Secret
|
||||
provider: alibaba
|
||||
region: '[[ index .Args "ALICLOUD_REGION" ]]'
|
||||
type: raw
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
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/provider-alibaba
|
||||
labels:
|
||||
addons.oam.dev/type: terraform-provider-alibaba
|
||||
name: terraform-provider-alibaba
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
@@ -0,0 +1,65 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
initializer: |
|
||||
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:
|
||||
spec:
|
||||
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
|
||||
source: Secret
|
||||
provider: azure
|
||||
type: raw
|
||||
status:
|
||||
rollout:
|
||||
batchRollingState: ""
|
||||
currentBatch: 0
|
||||
lastTargetAppRevision: ""
|
||||
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/provider-azure
|
||||
labels:
|
||||
addons.oam.dev/type: terraform-provider-azure
|
||||
name: terraform-provider-azure
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
@@ -15,9 +15,10 @@ data:
|
||||
components:
|
||||
- name: terraform-controller
|
||||
properties:
|
||||
chart: ./chart
|
||||
repoType: git
|
||||
url: https://github.com/oam-dev/terraform-controller
|
||||
chart: terraform-controller
|
||||
repoType: helm
|
||||
url: https://charts.kubevela.net/addons
|
||||
version: 0.1.19
|
||||
type: helm
|
||||
- name: terraform-system
|
||||
properties:
|
||||
@@ -34,6 +35,7 @@ data:
|
||||
annotations:
|
||||
definition.oam.dev/description: Terraform configuration for Alibaba
|
||||
Cloud ACK cluster
|
||||
labels:
|
||||
type: terraform
|
||||
name: alibaba-ack
|
||||
namespace: vela-system
|
||||
@@ -238,6 +240,28 @@ data:
|
||||
apiVersion: terraform.core.oam.dev/v1beta1
|
||||
kind: Configuration
|
||||
type: raw
|
||||
- name: alibaba-eip
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1alpha2
|
||||
kind: ComponentDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Terraform configuration for Alibaba
|
||||
Cloud Elastic IP
|
||||
labels:
|
||||
type: terraform
|
||||
name: alibaba-eip
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
terraform:
|
||||
configuration: https://github.com/oam-dev/terraform-alibaba-eip.git
|
||||
type: remote
|
||||
workload:
|
||||
definition:
|
||||
apiVersion: terraform.core.oam.dev/v1beta1
|
||||
kind: Configuration
|
||||
type: raw
|
||||
- name: alibaba-oss
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1alpha2
|
||||
@@ -246,8 +270,10 @@ data:
|
||||
annotations:
|
||||
definition.oam.dev/description: Terraform configuration for Alibaba
|
||||
Cloud OSS object
|
||||
labels:
|
||||
type: terraform
|
||||
name: alibaba-oss
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
terraform:
|
||||
@@ -271,26 +297,135 @@ data:
|
||||
annotations:
|
||||
definition.oam.dev/description: Terraform configuration for Alibaba
|
||||
Cloud RDS object
|
||||
labels:
|
||||
type: terraform
|
||||
name: alibaba-rds
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
terraform:
|
||||
configuration: "module \"rds\" {\n source = \"terraform-alicloud-modules/rds/alicloud\"\n
|
||||
\ engine = \"MySQL\"\n engine_version = \"8.0\"\n instance_type
|
||||
= \"rds.mysql.c1.large\"\n instance_storage = \"20\"\n instance_name
|
||||
= var.instance_name\n account_name = var.account_name\n password
|
||||
= var.password\n}\noutput \"DB_NAME\" {\n value = module.rds.this_db_instance_name\n}\noutput
|
||||
\"DB_USER\" {\n value = module.rds.this_db_database_account\n}\noutput
|
||||
\"DB_PORT\" {\n value = module.rds.this_db_instance_port\n}\noutput
|
||||
\"DB_HOST\" {\n value = module.rds.this_db_instance_connection_string\n}\noutput
|
||||
\"DB_PASSWORD\" {\n value = module.rds.this_db_instance_port\n}\nvariable
|
||||
\"instance_name\" {\n description = \"RDS instance name\"\n type
|
||||
= string\n default = \"poc\"\n}\nvariable \"account_name\" {\n
|
||||
\ description = \"RDS instance user account name\"\n type = string\n
|
||||
\ default = \"oam\"\n}\nvariable \"password\" {\n description =
|
||||
\"RDS instance account password\"\n type = string\n default =
|
||||
\"Xyfff83jfewGGfaked\"\n} \n"
|
||||
configuration: |
|
||||
module "rds" {
|
||||
source = "terraform-alicloud-modules/rds/alicloud"
|
||||
engine = "MySQL"
|
||||
engine_version = "8.0"
|
||||
instance_type = "rds.mysql.c1.large"
|
||||
instance_storage = "20"
|
||||
instance_name = var.instance_name
|
||||
account_name = var.account_name
|
||||
password = var.password
|
||||
}
|
||||
|
||||
output "DB_NAME" {
|
||||
value = module.rds.this_db_instance_name
|
||||
}
|
||||
output "DB_USER" {
|
||||
value = module.rds.this_db_database_account
|
||||
}
|
||||
output "DB_PORT" {
|
||||
value = module.rds.this_db_instance_port
|
||||
}
|
||||
output "DB_HOST" {
|
||||
value = module.rds.this_db_instance_connection_string
|
||||
}
|
||||
output "DB_PASSWORD" {
|
||||
value = var.password
|
||||
}
|
||||
|
||||
variable "instance_name" {
|
||||
description = "RDS instance name"
|
||||
type = string
|
||||
default = "poc"
|
||||
}
|
||||
|
||||
variable "account_name" {
|
||||
description = "RDS instance user account name"
|
||||
type = string
|
||||
default = "oam"
|
||||
}
|
||||
|
||||
variable "password" {
|
||||
description = "RDS instance account password"
|
||||
type = string
|
||||
default = "Xyfff83jfewGGfaked"
|
||||
}
|
||||
workload:
|
||||
definition:
|
||||
apiVersion: terraform.core.oam.dev/v1beta1
|
||||
kind: Configuration
|
||||
type: raw
|
||||
- name: azure-database-mariadb
|
||||
properties:
|
||||
apiVersion: core.oam.dev/v1alpha2
|
||||
kind: ComponentDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Terraform configuration for Azure Database
|
||||
Mariadb
|
||||
provider: azure
|
||||
labels:
|
||||
type: terraform
|
||||
name: azure-database-mariadb
|
||||
namespace: vela-system
|
||||
spec:
|
||||
schematic:
|
||||
terraform:
|
||||
configuration: |
|
||||
# Configure the Microsoft Azure Provider
|
||||
provider "azurerm" {
|
||||
features {}
|
||||
}
|
||||
|
||||
resource "azurerm_resource_group" "example" {
|
||||
name = "tfex-mariadb-database-RG"
|
||||
location = "West Europe"
|
||||
}
|
||||
|
||||
resource "azurerm_mariadb_server" "example" {
|
||||
name = "mariadb-svr-sample"
|
||||
location = azurerm_resource_group.example.location
|
||||
resource_group_name = azurerm_resource_group.example.name
|
||||
|
||||
sku_name = "B_Gen5_2"
|
||||
|
||||
storage_mb = 51200
|
||||
backup_retention_days = 7
|
||||
geo_redundant_backup_enabled = false
|
||||
|
||||
administrator_login = var.username
|
||||
administrator_login_password = var.password
|
||||
version = "10.2"
|
||||
ssl_enforcement_enabled = true
|
||||
}
|
||||
|
||||
resource "azurerm_mariadb_database" "example" {
|
||||
name = var.name
|
||||
resource_group_name = azurerm_resource_group.example.name
|
||||
server_name = azurerm_mariadb_server.example.name
|
||||
charset = "utf8"
|
||||
collation = "utf8_general_ci"
|
||||
}
|
||||
|
||||
variable "name" {
|
||||
default = "mariadb_database"
|
||||
type = string
|
||||
description = "Database instance name"
|
||||
}
|
||||
|
||||
variable "username" {
|
||||
default = "acctestun"
|
||||
type = string
|
||||
description = "Database instance username"
|
||||
}
|
||||
|
||||
variable "password" {
|
||||
default = "H@Sh1CoR3!faked"
|
||||
type = string
|
||||
description = "Database instance password"
|
||||
}
|
||||
providerRef:
|
||||
name: azure
|
||||
namespace: default
|
||||
workload:
|
||||
definition:
|
||||
apiVersion: terraform.core.oam.dev/v1beta1
|
||||
@@ -317,6 +452,7 @@ metadata:
|
||||
annotations:
|
||||
addons.oam.dev/description: Terraform Controller is a Kubernetes Controller for
|
||||
Terraform.
|
||||
addons.oam.dev/name: terraform
|
||||
labels:
|
||||
addons.oam.dev/type: terraform
|
||||
name: terraform
|
||||
|
||||
@@ -18,6 +18,7 @@ metadata:
|
||||
spec:
|
||||
secretName: {{ template "kubevela.fullname" . }}-root-cert
|
||||
duration: 43800h # 5y
|
||||
revisionHistoryLimit: {{ .Values.admissionWebhooks.certManager.revisionHistoryLimit }}
|
||||
issuerRef:
|
||||
name: {{ template "kubevela.fullname" . }}-self-signed-issuer
|
||||
commonName: "ca.webhook.kubevela"
|
||||
@@ -44,6 +45,7 @@ metadata:
|
||||
spec:
|
||||
secretName: {{ template "kubevela.fullname" . }}-admission
|
||||
duration: 8760h # 1y
|
||||
revisionHistoryLimit: {{ .Values.admissionWebhooks.certManager.revisionHistoryLimit }}
|
||||
issuerRef:
|
||||
name: {{ template "kubevela.fullname" . }}-root-issuer
|
||||
dnsNames:
|
||||
|
||||
191
charts/vela-core/templates/cluster-gateway.yaml
Normal file
191
charts/vela-core/templates/cluster-gateway.yaml
Normal file
@@ -0,0 +1,191 @@
|
||||
{{ if .Values.multicluster.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-cluster-gateway
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.multicluster.clusterGateway.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "kubevela.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ include "kubevela.fullname" . }}-cluster-gateway
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
args:
|
||||
- "apiserver"
|
||||
- "--secure-port={{ .Values.multicluster.clusterGateway.port }}"
|
||||
- "--secret-namespace={{ .Release.Namespace }}"
|
||||
- "--feature-gates=APIPriorityAndFairness=false"
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
- "--cert-dir={{ .Values.multicluster.clusterGateway.secureTLS.certPath }}"
|
||||
{{ end }}
|
||||
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.multicluster.clusterGateway.resources | nindent 12 }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.multicluster.clusterGateway.port }}
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
volumeMounts:
|
||||
- mountPath: {{ .Values.multicluster.clusterGateway.secureTLS.certPath }}
|
||||
name: tls-cert-vol
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
volumes:
|
||||
- name: tls-cert-vol
|
||||
secret:
|
||||
defaultMode: 420
|
||||
secretName: {{ template "kubevela.fullname" . }}-cluster-gateway-tls
|
||||
{{ end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
---
|
||||
{{ if .Values.multicluster.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-cluster-gateway-service
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
selector:
|
||||
{{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 4 }}
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: {{ .Values.multicluster.clusterGateway.port }}
|
||||
targetPort: {{ .Values.multicluster.clusterGateway.port }}
|
||||
{{ end }}
|
||||
---
|
||||
{{ if .Values.multicluster.enabled }}
|
||||
apiVersion: apiregistration.k8s.io/v1
|
||||
kind: APIService
|
||||
metadata:
|
||||
name: v1alpha1.cluster.core.oam.dev
|
||||
labels:
|
||||
api: cluster-extension-apiserver
|
||||
apiserver: "true"
|
||||
spec:
|
||||
version: v1alpha1
|
||||
group: cluster.core.oam.dev
|
||||
groupPriorityMinimum: 2000
|
||||
service:
|
||||
name: {{ .Release.Name }}-cluster-gateway-service
|
||||
namespace: {{ .Release.Namespace }}
|
||||
port: {{ .Values.multicluster.clusterGateway.port }}
|
||||
versionPriority: 10
|
||||
insecureSkipTLSVerify: {{ not .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
{{ if .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
caBundle: Cg==
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
---
|
||||
{{ if and .Values.multicluster.enabled .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-create
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-create
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }}
|
||||
# Alpha feature since k8s 1.12
|
||||
ttlSecondsAfterFinished: 0
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-create
|
||||
labels:
|
||||
app: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-create
|
||||
{{- include "kubevela.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ .Values.admissionWebhooks.patch.image.repository }}:{{ .Values.admissionWebhooks.patch.image.tag }}
|
||||
imagePullPolicy: {{ .Values.admissionWebhooks.patch.image.pullPolicy }}
|
||||
args:
|
||||
- create
|
||||
- --host={{ .Release.Name }}-cluster-gateway-service,{{ .Release.Name }}-cluster-gateway-service.{{ .Release.Namespace }}.svc
|
||||
- --namespace={{ .Release.Namespace }}
|
||||
- --secret-name={{ template "kubevela.fullname" . }}-cluster-gateway-tls
|
||||
- --key-name=apiserver.key
|
||||
- --cert-name=apiserver.crt
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: {{ template "kubevela.fullname" . }}-admission
|
||||
securityContext:
|
||||
runAsGroup: 2000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 2000
|
||||
{{ end }}
|
||||
---
|
||||
{{ if and .Values.multicluster.enabled .Values.multicluster.clusterGateway.secureTLS.enabled }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-patch
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-patch
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }}
|
||||
# Alpha feature since k8s 1.12
|
||||
ttlSecondsAfterFinished: 0
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-patch
|
||||
labels:
|
||||
app: {{ template "kubevela.fullname" . }}-cluster-gateway-tls-secret-patch
|
||||
{{- include "kubevela.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ .Values.multicluster.clusterGateway.image.repository }}:{{ .Values.multicluster.clusterGateway.image.tag }}
|
||||
imagePullPolicy: {{ .Values.multicluster.clusterGateway.image.pullPolicy }}
|
||||
command:
|
||||
- /patch
|
||||
args:
|
||||
- --secret-namespace={{ .Release.Namespace }}
|
||||
- --secret-name={{ template "kubevela.fullname" . }}-cluster-gateway-tls
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: {{ include "kubevela.serviceAccountName" . }}
|
||||
securityContext:
|
||||
runAsGroup: 2000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 2000
|
||||
{{ end }}
|
||||
@@ -4,19 +4,26 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Add annotations for your Workload.
|
||||
definition.oam.dev/description: Add annotations on K8s pod for your workload which follows the pod spec in path 'spec.template'.
|
||||
name: annotations
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- '*'
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
patch: spec: template: metadata: annotations: {
|
||||
for k, v in parameter {
|
||||
"\(k)": v
|
||||
patch: {
|
||||
metadata: annotations: {
|
||||
for k, v in parameter {
|
||||
"\(k)": v
|
||||
}
|
||||
}
|
||||
spec: template: metadata: annotations: {
|
||||
for k, v in parameter {
|
||||
"\(k)": v
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: [string]: string
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-application.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Apply application for your workflow steps
|
||||
name: apply-application
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
// apply application
|
||||
output: op.#ApplyApplication & {}
|
||||
|
||||
22
charts/vela-core/templates/defwithtemplate/apply-object.yaml
Normal file
22
charts/vela-core/templates/defwithtemplate/apply-object.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/apply-object.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Apply raw kubernetes objects for your workflow steps
|
||||
name: apply-object
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
apply: op.#Apply & {
|
||||
value: parameter
|
||||
}
|
||||
parameter: {}
|
||||
|
||||
@@ -21,16 +21,6 @@ spec:
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Declare the name of the component
|
||||
exceptions?: [componentName=string]: {
|
||||
// +usage=skipApplyWorkload indicates whether to skip apply the workload resource
|
||||
skipApplyWorkload: *true | bool
|
||||
|
||||
// +usage=skipAllTraits indicates to skip apply all resources of the traits.
|
||||
// +usage=If this is true, skipApplyTraits will be ignored
|
||||
skipAllTraits: *true | bool
|
||||
|
||||
// +usage=skipApplyTraits specifies the names of the traits to skip apply
|
||||
skipApplyTraits: [...string]
|
||||
}
|
||||
exceptions?: [...string]
|
||||
}
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@ apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Create/Attach configmaps to workloads.
|
||||
definition.oam.dev/description: Create/Attach configmaps on K8s pod for your workload which follows the pod spec in path 'spec.template'.
|
||||
name: configmap
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
appliesToWorkloads:
|
||||
- deployments.apps
|
||||
- '*'
|
||||
podDisruptive: true
|
||||
schematic:
|
||||
cue:
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/depends-on-app.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: check or install depends-on Application
|
||||
name: depends-on-app
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
"encoding/yaml"
|
||||
)
|
||||
|
||||
dependsOn: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "core.oam.dev/v1beta1"
|
||||
kind: "Application"
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
load: op.#Steps & {
|
||||
if dependsOn.err != _|_ && dependsOn.value == _|_ {
|
||||
configMap: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "ConfigMap"
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
yaml.Unmarshal(configMap.value.data[parameter.name])
|
||||
}
|
||||
}
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: load.apply.value.status.status == "running"
|
||||
}
|
||||
}
|
||||
|
||||
if dependsOn.value != _|_ {
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: dependsOn.value.status.status == "running"
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the name of the dependent Application
|
||||
name: string
|
||||
// +usage=Specify the namespace of the dependent Application
|
||||
namespace: string
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
||||
# Definition source cue file: vela-templates/definitions/internal/multi-env.cue
|
||||
# Definition source cue file: vela-templates/definitions/internal/deploy2env.cue
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: WorkflowStepDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: Apply env binding component
|
||||
name: multi-env
|
||||
definition.oam.dev/description: Deploy env binding component to target env
|
||||
name: deploy2env
|
||||
namespace: {{.Values.systemDefinitionNamespace}}
|
||||
spec:
|
||||
schematic:
|
||||
@@ -15,16 +15,14 @@ spec:
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
component: op.#ApplyEnvBindComponent & {
|
||||
env: parameter.env
|
||||
policy: parameter.policy
|
||||
component: parameter.component
|
||||
app: op.#ApplyEnvBindApp & {
|
||||
env: parameter.env
|
||||
policy: parameter.policy
|
||||
app: context.name
|
||||
// context.namespace indicates the namespace of the app
|
||||
namespace: context.namespace
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Declare the name of the component
|
||||
component: string
|
||||
// +usage=Declare the name of the policy
|
||||
policy: string
|
||||
// +usage=Declare the name of the env in policy
|
||||
@@ -15,7 +15,7 @@ spec:
|
||||
apiVersion: "core.oam.dev/v1alpha1"
|
||||
kind: "EnvBinding"
|
||||
spec: {
|
||||
engine: parameter.engine
|
||||
engine: parameter.clusterManagementEngine
|
||||
appTemplate: {
|
||||
apiVersion: "core.oam.dev/v1beta1"
|
||||
kind: "Application"
|
||||
@@ -26,11 +26,9 @@ spec:
|
||||
spec: components: context.components
|
||||
}
|
||||
envs: parameter.envs
|
||||
if !parameter.created {
|
||||
outputResourcesTo: {
|
||||
name: context.name
|
||||
namespace: context.namespace
|
||||
}
|
||||
outputResourcesTo: {
|
||||
name: context.name
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,10 +53,10 @@ spec:
|
||||
name?: string
|
||||
}
|
||||
}
|
||||
selector?: components: [...string]
|
||||
}
|
||||
parameter: {
|
||||
engine: *"ocm" | string
|
||||
clusterManagementEngine: *"cluster-gateway" | string
|
||||
envs: [...#Env]
|
||||
created: *true | bool
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user