mirror of
https://github.com/kubevela/kubevela.git
synced 2026-03-02 09:40:51 +00:00
Compare commits
2 Commits
dependabot
...
v1.9.12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89c1d07a8f | ||
|
|
fa8350bc50 |
30
.github/CODEOWNERS
vendored
30
.github/CODEOWNERS
vendored
@@ -1,35 +1,35 @@
|
||||
# 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
|
||||
|
||||
* @barnettZQG @wonderflow @leejanee @Somefive @jefree-cat @FogDong @wangyikewxgm @chivalryq @anoop2811 @dhiguero
|
||||
design/ @barnettZQG @leejanee @wonderflow @Somefive @jefree-cat @FogDong @anoop2811 @dhiguero
|
||||
* @barnettZQG @wonderflow @leejanee @Somefive @jefree-cat @FogDong @wangyikewxgm @chivalryq
|
||||
design/ @barnettZQG @leejanee @wonderflow @Somefive @jefree-cat @FogDong
|
||||
|
||||
# Owner of Core Controllers
|
||||
pkg/controller/core.oam.dev @Somefive @FogDong @barnettZQG @wonderflow @wangyikewxgm @chivalryq @anoop2811 @dhiguero
|
||||
pkg/controller/core.oam.dev @Somefive @FogDong @barnettZQG @wonderflow @wangyikewxgm @chivalryq
|
||||
|
||||
# Owner of Standard Controllers
|
||||
pkg/controller/standard.oam.dev @wangyikewxgm @barnettZQG @wonderflow @Somefive @anoop2811 @dhiguero @FogDong
|
||||
pkg/controller/standard.oam.dev @wangyikewxgm @barnettZQG @wonderflow @Somefive
|
||||
|
||||
# Owner of CUE
|
||||
pkg/cue @leejanee @FogDong @Somefive @anoop2811 @dhiguero
|
||||
pkg/stdlib @leejanee @FogDong @Somefive @anoop2811 @dhiguero
|
||||
pkg/cue @leejanee @FogDong @Somefive
|
||||
pkg/stdlib @leejanee @FogDong @Somefive
|
||||
|
||||
# Owner of Workflow
|
||||
pkg/workflow @leejanee @FogDong @Somefive @wangyikewxgm @chivalryq @anoop2811 @dhiguero
|
||||
pkg/workflow @leejanee @FogDong @Somefive @wangyikewxgm @chivalryq
|
||||
|
||||
# Owner of vela templates
|
||||
vela-templates/ @Somefive @barnettZQG @wonderflow @FogDong @wangyikewxgm @chivalryq @anoop2811 @dhiguero
|
||||
vela-templates/ @Somefive @barnettZQG @wonderflow @FogDong @wangyikewxgm @chivalryq
|
||||
|
||||
# Owner of vela CLI
|
||||
references/cli/ @Somefive @StevenLeiZhang @charlie0129 @wangyikewxgm @chivalryq @anoop2811 @dhiguero @FogDong
|
||||
references/cli/ @Somefive @zzxwill @StevenLeiZhang @charlie0129 @wangyikewxgm @chivalryq
|
||||
|
||||
# Owner of vela addon framework
|
||||
pkg/addon/ @wangyikewxgm @wonderflow @charlie0129 @anoop2811 @dhiguero @FogDong
|
||||
pkg/addon/ @wangyikewxgm @wonderflow @charlie0129
|
||||
|
||||
# Owner of resource keeper and tracker
|
||||
pkg/resourcekeeper @Somefive @FogDong @chivalryq @anoop2811 @dhiguero
|
||||
pkg/resourcetracker @Somefive @FogDong @chivalryq @anoop2811 @dhiguero
|
||||
pkg/resourcekeeper @Somefive @FogDong @chivalryq
|
||||
pkg/resourcetracker @Somefive @FogDong @chivalryq
|
||||
|
||||
.github/ @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm @anoop2811 @dhiguero
|
||||
makefiles @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm @anoop2811 @dhiguero
|
||||
go.* @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm @anoop2811 @dhiguero
|
||||
.github/ @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm
|
||||
makefiles @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm
|
||||
go.* @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm
|
||||
|
||||
|
||||
4
.github/workflows/chart.yml
vendored
4
.github/workflows/chart.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
with:
|
||||
version: v3.4.0
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
|
||||
with:
|
||||
node-version: '14'
|
||||
- name: Generate helm doc
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
chart_smever=${chart_version#"v"}
|
||||
sed -i "s/0.1.0/$chart_smever/g" $HELM_CHART/Chart.yaml
|
||||
|
||||
- uses: jnwng/github-app-installation-token-action@c54add4c02866dc41e106745ac6dcf5cdd6339e5 # v2
|
||||
- uses: jnwng/github-app-installation-token-action@v2
|
||||
id: get_app_token
|
||||
with:
|
||||
appId: 340472
|
||||
|
||||
2
.github/workflows/commit-lint.yml
vendored
2
.github/workflows/commit-lint.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
check:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: thehanimo/pr-title-checker@5652588c80c479af803eabfbdb5a3895a77c1388 # v1.4.1
|
||||
- uses: thehanimo/pr-title-checker@v1.4.1
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
pass_on_octokit_error: true
|
||||
|
||||
4
.github/workflows/core-api-test.yml
vendored
4
.github/workflows/core-api-test.yml
vendored
@@ -16,10 +16,10 @@ jobs:
|
||||
core-api-test:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Set up Go 1.22
|
||||
- name: Set up Go 1.19
|
||||
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
|
||||
env:
|
||||
GO_VERSION: '1.22'
|
||||
GO_VERSION: '1.19'
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
id: go
|
||||
|
||||
2
.github/workflows/definition-lint.yml
vendored
2
.github/workflows/definition-lint.yml
vendored
@@ -16,7 +16,7 @@ permissions:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.22'
|
||||
GO_VERSION: '1.19'
|
||||
|
||||
jobs:
|
||||
definition-doc:
|
||||
|
||||
10
.github/workflows/e2e-multicluster-test.yml
vendored
10
.github/workflows/e2e-multicluster-test.yml
vendored
@@ -18,7 +18,7 @@ permissions:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.22'
|
||||
GO_VERSION: '1.19'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
k8s-version: ["v1.29"]
|
||||
k8s-version: ["v1.26"]
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
|
||||
cancel-in-progress: true
|
||||
@@ -71,12 +71,12 @@ jobs:
|
||||
|
||||
- name: Setup KinD
|
||||
run: |
|
||||
go install sigs.k8s.io/kind@v0.24.0
|
||||
go install sigs.k8s.io/kind@v0.19.0
|
||||
kind delete cluster --name worker || true
|
||||
kind create cluster --name worker --image=kindest/node:v1.29.8
|
||||
kind create cluster --name worker --image=kindest/node:v1.26.4
|
||||
kind export kubeconfig --internal --name worker --kubeconfig /tmp/worker.kubeconfig
|
||||
kind delete cluster || true
|
||||
kind create cluster --image=kindest/node:v1.29.8
|
||||
kind create cluster --image=kindest/node:v1.26.4
|
||||
|
||||
- name: Load image
|
||||
run: |
|
||||
|
||||
11
.github/workflows/e2e-test.yml
vendored
11
.github/workflows/e2e-test.yml
vendored
@@ -18,7 +18,7 @@ permissions:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.22'
|
||||
GO_VERSION: '1.19'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
if: needs.detect-noop.outputs.noop != 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
k8s-version: ["v1.29"]
|
||||
k8s-version: ["v1.26"]
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
|
||||
cancel-in-progress: true
|
||||
@@ -71,13 +71,14 @@ jobs:
|
||||
|
||||
- name: Setup KinD
|
||||
run: |
|
||||
go install sigs.k8s.io/kind@v0.24.0
|
||||
go install sigs.k8s.io/kind@v0.19.0
|
||||
kind delete cluster || true
|
||||
kind create cluster --image=kindest/node:v1.29.8
|
||||
kind create cluster
|
||||
|
||||
- name: Get Ginkgo
|
||||
run: |
|
||||
go install github.com/onsi/ginkgo/v2/ginkgo@v2.14.0
|
||||
go install github.com/onsi/ginkgo/v2/ginkgo@v2.10.0
|
||||
go get github.com/onsi/gomega/...
|
||||
|
||||
- name: Load image
|
||||
run: |
|
||||
|
||||
12
.github/workflows/go.yml
vendored
12
.github/workflows/go.yml
vendored
@@ -16,8 +16,8 @@ permissions: # added using https://github.com/step-security/secure-workflows
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.22'
|
||||
GOLANGCI_VERSION: 'v1.54.2'
|
||||
GO_VERSION: '1.19'
|
||||
GOLANGCI_VERSION: 'v1.49'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
# version, but we prefer this action because it leaves 'annotations' (i.e.
|
||||
# it comments on PRs to point out linter violations).
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
|
||||
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
|
||||
with:
|
||||
version: ${{ env.GOLANGCI_VERSION }}
|
||||
|
||||
@@ -104,7 +104,7 @@ jobs:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
@@ -178,7 +178,7 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
|
||||
- name: Build Test for vela core
|
||||
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0
|
||||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
@@ -198,7 +198,7 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
|
||||
- name: Build Test for CLI
|
||||
uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0
|
||||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.cli
|
||||
|
||||
8
.github/workflows/issue-commands.yml
vendored
8
.github/workflows/issue-commands.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
path: ./actions
|
||||
ref: v0.4.2
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
|
||||
with:
|
||||
node-version: '14'
|
||||
cache: 'npm'
|
||||
@@ -48,14 +48,14 @@ jobs:
|
||||
id: command
|
||||
uses: xt0rted/slash-command-action@bf51f8f5f4ea3d58abc7eca58f77104182b23e88
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
repo-token: ${{ secrets.VELA_BOT_TOKEN }}
|
||||
command: backport
|
||||
reaction: "true"
|
||||
reaction-type: "eyes"
|
||||
allow-edits: "false"
|
||||
permission-level: read
|
||||
- name: Handle Command
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
|
||||
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
|
||||
env:
|
||||
VERSION: ${{ steps.command.outputs.command-arguments }}
|
||||
with:
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Retest the current pull request
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
|
||||
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
|
||||
env:
|
||||
PULL_REQUEST_ID: ${{ github.event.issue.number }}
|
||||
COMMENT_ID: ${{ github.event.comment.id }}
|
||||
|
||||
2
.github/workflows/license.yml
vendored
2
.github/workflows/license.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.6
|
||||
- name: Install dependencies
|
||||
|
||||
4
.github/workflows/registry.yml
vendored
4
.github/workflows/registry.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
with:
|
||||
driver-opts: image=moby/buildkit:master
|
||||
|
||||
- uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0
|
||||
- uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
|
||||
name: Build & Pushing vela-core for Dockerhub, GHCR
|
||||
with:
|
||||
context: .
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
docker.io/oamdev/vela-core:${{ steps.get_version.outputs.VERSION }}
|
||||
ghcr.io/${{ github.repository_owner }}/oamdev/vela-core:${{ steps.get_version.outputs.VERSION }}
|
||||
|
||||
- uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0
|
||||
- uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
|
||||
name: Build & Pushing CLI for Dockerhub, GHCR
|
||||
with:
|
||||
context: .
|
||||
|
||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
|
||||
with:
|
||||
go-version: 1.22
|
||||
go-version: 1.19
|
||||
cache: true
|
||||
- uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
|
||||
with:
|
||||
|
||||
9
.github/workflows/sdk-test.yml
vendored
9
.github/workflows/sdk-test.yml
vendored
@@ -18,8 +18,8 @@ permissions:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.22'
|
||||
GOLANGCI_VERSION: 'v1.54.2'
|
||||
GO_VERSION: '1.19'
|
||||
GOLANGCI_VERSION: 'v1.49'
|
||||
|
||||
jobs:
|
||||
sdk-tests:
|
||||
@@ -38,11 +38,6 @@ jobs:
|
||||
make goimports
|
||||
make golangci
|
||||
|
||||
- name: Setup KinD
|
||||
run: |
|
||||
go install sigs.k8s.io/kind@v0.19.0
|
||||
kind create cluster
|
||||
|
||||
- name: Build CLI
|
||||
run: make vela-cli
|
||||
|
||||
|
||||
2
.github/workflows/sync-api.yml
vendored
2
.github/workflows/sync-api.yml
vendored
@@ -11,7 +11,7 @@ permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
GO_VERSION: '1.22'
|
||||
GO_VERSION: '1.19'
|
||||
|
||||
jobs:
|
||||
sync-core-api:
|
||||
|
||||
2
.github/workflows/sync-sdk.yaml
vendored
2
.github/workflows/sync-sdk.yaml
vendored
@@ -15,7 +15,7 @@ permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
GO_VERSION: '1.22'
|
||||
GO_VERSION: '1.19'
|
||||
|
||||
jobs:
|
||||
sync_sdk:
|
||||
|
||||
4
.github/workflows/trivy-scan.yml
vendored
4
.github/workflows/trivy-scan.yml
vendored
@@ -20,14 +20,14 @@ jobs:
|
||||
docker build --build-arg GOPROXY=https://proxy.golang.org -t docker.io/oamdev/vela-core:${{ github.sha }} .
|
||||
|
||||
- name: Run Trivy vulnerability scanner for vela core
|
||||
uses: aquasecurity/trivy-action@d9cd5b1c23aaf8cb31bb09141028215828364bbb # master
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/oamdev/vela-core:${{ github.sha }}'
|
||||
format: 'sarif'
|
||||
output: 'trivy-results.sarif'
|
||||
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
uses: github/codeql-action/upload-sarif@366883a76d75dcee5428da5c3ae7abf9386e35ac # v2.26.2
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
if: always()
|
||||
with:
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
9
.github/workflows/unit-test.yml
vendored
9
.github/workflows/unit-test.yml
vendored
@@ -16,7 +16,7 @@ permissions:
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.22'
|
||||
GO_VERSION: '1.19'
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -70,6 +70,13 @@ jobs:
|
||||
go install sigs.k8s.io/kind@v0.19.0
|
||||
kind create cluster
|
||||
|
||||
- name: install Kubebuilder
|
||||
uses: RyanSiu1995/kubebuilder-action@7170cb0476187070ae04cbb6cee305e809de2693
|
||||
with:
|
||||
version: 3.9.1
|
||||
kubebuilderOnly: false
|
||||
kubernetesVersion: v1.26.2
|
||||
|
||||
- name: Run Make test
|
||||
run: make test
|
||||
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -41,7 +41,6 @@ _tmp/
|
||||
|
||||
references/cmd/cli/fake/source.go
|
||||
references/cmd/cli/fake/chart_source.go
|
||||
references/vela-sdk-gen/*
|
||||
charts/vela-core/crds/_.yaml
|
||||
.test_vela
|
||||
tmp/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
ARG BASE_IMAGE
|
||||
# Build the manager binary
|
||||
FROM golang:1.22-alpine3.18 as builder
|
||||
FROM golang:1.19-alpine3.18 as builder
|
||||
|
||||
WORKDIR /workspace
|
||||
# Copy the Go Modules manifests
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
ARG BASE_IMAGE
|
||||
# Build the cli binary
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22-alpine@sha256:d1a601b64de09e2fa38c95e55838961811d5ca11062a8f4230a5c434b3ae2a34 as builder
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:2381c1e5f8350a901597d633b2e517775eeac7a6682be39225a93b22cfd0f8bb as builder
|
||||
ARG GOPROXY
|
||||
ENV GOPROXY=${GOPROXY:-https://proxy.golang.org}
|
||||
WORKDIR /workspace
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
ARG BASE_IMAGE
|
||||
# Build the manager binary
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22-alpine@sha256:d1a601b64de09e2fa38c95e55838961811d5ca11062a8f4230a5c434b3ae2a34 as builder
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:2381c1e5f8350a901597d633b2e517775eeac7a6682be39225a93b22cfd0f8bb as builder
|
||||
|
||||
WORKDIR /workspace
|
||||
# Copy the Go Modules manifests
|
||||
|
||||
12
Makefile
12
Makefile
@@ -12,7 +12,7 @@ all: build
|
||||
# Targets
|
||||
|
||||
## test: Run tests
|
||||
test: envtest unit-test-core test-cli-gen
|
||||
test: unit-test-core test-cli-gen
|
||||
@$(OK) unit-tests pass
|
||||
|
||||
## test-cli-gen: Run the unit tests for cli gen
|
||||
@@ -22,8 +22,8 @@ test-cli-gen:
|
||||
|
||||
## unit-test-core: Run the unit tests for core
|
||||
unit-test-core:
|
||||
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test -coverprofile=coverage.txt $(shell go list ./pkg/... ./cmd/... ./apis/... | grep -v apiserver | grep -v applicationconfiguration)
|
||||
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test $(shell go list ./references/... | grep -v apiserver)
|
||||
go test -coverprofile=coverage.txt $(shell go list ./pkg/... ./cmd/... ./apis/... | grep -v apiserver | grep -v applicationconfiguration)
|
||||
go test $(shell go list ./references/... | grep -v apiserver)
|
||||
|
||||
## build: Build vela cli binary
|
||||
build: vela-cli kubectl-vela
|
||||
@@ -41,8 +41,9 @@ fmt: goimports installcue
|
||||
$(CUE) fmt ./vela-templates/definitions/internal/*
|
||||
$(CUE) fmt ./vela-templates/definitions/deprecated/*
|
||||
$(CUE) fmt ./vela-templates/definitions/registry/*
|
||||
$(CUE) fmt ./pkg/workflow/template/static/*
|
||||
$(CUE) fmt ./pkg/workflow/providers/...
|
||||
$(CUE) fmt ./pkg/stdlib/pkgs/*
|
||||
$(CUE) fmt ./pkg/stdlib/op.cue
|
||||
$(CUE) fmt ./pkg/workflow/tasks/template/static/*
|
||||
|
||||
## sdk_fmt: Run go fmt against code
|
||||
sdk_fmt:
|
||||
@@ -107,6 +108,7 @@ manifests: installcue kustomize
|
||||
go generate $(foreach t,pkg apis,./$(t)/...)
|
||||
# TODO(yangsoon): kustomize will merge all CRD into a whole file, it may not work if we want patch more than one CRD in this way
|
||||
$(KUSTOMIZE) build config/crd -o config/crd/base/core.oam.dev_applications.yaml
|
||||
./hack/crd/cleanup.sh
|
||||
go run ./hack/crd/dispatch/dispatch.go config/crd/base charts/vela-core/crds
|
||||
rm -f config/crd/base/*
|
||||
./vela-templates/gen_definitions.sh
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2023 The KubeVela Authors.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2023 The KubeVela Authors.
|
||||
|
||||
@@ -18,7 +18,7 @@ package v1alpha1
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/utils/ptr"
|
||||
"k8s.io/utils/pointer"
|
||||
stringslices "k8s.io/utils/strings/slices"
|
||||
|
||||
"github.com/oam-dev/kubevela/pkg/oam"
|
||||
@@ -52,7 +52,7 @@ func (in *ResourcePolicyRuleSelector) Match(manifest *unstructured.Unstructured)
|
||||
if len(src) == 0 {
|
||||
return nil
|
||||
}
|
||||
return ptr.To(val != "" && stringslices.Contains(src, val))
|
||||
return pointer.Bool(val != "" && stringslices.Contains(src, val))
|
||||
}
|
||||
conditions := []*bool{
|
||||
match(in.CompNames, compName),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2023 The KubeVela Authors.
|
||||
|
||||
@@ -31,7 +31,7 @@ import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/utils/ptr"
|
||||
"k8s.io/utils/pointer"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
|
||||
"github.com/oam-dev/kubevela/pkg/oam"
|
||||
@@ -133,7 +133,7 @@ func TestManagedResourceKeys(t *testing.T) {
|
||||
r.Equal("cluster/component", input.ComponentKey())
|
||||
r.Equal("Deployment name (Cluster: cluster, Namespace: namespace)", input.DisplayName())
|
||||
var deploy1, deploy2 appsv1.Deployment
|
||||
deploy1.Spec.Replicas = ptr.To(int32(5))
|
||||
deploy1.Spec.Replicas = pointer.Int32(5)
|
||||
bs, err := json.Marshal(deploy1)
|
||||
r.NoError(err)
|
||||
r.ErrorIs(input.UnmarshalTo(&deploy2), errors.ManagedResourceHasNoDataError{})
|
||||
@@ -168,7 +168,7 @@ func TestResourceTracker_ManagedResource(t *testing.T) {
|
||||
pod3 := corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod3"}}
|
||||
input.AddManagedResource(&pod3, false, false, "")
|
||||
r.Equal(3, len(input.Spec.ManagedResources))
|
||||
deploy1.Spec.Replicas = ptr.To(int32(5))
|
||||
deploy1.Spec.Replicas = pointer.Int32(5)
|
||||
input.AddManagedResource(&deploy1, false, false, "")
|
||||
r.Equal(3, len(input.Spec.ManagedResources))
|
||||
input.DeleteManagedResource(&cm2, false)
|
||||
@@ -203,7 +203,7 @@ func TestResourceTrackerCompression(t *testing.T) {
|
||||
"../../../charts/vela-core/crds/core.oam.dev_componentdefinitions.yaml",
|
||||
"../../../charts/vela-core/templates/kubevela-controller.yaml",
|
||||
"../../../charts/vela-core/README.md",
|
||||
"../../../pkg/workflow/providers/legacy/query/testdata/machinelearning.seldon.io_seldondeployments.yaml",
|
||||
"../../../pkg/velaql/providers/query/testdata/machinelearning.seldon.io_seldondeployments.yaml",
|
||||
}
|
||||
for _, p := range paths {
|
||||
b, err := os.ReadFile(p)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2023 The KubeVela Authors.
|
||||
@@ -146,8 +147,7 @@ func (in *ApplicationRevisionCompressibleFields) DeepCopyInto(out *ApplicationRe
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
inVal := (*in)[key]
|
||||
in, out := &inVal, &outVal
|
||||
in, out := &val, &outVal
|
||||
*out = new(ComponentDefinition)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
@@ -169,8 +169,7 @@ func (in *ApplicationRevisionCompressibleFields) DeepCopyInto(out *ApplicationRe
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
inVal := (*in)[key]
|
||||
in, out := &inVal, &outVal
|
||||
in, out := &val, &outVal
|
||||
*out = new(TraitDefinition)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
@@ -192,8 +191,7 @@ func (in *ApplicationRevisionCompressibleFields) DeepCopyInto(out *ApplicationRe
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
inVal := (*in)[key]
|
||||
in, out := &inVal, &outVal
|
||||
in, out := &val, &outVal
|
||||
*out = new(WorkflowStepDefinition)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
|
||||
@@ -48,14 +48,12 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
|
||||
|
||||
### KubeVela workflow parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------------------- | ------------------------------------------------------- | ------- |
|
||||
| `workflow.enableSuspendOnFailure` | Enable suspend on workflow failure | `false` |
|
||||
| `workflow.enableExternalPackageForDefaultCompiler` | Enable external package for default cuex compiler | `true` |
|
||||
| `workflow.enableExternalPackageWatchForDefaultCompiler` | Enable external package watch for default cuex compiler | `false` |
|
||||
| `workflow.backoff.maxTime.waitState` | The max backoff time of workflow in a wait condition | `60` |
|
||||
| `workflow.backoff.maxTime.failedState` | The max backoff time of workflow in a failed condition | `300` |
|
||||
| `workflow.step.errorRetryTimes` | The max retry times of a failed workflow step | `10` |
|
||||
| Name | Description | Value |
|
||||
| -------------------------------------- | ------------------------------------------------------ | ------- |
|
||||
| `workflow.enableSuspendOnFailure` | Enable suspend on workflow failure | `false` |
|
||||
| `workflow.backoff.maxTime.waitState` | The max backoff time of workflow in a wait condition | `60` |
|
||||
| `workflow.backoff.maxTime.failedState` | The max backoff time of workflow in a failed condition | `300` |
|
||||
| `workflow.step.errorRetryTimes` | The max retry times of a failed workflow step | `10` |
|
||||
|
||||
### KubeVela controller parameters
|
||||
|
||||
@@ -98,7 +96,6 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
|
||||
| `featureGates.informerCacheFilterUnnecessaryFields` | filter unnecessary fields for informer cache | `true` |
|
||||
| `featureGates.sharedDefinitionStorageForApplicationRevision` | use definition cache to reduce duplicated definition storage for application revision, must be used with InformerCacheFilterUnnecessaryFields | `true` |
|
||||
| `featureGates.disableWorkflowContextConfigMapCache` | disable the workflow context's configmap informer cache | `true` |
|
||||
| `featureGates.enableCueValidation` | enable the strict cue validation for cue required parameter fields | `false` |
|
||||
|
||||
### MultiCluster parameters
|
||||
|
||||
|
||||
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.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.11.4
|
||||
name: applications.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -44,19 +44,14 @@ spec:
|
||||
description: Application is the Schema for the applications API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
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
|
||||
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
|
||||
@@ -109,9 +104,10 @@ spec:
|
||||
scopes:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
scopes in ApplicationComponent defines the component-level scopes
|
||||
the format is <scope-type:scope-instance-name> pairs, the key represents type of `ScopeDefinition` while the value represent the name of scope instance.
|
||||
description: scopes in ApplicationComponent defines the component-level
|
||||
scopes the format is <scope-type:scope-instance-name> pairs,
|
||||
the key represents type of `ScopeDefinition` while the value
|
||||
represent the name of scope instance.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
traits:
|
||||
@@ -137,10 +133,10 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
policies:
|
||||
description: |-
|
||||
Policies defines the global policies for all components in the app, e.g. security, metrics, gitops,
|
||||
multi-cluster placement rules, etc.
|
||||
Policies are applied after components are rendered and before workflow steps are executed.
|
||||
description: Policies defines the global policies for all components
|
||||
in the app, e.g. security, metrics, gitops, multi-cluster placement
|
||||
rules, etc. Policies are applied after components are rendered and
|
||||
before workflow steps are executed.
|
||||
items:
|
||||
description: AppPolicy defines a global policy for all components
|
||||
in the app.
|
||||
@@ -159,12 +155,11 @@ spec:
|
||||
type: object
|
||||
type: array
|
||||
workflow:
|
||||
description: |-
|
||||
Workflow defines how to customize the control logic.
|
||||
If workflow is specified, Vela won't apply any resource, but provide rendered output in AppRevision.
|
||||
Workflow steps are executed in array order, and each step:
|
||||
- will have a context in annotation.
|
||||
- should mark "finish" phase in status.conditions.
|
||||
description: 'Workflow defines how to customize the control logic.
|
||||
If workflow is specified, Vela won''t apply any resource, but provide
|
||||
rendered output in AppRevision. Workflow steps are executed in array
|
||||
order, and each step: - will have a context in annotation. - should
|
||||
mark "finish" phase in status.conditions.'
|
||||
properties:
|
||||
mode:
|
||||
description: WorkflowExecuteMode defines the mode of workflow
|
||||
@@ -337,40 +332,33 @@ spec:
|
||||
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.
|
||||
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
|
||||
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
|
||||
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/
|
||||
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
|
||||
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
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
@@ -379,63 +367,63 @@ spec:
|
||||
description: Components record the related Components created by Application
|
||||
Controller
|
||||
items:
|
||||
description: |-
|
||||
ObjectReference contains enough information to let you inspect or modify the referred object.
|
||||
---
|
||||
New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
|
||||
1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
|
||||
2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
|
||||
restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
|
||||
Those cannot be well described when embedded.
|
||||
3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
|
||||
4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
|
||||
during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
|
||||
and the version of the actual struct is irrelevant.
|
||||
5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
|
||||
will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
|
||||
|
||||
|
||||
Instead of using this type, create a locally provided and used type that is well-focused on your reference.
|
||||
For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
|
||||
description: "ObjectReference contains enough information to let
|
||||
you inspect or modify the referred object. --- New uses of this
|
||||
type are discouraged because of difficulty describing its usage
|
||||
when embedded in APIs. 1. Ignored fields. It includes many fields
|
||||
which are not generally honored. For instance, ResourceVersion
|
||||
and FieldPath are both very rarely valid in actual usage. 2. Invalid
|
||||
usage help. It is impossible to add specific help for individual
|
||||
usage. In most embedded usages, there are particular restrictions
|
||||
like, \"must refer only to types A and B\" or \"UID not honored\"
|
||||
or \"name must be restricted\". Those cannot be well described
|
||||
when embedded. 3. Inconsistent validation. Because the usages
|
||||
are different, the validation rules are different by usage, which
|
||||
makes it hard for users to predict what will happen. 4. The fields
|
||||
are both imprecise and overly precise. Kind is not a precise
|
||||
mapping to a URL. This can produce ambiguity during interpretation
|
||||
and require a REST mapping. In most cases, the dependency is
|
||||
on the group,resource tuple and the version of the actual struct
|
||||
is irrelevant. 5. We cannot easily change it. Because this type
|
||||
is embedded in many locations, updates to this type will affect
|
||||
numerous schemas. Don't make new APIs embed an underspecified
|
||||
API type they do not control. \n Instead of using this type, create
|
||||
a locally provided and used type that is well-focused on your
|
||||
reference. For example, ServiceReferences for admission registration:
|
||||
https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: |-
|
||||
If referring to a piece of an object instead of an entire object, this string
|
||||
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within a pod, this would take on a value like:
|
||||
"spec.containers{name}" (where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only to have some well-defined way of
|
||||
referencing a part of an object.
|
||||
TODO: this design is not final and this field is subject to change in the future.
|
||||
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
|
||||
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
|
||||
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/
|
||||
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
|
||||
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
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
@@ -446,15 +434,13 @@ spec:
|
||||
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.
|
||||
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.
|
||||
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
|
||||
@@ -465,9 +451,8 @@ spec:
|
||||
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.
|
||||
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
|
||||
@@ -497,13 +482,10 @@ spec:
|
||||
format: int64
|
||||
type: integer
|
||||
policy:
|
||||
description: |-
|
||||
PolicyStatus records the status of policy
|
||||
Deprecated This field is only used by EnvBinding Policy which is deprecated.
|
||||
description: PolicyStatus records the status of policy Deprecated
|
||||
This field is only used by EnvBinding Policy which is deprecated.
|
||||
items:
|
||||
description: |-
|
||||
PolicyStatus records the status of policy
|
||||
Deprecated
|
||||
description: PolicyStatus records the status of policy Deprecated
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
@@ -537,63 +519,66 @@ spec:
|
||||
type: string
|
||||
scopes:
|
||||
items:
|
||||
description: |-
|
||||
ObjectReference contains enough information to let you inspect or modify the referred object.
|
||||
---
|
||||
New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
|
||||
1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
|
||||
2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
|
||||
restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
|
||||
Those cannot be well described when embedded.
|
||||
3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
|
||||
4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
|
||||
during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
|
||||
and the version of the actual struct is irrelevant.
|
||||
5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
|
||||
will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
|
||||
|
||||
|
||||
Instead of using this type, create a locally provided and used type that is well-focused on your reference.
|
||||
For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
|
||||
description: "ObjectReference contains enough information
|
||||
to let you inspect or modify the referred object. --- New
|
||||
uses of this type are discouraged because of difficulty
|
||||
describing its usage when embedded in APIs. 1. Ignored fields.
|
||||
\ It includes many fields which are not generally honored.
|
||||
\ For instance, ResourceVersion and FieldPath are both very
|
||||
rarely valid in actual usage. 2. Invalid usage help. It
|
||||
is impossible to add specific help for individual usage.
|
||||
\ In most embedded usages, there are particular restrictions
|
||||
like, \"must refer only to types A and B\" or \"UID not
|
||||
honored\" or \"name must be restricted\". Those cannot be
|
||||
well described when embedded. 3. Inconsistent validation.
|
||||
\ Because the usages are different, the validation rules
|
||||
are different by usage, which makes it hard for users to
|
||||
predict what will happen. 4. The fields are both imprecise
|
||||
and overly precise. Kind is not a precise mapping to a
|
||||
URL. This can produce ambiguity during interpretation and
|
||||
require a REST mapping. In most cases, the dependency is
|
||||
on the group,resource tuple and the version of the actual
|
||||
struct is irrelevant. 5. We cannot easily change it. Because
|
||||
this type is embedded in many locations, updates to this
|
||||
type will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control. \n
|
||||
Instead of using this type, create a locally provided and
|
||||
used type that is well-focused on your reference. For example,
|
||||
ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: |-
|
||||
If referring to a piece of an object instead of an entire object, this string
|
||||
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within a pod, this would take on a value like:
|
||||
"spec.containers{name}" (where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only to have some well-defined way of
|
||||
referencing a part of an object.
|
||||
TODO: this design is not final and this field is subject to change in the future.
|
||||
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
|
||||
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
|
||||
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/
|
||||
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
|
||||
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
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
@@ -641,63 +626,63 @@ spec:
|
||||
appRevision:
|
||||
type: string
|
||||
contextBackend:
|
||||
description: |-
|
||||
ObjectReference contains enough information to let you inspect or modify the referred object.
|
||||
---
|
||||
New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
|
||||
1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
|
||||
2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
|
||||
restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
|
||||
Those cannot be well described when embedded.
|
||||
3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
|
||||
4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
|
||||
during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
|
||||
and the version of the actual struct is irrelevant.
|
||||
5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
|
||||
will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
|
||||
|
||||
|
||||
Instead of using this type, create a locally provided and used type that is well-focused on your reference.
|
||||
For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
|
||||
description: "ObjectReference contains enough information to let
|
||||
you inspect or modify the referred object. --- New uses of this
|
||||
type are discouraged because of difficulty describing its usage
|
||||
when embedded in APIs. 1. Ignored fields. It includes many
|
||||
fields which are not generally honored. For instance, ResourceVersion
|
||||
and FieldPath are both very rarely valid in actual usage. 2.
|
||||
Invalid usage help. It is impossible to add specific help for
|
||||
individual usage. In most embedded usages, there are particular
|
||||
restrictions like, \"must refer only to types A and B\" or \"UID
|
||||
not honored\" or \"name must be restricted\". Those cannot be
|
||||
well described when embedded. 3. Inconsistent validation. Because
|
||||
the usages are different, the validation rules are different
|
||||
by usage, which makes it hard for users to predict what will
|
||||
happen. 4. The fields are both imprecise and overly precise.
|
||||
\ Kind is not a precise mapping to a URL. This can produce ambiguity
|
||||
during interpretation and require a REST mapping. In most cases,
|
||||
the dependency is on the group,resource tuple and the version
|
||||
of the actual struct is irrelevant. 5. We cannot easily change
|
||||
it. Because this type is embedded in many locations, updates
|
||||
to this type will affect numerous schemas. Don't make new APIs
|
||||
embed an underspecified API type they do not control. \n Instead
|
||||
of using this type, create a locally provided and used type
|
||||
that is well-focused on your reference. For example, ServiceReferences
|
||||
for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
|
||||
."
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: |-
|
||||
If referring to a piece of an object instead of an entire object, this string
|
||||
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within a pod, this would take on a value like:
|
||||
"spec.containers{name}" (where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]" (container with
|
||||
index 2 in this pod). This syntax is chosen only to have some well-defined way of
|
||||
referencing a part of an object.
|
||||
TODO: this design is not final and this field is subject to change in the future.
|
||||
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
|
||||
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
|
||||
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/
|
||||
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
|
||||
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
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.11.4
|
||||
name: componentdefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -32,19 +32,14 @@ spec:
|
||||
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
|
||||
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
|
||||
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
|
||||
@@ -81,14 +76,14 @@ spec:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
podSpecPath:
|
||||
description: |-
|
||||
PodSpecPath indicates where/if this workload has K8s podSpec field
|
||||
if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields.
|
||||
description: PodSpecPath indicates where/if this workload has K8s
|
||||
podSpec field if one workload has podSpec, trait can do lot's of
|
||||
assumption such as port, env, volume fields.
|
||||
type: string
|
||||
revisionLabel:
|
||||
description: |-
|
||||
RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload
|
||||
can be used by trait to create resource selectors(e.g. label selector for pods).
|
||||
description: RevisionLabel indicates which label for underlying resources(e.g.
|
||||
pods) of this workload can be used by trait to create resource selectors(e.g.
|
||||
label selector for pods).
|
||||
type: string
|
||||
schematic:
|
||||
description: Schematic defines the data format and template of the
|
||||
@@ -98,9 +93,10 @@ spec:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: |-
|
||||
Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field.
|
||||
Template is a required field if CUE is defined in Capability Definition.
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
@@ -163,11 +159,11 @@ spec:
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: |-
|
||||
WriteConnectionSecretToReference specifies the namespace and name of a
|
||||
Secret to which any connection details for this managed resource should
|
||||
be written. Connection details frequently include the endpoint, username,
|
||||
and password required to connect to the managed resource.
|
||||
description: WriteConnectionSecretToReference specifies the
|
||||
namespace and name of a Secret to which any connection details
|
||||
for this managed resource should be written. Connection
|
||||
details frequently include the endpoint, username, and password
|
||||
required to connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
@@ -226,15 +222,13 @@ spec:
|
||||
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.
|
||||
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.
|
||||
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
|
||||
@@ -245,9 +239,8 @@ spec:
|
||||
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.
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.11.4
|
||||
name: definitionrevisions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -34,19 +34,14 @@ spec:
|
||||
description: DefinitionRevision is the Schema for the DefinitionRevision API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
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
|
||||
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
|
||||
@@ -58,19 +53,16 @@ spec:
|
||||
ComponentDefinition
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
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
|
||||
description: 'Kind is a string value representing the REST resource
|
||||
this object represents. Servers may infer this from the endpoint
|
||||
the client submits requests to. Cannot be updated. In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
properties:
|
||||
@@ -125,14 +117,14 @@ spec:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
podSpecPath:
|
||||
description: |-
|
||||
PodSpecPath indicates where/if this workload has K8s podSpec field
|
||||
if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields.
|
||||
description: PodSpecPath indicates where/if this workload
|
||||
has K8s podSpec field if one workload has podSpec, trait
|
||||
can do lot's of assumption such as port, env, volume fields.
|
||||
type: string
|
||||
revisionLabel:
|
||||
description: |-
|
||||
RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload
|
||||
can be used by trait to create resource selectors(e.g. label selector for pods).
|
||||
description: RevisionLabel indicates which label for underlying
|
||||
resources(e.g. pods) of this workload can be used by trait
|
||||
to create resource selectors(e.g. label selector for pods).
|
||||
type: string
|
||||
schematic:
|
||||
description: Schematic defines the data format and template
|
||||
@@ -142,9 +134,10 @@ spec:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: |-
|
||||
Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field.
|
||||
Template is a required field if CUE is defined in Capability Definition.
|
||||
description: Template defines the abstraction template
|
||||
data of the capability, it will replace the old
|
||||
CUE template in extension field. Template is a required
|
||||
field if CUE is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
@@ -209,11 +202,12 @@ spec:
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: |-
|
||||
WriteConnectionSecretToReference specifies the namespace and name of a
|
||||
Secret to which any connection details for this managed resource should
|
||||
be written. Connection details frequently include the endpoint, username,
|
||||
and password required to connect to the managed resource.
|
||||
description: WriteConnectionSecretToReference specifies
|
||||
the namespace and name of a Secret to which any
|
||||
connection details for this managed resource should
|
||||
be written. Connection details frequently include
|
||||
the endpoint, username, and password required to
|
||||
connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
@@ -272,15 +266,14 @@ spec:
|
||||
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.
|
||||
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.
|
||||
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
|
||||
@@ -291,9 +284,9 @@ spec:
|
||||
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.
|
||||
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
|
||||
@@ -337,19 +330,16 @@ spec:
|
||||
PolicyDefinition
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
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
|
||||
description: 'Kind is a string value representing the REST resource
|
||||
this object represents. Servers may infer this from the endpoint
|
||||
the client submits requests to. Cannot be updated. In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
properties:
|
||||
@@ -382,30 +372,31 @@ spec:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: |-
|
||||
Version indicate which version should be used if CRD has multiple versions
|
||||
by default it will use the first one if not specified
|
||||
description: Version indicate which version should be
|
||||
used if CRD has multiple versions by default it will
|
||||
use the first one if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
manageHealthCheck:
|
||||
description: |-
|
||||
ManageHealthCheck means the policy will handle health checking and skip application controller
|
||||
built-in health checking.
|
||||
description: ManageHealthCheck means the policy will handle
|
||||
health checking and skip application controller built-in
|
||||
health checking.
|
||||
type: boolean
|
||||
schematic:
|
||||
description: |-
|
||||
Schematic defines the data format and template of the encapsulation of the policy definition.
|
||||
Only CUE schematic is supported for now.
|
||||
description: Schematic defines the data format and template
|
||||
of the encapsulation of the policy definition. Only CUE
|
||||
schematic is supported for now.
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: |-
|
||||
Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field.
|
||||
Template is a required field if CUE is defined in Capability Definition.
|
||||
description: Template defines the abstraction template
|
||||
data of the capability, it will replace the old
|
||||
CUE template in extension field. Template is a required
|
||||
field if CUE is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
@@ -470,11 +461,12 @@ spec:
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: |-
|
||||
WriteConnectionSecretToReference specifies the namespace and name of a
|
||||
Secret to which any connection details for this managed resource should
|
||||
be written. Connection details frequently include the endpoint, username,
|
||||
and password required to connect to the managed resource.
|
||||
description: WriteConnectionSecretToReference specifies
|
||||
the namespace and name of a Secret to which any
|
||||
connection details for this managed resource should
|
||||
be written. Connection details frequently include
|
||||
the endpoint, username, and password required to
|
||||
connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
@@ -499,15 +491,14 @@ spec:
|
||||
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.
|
||||
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.
|
||||
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
|
||||
@@ -518,9 +509,9 @@ spec:
|
||||
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.
|
||||
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
|
||||
@@ -564,19 +555,16 @@ spec:
|
||||
TraitDefinition
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
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
|
||||
description: 'Kind is a string value representing the REST resource
|
||||
this object represents. Servers may infer this from the endpoint
|
||||
the client submits requests to. Cannot be updated. In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
properties:
|
||||
@@ -602,25 +590,21 @@ spec:
|
||||
a TraitDefinition.
|
||||
properties:
|
||||
appliesToWorkloads:
|
||||
description: |-
|
||||
AppliesToWorkloads specifies the list of workload kinds this trait
|
||||
applies to. Workload kinds are specified in resource.group/version format,
|
||||
e.g. server.core.oam.dev/v1alpha2. Traits that omit this field apply to
|
||||
all workload kinds.
|
||||
description: AppliesToWorkloads specifies the list of workload
|
||||
kinds this trait applies to. Workload kinds are specified
|
||||
in resource.group/version format, e.g. server.core.oam.dev/v1alpha2.
|
||||
Traits that omit this field apply to all workload kinds.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
conflictsWith:
|
||||
description: |-
|
||||
ConflictsWith specifies the list of traits(CRD name, Definition name, CRD group)
|
||||
which could not apply to the same workloads with this trait.
|
||||
Traits that omit this field can work with any other traits.
|
||||
Example rules:
|
||||
"service" # Trait definition name
|
||||
"services.k8s.io" # API resource/crd name
|
||||
"*.networking.k8s.io" # API group
|
||||
"labelSelector:foo=bar" # label selector
|
||||
labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse
|
||||
description: 'ConflictsWith specifies the list of traits(CRD
|
||||
name, Definition name, CRD group) which could not apply
|
||||
to the same workloads with this trait. Traits that omit
|
||||
this field can work with any other traits. Example rules:
|
||||
"service" # Trait definition name "services.k8s.io" # API
|
||||
resource/crd name "*.networking.k8s.io" # API group "labelSelector:foo=bar"
|
||||
# label selector labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
@@ -636,9 +620,9 @@ spec:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: |-
|
||||
Version indicate which version should be used if CRD has multiple versions
|
||||
by default it will use the first one if not specified
|
||||
description: Version indicate which version should be
|
||||
used if CRD has multiple versions by default it will
|
||||
use the first one if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
@@ -661,17 +645,18 @@ spec:
|
||||
component revision
|
||||
type: boolean
|
||||
schematic:
|
||||
description: |-
|
||||
Schematic defines the data format and template of the encapsulation of the trait.
|
||||
Only CUE and Kube schematic are supported for now.
|
||||
description: Schematic defines the data format and template
|
||||
of the encapsulation of the trait. Only CUE and Kube schematic
|
||||
are supported for now.
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: |-
|
||||
Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field.
|
||||
Template is a required field if CUE is defined in Capability Definition.
|
||||
description: Template defines the abstraction template
|
||||
data of the capability, it will replace the old
|
||||
CUE template in extension field. Template is a required
|
||||
field if CUE is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
@@ -736,11 +721,12 @@ spec:
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: |-
|
||||
WriteConnectionSecretToReference specifies the namespace and name of a
|
||||
Secret to which any connection details for this managed resource should
|
||||
be written. Connection details frequently include the endpoint, username,
|
||||
and password required to connect to the managed resource.
|
||||
description: WriteConnectionSecretToReference specifies
|
||||
the namespace and name of a Secret to which any
|
||||
connection details for this managed resource should
|
||||
be written. Connection details frequently include
|
||||
the endpoint, username, and password required to
|
||||
connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
@@ -756,10 +742,10 @@ spec:
|
||||
type: object
|
||||
type: object
|
||||
stage:
|
||||
description: |-
|
||||
Stage defines the stage information to which this trait resource processing belongs.
|
||||
Currently, PreDispatch and PostDispatch are provided, which are used to control resource
|
||||
pre-process and post-process respectively.
|
||||
description: Stage defines the stage information to which
|
||||
this trait resource processing belongs. Currently, PreDispatch
|
||||
and PostDispatch are provided, which are used to control
|
||||
resource pre-process and post-process respectively.
|
||||
type: string
|
||||
status:
|
||||
description: Status defines the custom health policy and status
|
||||
@@ -788,15 +774,14 @@ spec:
|
||||
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.
|
||||
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.
|
||||
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
|
||||
@@ -807,9 +792,9 @@ spec:
|
||||
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.
|
||||
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
|
||||
@@ -845,19 +830,16 @@ spec:
|
||||
WorkflowStepDefinition
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
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
|
||||
description: 'Kind is a string value representing the REST resource
|
||||
this object represents. Servers may infer this from the endpoint
|
||||
the client submits requests to. Cannot be updated. In CamelCase.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
properties:
|
||||
@@ -890,25 +872,26 @@ spec:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: |-
|
||||
Version indicate which version should be used if CRD has multiple versions
|
||||
by default it will use the first one if not specified
|
||||
description: Version indicate which version should be
|
||||
used if CRD has multiple versions by default it will
|
||||
use the first one if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
schematic:
|
||||
description: |-
|
||||
Schematic defines the data format and template of the encapsulation of the workflow step definition.
|
||||
Only CUE schematic is supported for now.
|
||||
description: Schematic defines the data format and template
|
||||
of the encapsulation of the workflow step definition. Only
|
||||
CUE schematic is supported for now.
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: |-
|
||||
Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field.
|
||||
Template is a required field if CUE is defined in Capability Definition.
|
||||
description: Template defines the abstraction template
|
||||
data of the capability, it will replace the old
|
||||
CUE template in extension field. Template is a required
|
||||
field if CUE is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
@@ -973,11 +956,12 @@ spec:
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: |-
|
||||
WriteConnectionSecretToReference specifies the namespace and name of a
|
||||
Secret to which any connection details for this managed resource should
|
||||
be written. Connection details frequently include the endpoint, username,
|
||||
and password required to connect to the managed resource.
|
||||
description: WriteConnectionSecretToReference specifies
|
||||
the namespace and name of a Secret to which any
|
||||
connection details for this managed resource should
|
||||
be written. Connection details frequently include
|
||||
the endpoint, username, and password required to
|
||||
connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
@@ -1002,15 +986,14 @@ spec:
|
||||
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.
|
||||
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.
|
||||
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
|
||||
@@ -1021,9 +1004,9 @@ spec:
|
||||
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.
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.11.4
|
||||
name: policies.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -26,19 +26,14 @@ spec:
|
||||
description: Policy is the Schema for the policy API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
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
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.11.4
|
||||
name: policydefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -24,19 +24,14 @@ spec:
|
||||
description: PolicyDefinition is the Schema for the policydefinitions API
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
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
|
||||
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
|
||||
@@ -51,30 +46,30 @@ spec:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: |-
|
||||
Version indicate which version should be used if CRD has multiple versions
|
||||
by default it will use the first one if not specified
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
manageHealthCheck:
|
||||
description: |-
|
||||
ManageHealthCheck means the policy will handle health checking and skip application controller
|
||||
built-in health checking.
|
||||
description: ManageHealthCheck means the policy will handle health
|
||||
checking and skip application controller built-in health checking.
|
||||
type: boolean
|
||||
schematic:
|
||||
description: |-
|
||||
Schematic defines the data format and template of the encapsulation of the policy definition.
|
||||
Only CUE schematic is supported for now.
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the policy definition. Only CUE schematic is supported
|
||||
for now.
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: |-
|
||||
Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field.
|
||||
Template is a required field if CUE is defined in Capability Definition.
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
@@ -137,11 +132,11 @@ spec:
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: |-
|
||||
WriteConnectionSecretToReference specifies the namespace and name of a
|
||||
Secret to which any connection details for this managed resource should
|
||||
be written. Connection details frequently include the endpoint, username,
|
||||
and password required to connect to the managed resource.
|
||||
description: WriteConnectionSecretToReference specifies the
|
||||
namespace and name of a Secret to which any connection details
|
||||
for this managed resource should be written. Connection
|
||||
details frequently include the endpoint, username, and password
|
||||
required to connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
@@ -166,15 +161,13 @@ spec:
|
||||
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.
|
||||
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.
|
||||
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
|
||||
@@ -185,9 +178,8 @@ spec:
|
||||
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.
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.11.4
|
||||
name: resourcetrackers.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -38,19 +38,14 @@ spec:
|
||||
resources
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
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
|
||||
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
|
||||
@@ -88,38 +83,33 @@ spec:
|
||||
description: Deleted marks the resource to be deleted
|
||||
type: boolean
|
||||
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.
|
||||
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
|
||||
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
|
||||
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/
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
raw:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
resourceVersion:
|
||||
description: |-
|
||||
Specific resourceVersion to which this reference is made, if any.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
|
||||
description: 'Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
|
||||
type: string
|
||||
skipGC:
|
||||
description: SkipGC marks the resource to skip gc
|
||||
@@ -127,9 +117,7 @@ spec:
|
||||
trait:
|
||||
type: string
|
||||
uid:
|
||||
description: |-
|
||||
UID of the referent.
|
||||
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.11.4
|
||||
name: traitdefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -28,26 +28,20 @@ spec:
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: |-
|
||||
A TraitDefinition registers a kind of Kubernetes custom resource as a valid
|
||||
OAM trait kind by referencing its CustomResourceDefinition. The CRD is used
|
||||
to validate the schema of the trait when it is embedded in an OAM
|
||||
ApplicationConfiguration.
|
||||
description: A TraitDefinition registers a kind of Kubernetes custom resource
|
||||
as a valid OAM trait kind by referencing its CustomResourceDefinition. The
|
||||
CRD is used to validate the schema of the trait when it is embedded in an
|
||||
OAM ApplicationConfiguration.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |-
|
||||
APIVersion defines the versioned schema of this representation of an object.
|
||||
Servers should convert recognized schemas to the latest internal value, and
|
||||
may reject unrecognized values.
|
||||
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
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
|
||||
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
|
||||
@@ -55,25 +49,20 @@ spec:
|
||||
description: A TraitDefinitionSpec defines the desired state of a TraitDefinition.
|
||||
properties:
|
||||
appliesToWorkloads:
|
||||
description: |-
|
||||
AppliesToWorkloads specifies the list of workload kinds this trait
|
||||
applies to. Workload kinds are specified in resource.group/version format,
|
||||
e.g. server.core.oam.dev/v1alpha2. Traits that omit this field apply to
|
||||
all workload kinds.
|
||||
description: AppliesToWorkloads specifies the list of workload kinds
|
||||
this trait applies to. Workload kinds are specified in resource.group/version
|
||||
format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this
|
||||
field apply to all workload kinds.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
conflictsWith:
|
||||
description: |-
|
||||
ConflictsWith specifies the list of traits(CRD name, Definition name, CRD group)
|
||||
which could not apply to the same workloads with this trait.
|
||||
Traits that omit this field can work with any other traits.
|
||||
Example rules:
|
||||
"service" # Trait definition name
|
||||
"services.k8s.io" # API resource/crd name
|
||||
"*.networking.k8s.io" # API group
|
||||
"labelSelector:foo=bar" # label selector
|
||||
labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse
|
||||
description: 'ConflictsWith specifies the list of traits(CRD name,
|
||||
Definition name, CRD group) which could not apply to the same workloads
|
||||
with this trait. Traits that omit this field can work with any other
|
||||
traits. Example rules: "service" # Trait definition name "services.k8s.io"
|
||||
# API resource/crd name "*.networking.k8s.io" # API group "labelSelector:foo=bar"
|
||||
# label selector labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse'
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
@@ -89,9 +78,9 @@ spec:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: |-
|
||||
Version indicate which version should be used if CRD has multiple versions
|
||||
by default it will use the first one if not specified
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
@@ -114,17 +103,18 @@ spec:
|
||||
revision
|
||||
type: boolean
|
||||
schematic:
|
||||
description: |-
|
||||
Schematic defines the data format and template of the encapsulation of the trait.
|
||||
Only CUE and Kube schematic are supported for now.
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the trait. Only CUE and Kube schematic are supported
|
||||
for now.
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: |-
|
||||
Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field.
|
||||
Template is a required field if CUE is defined in Capability Definition.
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
@@ -187,11 +177,11 @@ spec:
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: |-
|
||||
WriteConnectionSecretToReference specifies the namespace and name of a
|
||||
Secret to which any connection details for this managed resource should
|
||||
be written. Connection details frequently include the endpoint, username,
|
||||
and password required to connect to the managed resource.
|
||||
description: WriteConnectionSecretToReference specifies the
|
||||
namespace and name of a Secret to which any connection details
|
||||
for this managed resource should be written. Connection
|
||||
details frequently include the endpoint, username, and password
|
||||
required to connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
@@ -207,10 +197,10 @@ spec:
|
||||
type: object
|
||||
type: object
|
||||
stage:
|
||||
description: |-
|
||||
Stage defines the stage information to which this trait resource processing belongs.
|
||||
Currently, PreDispatch and PostDispatch are provided, which are used to control resource
|
||||
pre-process and post-process respectively.
|
||||
description: Stage defines the stage information to which this trait
|
||||
resource processing belongs. Currently, PreDispatch and PostDispatch
|
||||
are provided, which are used to control resource pre-process and
|
||||
post-process respectively.
|
||||
type: string
|
||||
status:
|
||||
description: Status defines the custom health policy and status message
|
||||
@@ -239,15 +229,13 @@ spec:
|
||||
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.
|
||||
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.
|
||||
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
|
||||
@@ -258,9 +246,8 @@ spec:
|
||||
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.
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.14.0
|
||||
controller-gen.kubebuilder.io/version: v0.11.4
|
||||
name: workflowstepdefinitions.core.oam.dev
|
||||
spec:
|
||||
group: core.oam.dev
|
||||
@@ -25,19 +25,14 @@ spec:
|
||||
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
|
||||
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
|
||||
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
|
||||
@@ -52,25 +47,26 @@ spec:
|
||||
description: Name of the referenced CustomResourceDefinition.
|
||||
type: string
|
||||
version:
|
||||
description: |-
|
||||
Version indicate which version should be used if CRD has multiple versions
|
||||
by default it will use the first one if not specified
|
||||
description: Version indicate which version should be used if
|
||||
CRD has multiple versions by default it will use the first one
|
||||
if not specified
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
schematic:
|
||||
description: |-
|
||||
Schematic defines the data format and template of the encapsulation of the workflow step definition.
|
||||
Only CUE schematic is supported for now.
|
||||
description: Schematic defines the data format and template of the
|
||||
encapsulation of the workflow step definition. Only CUE schematic
|
||||
is supported for now.
|
||||
properties:
|
||||
cue:
|
||||
description: CUE defines the encapsulation in CUE format
|
||||
properties:
|
||||
template:
|
||||
description: |-
|
||||
Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field.
|
||||
Template is a required field if CUE is defined in Capability Definition.
|
||||
description: Template defines the abstraction template data
|
||||
of the capability, it will replace the old CUE template
|
||||
in extension field. Template is a required field if CUE
|
||||
is defined in Capability Definition.
|
||||
type: string
|
||||
required:
|
||||
- template
|
||||
@@ -133,11 +129,11 @@ spec:
|
||||
- remote
|
||||
type: string
|
||||
writeConnectionSecretToRef:
|
||||
description: |-
|
||||
WriteConnectionSecretToReference specifies the namespace and name of a
|
||||
Secret to which any connection details for this managed resource should
|
||||
be written. Connection details frequently include the endpoint, username,
|
||||
and password required to connect to the managed resource.
|
||||
description: WriteConnectionSecretToReference specifies the
|
||||
namespace and name of a Secret to which any connection details
|
||||
for this managed resource should be written. Connection
|
||||
details frequently include the endpoint, username, and password
|
||||
required to connect to the managed resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret.
|
||||
@@ -162,15 +158,13 @@ spec:
|
||||
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.
|
||||
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.
|
||||
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
|
||||
@@ -181,9 +175,8 @@ spec:
|
||||
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.
|
||||
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
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
creationTimestamp: null
|
||||
name: packages.cue.oam.dev
|
||||
spec:
|
||||
group: cue.oam.dev
|
||||
names:
|
||||
kind: Package
|
||||
listKind: PackageList
|
||||
plural: packages
|
||||
shortNames:
|
||||
- pkg
|
||||
- cpkg
|
||||
- cuepkg
|
||||
- cuepackage
|
||||
singular: package
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.path
|
||||
name: PATH
|
||||
type: string
|
||||
- jsonPath: .spec.provider.protocol
|
||||
name: PROTO
|
||||
type: string
|
||||
- jsonPath: .spec.provider.endpoint
|
||||
name: ENDPOINT
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Package is an extension for cuex engine
|
||||
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: PackageSpec the spec for Package
|
||||
properties:
|
||||
path:
|
||||
type: string
|
||||
provider:
|
||||
description: Provider the external Provider in Package for cuex to
|
||||
run functions
|
||||
properties:
|
||||
endpoint:
|
||||
type: string
|
||||
protocol:
|
||||
description: ProviderProtocol the protocol type for external Provider
|
||||
type: string
|
||||
required:
|
||||
- endpoint
|
||||
- protocol
|
||||
type: object
|
||||
templates:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- path
|
||||
- templates
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
@@ -31,9 +31,6 @@ spec:
|
||||
if k.namespace != _|_ {
|
||||
namespace: k.namespace
|
||||
}
|
||||
if k.namespaces != _|_ {
|
||||
namespaces: k.namespaces
|
||||
}
|
||||
topologyKey: k.topologyKey
|
||||
if k.namespaceSelector != _|_ {
|
||||
namespaceSelector: k.namespaceSelector
|
||||
@@ -60,9 +57,6 @@ spec:
|
||||
if k.namespace != _|_ {
|
||||
namespace: k.namespace
|
||||
}
|
||||
if k.namespaces != _|_ {
|
||||
namespaces: k.namespaces
|
||||
}
|
||||
topologyKey: k.topologyKey
|
||||
if k.namespaceSelector != _|_ {
|
||||
namespaceSelector: k.namespaceSelector
|
||||
|
||||
@@ -16,39 +16,36 @@ spec:
|
||||
import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"vela/kube"
|
||||
"vela/builtin"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
output: kube.#Apply & {
|
||||
$params: {
|
||||
cluster: parameter.cluster
|
||||
value: {
|
||||
apiVersion: "apps/v1"
|
||||
kind: "Deployment"
|
||||
metadata: {
|
||||
name: context.stepName
|
||||
namespace: context.namespace
|
||||
}
|
||||
spec: {
|
||||
selector: matchLabels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
|
||||
replicas: parameter.replicas
|
||||
template: {
|
||||
metadata: labels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
|
||||
spec: containers: [{
|
||||
name: context.stepName
|
||||
image: parameter.image
|
||||
if parameter["cmd"] != _|_ {
|
||||
command: parameter.cmd
|
||||
}
|
||||
}]
|
||||
}
|
||||
output: op.#Apply & {
|
||||
cluster: parameter.cluster
|
||||
value: {
|
||||
apiVersion: "apps/v1"
|
||||
kind: "Deployment"
|
||||
metadata: {
|
||||
name: context.stepName
|
||||
namespace: context.namespace
|
||||
}
|
||||
spec: {
|
||||
selector: matchLabels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
|
||||
replicas: parameter.replicas
|
||||
template: {
|
||||
metadata: labels: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"
|
||||
spec: containers: [{
|
||||
name: context.stepName
|
||||
image: parameter.image
|
||||
if parameter["cmd"] != _|_ {
|
||||
command: parameter.cmd
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
wait: builtin.#ConditionalWait & {
|
||||
$params: continue: output.$returns.value.status.readyReplicas == parameter.replicas
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: output.value.status.readyReplicas == parameter.replicas
|
||||
}
|
||||
parameter: {
|
||||
image: string
|
||||
|
||||
@@ -13,13 +13,13 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/kube"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
apply: kube.#Apply & {
|
||||
$params: parameter
|
||||
apply: op.#Apply & {
|
||||
value: parameter.value
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify Kubernetes native resource object to be applied
|
||||
value: {...}
|
||||
|
||||
@@ -14,12 +14,11 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/kube"
|
||||
"vela/builtin"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
apply: kube.#Apply & {
|
||||
$params: value: {
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "terraform.core.oam.dev/v1beta2"
|
||||
kind: "Configuration"
|
||||
metadata: {
|
||||
@@ -54,10 +53,8 @@ spec:
|
||||
}
|
||||
}
|
||||
}
|
||||
check: builtin.#ConditionalWait & {
|
||||
if apply.$returns.value.status != _|_ if apply.$returns.value.status.apply != _|_ {
|
||||
$params: continue: apply.$returns.value.status.apply.state == "Available"
|
||||
}
|
||||
check: op.#ConditionalWait & {
|
||||
continue: apply.value.status != _|_ && apply.value.status.apply != _|_ && apply.value.status.apply.state == "Available"
|
||||
}
|
||||
parameter: {
|
||||
// +usage=specify the source of the terraform configuration
|
||||
|
||||
@@ -14,65 +14,61 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/config"
|
||||
"vela/kube"
|
||||
"vela/builtin"
|
||||
"vela/op"
|
||||
"strings"
|
||||
)
|
||||
|
||||
cfg: config.#CreateConfig & {
|
||||
$params: {
|
||||
name: "\(context.name)-\(context.stepName)"
|
||||
namespace: context.namespace
|
||||
template: "terraform-\(parameter.type)"
|
||||
config: {
|
||||
name: parameter.name
|
||||
if parameter.type == "alibaba" {
|
||||
ALICLOUD_ACCESS_KEY: parameter.accessKey
|
||||
ALICLOUD_SECRET_KEY: parameter.secretKey
|
||||
ALICLOUD_REGION: parameter.region
|
||||
}
|
||||
if parameter.type == "aws" {
|
||||
AWS_ACCESS_KEY_ID: parameter.accessKey
|
||||
AWS_SECRET_ACCESS_KEY: parameter.secretKey
|
||||
AWS_DEFAULT_REGION: parameter.region
|
||||
AWS_SESSION_TOKEN: parameter.token
|
||||
}
|
||||
if parameter.type == "azure" {
|
||||
ARM_CLIENT_ID: parameter.clientID
|
||||
ARM_CLIENT_SECRET: parameter.clientSecret
|
||||
ARM_SUBSCRIPTION_ID: parameter.subscriptionID
|
||||
ARM_TENANT_ID: parameter.tenantID
|
||||
}
|
||||
if parameter.type == "baidu" {
|
||||
BAIDUCLOUD_ACCESS_KEY: parameter.accessKey
|
||||
BAIDUCLOUD_SECRET_KEY: parameter.secretKey
|
||||
BAIDUCLOUD_REGION: parameter.region
|
||||
}
|
||||
if parameter.type == "ec" {
|
||||
EC_API_KEY: parameter.apiKey
|
||||
}
|
||||
if parameter.type == "gcp" {
|
||||
GOOGLE_CREDENTIALS: parameter.credentials
|
||||
GOOGLE_REGION: parameter.region
|
||||
GOOGLE_PROJECT: parameter.project
|
||||
}
|
||||
if parameter.type == "tencent" {
|
||||
TENCENTCLOUD_SECRET_ID: parameter.secretID
|
||||
TENCENTCLOUD_SECRET_KEY: parameter.secretKey
|
||||
TENCENTCLOUD_REGION: parameter.region
|
||||
}
|
||||
if parameter.type == "ucloud" {
|
||||
UCLOUD_PRIVATE_KEY: parameter.privateKey
|
||||
UCLOUD_PUBLIC_KEY: parameter.publicKey
|
||||
UCLOUD_PROJECT_ID: parameter.projectID
|
||||
UCLOUD_REGION: parameter.region
|
||||
}
|
||||
config: op.#CreateConfig & {
|
||||
name: "\(context.name)-\(context.stepName)"
|
||||
namespace: context.namespace
|
||||
template: "terraform-\(parameter.type)"
|
||||
config: {
|
||||
name: parameter.name
|
||||
if parameter.type == "alibaba" {
|
||||
ALICLOUD_ACCESS_KEY: parameter.accessKey
|
||||
ALICLOUD_SECRET_KEY: parameter.secretKey
|
||||
ALICLOUD_REGION: parameter.region
|
||||
}
|
||||
if parameter.type == "aws" {
|
||||
AWS_ACCESS_KEY_ID: parameter.accessKey
|
||||
AWS_SECRET_ACCESS_KEY: parameter.secretKey
|
||||
AWS_DEFAULT_REGION: parameter.region
|
||||
AWS_SESSION_TOKEN: parameter.token
|
||||
}
|
||||
if parameter.type == "azure" {
|
||||
ARM_CLIENT_ID: parameter.clientID
|
||||
ARM_CLIENT_SECRET: parameter.clientSecret
|
||||
ARM_SUBSCRIPTION_ID: parameter.subscriptionID
|
||||
ARM_TENANT_ID: parameter.tenantID
|
||||
}
|
||||
if parameter.type == "baidu" {
|
||||
BAIDUCLOUD_ACCESS_KEY: parameter.accessKey
|
||||
BAIDUCLOUD_SECRET_KEY: parameter.secretKey
|
||||
BAIDUCLOUD_REGION: parameter.region
|
||||
}
|
||||
if parameter.type == "ec" {
|
||||
EC_API_KEY: parameter.apiKey
|
||||
}
|
||||
if parameter.type == "gcp" {
|
||||
GOOGLE_CREDENTIALS: parameter.credentials
|
||||
GOOGLE_REGION: parameter.region
|
||||
GOOGLE_PROJECT: parameter.project
|
||||
}
|
||||
if parameter.type == "tencent" {
|
||||
TENCENTCLOUD_SECRET_ID: parameter.secretID
|
||||
TENCENTCLOUD_SECRET_KEY: parameter.secretKey
|
||||
TENCENTCLOUD_REGION: parameter.region
|
||||
}
|
||||
if parameter.type == "ucloud" {
|
||||
UCLOUD_PRIVATE_KEY: parameter.privateKey
|
||||
UCLOUD_PUBLIC_KEY: parameter.publicKey
|
||||
UCLOUD_PROJECT_ID: parameter.projectID
|
||||
UCLOUD_REGION: parameter.region
|
||||
}
|
||||
}
|
||||
}
|
||||
read: kube.#Read & {
|
||||
$params: value: {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "terraform.core.oam.dev/v1beta1"
|
||||
kind: "Provider"
|
||||
metadata: {
|
||||
@@ -81,9 +77,12 @@ spec:
|
||||
}
|
||||
}
|
||||
}
|
||||
check: builtin.#ConditionalWait & {
|
||||
if read.$returns.value.status != _|_ {
|
||||
$params: continue: read.$returns.value.status.state == "ready"
|
||||
check: op.#ConditionalWait & {
|
||||
if read.value.status != _|_ {
|
||||
continue: read.value.status.state == "ready"
|
||||
}
|
||||
if read.value.status == _|_ {
|
||||
continue: false
|
||||
}
|
||||
}
|
||||
providerBasic: {
|
||||
|
||||
@@ -14,9 +14,7 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/builtin"
|
||||
"vela/kube"
|
||||
"vela/util"
|
||||
"vela/op"
|
||||
"encoding/json"
|
||||
"strings"
|
||||
)
|
||||
@@ -30,8 +28,8 @@ spec:
|
||||
value: parameter.context
|
||||
}
|
||||
}
|
||||
kaniko: kube.#Apply & {
|
||||
$params: value: {
|
||||
kaniko: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Pod"
|
||||
metadata: {
|
||||
@@ -97,14 +95,14 @@ spec:
|
||||
}
|
||||
}
|
||||
}
|
||||
log: util.#Log & {
|
||||
$params: source: resources: [{
|
||||
log: op.#Log & {
|
||||
source: resources: [{
|
||||
name: "\(context.name)-\(context.stepSessionID)-kaniko"
|
||||
namespace: context.namespace
|
||||
}]
|
||||
}
|
||||
read: kube.#Read & {
|
||||
$params: value: {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Pod"
|
||||
metadata: {
|
||||
@@ -113,10 +111,8 @@ spec:
|
||||
}
|
||||
}
|
||||
}
|
||||
wait: builtin.#ConditionalWait & {
|
||||
if read.$returns.value.status != _|_ {
|
||||
$params: continue: read.$returns.value.status.phase == "Succeeded"
|
||||
}
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: read.value.status != _|_ && read.value.status.phase == "Succeeded"
|
||||
}
|
||||
#secret: {
|
||||
name: string
|
||||
|
||||
@@ -15,35 +15,32 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/metrics"
|
||||
"vela/builtin"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
check: metrics.#PromCheck & {
|
||||
$params: {
|
||||
query: parameter.query
|
||||
metricEndpoint: parameter.metricEndpoint
|
||||
condition: parameter.condition
|
||||
stepID: context.stepSessionID
|
||||
duration: parameter.duration
|
||||
failDuration: parameter.failDuration
|
||||
}
|
||||
check: op.#PromCheck & {
|
||||
query: parameter.query
|
||||
metricEndpoint: parameter.metricEndpoint
|
||||
condition: parameter.condition
|
||||
stepID: context.stepSessionID
|
||||
duration: parameter.duration
|
||||
failDuration: parameter.failDuration
|
||||
}
|
||||
|
||||
fail: {
|
||||
if check.$returns.failed != _|_ {
|
||||
if check.$returns.failed == true {
|
||||
breakWorkflow: builtin.#Fail & {
|
||||
$params: message: check.$returns.message
|
||||
fail: op.#Steps & {
|
||||
if check.failed != _|_ {
|
||||
if check.failed == true {
|
||||
breakWorkflow: op.#Fail & {
|
||||
message: check.message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wait: builtin.#ConditionalWait & {
|
||||
$params: continue: check.$returns.result
|
||||
if check.$returns.message != _|_ {
|
||||
$params: message: check.$returns.message
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: check.result
|
||||
if check.message != _|_ {
|
||||
message: check.message
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/kube"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
parameter: {
|
||||
@@ -21,46 +21,42 @@ spec:
|
||||
namespace: *context.namespace | string
|
||||
}
|
||||
|
||||
cleanJobs: kube.#Delete & {
|
||||
$params: {
|
||||
value: {
|
||||
apiVersion: "batch/v1"
|
||||
kind: "Job"
|
||||
metadata: {
|
||||
name: context.name
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
filter: {
|
||||
cleanJobs: op.#Delete & {
|
||||
value: {
|
||||
apiVersion: "batch/v1"
|
||||
kind: "Job"
|
||||
metadata: {
|
||||
name: context.name
|
||||
namespace: parameter.namespace
|
||||
if parameter.labelselector != _|_ {
|
||||
matchingLabels: parameter.labelselector
|
||||
}
|
||||
if parameter.labelselector == _|_ {
|
||||
matchingLabels: "workflow.oam.dev/name": context.name
|
||||
}
|
||||
}
|
||||
}
|
||||
filter: {
|
||||
namespace: parameter.namespace
|
||||
if parameter.labelselector != _|_ {
|
||||
matchingLabels: parameter.labelselector
|
||||
}
|
||||
if parameter.labelselector == _|_ {
|
||||
matchingLabels: "workflow.oam.dev/name": context.name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cleanPods: kube.#Delete & {
|
||||
$params: {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "pod"
|
||||
metadata: {
|
||||
name: context.name
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
filter: {
|
||||
cleanPods: op.#Delete & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "pod"
|
||||
metadata: {
|
||||
name: context.name
|
||||
namespace: parameter.namespace
|
||||
if parameter.labelselector != _|_ {
|
||||
matchingLabels: parameter.labelselector
|
||||
}
|
||||
if parameter.labelselector == _|_ {
|
||||
matchingLabels: "workflow.oam.dev/name": context.name
|
||||
}
|
||||
}
|
||||
}
|
||||
filter: {
|
||||
namespace: parameter.namespace
|
||||
if parameter.labelselector != _|_ {
|
||||
matchingLabels: parameter.labelselector
|
||||
}
|
||||
if parameter.labelselector == _|_ {
|
||||
matchingLabels: "workflow.oam.dev/name": context.name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,30 +13,36 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/builtin"
|
||||
"vela/query"
|
||||
"vela/op"
|
||||
"vela/ql"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
collect: query.#CollectServiceEndpoints & {
|
||||
$params: app: {
|
||||
name: parameter.name
|
||||
namespace: parameter.namespace
|
||||
collect: ql.#CollectServiceEndpoints & {
|
||||
app: {
|
||||
name: *context.name | string
|
||||
namespace: *context.namespace | string
|
||||
if parameter.name != _|_ {
|
||||
name: parameter.name
|
||||
}
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
filter: {
|
||||
if parameter.components != _|_ {
|
||||
components: parameter.components
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} @step(1)
|
||||
|
||||
outputs: {
|
||||
eps_port_name_filtered: *[] | [...]
|
||||
if parameter.portName == _|_ {
|
||||
eps_port_name_filtered: collect.$returns.list
|
||||
eps_port_name_filtered: collect.list
|
||||
}
|
||||
if parameter.portName != _|_ {
|
||||
eps_port_name_filtered: [for ep in collect.$returns.list if parameter.portName == ep.endpoint.portName {ep}]
|
||||
eps_port_name_filtered: [ for ep in collect.list if parameter.portName == ep.endpoint.portName {ep}]
|
||||
}
|
||||
|
||||
eps_port_filtered: *[] | [...]
|
||||
@@ -44,12 +50,12 @@ spec:
|
||||
eps_port_filtered: eps_port_name_filtered
|
||||
}
|
||||
if parameter.port != _|_ {
|
||||
eps_port_filtered: [for ep in eps_port_name_filtered if parameter.port == ep.endpoint.port {ep}]
|
||||
eps_port_filtered: [ for ep in eps_port_name_filtered if parameter.port == ep.endpoint.port {ep}]
|
||||
}
|
||||
eps: eps_port_filtered
|
||||
eps: eps_port_filtered
|
||||
endpoints: *[] | [...]
|
||||
if parameter.outer != _|_ {
|
||||
tmps: [for ep in eps {
|
||||
tmps: [ for ep in eps {
|
||||
ep
|
||||
if ep.endpoint.inner == _|_ {
|
||||
outer: true
|
||||
@@ -58,16 +64,16 @@ spec:
|
||||
outer: !ep.endpoint.inner
|
||||
}
|
||||
}]
|
||||
endpoints: [for ep in tmps if (!parameter.outer || ep.outer) {ep}]
|
||||
endpoints: [ for ep in tmps if (!parameter.outer || ep.outer) {ep}]
|
||||
}
|
||||
if parameter.outer == _|_ {
|
||||
endpoints: eps_port_filtered
|
||||
}
|
||||
}
|
||||
|
||||
wait: builtin.#ConditionalWait & {
|
||||
$params: continue: len(outputs.endpoints) > 0
|
||||
}
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: len(outputs.endpoints) > 0
|
||||
} @step(2)
|
||||
|
||||
value: {
|
||||
if len(outputs.endpoints) > 0 {
|
||||
@@ -79,9 +85,9 @@ spec:
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the name of the application
|
||||
name: *context.name | string
|
||||
name?: string
|
||||
// +usage=Specify the namespace of the application
|
||||
namespace: *context.namespace | string
|
||||
namespace?: string
|
||||
// +usage=Filter the component of the endpoints
|
||||
components?: [...string]
|
||||
// +usage=Filter the port of the endpoints
|
||||
|
||||
@@ -32,7 +32,7 @@ spec:
|
||||
_params: #PatchParams
|
||||
name: _params.containerName
|
||||
_baseContainers: context.output.spec.template.spec.containers
|
||||
_matchContainers_: [for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
_matchContainers_: [ for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
_baseContainer: *_|_ | {...}
|
||||
if len(_matchContainers_) == 0 {
|
||||
err: "container \(name) not found"
|
||||
@@ -73,7 +73,7 @@ spec:
|
||||
}
|
||||
|
||||
// +patchStrategy=replace
|
||||
args: [for a in _args if _delArgs[a] == _|_ {a}] + [for a in _addArgs if _delArgs[a] == _|_ && _argsMap[a] == _|_ {a}]
|
||||
args: [ for a in _args if _delArgs[a] == _|_ {a}] + [ for a in _addArgs if _delArgs[a] == _|_ && _argsMap[a] == _|_ {a}]
|
||||
}
|
||||
}
|
||||
// +patchStrategy=open
|
||||
@@ -97,7 +97,7 @@ spec:
|
||||
}
|
||||
if parameter.containers != _|_ {
|
||||
// +patchKey=name
|
||||
containers: [for c in parameter.containers {
|
||||
containers: [ for c in parameter.containers {
|
||||
if c.containerName == "" {
|
||||
err: "container name must be set for containers"
|
||||
}
|
||||
@@ -113,5 +113,5 @@ spec:
|
||||
containers: [...#PatchParams]
|
||||
})
|
||||
|
||||
errs: [for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ spec:
|
||||
_params: #PatchParams
|
||||
name: _params.containerName
|
||||
_baseContainers: context.output.spec.template.spec.containers
|
||||
_matchContainers_: [for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
_matchContainers_: [ for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
_baseContainer: *_|_ | {...}
|
||||
if len(_matchContainers_) == 0 {
|
||||
err: "container \(name) not found"
|
||||
@@ -62,7 +62,7 @@ spec:
|
||||
}
|
||||
if parameter.containers != _|_ {
|
||||
// +patchKey=name
|
||||
containers: [for c in parameter.containers {
|
||||
containers: [ for c in parameter.containers {
|
||||
if c.containerName == "" {
|
||||
err: "containerName must be set for containers"
|
||||
}
|
||||
@@ -78,5 +78,5 @@ spec:
|
||||
containers: [...#PatchParams]
|
||||
})
|
||||
|
||||
errs: [for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ spec:
|
||||
_params: #PatchParams
|
||||
name: _params.containerName
|
||||
_baseContainers: context.output.spec.template.spec.containers
|
||||
_matchContainers_: [for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
_matchContainers_: [ for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
_baseContainer: *_|_ | {...}
|
||||
if len(_matchContainers_) == 0 {
|
||||
err: "container \(name) not found"
|
||||
@@ -52,7 +52,7 @@ spec:
|
||||
_basePorts: _baseContainer.ports
|
||||
if _basePorts == _|_ {
|
||||
// +patchStrategy=replace
|
||||
ports: [for port in _params.ports {
|
||||
ports: [ for port in _params.ports {
|
||||
containerPort: port.containerPort
|
||||
protocol: port.protocol
|
||||
if port.hostPort != _|_ {
|
||||
@@ -67,7 +67,7 @@ spec:
|
||||
_basePortsMap: {for _basePort in _basePorts {(strings.ToLower(_basePort.protocol) + strconv.FormatInt(_basePort.containerPort, 10)): _basePort}}
|
||||
_portsMap: {for port in _params.ports {(strings.ToLower(port.protocol) + strconv.FormatInt(port.containerPort, 10)): port}}
|
||||
// +patchStrategy=replace
|
||||
ports: [for portVar in _basePorts {
|
||||
ports: [ for portVar in _basePorts {
|
||||
containerPort: portVar.containerPort
|
||||
protocol: portVar.protocol
|
||||
name: portVar.name
|
||||
@@ -80,7 +80,7 @@ spec:
|
||||
hostIP: _portsMap[_uniqueKey].hostIP
|
||||
}
|
||||
}
|
||||
}] + [for port in _params.ports if _basePortsMap[strings.ToLower(port.protocol)+strconv.FormatInt(port.containerPort, 10)] == _|_ {
|
||||
}] + [ for port in _params.ports if _basePortsMap[strings.ToLower(port.protocol)+strconv.FormatInt(port.containerPort, 10)] == _|_ {
|
||||
if port.containerPort != _|_ {
|
||||
containerPort: port.containerPort
|
||||
}
|
||||
@@ -115,7 +115,7 @@ spec:
|
||||
}
|
||||
if parameter.containers != _|_ {
|
||||
// +patchKey=name
|
||||
containers: [for c in parameter.containers {
|
||||
containers: [ for c in parameter.containers {
|
||||
if c.containerName == "" {
|
||||
err: "container name must be set for containers"
|
||||
}
|
||||
@@ -131,5 +131,5 @@ spec:
|
||||
containers: [...#PatchParams]
|
||||
})
|
||||
|
||||
errs: [for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
|
||||
|
||||
@@ -13,18 +13,28 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/config"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
deploy: config.#CreateConfig & {
|
||||
$params: parameter
|
||||
deploy: op.#CreateConfig & {
|
||||
name: parameter.name
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
if parameter.template != _|_ {
|
||||
template: parameter.template
|
||||
}
|
||||
config: parameter.config
|
||||
}
|
||||
parameter: {
|
||||
//+usage=Specify the name of the config.
|
||||
name: string
|
||||
|
||||
//+usage=Specify the namespace of the config.
|
||||
namespace: *context.namespace | string
|
||||
namespace?: string
|
||||
|
||||
//+usage=Specify the template of the config.
|
||||
template?: string
|
||||
|
||||
@@ -25,7 +25,7 @@ spec:
|
||||
] | []
|
||||
|
||||
configMap: *[
|
||||
for v in parameter.volumeMounts.configMap {
|
||||
for v in parameter.volumeMounts.configMap {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
if v.subPath != _|_ {
|
||||
@@ -49,7 +49,7 @@ spec:
|
||||
] | []
|
||||
|
||||
emptyDir: *[
|
||||
for v in parameter.volumeMounts.emptyDir {
|
||||
for v in parameter.volumeMounts.emptyDir {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
if v.subPath != _|_ {
|
||||
@@ -61,7 +61,7 @@ spec:
|
||||
] | []
|
||||
|
||||
hostPath: *[
|
||||
for v in parameter.volumeMounts.hostPath {
|
||||
for v in parameter.volumeMounts.hostPath {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
if v.subPath != _|_ {
|
||||
@@ -83,7 +83,7 @@ spec:
|
||||
] | []
|
||||
|
||||
configMap: *[
|
||||
for v in parameter.volumeMounts.configMap {
|
||||
for v in parameter.volumeMounts.configMap {
|
||||
{
|
||||
name: v.name
|
||||
configMap: {
|
||||
@@ -113,7 +113,7 @@ spec:
|
||||
] | []
|
||||
|
||||
emptyDir: *[
|
||||
for v in parameter.volumeMounts.emptyDir {
|
||||
for v in parameter.volumeMounts.emptyDir {
|
||||
{
|
||||
name: v.name
|
||||
emptyDir: medium: v.medium
|
||||
@@ -122,7 +122,7 @@ spec:
|
||||
] | []
|
||||
|
||||
hostPath: *[
|
||||
for v in parameter.volumeMounts.hostPath {
|
||||
for v in parameter.volumeMounts.hostPath {
|
||||
{
|
||||
name: v.name
|
||||
hostPath: path: v.path
|
||||
@@ -223,7 +223,7 @@ spec:
|
||||
}
|
||||
}
|
||||
if parameter["volumes"] != _|_ if parameter["volumeMounts"] == _|_ {
|
||||
volumeMounts: [for v in parameter.volumes {
|
||||
volumeMounts: [ for v in parameter.volumes {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
name: v.name
|
||||
@@ -234,7 +234,7 @@ spec:
|
||||
}
|
||||
}]
|
||||
if parameter["volumes"] != _|_ if parameter["volumeMounts"] == _|_ {
|
||||
volumes: [for v in parameter.volumes {
|
||||
volumes: [ for v in parameter.volumes {
|
||||
{
|
||||
name: v.name
|
||||
if v.type == "pvc" {
|
||||
@@ -267,13 +267,13 @@ spec:
|
||||
volumes: deDupVolumesArray
|
||||
}
|
||||
if parameter["imagePullSecrets"] != _|_ {
|
||||
imagePullSecrets: [for v in parameter.imagePullSecrets {
|
||||
imagePullSecrets: [ for v in parameter.imagePullSecrets {
|
||||
name: v
|
||||
},
|
||||
]
|
||||
}
|
||||
if parameter.hostAliases != _|_ {
|
||||
hostAliases: [for v in parameter.hostAliases {
|
||||
hostAliases: [ for v in parameter.hostAliases {
|
||||
ip: v.ip
|
||||
hostnames: v.hostnames
|
||||
},
|
||||
|
||||
@@ -162,7 +162,7 @@ spec:
|
||||
}]
|
||||
}
|
||||
if parameter["ports"] != _|_ {
|
||||
ports: [for v in parameter.ports {
|
||||
ports: [ for v in parameter.ports {
|
||||
{
|
||||
containerPort: v.port
|
||||
protocol: v.protocol
|
||||
@@ -206,7 +206,7 @@ spec:
|
||||
}
|
||||
|
||||
if parameter["volumes"] != _|_ && parameter["volumeMounts"] == _|_ {
|
||||
volumeMounts: [for v in parameter.volumes {
|
||||
volumeMounts: [ for v in parameter.volumes {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
name: v.name
|
||||
@@ -233,14 +233,14 @@ spec:
|
||||
}
|
||||
|
||||
if parameter["imagePullSecrets"] != _|_ {
|
||||
imagePullSecrets: [for v in parameter.imagePullSecrets {
|
||||
imagePullSecrets: [ for v in parameter.imagePullSecrets {
|
||||
name: v
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
if parameter["volumes"] != _|_ && parameter["volumeMounts"] == _|_ {
|
||||
volumes: [for v in parameter.volumes {
|
||||
volumes: [ for v in parameter.volumes {
|
||||
{
|
||||
name: v.name
|
||||
if v.type == "pvc" {
|
||||
|
||||
@@ -13,17 +13,23 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/config"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
deploy: config.#DeleteConfig & {
|
||||
$params: parameter
|
||||
deploy: op.#DeleteConfig & {
|
||||
name: parameter.name
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
//+usage=Specify the name of the config.
|
||||
name: string
|
||||
|
||||
//+usage=Specify the namespace of the config.
|
||||
namespace: *context.namespace | string
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
|
||||
@@ -13,13 +13,12 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/kube"
|
||||
"vela/builtin"
|
||||
"vela/op"
|
||||
"encoding/yaml"
|
||||
)
|
||||
|
||||
dependsOn: kube.#Read & {
|
||||
$params: value: {
|
||||
dependsOn: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "core.oam.dev/v1beta1"
|
||||
kind: "Application"
|
||||
metadata: {
|
||||
@@ -28,10 +27,10 @@ spec:
|
||||
}
|
||||
}
|
||||
}
|
||||
load: {
|
||||
if dependsOn.$returns.err != _|_ {
|
||||
configMap: kube.#Read & {
|
||||
$params: value: {
|
||||
load: op.#Steps & {
|
||||
if dependsOn.err != _|_ {
|
||||
configMap: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "ConfigMap"
|
||||
metadata: {
|
||||
@@ -39,19 +38,19 @@ spec:
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
template: configMap.$returns.value.data["application"]
|
||||
apply: kube.#Apply & {
|
||||
$params: value: yaml.Unmarshal(template)
|
||||
}
|
||||
wait: builtin.#ConditionalWait & {
|
||||
$params: continue: apply.$returns.value.status.status == "running"
|
||||
}
|
||||
} @step(1)
|
||||
template: configMap.value.data["application"]
|
||||
apply: op.#Apply & {
|
||||
value: yaml.Unmarshal(template)
|
||||
} @step(2)
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: apply.value.status.status == "running"
|
||||
} @step(3)
|
||||
}
|
||||
|
||||
if dependsOn.$returns.err == _|_ {
|
||||
wait: builtin.#ConditionalWait & {
|
||||
$params: continue: dependsOn.$returns.value.status.status == "running"
|
||||
if dependsOn.err == _|_ {
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: dependsOn.value.status.status == "running"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,19 +15,16 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/multicluster"
|
||||
"vela/builtin"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
if parameter.auto == false {
|
||||
suspend: builtin.#Suspend & {$params: message: "Waiting approval to the deploy step \"\(context.stepName)\""}
|
||||
suspend: op.#Suspend & {message: "Waiting approval to the deploy step \"\(context.stepName)\""}
|
||||
}
|
||||
deploy: multicluster.#Deploy & {
|
||||
$params: {
|
||||
policies: parameter.policies
|
||||
parallelism: parameter.parallelism
|
||||
ignoreTerraformComponent: parameter.ignoreTerraformComponent
|
||||
}
|
||||
deploy: op.#Deploy & {
|
||||
policies: parameter.policies
|
||||
parallelism: parameter.parallelism
|
||||
ignoreTerraformComponent: parameter.ignoreTerraformComponent
|
||||
}
|
||||
parameter: {
|
||||
//+usage=If set to false, the workflow will suspend automatically before this step, default to be true.
|
||||
|
||||
@@ -31,7 +31,7 @@ spec:
|
||||
name: _params.containerName
|
||||
_delKeys: {for k in _params.unset {(k): ""}}
|
||||
_baseContainers: context.output.spec.template.spec.containers
|
||||
_matchContainers_: [for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
_matchContainers_: [ for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
_baseContainer: *_|_ | {...}
|
||||
if len(_matchContainers_) == 0 {
|
||||
err: "container \(name) not found"
|
||||
@@ -41,7 +41,7 @@ spec:
|
||||
_baseEnv: _baseContainer.env
|
||||
if _baseEnv == _|_ {
|
||||
// +patchStrategy=replace
|
||||
env: [for k, v in _params.env if _delKeys[k] == _|_ {
|
||||
env: [ for k, v in _params.env if _delKeys[k] == _|_ {
|
||||
name: k
|
||||
value: v
|
||||
}]
|
||||
@@ -49,7 +49,7 @@ spec:
|
||||
if _baseEnv != _|_ {
|
||||
_baseEnvMap: {for envVar in _baseEnv {(envVar.name): envVar}}
|
||||
// +patchStrategy=replace
|
||||
env: [for envVar in _baseEnv if _delKeys[envVar.name] == _|_ && !_params.replace {
|
||||
env: [ for envVar in _baseEnv if _delKeys[envVar.name] == _|_ && !_params.replace {
|
||||
name: envVar.name
|
||||
if _params.env[envVar.name] != _|_ {
|
||||
value: _params.env[envVar.name]
|
||||
@@ -62,7 +62,7 @@ spec:
|
||||
valueFrom: envVar.valueFrom
|
||||
}
|
||||
}
|
||||
}] + [for k, v in _params.env if _delKeys[k] == _|_ && (_params.replace || _baseEnvMap[k] == _|_) {
|
||||
}] + [ for k, v in _params.env if _delKeys[k] == _|_ && (_params.replace || _baseEnvMap[k] == _|_) {
|
||||
name: k
|
||||
value: v
|
||||
}]
|
||||
@@ -88,7 +88,7 @@ spec:
|
||||
}
|
||||
if parameter.containers != _|_ {
|
||||
// +patchKey=name
|
||||
containers: [for c in parameter.containers {
|
||||
containers: [ for c in parameter.containers {
|
||||
if c.containerName == "" {
|
||||
err: "containerName must be set for containers"
|
||||
}
|
||||
@@ -104,5 +104,5 @@ spec:
|
||||
containers: [...#PatchParams]
|
||||
})
|
||||
|
||||
errs: [for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ spec:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
"vela/kube"
|
||||
)
|
||||
|
||||
object: {
|
||||
@@ -38,25 +37,23 @@ spec:
|
||||
if parameter.kind == "Secret" {
|
||||
stringData: parameter.data
|
||||
}
|
||||
}
|
||||
} @step(1)
|
||||
|
||||
getPlacements: op.#GetPlacementsFromTopologyPolicies & {
|
||||
policies: *[] | [...string]
|
||||
if parameter.topology != _|_ {
|
||||
policies: [parameter.topology]
|
||||
}
|
||||
}
|
||||
} @step(2)
|
||||
|
||||
apply: {
|
||||
apply: op.#Steps & {
|
||||
for p in getPlacements.placements {
|
||||
(p.cluster): kube.#Apply & {
|
||||
$params: {
|
||||
value: object
|
||||
cluster: p.cluster
|
||||
}
|
||||
(p.cluster): op.#Apply & {
|
||||
value: object
|
||||
cluster: p.cluster
|
||||
}
|
||||
}
|
||||
}
|
||||
} @step(3)
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the name of the export destination
|
||||
|
||||
@@ -16,7 +16,6 @@ spec:
|
||||
template: |
|
||||
import (
|
||||
"vela/op"
|
||||
"vela/kube"
|
||||
)
|
||||
|
||||
meta: {
|
||||
@@ -49,27 +48,25 @@ spec:
|
||||
addresses: [{ip: parameter.ip}]
|
||||
ports: [{port: parameter.targetPort}]
|
||||
}]
|
||||
}]
|
||||
}] @step(1)
|
||||
|
||||
getPlacements: op.#GetPlacementsFromTopologyPolicies & {
|
||||
policies: *[] | [...string]
|
||||
if parameter.topology != _|_ {
|
||||
policies: [parameter.topology]
|
||||
}
|
||||
}
|
||||
} @step(2)
|
||||
|
||||
apply: {
|
||||
apply: op.#Steps & {
|
||||
for p in getPlacements.placements {
|
||||
for o in objects {
|
||||
"\(p.cluster)-\(o.kind)": kube.#Apply & {
|
||||
$params: {
|
||||
value: o
|
||||
cluster: p.cluster
|
||||
}
|
||||
"\(p.cluster)-\(o.kind)": op.#Apply & {
|
||||
value: o
|
||||
cluster: p.cluster
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} @step(3)
|
||||
|
||||
parameter: {
|
||||
// +usage=Specify the name of the export destination
|
||||
|
||||
@@ -13,27 +13,25 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/kube"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
apply: kube.#Apply & {
|
||||
$params: {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "ConfigMap"
|
||||
metadata: {
|
||||
name: parameter.configName
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "ConfigMap"
|
||||
metadata: {
|
||||
name: parameter.configName
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
data: parameter.data
|
||||
}
|
||||
cluster: parameter.cluster
|
||||
data: parameter.data
|
||||
}
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the name of the config map
|
||||
|
||||
@@ -13,12 +13,12 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/kube"
|
||||
"vela/op"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
secret: {
|
||||
secret: op.#Steps & {
|
||||
data: *parameter.data | {}
|
||||
if parameter.kind == "docker-registry" && parameter.dockerRegistry != _|_ {
|
||||
registryData: auths: "\(parameter.dockerRegistry.server)": {
|
||||
@@ -28,30 +28,28 @@ spec:
|
||||
}
|
||||
data: ".dockerconfigjson": json.Marshal(registryData)
|
||||
}
|
||||
apply: kube.#Apply & {
|
||||
$params: {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
if parameter.type == _|_ && parameter.kind == "docker-registry" {
|
||||
type: "kubernetes.io/dockerconfigjson"
|
||||
}
|
||||
if parameter.type != _|_ {
|
||||
type: parameter.type
|
||||
}
|
||||
metadata: {
|
||||
name: parameter.secretName
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
stringData: data
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
if parameter.type == _|_ && parameter.kind == "docker-registry" {
|
||||
type: "kubernetes.io/dockerconfigjson"
|
||||
}
|
||||
cluster: parameter.cluster
|
||||
if parameter.type != _|_ {
|
||||
type: parameter.type
|
||||
}
|
||||
metadata: {
|
||||
name: parameter.secretName
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
stringData: data
|
||||
}
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
|
||||
@@ -44,7 +44,7 @@ spec:
|
||||
]
|
||||
}
|
||||
if parameter["ports"] != _|_ {
|
||||
ports: [for v in parameter.ports {
|
||||
ports: [ for v in parameter.ports {
|
||||
port: v.port
|
||||
targetPort: v.port
|
||||
if v.name != _|_ {
|
||||
|
||||
@@ -161,11 +161,11 @@ spec:
|
||||
}
|
||||
let ingressMetaName = context.name + nameSuffix
|
||||
let ig = [for i in context.outputs if (i.kind == "Ingress") && (i.metadata.name == ingressMetaName) {i}][0]
|
||||
igs: *{} | {}
|
||||
igs: *null | string
|
||||
if ig != _|_ if ig.status != _|_ if ig.status.loadbalancer != _|_ {
|
||||
igs: ig.status.loadbalancer.ingress[0]
|
||||
}
|
||||
igr: *{} | {}
|
||||
igr: *null | string
|
||||
if ig != _|_ if ig.spec != _|_ {
|
||||
igr: ig.spec.rules[0]
|
||||
}
|
||||
@@ -185,7 +185,7 @@ spec:
|
||||
if igr.host != _|_ {
|
||||
message: "Visiting URL: " + igr.host + "\n"
|
||||
}
|
||||
if igr.host == _|_ {
|
||||
if igs.host == _|_ {
|
||||
message: "Host not specified, visit the cluster or load balancer in front of the cluster\n"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,13 +13,12 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/kube"
|
||||
"vela/util"
|
||||
"vela/op"
|
||||
"encoding/base64"
|
||||
)
|
||||
|
||||
output: kube.#Read & {
|
||||
$params: value: {
|
||||
output: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
metadata: {
|
||||
@@ -30,16 +29,16 @@ spec:
|
||||
}
|
||||
}
|
||||
}
|
||||
dbHost: util.#ConvertString & {$params: bt: base64.Decode(null, output.$returns.value.data["DB_HOST"])}
|
||||
dbPort: util.#ConvertString & {$params: bt: base64.Decode(null, output.$returns.value.data["DB_PORT"])}
|
||||
dbName: util.#ConvertString & {$params: bt: base64.Decode(null, output.$returns.value.data["DB_NAME"])}
|
||||
username: util.#ConvertString & {$params: bt: base64.Decode(null, output.$returns.value.data["DB_USER"])}
|
||||
password: util.#ConvertString & {$params: bt: base64.Decode(null, output.$returns.value.data["DB_PASSWORD"])}
|
||||
dbHost: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_HOST"])}
|
||||
dbPort: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_PORT"])}
|
||||
dbName: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_NAME"])}
|
||||
username: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_USER"])}
|
||||
password: op.#ConvertString & {bt: base64.Decode(null, output.value.data["DB_PASSWORD"])}
|
||||
|
||||
env: [
|
||||
{name: "url", value: "jdbc://" + dbHost.$returns.str + ":" + dbPort.$returns.str + "/" + dbName.$returns.str + "?characterEncoding=utf8&useSSL=false"},
|
||||
{name: "username", value: username.$returns.str},
|
||||
{name: "password", value: password.$returns.str},
|
||||
{name: "url", value: "jdbc://" + dbHost.str + ":" + dbPort.str + "/" + dbName.str + "?characterEncoding=utf8&useSSL=false"},
|
||||
{name: "username", value: username.str},
|
||||
{name: "password", value: password.str},
|
||||
]
|
||||
|
||||
parameter: {
|
||||
|
||||
@@ -13,16 +13,22 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/config"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
output: config.#ListConfig & {
|
||||
$params: parameter
|
||||
output: op.#ListConfig & {
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
template: parameter.template
|
||||
}
|
||||
parameter: {
|
||||
//+usage=Specify the template of the config.
|
||||
template: string
|
||||
//+usage=Specify the namespace of the config.
|
||||
namespace: *context.namespace | string
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ spec:
|
||||
patch: metadata: annotations: {
|
||||
"dev.nocalhost/application-name": context.appName
|
||||
"dev.nocalhost/application-namespace": context.namespace
|
||||
"dev.nocalhost": json.Marshal({
|
||||
"dev.nocalhost": json.Marshal({
|
||||
name: context.name
|
||||
serviceType: parameter.serviceType
|
||||
containers: [
|
||||
@@ -126,14 +126,14 @@ spec:
|
||||
workDir: *"/home/nocalhost-dev" | string
|
||||
storageClass?: string
|
||||
command: {
|
||||
run: *["sh", "run.sh"] | [...string]
|
||||
run: *["sh", "run.sh"] | [...string]
|
||||
debug: *["sh", "debug.sh"] | [...string]
|
||||
}
|
||||
debug?: remoteDebugPort?: int
|
||||
hotReload: *true | bool
|
||||
sync: {
|
||||
type: *"send" | string
|
||||
filePattern: *["./"] | [...string]
|
||||
type: *"send" | string
|
||||
filePattern: *["./"] | [...string]
|
||||
ignoreFilePattern: *[".git", ".vscode", ".idea", ".gradle", "build"] | [...string]
|
||||
}
|
||||
env?: [...{
|
||||
|
||||
@@ -13,12 +13,8 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/http"
|
||||
"vela/email"
|
||||
"vela/kube"
|
||||
"vela/util"
|
||||
"vela/op"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
parameter: {
|
||||
@@ -73,7 +69,7 @@ spec:
|
||||
picUrl?: string
|
||||
}
|
||||
|
||||
link?: #link
|
||||
link?: #link
|
||||
markdown?: close({
|
||||
text: string
|
||||
title: string
|
||||
@@ -213,23 +209,17 @@ spec:
|
||||
}
|
||||
|
||||
// send webhook notification
|
||||
ding: {
|
||||
ding: op.#Steps & {
|
||||
if parameter.dingding != _|_ {
|
||||
if parameter.dingding.url.value != _|_ {
|
||||
ding1: http.#Do & {
|
||||
$params: {
|
||||
method: "POST"
|
||||
url: parameter.dingding.url.value
|
||||
request: {
|
||||
body: json.Marshal(parameter.dingding.message)
|
||||
header: "Content-Type": "application/json"
|
||||
}
|
||||
}
|
||||
ding1: op.#DingTalk & {
|
||||
message: parameter.dingding.message
|
||||
dingUrl: parameter.dingding.url.value
|
||||
}
|
||||
}
|
||||
if parameter.dingding.url.secretRef != _|_ && parameter.dingding.url.value == _|_ {
|
||||
read: kube.#Read & {
|
||||
$params: value: {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
metadata: {
|
||||
@@ -239,38 +229,26 @@ spec:
|
||||
}
|
||||
}
|
||||
|
||||
stringValue: util.#ConvertString & {$params: bt: base64.Decode(null, read.$returns.value.data[parameter.dingding.url.secretRef.key])}
|
||||
ding2: http.#Do & {
|
||||
$params: {
|
||||
method: "POST"
|
||||
url: stringValue.$returns.str
|
||||
request: {
|
||||
body: json.Marshal(parameter.dingding.message)
|
||||
header: "Content-Type": "application/json"
|
||||
}
|
||||
}
|
||||
stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.dingding.url.secretRef.key])}
|
||||
ding2: op.#DingTalk & {
|
||||
message: parameter.dingding.message
|
||||
dingUrl: stringValue.str
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lark: {
|
||||
lark: op.#Steps & {
|
||||
if parameter.lark != _|_ {
|
||||
if parameter.lark.url.value != _|_ {
|
||||
lark1: http.#Do & {
|
||||
$params: {
|
||||
method: "POST"
|
||||
url: parameter.lark.message
|
||||
request: {
|
||||
body: json.Marshal(parameter.lark.message)
|
||||
header: "Content-Type": "application/json"
|
||||
}
|
||||
}
|
||||
lark1: op.#Lark & {
|
||||
message: parameter.lark.message
|
||||
larkUrl: parameter.lark.url.value
|
||||
}
|
||||
}
|
||||
if parameter.lark.url.secretRef != _|_ && parameter.lark.url.value == _|_ {
|
||||
read: kube.#Read & {
|
||||
$params: value: {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
metadata: {
|
||||
@@ -280,39 +258,26 @@ spec:
|
||||
}
|
||||
}
|
||||
|
||||
stringValue: util.#ConvertString & {$params: bt: base64.Decode(null, read.$returns.value.data[parameter.lark.url.secretRef.key])}
|
||||
lark2: http.#Do & {
|
||||
$params: {
|
||||
method: "POST"
|
||||
url: stringValue.$returns.str
|
||||
request: {
|
||||
body: json.Marshal(parameter.lark.message)
|
||||
header: "Content-Type": "application/json"
|
||||
}
|
||||
}
|
||||
stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.lark.url.secretRef.key])}
|
||||
lark2: op.#Lark & {
|
||||
message: parameter.lark.message
|
||||
larkUrl: stringValue.str
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
slack: {
|
||||
slack: op.#Steps & {
|
||||
if parameter.slack != _|_ {
|
||||
if parameter.slack.url.value != _|_ {
|
||||
slack1: http.#Do & {
|
||||
$params: {
|
||||
method: "POST"
|
||||
url: parameter.slack.url.value
|
||||
request: {
|
||||
body: json.Marshal(parameter.slack.message)
|
||||
header: "Content-Type": "application/json"
|
||||
}
|
||||
}
|
||||
slack1: op.#Slack & {
|
||||
message: parameter.slack.message
|
||||
slackUrl: parameter.slack.url.value
|
||||
}
|
||||
}
|
||||
if parameter.slack.url.secretRef != _|_ && parameter.slack.url.value == _|_ {
|
||||
read: kube.#Read & {
|
||||
$params: value: {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
kind: "Secret"
|
||||
apiVersion: "v1"
|
||||
metadata: {
|
||||
@@ -322,44 +287,36 @@ spec:
|
||||
}
|
||||
}
|
||||
|
||||
stringValue: util.#ConvertString & {$params: bt: base64.Decode(null, read.$returns.value.data[parameter.slack.url.secretRef.key])}
|
||||
slack2: http.#Do & {
|
||||
$params: {
|
||||
method: "POST"
|
||||
url: stringValue.$returns.str
|
||||
request: {
|
||||
body: json.Marshal(parameter.slack.message)
|
||||
header: "Content-Type": "application/json"
|
||||
}
|
||||
}
|
||||
stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.slack.url.secretRef.key])}
|
||||
slack2: op.#Slack & {
|
||||
message: parameter.slack.message
|
||||
slackUrl: stringValue.str
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
email0: {
|
||||
email: op.#Steps & {
|
||||
if parameter.email != _|_ {
|
||||
if parameter.email.from.password.value != _|_ {
|
||||
email1: email.#SendEmail & {
|
||||
$params: {
|
||||
from: {
|
||||
address: parameter.email.from.address
|
||||
if parameter.email.from.alias != _|_ {
|
||||
alias: parameter.email.from.alias
|
||||
}
|
||||
password: parameter.email.from.password.value
|
||||
host: parameter.email.from.host
|
||||
port: parameter.email.from.port
|
||||
email1: op.#SendEmail & {
|
||||
from: {
|
||||
address: parameter.email.from.address
|
||||
if parameter.email.from.alias != _|_ {
|
||||
alias: parameter.email.from.alias
|
||||
}
|
||||
to: parameter.email.to
|
||||
content: parameter.email.content
|
||||
password: parameter.email.from.password.value
|
||||
host: parameter.email.from.host
|
||||
port: parameter.email.from.port
|
||||
}
|
||||
to: parameter.email.to
|
||||
content: parameter.email.content
|
||||
}
|
||||
}
|
||||
|
||||
if parameter.email.from.password.secretRef != _|_ && parameter.email.from.password.value == _|_ {
|
||||
read: kube.#Read & {
|
||||
$params: value: {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
kind: "Secret"
|
||||
apiVersion: "v1"
|
||||
metadata: {
|
||||
@@ -369,21 +326,19 @@ spec:
|
||||
}
|
||||
}
|
||||
|
||||
stringValue: util.#ConvertString & {$params: bt: base64.Decode(null, read.$returns.value.data[parameter.email.from.password.secretRef.key])}
|
||||
email2: email.#SendEmail & {
|
||||
$params: {
|
||||
from: {
|
||||
address: parameter.email.from.address
|
||||
if parameter.email.from.alias != _|_ {
|
||||
alias: parameter.email.from.alias
|
||||
}
|
||||
password: stringValue.str
|
||||
host: parameter.email.from.host
|
||||
port: parameter.email.from.port
|
||||
stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.email.from.password.secretRef.key])}
|
||||
email2: op.#SendEmail & {
|
||||
from: {
|
||||
address: parameter.email.from.address
|
||||
if parameter.email.from.alias != _|_ {
|
||||
alias: parameter.email.from.alias
|
||||
}
|
||||
to: parameter.email.to
|
||||
content: parameter.email.content
|
||||
password: stringValue.str
|
||||
host: parameter.email.from.host
|
||||
port: parameter.email.from.port
|
||||
}
|
||||
to: parameter.email.to
|
||||
content: parameter.email.content
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,12 +13,12 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/builtin"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
parameter: message: string
|
||||
|
||||
msg: builtin.#Message & {
|
||||
$params: parameter
|
||||
msg: op.#Message & {
|
||||
message: parameter.message
|
||||
}
|
||||
|
||||
|
||||
@@ -13,17 +13,23 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/config"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
output: config.#ReadConfig & {
|
||||
$params: parameter
|
||||
output: op.#ReadConfig & {
|
||||
name: parameter.name
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
if parameter.namespace == _|_ {
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
//+usage=Specify the name of the config.
|
||||
name: string
|
||||
|
||||
//+usage=Specify the namespace of the config.
|
||||
namespace: *context.namespace | string
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
|
||||
@@ -13,31 +13,50 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/kube"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
output: kube.#Read & {
|
||||
$params: {
|
||||
cluster: parameter.cluster
|
||||
value: {
|
||||
apiVersion: parameter.apiVersion
|
||||
kind: parameter.kind
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
namespace: parameter.namespace
|
||||
output: {
|
||||
if parameter.apiVersion == _|_ && parameter.kind == _|_ {
|
||||
op.#Read & {
|
||||
value: {
|
||||
apiVersion: "core.oam.dev/v1beta1"
|
||||
kind: "Application"
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
}
|
||||
if parameter.apiVersion != _|_ || parameter.kind != _|_ {
|
||||
op.#Read & {
|
||||
value: {
|
||||
apiVersion: parameter.apiVersion
|
||||
kind: parameter.kind
|
||||
metadata: {
|
||||
name: parameter.name
|
||||
if parameter.namespace != _|_ {
|
||||
namespace: parameter.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the apiVersion of the object, defaults to 'core.oam.dev/v1beta1'
|
||||
apiVersion: *"core.oam.dev/v1beta1" | string
|
||||
apiVersion?: string
|
||||
// +usage=Specify the kind of the object, defaults to Application
|
||||
kind: *"Application" | string
|
||||
kind?: string
|
||||
// +usage=Specify the name of the object
|
||||
name: string
|
||||
// +usage=The namespace of the resource you want to read
|
||||
namespace: *"default" | string
|
||||
namespace?: *"default" | string
|
||||
// +usage=The cluster you want to apply the resource to, default is the current control plane cluster
|
||||
cluster: *"" | string
|
||||
}
|
||||
|
||||
@@ -14,33 +14,30 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/http"
|
||||
"vela/builtin"
|
||||
"vela/op"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
req: http.#HTTPDo & {
|
||||
$params: {
|
||||
method: parameter.method
|
||||
url: parameter.url
|
||||
request: {
|
||||
if parameter.body != _|_ {
|
||||
body: json.Marshal(parameter.body)
|
||||
}
|
||||
if parameter.header != _|_ {
|
||||
header: parameter.header
|
||||
}
|
||||
http: op.#HTTPDo & {
|
||||
method: parameter.method
|
||||
url: parameter.url
|
||||
request: {
|
||||
if parameter.body != _|_ {
|
||||
body: json.Marshal(parameter.body)
|
||||
}
|
||||
if parameter.header != _|_ {
|
||||
header: parameter.header
|
||||
}
|
||||
}
|
||||
}
|
||||
fail: {
|
||||
if http.$returns.response.statusCode > 400 {
|
||||
requestFail: builtin.#Fail & {
|
||||
$params: message: "request of \(parameter.url) is fail: \(http.response.statusCode)"
|
||||
fail: op.#Steps & {
|
||||
if http.response.statusCode > 400 {
|
||||
requestFail: op.#Fail & {
|
||||
message: "request of \(parameter.url) is fail: \(http.response.statusCode)"
|
||||
}
|
||||
}
|
||||
}
|
||||
response: json.Unmarshal(http.$returns.response.body)
|
||||
response: json.Unmarshal(http.response.body)
|
||||
parameter: {
|
||||
url: string
|
||||
method: *"GET" | "POST" | "PUT" | "DELETE"
|
||||
|
||||
@@ -42,8 +42,8 @@ spec:
|
||||
// +patchStrategy=retainKeys
|
||||
patch: spec: template: spec: serviceAccountName: parameter.name
|
||||
|
||||
_clusterPrivileges: [if parameter.privileges != _|_ for p in parameter.privileges if p.scope == "cluster" {p}]
|
||||
_namespacePrivileges: [if parameter.privileges != _|_ for p in parameter.privileges if p.scope == "namespace" {p}]
|
||||
_clusterPrivileges: [ if parameter.privileges != _|_ for p in parameter.privileges if p.scope == "cluster" {p}]
|
||||
_namespacePrivileges: [ if parameter.privileges != _|_ for p in parameter.privileges if p.scope == "namespace" {p}]
|
||||
outputs: {
|
||||
if parameter.create {
|
||||
"service-account": {
|
||||
@@ -58,7 +58,7 @@ spec:
|
||||
apiVersion: "rbac.authorization.k8s.io/v1"
|
||||
kind: "ClusterRole"
|
||||
metadata: name: "\(context.namespace):\(parameter.name)"
|
||||
rules: [for p in _clusterPrivileges {
|
||||
rules: [ for p in _clusterPrivileges {
|
||||
verbs: p.verbs
|
||||
if p.apiGroups != _|_ {
|
||||
apiGroups: p.apiGroups
|
||||
@@ -95,7 +95,7 @@ spec:
|
||||
apiVersion: "rbac.authorization.k8s.io/v1"
|
||||
kind: "Role"
|
||||
metadata: name: parameter.name
|
||||
rules: [for p in _namespacePrivileges {
|
||||
rules: [ for p in _namespacePrivileges {
|
||||
verbs: p.verbs
|
||||
if p.apiGroups != _|_ {
|
||||
apiGroups: p.apiGroups
|
||||
|
||||
@@ -32,7 +32,7 @@ spec:
|
||||
env: parameter.env
|
||||
}
|
||||
if parameter["volumes"] != _|_ {
|
||||
volumeMounts: [for v in parameter.volumes {
|
||||
volumeMounts: [ for v in parameter.volumes {
|
||||
{
|
||||
mountPath: v.path
|
||||
name: v.name
|
||||
|
||||
@@ -74,7 +74,7 @@ spec:
|
||||
_params: #StartupProbeParams
|
||||
name: _params.containerName
|
||||
_baseContainers: context.output.spec.template.spec.containers
|
||||
_matchContainers_: [for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
_matchContainers_: [ for _container_ in _baseContainers if _container_.name == name {_container_}]
|
||||
if len(_matchContainers_) == 0 {
|
||||
err: "container \(name) not found"
|
||||
}
|
||||
@@ -151,7 +151,7 @@ spec:
|
||||
}
|
||||
if parameter.probes != _|_ {
|
||||
// +patchKey=name
|
||||
containers: [for c in parameter.probes {
|
||||
containers: [ for c in parameter.probes {
|
||||
if c.name == "" {
|
||||
err: "containerName must be set when specifying startup probe for multiple containers"
|
||||
}
|
||||
@@ -167,5 +167,5 @@ spec:
|
||||
probes: [...#StartupProbeParams]
|
||||
})
|
||||
|
||||
errs: [for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
errs: [ for c in patch.spec.template.spec.containers if c.err != _|_ {c.err}]
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ spec:
|
||||
]
|
||||
|
||||
volumeDevicesList: *[
|
||||
for v in parameter.pvc if v.volumeMode == "Block" {
|
||||
for v in parameter.pvc if v.volumeMode == "Block" {
|
||||
{
|
||||
name: "pvc-" + v.name
|
||||
devicePath: v.mountPath
|
||||
@@ -262,13 +262,13 @@ spec:
|
||||
parameter: {
|
||||
// +usage=Declare pvc type storage
|
||||
pvc?: [...{
|
||||
name: string
|
||||
mountOnly: *false | bool
|
||||
mountPath: string
|
||||
subPath?: string
|
||||
volumeMode: *"Filesystem" | string
|
||||
volumeName?: string
|
||||
accessModes: *["ReadWriteOnce"] | [...string]
|
||||
name: string
|
||||
mountOnly: *false | bool
|
||||
mountPath: string
|
||||
subPath?: string
|
||||
volumeMode: *"Filesystem" | string
|
||||
volumeName?: string
|
||||
accessModes: *["ReadWriteOnce"] | [...string]
|
||||
storageClassName?: string
|
||||
resources?: {
|
||||
requests: storage: =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$"
|
||||
|
||||
@@ -13,11 +13,16 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/builtin"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
suspend: builtin.#Suspend & {
|
||||
$params: parameter
|
||||
suspend: op.#Suspend & {
|
||||
if parameter.duration != _|_ {
|
||||
duration: parameter.duration
|
||||
}
|
||||
if parameter.message != _|_ {
|
||||
message: parameter.message
|
||||
}
|
||||
}
|
||||
|
||||
parameter: {
|
||||
|
||||
@@ -63,7 +63,7 @@ spec:
|
||||
}
|
||||
|
||||
if parameter["volumes"] != _|_ {
|
||||
volumeMounts: [for v in parameter.volumes {
|
||||
volumeMounts: [ for v in parameter.volumes {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
name: v.name
|
||||
@@ -72,7 +72,7 @@ spec:
|
||||
}]
|
||||
|
||||
if parameter["volumes"] != _|_ {
|
||||
volumes: [for v in parameter.volumes {
|
||||
volumes: [ for v in parameter.volumes {
|
||||
{
|
||||
name: v.name
|
||||
if v.type == "pvc" {
|
||||
@@ -103,7 +103,7 @@ spec:
|
||||
}
|
||||
|
||||
if parameter["imagePullSecrets"] != _|_ {
|
||||
imagePullSecrets: [for v in parameter.imagePullSecrets {
|
||||
imagePullSecrets: [ for v in parameter.imagePullSecrets {
|
||||
name: v
|
||||
},
|
||||
]
|
||||
|
||||
@@ -13,9 +13,7 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/kube"
|
||||
"vela/builtin"
|
||||
"vela/util"
|
||||
"vela/op"
|
||||
)
|
||||
|
||||
mountsArray: [
|
||||
@@ -70,8 +68,8 @@ spec:
|
||||
},
|
||||
]
|
||||
|
||||
job: kube.#Apply & {
|
||||
$params: value: {
|
||||
job: op.#Apply & {
|
||||
value: {
|
||||
apiVersion: "batch/v1"
|
||||
kind: "Job"
|
||||
metadata: {
|
||||
@@ -105,24 +103,22 @@ spec:
|
||||
}
|
||||
}
|
||||
|
||||
log: util.#Log & {
|
||||
$params: source: resources: [{labelSelector: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"}]
|
||||
log: op.#Log & {
|
||||
source: resources: [{labelSelector: "workflow.oam.dev/step-name": "\(context.name)-\(context.stepName)"}]
|
||||
}
|
||||
|
||||
fail: {
|
||||
if job.$returns.value.status != _|_ if job.$returns.value.status.failed != _|_ {
|
||||
if job.$returns.value.status.failed > 2 {
|
||||
breakWorkflow: builtin.#Fail & {
|
||||
$params: message: "failed to execute vela command"
|
||||
fail: op.#Steps & {
|
||||
if job.value.status.failed != _|_ {
|
||||
if job.value.status.failed > 2 {
|
||||
breakWorkflow: op.#Fail & {
|
||||
message: "failed to execute vela command"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wait: builtin.#ConditionalWait & {
|
||||
if job.$returns.value.status != _|_ if job.$returns.value.status.succeeded != _|_ {
|
||||
$params: continue: job.$returns.value.status.succeeded > 0
|
||||
}
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: job.value.status.succeeded != _|_ && job.value.status.succeeded > 0
|
||||
}
|
||||
|
||||
parameter: {
|
||||
|
||||
@@ -13,17 +13,15 @@ spec:
|
||||
cue:
|
||||
template: |
|
||||
import (
|
||||
"vela/http"
|
||||
"vela/kube"
|
||||
"vela/util"
|
||||
"vela/op"
|
||||
"encoding/json"
|
||||
"encoding/base64"
|
||||
)
|
||||
|
||||
data: {
|
||||
data: op.#Steps & {
|
||||
if parameter.data == _|_ {
|
||||
read: kube.#Read & {
|
||||
$params: value: {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "core.oam.dev/v1beta1"
|
||||
kind: "Application"
|
||||
metadata: {
|
||||
@@ -31,28 +29,26 @@ spec:
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
value: json.Marshal(read.$returns.value)
|
||||
} @step(1)
|
||||
value: json.Marshal(read.value) @step(2)
|
||||
}
|
||||
if parameter.data != _|_ {
|
||||
value: json.Marshal(parameter.data)
|
||||
value: json.Marshal(parameter.data) @step(3)
|
||||
}
|
||||
}
|
||||
webhook: {
|
||||
webhook: op.#Steps & {
|
||||
if parameter.url.value != _|_ {
|
||||
req: http.#HTTPPost & {
|
||||
$params: {
|
||||
url: parameter.url.value
|
||||
request: {
|
||||
body: data.value
|
||||
header: "Content-Type": "application/json"
|
||||
}
|
||||
http: op.#HTTPPost & {
|
||||
url: parameter.url.value
|
||||
request: {
|
||||
body: data.value
|
||||
header: "Content-Type": "application/json"
|
||||
}
|
||||
}
|
||||
} @step(4)
|
||||
}
|
||||
if parameter.url.secretRef != _|_ && parameter.url.value == _|_ {
|
||||
read: kube.#Read & {
|
||||
$params: value: {
|
||||
read: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
kind: "Secret"
|
||||
metadata: {
|
||||
@@ -60,18 +56,16 @@ spec:
|
||||
namespace: context.namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
} @step(5)
|
||||
|
||||
stringValue: util.#ConvertString & {$params: bt: base64.Decode(null, read.$returns.value.data[parameter.url.secretRef.key])}
|
||||
req: http.#HTTPPost & {
|
||||
$params: {
|
||||
url: stringValue.$returns.str
|
||||
request: {
|
||||
body: data.value
|
||||
header: "Content-Type": "application/json"
|
||||
}
|
||||
stringValue: op.#ConvertString & {bt: base64.Decode(null, read.value.data[parameter.url.secretRef.key])} @step(6)
|
||||
http: op.#HTTPPost & {
|
||||
url: stringValue.str
|
||||
request: {
|
||||
body: data.value
|
||||
header: "Content-Type": "application/json"
|
||||
}
|
||||
}
|
||||
} @step(7)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ spec:
|
||||
}]
|
||||
}
|
||||
if parameter["ports"] != _|_ {
|
||||
ports: [for v in parameter.ports {
|
||||
ports: [ for v in parameter.ports {
|
||||
{
|
||||
containerPort: {
|
||||
if v.containerPort != _|_ {v.containerPort}
|
||||
@@ -221,7 +221,7 @@ spec:
|
||||
}
|
||||
|
||||
if parameter["volumes"] != _|_ && parameter["volumeMounts"] == _|_ {
|
||||
volumeMounts: [for v in parameter.volumes {
|
||||
volumeMounts: [ for v in parameter.volumes {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
name: v.name
|
||||
@@ -248,14 +248,14 @@ spec:
|
||||
}
|
||||
|
||||
if parameter["imagePullSecrets"] != _|_ {
|
||||
imagePullSecrets: [for v in parameter.imagePullSecrets {
|
||||
imagePullSecrets: [ for v in parameter.imagePullSecrets {
|
||||
name: v
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
if parameter["volumes"] != _|_ && parameter["volumeMounts"] == _|_ {
|
||||
volumes: [for v in parameter.volumes {
|
||||
volumes: [ for v in parameter.volumes {
|
||||
{
|
||||
name: v.name
|
||||
if v.type == "pvc" {
|
||||
|
||||
@@ -171,7 +171,7 @@ spec:
|
||||
}
|
||||
|
||||
if parameter["volumes"] != _|_ && parameter["volumeMounts"] == _|_ {
|
||||
volumeMounts: [for v in parameter.volumes {
|
||||
volumeMounts: [ for v in parameter.volumes {
|
||||
{
|
||||
mountPath: v.mountPath
|
||||
name: v.name
|
||||
@@ -193,14 +193,14 @@ spec:
|
||||
}]
|
||||
|
||||
if parameter["imagePullSecrets"] != _|_ {
|
||||
imagePullSecrets: [for v in parameter.imagePullSecrets {
|
||||
imagePullSecrets: [ for v in parameter.imagePullSecrets {
|
||||
name: v
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
if parameter["volumes"] != _|_ && parameter["volumeMounts"] == _|_ {
|
||||
volumes: [for v in parameter.volumes {
|
||||
volumes: [ for v in parameter.volumes {
|
||||
{
|
||||
name: v.name
|
||||
if v.type == "pvc" {
|
||||
|
||||
@@ -296,8 +296,6 @@ spec:
|
||||
- "--max-workflow-wait-backoff-time={{ .Values.workflow.backoff.maxTime.waitState }}"
|
||||
- "--max-workflow-failed-backoff-time={{ .Values.workflow.backoff.maxTime.failedState }}"
|
||||
- "--max-workflow-step-error-retry-times={{ .Values.workflow.step.errorRetryTimes }}"
|
||||
- "--enable-external-package-for-default-compiler={{ .Values.workflow.enableExternalPackageForDefaultCompiler }}"
|
||||
- "--enable-external-package-watch-for-default-compiler={{ .Values.workflow.enableExternalPackageWatchForDefaultCompiler }}"
|
||||
- "--feature-gates=EnableSuspendOnFailure={{- .Values.workflow.enableSuspendOnFailure | toString -}}"
|
||||
- "--feature-gates=AuthenticateApplication={{- .Values.authentication.enabled | toString -}}"
|
||||
- "--feature-gates=GzipResourceTracker={{- .Values.featureGates.gzipResourceTracker | toString -}}"
|
||||
@@ -311,7 +309,6 @@ spec:
|
||||
- "--feature-gates=InformerCacheFilterUnnecessaryFields={{- .Values.featureGates.informerCacheFilterUnnecessaryFields | toString -}}"
|
||||
- "--feature-gates=SharedDefinitionStorageForApplicationRevision={{- .Values.featureGates.sharedDefinitionStorageForApplicationRevision | toString -}}"
|
||||
- "--feature-gates=DisableWorkflowContextConfigMapCache={{- .Values.featureGates.disableWorkflowContextConfigMapCache | toString -}}"
|
||||
- "--feature-gates=EnableCueValidation={{- .Values.featureGates.enableCueValidation | toString -}}"
|
||||
{{ if .Values.authentication.enabled }}
|
||||
{{ if .Values.authentication.withUser }}
|
||||
- "--authentication-with-user"
|
||||
|
||||
@@ -24,15 +24,11 @@ controllerArgs:
|
||||
## @section KubeVela workflow parameters
|
||||
|
||||
## @param workflow.enableSuspendOnFailure Enable suspend on workflow failure
|
||||
## @param workflow.enableExternalPackageForDefaultCompiler Enable external package for default cuex compiler
|
||||
## @param workflow.enableExternalPackageWatchForDefaultCompiler Enable external package watch for default cuex compiler
|
||||
## @param workflow.backoff.maxTime.waitState The max backoff time of workflow in a wait condition
|
||||
## @param workflow.backoff.maxTime.failedState The max backoff time of workflow in a failed condition
|
||||
## @param workflow.step.errorRetryTimes The max retry times of a failed workflow step
|
||||
workflow:
|
||||
enableSuspendOnFailure: false
|
||||
enableExternalPackageForDefaultCompiler: true
|
||||
enableExternalPackageWatchForDefaultCompiler: false
|
||||
backoff:
|
||||
maxTime:
|
||||
waitState: 60
|
||||
@@ -123,7 +119,6 @@ optimize:
|
||||
##@param featureGates.informerCacheFilterUnnecessaryFields filter unnecessary fields for informer cache
|
||||
##@param featureGates.sharedDefinitionStorageForApplicationRevision use definition cache to reduce duplicated definition storage for application revision, must be used with InformerCacheFilterUnnecessaryFields
|
||||
##@param featureGates.disableWorkflowContextConfigMapCache disable the workflow context's configmap informer cache
|
||||
##@param featureGates.enableCueValidation enable the strict cue validation for cue required parameter fields
|
||||
##@param
|
||||
featureGates:
|
||||
gzipResourceTracker: false
|
||||
@@ -139,7 +134,6 @@ featureGates:
|
||||
informerCacheFilterUnnecessaryFields: true
|
||||
sharedDefinitionStorageForApplicationRevision: true
|
||||
disableWorkflowContextConfigMapCache: true
|
||||
enableCueValidation: false
|
||||
|
||||
## @section MultiCluster parameters
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ func (in *SystemCRDValidationHook) Run(ctx context.Context) error {
|
||||
if err := in.Client.DeleteAllOf(ctx, &v1beta1.ApplicationRevision{},
|
||||
client.InNamespace(types.DefaultKubeVelaNS),
|
||||
client.MatchingLabels{oam.LabelPreCheck: types.VelaCoreName}); err != nil {
|
||||
klog.Errorf("failed to recycle pre-check ApplicationRevision: %v", err)
|
||||
klog.Errorf("failed to recycle pre-check ApplicationRevision: %w", err)
|
||||
}
|
||||
}()
|
||||
if err := in.Client.Get(ctx, key, appRev); err != nil {
|
||||
|
||||
@@ -35,32 +35,32 @@ import (
|
||||
oamcontroller "github.com/oam-dev/kubevela/pkg/controller/core.oam.dev"
|
||||
"github.com/oam-dev/kubevela/pkg/oam"
|
||||
"github.com/oam-dev/kubevela/pkg/resourcekeeper"
|
||||
"github.com/oam-dev/kubevela/pkg/workflow/providers"
|
||||
)
|
||||
|
||||
// CoreOptions contains everything necessary to create and run vela-core
|
||||
type CoreOptions struct {
|
||||
UseWebhook bool
|
||||
CertDir string
|
||||
WebhookPort int
|
||||
MetricsAddr string
|
||||
EnableLeaderElection bool
|
||||
LeaderElectionNamespace string
|
||||
LogFilePath string
|
||||
LogFileMaxSize uint64
|
||||
LogDebug bool
|
||||
ControllerArgs *oamcontroller.Args
|
||||
HealthAddr string
|
||||
StorageDriver string
|
||||
InformerSyncPeriod time.Duration
|
||||
QPS float64
|
||||
Burst int
|
||||
LeaseDuration time.Duration
|
||||
RenewDeadLine time.Duration
|
||||
RetryPeriod time.Duration
|
||||
EnableClusterGateway bool
|
||||
EnableClusterMetrics bool
|
||||
ClusterMetricsInterval time.Duration
|
||||
UseWebhook bool
|
||||
CertDir string
|
||||
WebhookPort int
|
||||
MetricsAddr string
|
||||
EnableLeaderElection bool
|
||||
LeaderElectionNamespace string
|
||||
LogFilePath string
|
||||
LogFileMaxSize uint64
|
||||
LogDebug bool
|
||||
ControllerArgs *oamcontroller.Args
|
||||
HealthAddr string
|
||||
StorageDriver string
|
||||
InformerSyncPeriod time.Duration
|
||||
QPS float64
|
||||
Burst int
|
||||
LeaderElectionResourceLock string
|
||||
LeaseDuration time.Duration
|
||||
RenewDeadLine time.Duration
|
||||
RetryPeriod time.Duration
|
||||
EnableClusterGateway bool
|
||||
EnableClusterMetrics bool
|
||||
ClusterMetricsInterval time.Duration
|
||||
}
|
||||
|
||||
// NewCoreOptions creates a new NewVelaCoreOptions object with default parameters
|
||||
@@ -84,17 +84,18 @@ func NewCoreOptions() *CoreOptions {
|
||||
IgnoreAppWithoutControllerRequirement: false,
|
||||
IgnoreDefinitionWithoutControllerRequirement: false,
|
||||
},
|
||||
HealthAddr: ":9440",
|
||||
StorageDriver: "Local",
|
||||
InformerSyncPeriod: 10 * time.Hour,
|
||||
QPS: 50,
|
||||
Burst: 100,
|
||||
LeaseDuration: 15 * time.Second,
|
||||
RenewDeadLine: 10 * time.Second,
|
||||
RetryPeriod: 2 * time.Second,
|
||||
EnableClusterGateway: false,
|
||||
EnableClusterMetrics: false,
|
||||
ClusterMetricsInterval: 15 * time.Second,
|
||||
HealthAddr: ":9440",
|
||||
StorageDriver: "Local",
|
||||
InformerSyncPeriod: 10 * time.Hour,
|
||||
QPS: 50,
|
||||
Burst: 100,
|
||||
LeaderElectionResourceLock: "configmapsleases",
|
||||
LeaseDuration: 15 * time.Second,
|
||||
RenewDeadLine: 10 * time.Second,
|
||||
RetryPeriod: 2 * time.Second,
|
||||
EnableClusterGateway: false,
|
||||
EnableClusterMetrics: false,
|
||||
ClusterMetricsInterval: 15 * time.Second,
|
||||
}
|
||||
return s
|
||||
}
|
||||
@@ -120,6 +121,7 @@ func (s *CoreOptions) Flags() cliflag.NamedFlagSets {
|
||||
"The re-sync period for informer in controller-runtime. This is a system-level configuration.")
|
||||
gfs.Float64Var(&s.QPS, "kube-api-qps", s.QPS, "the qps for reconcile clients. Low qps may lead to low throughput. High qps may give stress to api-server. Raise this value if concurrent-reconciles is set to be high.")
|
||||
gfs.IntVar(&s.Burst, "kube-api-burst", s.Burst, "the burst for reconcile clients. Recommend setting it qps*2.")
|
||||
gfs.StringVar(&s.LeaderElectionResourceLock, "leader-election-resource-lock", s.LeaderElectionResourceLock, "The resource lock to use for leader election")
|
||||
gfs.DurationVar(&s.LeaseDuration, "leader-election-lease-duration", s.LeaseDuration,
|
||||
"The duration that non-leader candidates will wait to force acquire leadership")
|
||||
gfs.DurationVar(&s.RenewDeadLine, "leader-election-renew-deadline", s.RenewDeadLine,
|
||||
@@ -129,8 +131,6 @@ func (s *CoreOptions) Flags() cliflag.NamedFlagSets {
|
||||
gfs.BoolVar(&s.EnableClusterGateway, "enable-cluster-gateway", s.EnableClusterGateway, "Enable cluster-gateway to use multicluster, disabled by default.")
|
||||
gfs.BoolVar(&s.EnableClusterMetrics, "enable-cluster-metrics", s.EnableClusterMetrics, "Enable cluster-metrics-management to collect metrics from clusters with cluster-gateway, disabled by default. When this param is enabled, enable-cluster-gateway should be enabled")
|
||||
gfs.DurationVar(&s.ClusterMetricsInterval, "cluster-metrics-interval", s.ClusterMetricsInterval, "The interval that ClusterMetricsMgr will collect metrics from clusters, default value is 15 seconds.")
|
||||
gfs.BoolVar(&providers.EnableExternalPackageForDefaultCompiler, "enable-external-package-for-default-compiler", providers.EnableExternalPackageForDefaultCompiler, "Enable external package for default compiler")
|
||||
gfs.BoolVar(&providers.EnableExternalPackageWatchForDefaultCompiler, "enable-external-package-watch-for-default-compiler", providers.EnableExternalPackageWatchForDefaultCompiler, "Enable external package watch for default compiler")
|
||||
|
||||
s.ControllerArgs.AddFlags(fss.FlagSet("controllerArgs"), s.ControllerArgs)
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ func TestCoreOptions_Flags(t *testing.T) {
|
||||
"--leader-election-lease-duration=3s",
|
||||
"--leader-election-namespace=test-namespace",
|
||||
"--leader-election-renew-deadline=5s",
|
||||
"--leader-election-resource-lock=/leases",
|
||||
"--leader-election-retry-period=3s",
|
||||
"--log-debug=true",
|
||||
"--log-file-max-size=50",
|
||||
@@ -69,27 +70,28 @@ func TestCoreOptions_Flags(t *testing.T) {
|
||||
}
|
||||
|
||||
expected := &CoreOptions{
|
||||
UseWebhook: true,
|
||||
CertDir: "/path/to/cert",
|
||||
WebhookPort: 8080,
|
||||
MetricsAddr: "/metrics",
|
||||
EnableLeaderElection: true,
|
||||
LeaderElectionNamespace: "test-namespace",
|
||||
LogFilePath: "/path/to/log",
|
||||
LogFileMaxSize: 50,
|
||||
LogDebug: true,
|
||||
ControllerArgs: &oamcontroller.Args{},
|
||||
HealthAddr: "/healthz",
|
||||
StorageDriver: "",
|
||||
InformerSyncPeriod: 3 * time.Second,
|
||||
QPS: 200,
|
||||
Burst: 500,
|
||||
LeaseDuration: 3 * time.Second,
|
||||
RenewDeadLine: 5 * time.Second,
|
||||
RetryPeriod: 3 * time.Second,
|
||||
EnableClusterGateway: true,
|
||||
EnableClusterMetrics: true,
|
||||
ClusterMetricsInterval: 5 * time.Second,
|
||||
UseWebhook: true,
|
||||
CertDir: "/path/to/cert",
|
||||
WebhookPort: 8080,
|
||||
MetricsAddr: "/metrics",
|
||||
EnableLeaderElection: true,
|
||||
LeaderElectionNamespace: "test-namespace",
|
||||
LogFilePath: "/path/to/log",
|
||||
LogFileMaxSize: 50,
|
||||
LogDebug: true,
|
||||
ControllerArgs: &oamcontroller.Args{},
|
||||
HealthAddr: "/healthz",
|
||||
StorageDriver: "",
|
||||
InformerSyncPeriod: 3 * time.Second,
|
||||
QPS: 200,
|
||||
Burst: 500,
|
||||
LeaderElectionResourceLock: "/leases",
|
||||
LeaseDuration: 3 * time.Second,
|
||||
RenewDeadLine: 5 * time.Second,
|
||||
RetryPeriod: 3 * time.Second,
|
||||
EnableClusterGateway: true,
|
||||
EnableClusterMetrics: true,
|
||||
ClusterMetricsInterval: 5 * time.Second,
|
||||
}
|
||||
|
||||
if !cmp.Equal(opt, expected, cmp.AllowUnexported(CoreOptions{})) {
|
||||
|
||||
@@ -29,19 +29,16 @@ import (
|
||||
"github.com/kubevela/pkg/controller/sharding"
|
||||
"github.com/kubevela/pkg/meta"
|
||||
"github.com/kubevela/pkg/util/profiling"
|
||||
"github.com/kubevela/workflow/pkg/cue/packages"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/klog/v2"
|
||||
"k8s.io/klog/v2/textlogger"
|
||||
"k8s.io/klog/v2/klogr"
|
||||
ctrl "sigs.k8s.io/controller-runtime"
|
||||
ctrlcache "sigs.k8s.io/controller-runtime/pkg/cache"
|
||||
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
|
||||
"sigs.k8s.io/controller-runtime/pkg/healthz"
|
||||
"sigs.k8s.io/controller-runtime/pkg/manager"
|
||||
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
|
||||
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
|
||||
ctrlwebhook "sigs.k8s.io/controller-runtime/pkg/webhook"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1beta1"
|
||||
"github.com/oam-dev/kubevela/apis/types"
|
||||
@@ -127,7 +124,7 @@ func run(ctx context.Context, s *options.CoreOptions) error {
|
||||
}
|
||||
}
|
||||
|
||||
ctrl.SetLogger(textlogger.NewLogger(textlogger.NewConfig()))
|
||||
ctrl.SetLogger(klogr.New())
|
||||
|
||||
if utilfeature.DefaultMutableFeatureGate.Enabled(features.ApplyOnce) {
|
||||
commonconfig.ApplicationReSyncPeriod = s.InformerSyncPeriod
|
||||
@@ -136,39 +133,27 @@ func run(ctx context.Context, s *options.CoreOptions) error {
|
||||
leaderElectionID := util.GenerateLeaderElectionID(types.KubeVelaName, s.ControllerArgs.IgnoreAppWithoutControllerRequirement)
|
||||
leaderElectionID += sharding.GetShardIDSuffix()
|
||||
mgr, err := ctrl.NewManager(restConfig, ctrl.Options{
|
||||
Scheme: scheme,
|
||||
Metrics: metricsserver.Options{
|
||||
BindAddress: s.MetricsAddr,
|
||||
},
|
||||
LeaderElection: s.EnableLeaderElection,
|
||||
LeaderElectionNamespace: s.LeaderElectionNamespace,
|
||||
LeaderElectionID: leaderElectionID,
|
||||
WebhookServer: ctrlwebhook.NewServer(ctrlwebhook.Options{
|
||||
Port: s.WebhookPort,
|
||||
CertDir: s.CertDir,
|
||||
}),
|
||||
HealthProbeBindAddress: s.HealthAddr,
|
||||
LeaseDuration: &s.LeaseDuration,
|
||||
RenewDeadline: &s.RenewDeadLine,
|
||||
RetryPeriod: &s.RetryPeriod,
|
||||
NewClient: velaclient.DefaultNewControllerClient,
|
||||
NewCache: cache.BuildCache(ctx,
|
||||
ctrlcache.Options{
|
||||
Scheme: scheme,
|
||||
SyncPeriod: &s.InformerSyncPeriod,
|
||||
// SyncPeriod is configured with default value, aka. 10h. First, controller-runtime does not
|
||||
// recommend use it as a time trigger, instead, it is expected to work for failure tolerance
|
||||
// of controller-runtime. Additionally, set this value will affect not only application
|
||||
// controller but also all other controllers like definition controller. Therefore, for
|
||||
// functionalities like state-keep, they should be invented in other ways.
|
||||
},
|
||||
&v1beta1.Application{}, &v1beta1.ApplicationRevision{}, &v1beta1.ResourceTracker{},
|
||||
),
|
||||
Client: ctrlclient.Options{
|
||||
Cache: &ctrlclient.CacheOptions{
|
||||
DisableFor: cache.NewResourcesToDisableCache(),
|
||||
},
|
||||
},
|
||||
Scheme: scheme,
|
||||
MetricsBindAddress: s.MetricsAddr,
|
||||
LeaderElection: s.EnableLeaderElection,
|
||||
LeaderElectionNamespace: s.LeaderElectionNamespace,
|
||||
LeaderElectionID: leaderElectionID,
|
||||
Port: s.WebhookPort,
|
||||
CertDir: s.CertDir,
|
||||
HealthProbeBindAddress: s.HealthAddr,
|
||||
LeaderElectionResourceLock: s.LeaderElectionResourceLock,
|
||||
LeaseDuration: &s.LeaseDuration,
|
||||
RenewDeadline: &s.RenewDeadLine,
|
||||
RetryPeriod: &s.RetryPeriod,
|
||||
SyncPeriod: &s.InformerSyncPeriod,
|
||||
// SyncPeriod is configured with default value, aka. 10h. First, controller-runtime does not
|
||||
// recommend use it as a time trigger, instead, it is expected to work for failure tolerance
|
||||
// of controller-runtime. Additionally, set this value will affect not only application
|
||||
// controller but also all other controllers like definition controller. Therefore, for
|
||||
// functionalities like state-keep, they should be invented in other ways.
|
||||
NewClient: velaclient.DefaultNewControllerClient,
|
||||
NewCache: cache.BuildCache(ctx, scheme, &v1beta1.Application{}, &v1beta1.ApplicationRevision{}, &v1beta1.ResourceTracker{}),
|
||||
ClientDisableCacheFor: cache.NewResourcesToDisableCache(),
|
||||
})
|
||||
if err != nil {
|
||||
klog.ErrorS(err, "Unable to create a controller manager")
|
||||
@@ -180,6 +165,15 @@ func run(ctx context.Context, s *options.CoreOptions) error {
|
||||
return err
|
||||
}
|
||||
|
||||
pd, err := packages.NewPackageDiscover(mgr.GetConfig())
|
||||
if err != nil {
|
||||
klog.Error(err, "Failed to create CRD discovery for CUE package client")
|
||||
if !packages.IsCUEParseErr(err) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
s.ControllerArgs.PackageDiscover = pd
|
||||
|
||||
if !sharding.EnableSharding {
|
||||
if err = prepareRun(ctx, mgr, s); err != nil {
|
||||
return err
|
||||
@@ -264,7 +258,10 @@ func registerHealthChecks(mgr ctrl.Manager) error {
|
||||
return err
|
||||
}
|
||||
// TODO: change the health check to be different from readiness check
|
||||
return mgr.AddHealthzCheck("ping", healthz.Ping)
|
||||
if err := mgr.AddHealthzCheck("ping", healthz.Ping); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// waitWebhookSecretVolume waits for webhook secret ready to avoid mgr running crash
|
||||
|
||||
@@ -17,12 +17,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/oam-dev/kubevela/references/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
|
||||
command := cli.NewCommand()
|
||||
|
||||
if err := command.Execute(); err != nil {
|
||||
|
||||
@@ -9,40 +9,26 @@ spec:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
output: {
|
||||
apiVersion: "apps/v1"
|
||||
kind: "Deployment"
|
||||
spec: {
|
||||
selector: {
|
||||
matchLabels: {
|
||||
app: "nginx"
|
||||
}
|
||||
}
|
||||
template: {
|
||||
metadata: {
|
||||
labels: {
|
||||
app: "nginx"
|
||||
}
|
||||
}
|
||||
spec: {
|
||||
containers: [
|
||||
{
|
||||
name: "nginx"
|
||||
image: parameter.image
|
||||
ports: [
|
||||
{
|
||||
containerPort: 80
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
outputs: {}
|
||||
parameter: {
|
||||
"image": string
|
||||
}
|
||||
kube:
|
||||
template:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
ports:
|
||||
- containerPort: 80
|
||||
parameters:
|
||||
- name: image
|
||||
required: true
|
||||
type: string
|
||||
fieldPaths:
|
||||
- "spec.template.spec.containers[0].image"
|
||||
|
||||
@@ -1,244 +1,285 @@
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: ComponentDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: ""
|
||||
labels: {}
|
||||
name: base-service
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
output: {
|
||||
apiVersion: "apps/v1"
|
||||
kind: "Deployment"
|
||||
metadata: {
|
||||
labels: {
|
||||
appId: "BASE-SERVICE"
|
||||
appName: "base-service"
|
||||
version: "0.0.1"
|
||||
}
|
||||
name: "base-service"
|
||||
}
|
||||
spec: {
|
||||
replicas: 2
|
||||
revisionHistoryLimit: 5
|
||||
selector: matchLabels: app: "base-service"
|
||||
template: {
|
||||
metadata: labels: {
|
||||
antiAffinity: "none"
|
||||
app: "base-service"
|
||||
appId: "BASE-SERVICE"
|
||||
version: "0.0.1"
|
||||
cluster: parameter.cluster
|
||||
}
|
||||
spec: {
|
||||
affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: [
|
||||
{
|
||||
podAffinityTerm: {
|
||||
labelSelector: matchExpressions: [
|
||||
{
|
||||
key: "app"
|
||||
operator: "In"
|
||||
values: ["base-service"]
|
||||
},
|
||||
{
|
||||
key: "antiAffinity"
|
||||
operator: "In"
|
||||
values: ["none"]
|
||||
},
|
||||
]
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
}
|
||||
weight: 100
|
||||
},
|
||||
]
|
||||
containers: [
|
||||
{
|
||||
env: [
|
||||
{name: "NODE_IP", valueFrom: fieldRef: fieldPath: "status.hostIP"},
|
||||
{name: "POD_IP", valueFrom: fieldRef: fieldPath: "status.podIP"},
|
||||
{name: "POD_NAME", valueFrom: fieldRef: fieldPath: "metadata.name"},
|
||||
{name: "POD_NAMESPACE", valueFrom: fieldRef: fieldPath: "metadata.namespace"},
|
||||
{name: "APP_NAME", value: "base-service"},
|
||||
{name: "LOG_BASE", value: "/data/log"},
|
||||
{name: "RUNTIME_CLUSTER", value: parameter.cluster},
|
||||
]
|
||||
image: parameter.image
|
||||
imagePullPolicy: "Always"
|
||||
name: "base-service"
|
||||
ports: [
|
||||
{containerPort: 11223, protocol: "TCP"},
|
||||
{containerPort: 11224, protocol: "TCP"},
|
||||
]
|
||||
volumeMounts: [
|
||||
{mountPath: "/tmp/data/log/base-service", name: "log-volume"},
|
||||
{mountPath: "/data", name: "sidecar-sre"},
|
||||
{mountPath: "/app/skywalking", name: "skywalking"},
|
||||
]
|
||||
},
|
||||
]
|
||||
initContainers: [
|
||||
{
|
||||
args: ["echo \"do something\""]
|
||||
command: ["/bin/sh", "-c"]
|
||||
env: [
|
||||
{name: "NODE_IP", valueFrom: fieldRef: fieldPath: "status.hostIP"},
|
||||
{name: "POD_IP", valueFrom: fieldRef: fieldPath: "status.podIP"},
|
||||
{name: "APP_NAME", value: "base-service"},
|
||||
]
|
||||
image: "busybox"
|
||||
imagePullPolicy: "Always"
|
||||
name: "sidecar-sre"
|
||||
resources: limits: {
|
||||
cpu: "100m"
|
||||
memory: "100Mi"
|
||||
}
|
||||
volumeMounts: [
|
||||
{mountPath: "/tmp/data/log/base-service", name: "log-volume"},
|
||||
{mountPath: "/scratch", name: "sidecar-sre"},
|
||||
]
|
||||
},
|
||||
]
|
||||
terminationGracePeriodSeconds: 120
|
||||
volumes: [
|
||||
{hostPath: {path: "/logs/dev/base-service", type: "DirectoryOrCreate"}, name: "log-volume"},
|
||||
{emptyDir: {}, name: "sidecar-sre"},
|
||||
{emptyDir: {}, name: "skywalking"},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
image: string
|
||||
cluster: string
|
||||
}
|
||||
workload:
|
||||
definition:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
schematic:
|
||||
kube:
|
||||
template:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
appId: BASE-SERVICE
|
||||
appName: base-service
|
||||
version: 0.0.1
|
||||
name: base-service
|
||||
spec:
|
||||
replicas: 2
|
||||
revisionHistoryLimit: 5
|
||||
selector:
|
||||
matchLabels:
|
||||
app: base-service
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
antiAffinity: none
|
||||
app: base-service
|
||||
appId: BASE-SERVICE
|
||||
version: 0.0.1
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- base-service
|
||||
- key: antiAffinity
|
||||
operator: In
|
||||
values:
|
||||
- none
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
containers:
|
||||
- env:
|
||||
- name: NODE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: APP_NAME
|
||||
value: base-service
|
||||
- name: LOG_BASE
|
||||
value: /data/log
|
||||
- name: RUNTIME_CLUSTER
|
||||
value: default
|
||||
image: base-service
|
||||
imagePullPolicy: Always
|
||||
name: base-service
|
||||
ports:
|
||||
- containerPort: 11223
|
||||
protocol: TCP
|
||||
- containerPort: 11224
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/data/log/base-service
|
||||
name: log-volume
|
||||
- mountPath: /data
|
||||
name: sidecar-sre
|
||||
- mountPath: /app/skywalking
|
||||
name: skywalking
|
||||
initContainers:
|
||||
- args:
|
||||
- 'echo "do something" '
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
env:
|
||||
- name: NODE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: APP_NAME
|
||||
value: base-service
|
||||
image: busybox
|
||||
imagePullPolicy: Always
|
||||
name: sidecar-sre
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/data/log/base-service
|
||||
name: log-volume
|
||||
- mountPath: /scratch
|
||||
name: sidecar-sre
|
||||
terminationGracePeriodSeconds: 120
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /logs/dev/base-service
|
||||
type: DirectoryOrCreate
|
||||
name: log-volume
|
||||
- emptyDir: {}
|
||||
name: sidecar-sre
|
||||
- emptyDir: {}
|
||||
name: skywalking
|
||||
parameters:
|
||||
- name: image
|
||||
required: true
|
||||
type: string
|
||||
fieldPaths:
|
||||
- "spec.template.spec.containers[0].image"
|
||||
- name: cluster
|
||||
required: true
|
||||
type: string
|
||||
fieldPaths:
|
||||
- "spec.template.spec.containers[0].env[6].value"
|
||||
- "spec.template.metadata.labels.cluster"
|
||||
---
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: ComponentDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
definition.oam.dev/description: ""
|
||||
labels: {}
|
||||
name: proxy-service
|
||||
spec:
|
||||
schematic:
|
||||
cue:
|
||||
template: |
|
||||
output: {
|
||||
apiVersion: "argoproj.io/v1alpha1"
|
||||
kind: "Rollout"
|
||||
metadata: {
|
||||
labels: {
|
||||
appId: "PROXY-SERVICE"
|
||||
appName: "proxy-service"
|
||||
version: "0.0.0"
|
||||
}
|
||||
name: "proxy-service"
|
||||
}
|
||||
spec: {
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 1
|
||||
selector: matchLabels: app: "proxy-service"
|
||||
strategy: canary: steps: [
|
||||
{setWeight: 50},
|
||||
{pause: {}},
|
||||
]
|
||||
template: {
|
||||
metadata: labels: {
|
||||
app: "proxy-service"
|
||||
appId: "PROXY-SERVICE"
|
||||
cluster: parameter.cluster
|
||||
version: "0.0.1"
|
||||
}
|
||||
spec: {
|
||||
affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: [
|
||||
{
|
||||
podAffinityTerm: {
|
||||
labelSelector: matchExpressions: [
|
||||
{
|
||||
key: "app"
|
||||
operator: "In"
|
||||
values: ["proxy-service"]
|
||||
},
|
||||
]
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
}
|
||||
weight: 100
|
||||
},
|
||||
]
|
||||
containers: [
|
||||
{
|
||||
env: [
|
||||
{name: "NODE_IP", valueFrom: fieldRef: fieldPath: "status.hostIP"},
|
||||
{name: "POD_IP", valueFrom: fieldRef: fieldPath: "status.podIP"},
|
||||
{name: "POD_NAME", valueFrom: fieldRef: fieldPath: "metadata.name"},
|
||||
{name: "POD_NAMESPACE", valueFrom: fieldRef: fieldPath: "metadata.namespace"},
|
||||
{name: "APP_NAME", value: "proxy-service"},
|
||||
{name: "LOG_BASE", value: "/app/data/log"},
|
||||
{name: "RUNTIME_CLUSTER", value: parameter.cluster},
|
||||
]
|
||||
#image: "proxy-service:0.1"
|
||||
image: parameter.image
|
||||
imagePullPolicy: "Always"
|
||||
name: "proxy-service"
|
||||
ports: [
|
||||
{containerPort: 11024, protocol: "TCP"},
|
||||
{containerPort: 11025, protocol: "TCP"},
|
||||
]
|
||||
volumeMounts: [
|
||||
{mountPath: "/tmp/data/log/proxy-service", name: "log-volume"},
|
||||
{mountPath: "/app/data", name: "sidecar-sre"},
|
||||
{mountPath: "/app/skywalking", name: "skywalking"},
|
||||
]
|
||||
},
|
||||
]
|
||||
initContainers: [
|
||||
{
|
||||
args: ["echo \"do something\" "]
|
||||
command: ["/bin/sh", "-c"]
|
||||
env: [
|
||||
{name: "NODE_IP", valueFrom: fieldRef: fieldPath: "status.hostIP"},
|
||||
{name: "POD_IP", valueFrom: fieldRef: fieldPath: "status.podIP"},
|
||||
{name: "APP_NAME", value: "proxy-service"},
|
||||
]
|
||||
image: "busybox"
|
||||
imagePullPolicy: "Always"
|
||||
name: "sidecar-sre"
|
||||
resources: limits: {
|
||||
cpu: "100m"
|
||||
memory: "100Mi"
|
||||
}
|
||||
volumeMounts: [
|
||||
{mountPath: "/tmp/data/log/proxy-service", name: "log-volume"},
|
||||
{mountPath: "/scratch", name: "sidecar-sre"},
|
||||
]
|
||||
},
|
||||
]
|
||||
terminationGracePeriodSeconds: 120
|
||||
volumes: [
|
||||
{hostPath: {path: "/app/logs/dev/proxy-service", type: "DirectoryOrCreate"}, name: "log-volume"},
|
||||
{emptyDir: {}, name: "sidecar-sre"},
|
||||
{emptyDir: {}, name: "skywalking"},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
image: string
|
||||
cluster: string
|
||||
}
|
||||
workload:
|
||||
definition:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Rollout
|
||||
|
||||
schematic:
|
||||
kube:
|
||||
template:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Rollout
|
||||
metadata:
|
||||
labels:
|
||||
appId: PROXY-SERVICE
|
||||
appName: proxy-service
|
||||
version: 0.0.0
|
||||
name: proxy-service
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: proxy-service
|
||||
strategy:
|
||||
canary:
|
||||
steps:
|
||||
- setWeight: 50
|
||||
- pause: {}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: proxy-service
|
||||
appId: PROXY-SERVICE
|
||||
cluster: default
|
||||
version: 0.0.1
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- proxy-service
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
containers:
|
||||
- env:
|
||||
- name: NODE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: APP_NAME
|
||||
value: proxy-service
|
||||
- name: LOG_BASE
|
||||
value: /app/data/log
|
||||
- name: RUNTIME_CLUSTER
|
||||
value: default
|
||||
image: proxy-service:0.1
|
||||
imagePullPolicy: Always
|
||||
name: proxy-service
|
||||
ports:
|
||||
- containerPort: 11024
|
||||
protocol: TCP
|
||||
- containerPort: 11025
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/data/log/proxy-service
|
||||
name: log-volume
|
||||
- mountPath: /app/data
|
||||
name: sidecar-sre
|
||||
- mountPath: /app/skywalking
|
||||
name: skywalking
|
||||
initContainers:
|
||||
- args:
|
||||
- 'echo "do something" '
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
env:
|
||||
- name: NODE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: APP_NAME
|
||||
value: proxy-service
|
||||
image: busybox
|
||||
imagePullPolicy: Always
|
||||
name: sidecar-sre
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/data/log/proxy-service
|
||||
name: log-volume
|
||||
- mountPath: /scratch
|
||||
name: sidecar-sre
|
||||
terminationGracePeriodSeconds: 120
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /app/logs/dev/proxy-service
|
||||
type: DirectoryOrCreate
|
||||
name: log-volume
|
||||
- emptyDir: {}
|
||||
name: sidecar-sre
|
||||
- emptyDir: {}
|
||||
name: skywalking
|
||||
parameters:
|
||||
- name: image
|
||||
required: true
|
||||
type: string
|
||||
fieldPaths:
|
||||
- "spec.template.spec.containers[0].image"
|
||||
- name: cluster
|
||||
required: true
|
||||
type: string
|
||||
fieldPaths:
|
||||
- "spec.template.spec.containers[0].env[5].value"
|
||||
- "spec.template.metadata.labels.cluster"
|
||||
---
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: TraitDefinition
|
||||
|
||||
@@ -26,7 +26,7 @@ spec:
|
||||
type: webhook
|
||||
outputs:
|
||||
- name: mysecret
|
||||
valueFrom: webhook.req.$returns.response.body
|
||||
valueFrom: webhook.http.response.body
|
||||
properties:
|
||||
url:
|
||||
value: <url>
|
||||
|
||||
@@ -16,9 +16,9 @@ spec:
|
||||
type: read-object
|
||||
outputs:
|
||||
- name: cpu
|
||||
valueFrom: output.$returns.value.data["cpu"]
|
||||
valueFrom: output.value.data["cpu"]
|
||||
- name: memory
|
||||
valueFrom: output.$returns.value.data["memory"]
|
||||
valueFrom: output.value.data["memory"]
|
||||
properties:
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
|
||||
@@ -31,7 +31,7 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
image: ghcr.io/fluxcd/helm-controller:v0.11.1
|
||||
image: fluxcd/helm-controller:v0.11.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
|
||||
@@ -31,7 +31,7 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
image: ghcr.io/fluxcd/kustomize-controller:v0.13.1
|
||||
image: fluxcd/kustomize-controller:v0.13.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
|
||||
@@ -35,7 +35,7 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
image: ghcr.io/fluxcd/source-controller:v0.15.3
|
||||
image: fluxcd/source-controller:v0.15.3
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
|
||||
@@ -27,7 +27,4 @@ spec:
|
||||
url: https://charts.kubevela.net/addons
|
||||
chart: terraform-controller
|
||||
version: 0.2.11
|
||||
values:
|
||||
image:
|
||||
repository: ghcr.io/kubevela/oamdev/terraform-controller
|
||||
tag: v0.8.0
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ var ApplicationInitIntercativeCliContext = func(context string, appName string,
|
||||
var ApplicationDeleteWithWaitOptions = func(context string, appName string) bool {
|
||||
return ginkgo.It(context+": should print successful deletion information", func() {
|
||||
cli := fmt.Sprintf("vela delete %s --wait -y", appName)
|
||||
output, err := e2e.LongTimeExec(cli, 10*time.Second)
|
||||
output, err := e2e.ExecAndTerminate(cli)
|
||||
gomega.Expect(err).NotTo(gomega.HaveOccurred())
|
||||
gomega.Expect(output).To(gomega.ContainSubstring("succeeded"))
|
||||
})
|
||||
@@ -215,7 +215,7 @@ var ApplicationDeleteWithForceOptions = func(context string, appName string) boo
|
||||
cli := fmt.Sprintf("vela delete %s --force -y", appName)
|
||||
output, err := e2e.LongTimeExec(cli, 3*time.Minute)
|
||||
gomega.Expect(err).NotTo(gomega.HaveOccurred())
|
||||
gomega.Expect(output).To(gomega.ContainSubstring("context deadline exceeded"))
|
||||
gomega.Expect(output).To(gomega.ContainSubstring("timed out"))
|
||||
|
||||
app = new(v1beta1.Application)
|
||||
gomega.Eventually(func(g gomega.Gomega) {
|
||||
|
||||
@@ -143,7 +143,7 @@ var _ = Describe("Test Kubectl Plugin", func() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(output).ShouldNot(ContainSubstring("addRevisionLabel"))
|
||||
})
|
||||
It("Test show webservice def with cue ignore annotation2 ", func() {
|
||||
It("Test show webservice def with cue ignore annotation ", func() {
|
||||
tdName := "mywebservice"
|
||||
output, err := e2e.Exec(fmt.Sprintf("kubectl-vela show %s -n default", tdName))
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
260
go.mod
260
go.mod
@@ -1,9 +1,9 @@
|
||||
module github.com/oam-dev/kubevela
|
||||
|
||||
go 1.22.0
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
cuelang.org/go v0.9.2
|
||||
cuelang.org/go v0.5.0
|
||||
github.com/AlecAivazis/survey/v2 v2.1.1
|
||||
github.com/FogDong/uitable v0.0.5
|
||||
github.com/Masterminds/semver/v3 v3.2.1
|
||||
@@ -12,188 +12,181 @@ require (
|
||||
github.com/bluele/gcache v0.0.2
|
||||
github.com/briandowns/spinner v1.23.0
|
||||
github.com/chartmuseum/helm-push v0.10.4
|
||||
github.com/containerd/log v0.1.0
|
||||
github.com/crossplane/crossplane-runtime v1.16.0
|
||||
github.com/containerd/containerd v1.7.5
|
||||
github.com/crossplane/crossplane-runtime v0.19.2
|
||||
github.com/cue-exp/kubevelafix v0.0.0-20220922150317-aead819d979d
|
||||
github.com/dave/jennifer v1.6.1
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/ettle/strcase v0.2.0
|
||||
github.com/fatih/color v1.16.0
|
||||
github.com/ettle/strcase v0.1.1
|
||||
github.com/fatih/color v1.15.0
|
||||
github.com/fluxcd/helm-controller/api v0.32.2
|
||||
github.com/fluxcd/source-controller/api v0.24.4
|
||||
github.com/form3tech-oss/jwt-go v3.2.5+incompatible
|
||||
github.com/gdamore/tcell/v2 v2.6.0
|
||||
github.com/getkin/kin-openapi v0.118.0
|
||||
github.com/go-git/go-git/v5 v5.8.1
|
||||
github.com/go-logr/logr v1.4.1
|
||||
github.com/go-logr/logr v1.3.0
|
||||
github.com/go-resty/resty/v2 v2.8.0
|
||||
github.com/golang/mock v1.6.0
|
||||
github.com/google/go-cmp v0.6.0
|
||||
github.com/google/go-containerregistry v0.18.0
|
||||
github.com/google/go-containerregistry v0.16.1
|
||||
github.com/google/go-github/v32 v32.1.0
|
||||
github.com/gosuri/uitable v0.0.4
|
||||
github.com/hashicorp/go-version v1.6.0
|
||||
github.com/hashicorp/hcl/v2 v2.18.0
|
||||
github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174
|
||||
github.com/imdario/mergo v0.3.16
|
||||
github.com/kubevela/pkg v1.9.3-0.20241203070234-2cf98778c0a9
|
||||
github.com/kubevela/workflow v0.6.1-0.20241210074645-d8a85b26c862
|
||||
github.com/kubevela/pkg v1.9.2
|
||||
github.com/kubevela/workflow v0.6.0
|
||||
github.com/kyokomi/emoji v2.2.4+incompatible
|
||||
github.com/magiconair/properties v1.8.7
|
||||
github.com/mattn/go-runewidth v0.0.15
|
||||
github.com/mitchellh/hashstructure/v2 v2.0.2
|
||||
github.com/nacos-group/nacos-sdk-go/v2 v2.2.2
|
||||
github.com/oam-dev/cluster-gateway v1.9.1-0.20241120140625-33c8891b781c
|
||||
github.com/oam-dev/cluster-gateway v1.9.0-alpha.2
|
||||
github.com/oam-dev/cluster-register v1.0.4-0.20230424040021-147f7c1fefe5
|
||||
github.com/oam-dev/terraform-config-inspect v0.0.0-20210418082552-fc72d929aa28
|
||||
github.com/oam-dev/terraform-controller v0.8.0
|
||||
github.com/olekukonko/tablewriter v0.0.5
|
||||
github.com/onsi/ginkgo/v2 v2.14.0
|
||||
github.com/onsi/gomega v1.30.0
|
||||
github.com/onsi/ginkgo/v2 v2.13.1
|
||||
github.com/onsi/gomega v1.29.0
|
||||
github.com/openkruise/kruise-api v1.4.0
|
||||
github.com/openkruise/rollouts v0.3.0
|
||||
github.com/pelletier/go-toml v1.9.5
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/prometheus/client_golang v1.18.0
|
||||
github.com/prometheus/client_model v0.5.0
|
||||
github.com/prometheus/client_golang v1.16.0
|
||||
github.com/prometheus/client_model v0.4.0
|
||||
github.com/rivo/tview v0.0.0-20221128165837-db36428c92d9
|
||||
github.com/rogpeppe/go-internal v1.10.0
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/spf13/cobra v1.8.0
|
||||
github.com/spf13/cobra v1.7.0
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/stretchr/testify v1.9.0
|
||||
github.com/stretchr/testify v1.8.4
|
||||
github.com/tidwall/gjson v1.14.4
|
||||
github.com/wercker/stern v0.0.0-20190705090245-4fa46dd6987f
|
||||
github.com/xanzy/go-gitlab v0.91.1
|
||||
github.com/xlab/treeprint v1.2.0
|
||||
go.uber.org/multierr v1.11.0
|
||||
golang.org/x/crypto v0.25.0
|
||||
golang.org/x/mod v0.17.0
|
||||
golang.org/x/oauth2 v0.20.0
|
||||
golang.org/x/sync v0.7.0
|
||||
golang.org/x/term v0.22.0
|
||||
golang.org/x/text v0.16.0
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d
|
||||
golang.org/x/crypto v0.21.0
|
||||
golang.org/x/oauth2 v0.12.0
|
||||
golang.org/x/sync v0.4.0
|
||||
golang.org/x/term v0.18.0
|
||||
golang.org/x/text v0.14.0
|
||||
golang.org/x/tools v0.14.0
|
||||
gomodules.xyz/jsonpatch/v2 v2.4.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
helm.sh/helm/v3 v3.14.4
|
||||
k8s.io/api v0.29.2
|
||||
k8s.io/apiextensions-apiserver v0.29.2
|
||||
k8s.io/apimachinery v0.29.2
|
||||
k8s.io/apiserver v0.29.2
|
||||
k8s.io/cli-runtime v0.29.2
|
||||
k8s.io/client-go v0.29.2
|
||||
k8s.io/component-base v0.29.2
|
||||
helm.sh/helm/v3 v3.11.2
|
||||
k8s.io/api v0.26.3
|
||||
k8s.io/apiextensions-apiserver v0.26.3
|
||||
k8s.io/apimachinery v0.26.3
|
||||
k8s.io/apiserver v0.26.3
|
||||
k8s.io/cli-runtime v0.26.3
|
||||
k8s.io/client-go v0.26.3
|
||||
k8s.io/component-base v0.26.3
|
||||
k8s.io/helm v2.17.0+incompatible
|
||||
k8s.io/klog/v2 v2.120.1
|
||||
k8s.io/kube-aggregator v0.27.2
|
||||
k8s.io/kubectl v0.29.2
|
||||
k8s.io/metrics v0.29.2
|
||||
k8s.io/utils v0.0.0-20240310230437-4693a0247e57
|
||||
open-cluster-management.io/api v0.11.0
|
||||
sigs.k8s.io/controller-runtime v0.17.6
|
||||
sigs.k8s.io/controller-tools v0.14.0
|
||||
k8s.io/klog/v2 v2.100.1
|
||||
k8s.io/kube-aggregator v0.26.3
|
||||
k8s.io/kubectl v0.26.3
|
||||
k8s.io/metrics v0.26.3
|
||||
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5
|
||||
open-cluster-management.io/api v0.10.1
|
||||
sigs.k8s.io/controller-runtime v0.14.6
|
||||
sigs.k8s.io/controller-tools v0.11.4
|
||||
sigs.k8s.io/gateway-api v0.7.1
|
||||
sigs.k8s.io/kind v0.20.0
|
||||
sigs.k8s.io/yaml v1.4.0
|
||||
sigs.k8s.io/yaml v1.3.0
|
||||
)
|
||||
|
||||
require (
|
||||
cuelabs.dev/go/oci/ociregistry v0.0.0-20240404174027-a39bec0462d2 // indirect
|
||||
dario.cat/mergo v1.0.0 // indirect
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
|
||||
github.com/BurntSushi/toml v1.3.2 // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
|
||||
github.com/BurntSushi/toml v1.2.1 // indirect
|
||||
github.com/MakeNowJust/heredoc v1.0.0 // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/semver v1.5.0 // indirect
|
||||
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
|
||||
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
|
||||
github.com/Masterminds/squirrel v1.5.4 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.2 // indirect
|
||||
github.com/Microsoft/hcsshim v0.12.2 // indirect
|
||||
github.com/Masterminds/squirrel v1.5.3 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/NYTimes/gziphandler v1.1.1 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect
|
||||
github.com/acomagu/bufpipe v1.0.4 // indirect
|
||||
github.com/agext/levenshtein v1.2.3 // indirect
|
||||
github.com/alessio/shellescape v1.4.1 // indirect
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704 // indirect
|
||||
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
|
||||
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
|
||||
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
|
||||
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
||||
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/blang/semver/v4 v4.0.0 // indirect
|
||||
github.com/buger/jsonparser v1.1.1 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/chai2010/gettext-go v1.0.2 // indirect
|
||||
github.com/cloudflare/circl v1.3.7 // indirect
|
||||
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
|
||||
github.com/containerd/containerd v1.7.24 // indirect
|
||||
github.com/containerd/errdefs v0.3.0 // indirect
|
||||
github.com/containerd/platforms v0.2.1 // indirect
|
||||
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
|
||||
github.com/coreos/go-semver v0.3.1 // indirect
|
||||
github.com/cloudflare/circl v1.3.3 // indirect
|
||||
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
|
||||
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
|
||||
github.com/coreos/go-semver v0.3.0 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||
github.com/creack/pty v1.1.18 // indirect
|
||||
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
|
||||
github.com/distribution/reference v0.6.0 // indirect
|
||||
github.com/docker/cli v26.0.0+incompatible // indirect
|
||||
github.com/docker/distribution v2.8.3+incompatible // indirect
|
||||
github.com/docker/docker v26.0.0+incompatible // indirect
|
||||
github.com/docker/docker-credential-helpers v0.8.1 // indirect
|
||||
github.com/docker/go-connections v0.5.0 // indirect
|
||||
github.com/docker/cli v24.0.0+incompatible // indirect
|
||||
github.com/docker/distribution v2.8.2+incompatible // indirect
|
||||
github.com/docker/docker v24.0.0+incompatible // indirect
|
||||
github.com/docker/docker-credential-helpers v0.7.0 // indirect
|
||||
github.com/docker/go-connections v0.4.0 // indirect
|
||||
github.com/docker/go-metrics v0.0.1 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
|
||||
github.com/emicklei/proto v1.10.0 // indirect
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
|
||||
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
|
||||
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
|
||||
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
|
||||
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
|
||||
github.com/fatih/camelcase v1.0.0 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.3 // indirect
|
||||
github.com/fluxcd/pkg/apis/acl v0.0.3 // indirect
|
||||
github.com/fluxcd/pkg/apis/kustomize v1.0.0 // indirect
|
||||
github.com/fluxcd/pkg/apis/meta v1.0.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
github.com/fvbommel/sortorder v1.1.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/fvbommel/sortorder v1.0.1 // indirect
|
||||
github.com/gdamore/encoding v1.0.0 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/go-errors/errors v1.5.1 // indirect
|
||||
github.com/go-errors/errors v1.0.1 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.4.1 // indirect
|
||||
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-logr/zapr v1.3.0 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.0 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
github.com/go-logr/zapr v1.2.3 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.0 // indirect
|
||||
github.com/go-openapi/swag v0.19.15 // indirect
|
||||
github.com/go-stack/stack v1.8.1 // indirect
|
||||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
|
||||
github.com/gobuffalo/flect v1.0.2 // indirect
|
||||
github.com/gobuffalo/flect v0.3.0 // indirect
|
||||
github.com/gobwas/glob v0.2.3 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/glog v1.0.0 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/btree v1.1.2 // indirect
|
||||
github.com/google/cel-go v0.17.7 // indirect
|
||||
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/google/btree v1.0.1 // indirect
|
||||
github.com/google/cel-go v0.12.6 // indirect
|
||||
github.com/google/gnostic v0.5.7-v3refs // indirect
|
||||
github.com/google/go-querystring v1.1.0 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 // indirect
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
|
||||
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/gorilla/mux v1.8.1 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/gorilla/mux v1.8.0 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-retryablehttp v0.7.2 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/huandu/xstrings v1.4.0 // indirect
|
||||
@@ -207,17 +200,17 @@ require (
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
|
||||
github.com/kevinburke/ssh_config v1.2.0 // indirect
|
||||
github.com/klauspost/compress v1.17.7 // indirect
|
||||
github.com/klauspost/compress v1.16.5 // indirect
|
||||
github.com/kr/pty v1.1.8 // indirect
|
||||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
|
||||
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
|
||||
github.com/lib/pq v1.10.9 // indirect
|
||||
github.com/lib/pq v1.10.7 // indirect
|
||||
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
@@ -225,28 +218,28 @@ require (
|
||||
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
||||
github.com/moby/locker v1.0.1 // indirect
|
||||
github.com/moby/spdystream v0.2.0 // indirect
|
||||
github.com/moby/term v0.5.0 // indirect
|
||||
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
||||
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
|
||||
github.com/morikuni/aec v1.0.0 // indirect
|
||||
github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
github.com/opencontainers/image-spec v1.1.0 // indirect
|
||||
github.com/opencontainers/image-spec v1.1.0-rc3 // indirect
|
||||
github.com/openshift/library-go v0.0.0-20230327085348-8477ec72b725 // indirect
|
||||
github.com/perimeterx/marshmallow v1.1.4 // indirect
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
|
||||
github.com/pjbgf/sha1cd v0.3.0 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/prometheus/common v0.45.0 // indirect
|
||||
github.com/prometheus/procfs v0.12.0 // indirect
|
||||
github.com/protocolbuffers/txtpbfmt v0.0.0-20230328191034-3462fbc510c0 // indirect
|
||||
github.com/prometheus/common v0.42.0 // indirect
|
||||
github.com/prometheus/procfs v0.10.1 // indirect
|
||||
github.com/protocolbuffers/txtpbfmt v0.0.0-20220428173112-74888fd59c2b // indirect
|
||||
github.com/rivo/uniseg v0.4.3 // indirect
|
||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
||||
github.com/rubenv/sql-migrate v1.5.2 // indirect
|
||||
github.com/rubenv/sql-migrate v1.3.1 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sergi/go-diff v1.1.0 // indirect
|
||||
github.com/shopspring/decimal v1.3.1 // indirect
|
||||
@@ -255,64 +248,61 @@ require (
|
||||
github.com/stoewer/go-strcase v1.2.0 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
github.com/tidwall/pretty v1.2.0 // indirect
|
||||
github.com/vbatts/tar-split v0.11.5 // indirect
|
||||
github.com/vbatts/tar-split v0.11.3 // indirect
|
||||
github.com/xanzy/ssh-agent v0.3.3 // indirect
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
||||
github.com/zclconf/go-cty v1.13.0 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.5.10 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect
|
||||
go.etcd.io/etcd/client/v3 v3.5.10 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
|
||||
go.opentelemetry.io/otel v1.21.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.21.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.21.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
|
||||
go.starlark.net v0.0.0-20240329153429-e6e8e7ce1b7a // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.5.5 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
|
||||
go.etcd.io/etcd/client/v3 v3.5.5 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0 // indirect
|
||||
go.opentelemetry.io/otel v1.14.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v0.37.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.14.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.14.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
|
||||
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/automaxprocs v1.5.3 // indirect
|
||||
go.uber.org/zap v1.26.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
|
||||
golang.org/x/net v0.25.0 // indirect
|
||||
golang.org/x/sys v0.22.0 // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
|
||||
google.golang.org/grpc v1.63.0 // indirect
|
||||
go.uber.org/zap v1.24.0 // indirect
|
||||
golang.org/x/mod v0.13.0 // indirect
|
||||
golang.org/x/net v0.21.0 // indirect
|
||||
golang.org/x/sys v0.18.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
|
||||
google.golang.org/grpc v1.53.0 // indirect
|
||||
google.golang.org/protobuf v1.33.0 // indirect
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/evanphx/json-patch.v5 v5.9.0 // indirect
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
k8s.io/klog v1.0.0 // indirect
|
||||
k8s.io/kms v0.29.3 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20240403164606-bc84c2ddaf99 // indirect
|
||||
oras.land/oras-go v1.2.5 // indirect
|
||||
k8s.io/kms v0.26.3 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
|
||||
oras.land/oras-go v1.2.2 // indirect
|
||||
sigs.k8s.io/apiserver-network-proxy v0.0.30 // indirect
|
||||
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 // indirect
|
||||
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.36 // indirect
|
||||
sigs.k8s.io/apiserver-runtime v1.1.2-0.20221118041430-0a6394f6dda3 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||
sigs.k8s.io/kustomize/api v0.16.0 // indirect
|
||||
sigs.k8s.io/kustomize/kyaml v0.16.0 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
|
||||
sigs.k8s.io/kustomize/api v0.12.1 // indirect
|
||||
sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
|
||||
)
|
||||
|
||||
replace (
|
||||
cloud.google.com/go => cloud.google.com/go v0.100.2
|
||||
github.com/docker/cli => github.com/docker/cli v24.0.9+incompatible
|
||||
github.com/docker/docker => github.com/docker/docker v24.0.9+incompatible
|
||||
github.com/docker/docker-credential-helpers => github.com/docker/docker-credential-helpers v0.7.0
|
||||
github.com/docker/cli => github.com/docker/cli v20.10.9+incompatible
|
||||
github.com/docker/docker => github.com/moby/moby v20.10.24+incompatible
|
||||
github.com/wercker/stern => github.com/oam-dev/stern v1.13.2
|
||||
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00
|
||||
sigs.k8s.io/apiserver-network-proxy/konnectivity-client => sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.36
|
||||
sigs.k8s.io/apiserver-runtime => github.com/kmodules/apiserver-runtime v1.1.2-0.20240303184316-6365e03bf9ac
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user