- Added optional chaining to safely access cluster details in `AddClusterDialog`.
This fix addresses the issue where the page crashes when trying to load details for an inaccessible cluster.
Signed-off-by: am6737 <1359816810@qq.com>
Added `setDefaultProperties` to ensure default values are correctly set for traits like "cpuscaler", "hpa", "resource", and "k8s-update-strategy".
Signed-off-by: am6737 <1359816810@qq.com>
- Added custom width (60vw) to Helm values.yaml dialog for better visibility.
- Enabled close modes: 'close' and 'mask' to improve user experience.
Closes#851
Signed-off-by: am6737 <1359816810@qq.com>
* Update swagger.json by `make update-swagger`.
* Returns a predefined structure instead of a map object to avoid Swagger being unable to generate code correctly
* Delete duplicate runtimes_cluster parameter definition to avoid the code constructed by swagger being unusable
* Add swagger 3.0.json to facilitate developers debugging APIs on the swagger UI.
Signed-off-by: 上郡 <shangjun.csb@alibaba-inc.com>
Co-authored-by: 上郡 <shangjun.csb@alibaba-inc.com>
* Fix: fail to get global config when config not exist in project scope
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
* Add unit test
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
* add test clean up
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
* Fix: infinite forloop
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
* restore 404
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
---------
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
* Fix: Add custom annotation add for application edit page
Signed-off-by: li <1312513963@qq.com>
* update
Signed-off-by: li <1312513963@qq.com>
* update
Signed-off-by: li <1312513963@qq.com>
* Do not override internal annotations
Signed-off-by: li <1312513963@qq.com>
---------
Signed-off-by: li <1312513963@qq.com>
* Fix: Simplify the workspace menus
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: support querying the time of joining project
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the field type
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
---------
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: Sync all admin users to dex server
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: code style
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: unit test
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
---------
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: Add the backend plugin framework
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: add some unit tests
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the package order
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: make the node dashboard plugin to work
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: change the code style
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: e2e test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: Support to prxoy the multiple cluster API
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: Change the menu
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: Can't build ui package
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: e2e test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: unit test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change some words
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
---------
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: UI crash when the plugin doesn't build.
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: ignore the js file in the pkg dir
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
---------
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support get secret from project config for helm chart
Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
* Feat: support get secret from project config for helm chart
Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
* Feat: support get secret from project config for helm chart
Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
* Feat: support get secret from project config for helm chart
Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
* Feat: support get secret from project config for helm chart
Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
* Feat: support get secret from project config for helm chart
Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
* Feat: support get secret from project config for helm chart
Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
---------
Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
* Feat: Support to proxy the dex server
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: e2e test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
---------
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: Added a shortcut process to set up the canary workflow
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: Format the package.json file
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
---------
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support label filter for application list
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
* add label fold up display in application table view
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
* fix error when clear all label filter
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
* add e2e test case for list application by label
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
* fix swagger.json
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
* use unique app label for e2e test
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
* fix e2e test case by adding list app parms
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
* fix some zh translation
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
---------
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
* Fix: guides the user to enable the vale-workflow addon
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: component state property never read
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: enhance the top bar and show the grafana link
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: mark the experimental addon
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: enhance the drawer page of the addon
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: reset the schema after version changed
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: enhance the application graph
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: remove the never read property
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: show the graph not as the tree
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support to create the target where creating the environment
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support to manage the configs
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the values do not take effect
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change some alerts
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: alerts of the code style
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add some logos
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support to create the target where creating the environment
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: adapt the process from the creating application page
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: set the locale
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: show the port name for the endpoints
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: change some words
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: show the endpoints in the addon detail page
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: js/unsafe-external-link
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support to create the application policy
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: code style
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: potentially inconsistent state update
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the inaccurate words
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support to force delete the policy
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support to show the application diff
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the field name
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support edit the application labels
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: change shown of the workflow record
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: show the kind of the resource
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: show the kind in the cluster and pod node
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the less code style
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: incorrect display of resource details
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: fait to show resource
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: component parameters are mixed after the component type is changed
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
* Fix: component parameters are mixed after the component type is changed
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
* Fix: component parameters are mixed after the component type is changed
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
* Fix: component parameters are mixed after the component type is changed
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
* Feat: support to configure the component name for the trigger
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
* Fix: create trigger update
Signed-off-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
SOLVES https://github.com/oam-dev/velaux/issues/488
Currently only en and zh are the only supported languages.
If for example in reason of other browser language settings, the locales doesn't exist and the ui is not visible (after login).
As workaround it is possible to change the browser language (bad way).
The solution is to add a fallback language.
Signed-off-by: Manuel Ruck <git@manuelruck.de>
Co-authored-by: Manuel Ruck <git@manuelruck.de>
* Fix: can not query instances when the application is abnormal
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the app logs shown bug
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add addons gitlab support
Signed-off-by: huangwei <285961971@qq.com>
* add gitlab addon support help information
Signed-off-by: huangwei <285961971@qq.com>
* Fix: word of Chinese character you and reset password
Signed-off-by: BinaryHB0916 <davidduan0916@gmail.com>
* Update src/locals/Zh/zh.json
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: typo on password
Signed-off-by: BinaryHB0916 <davidduan0916@gmail.com>
* Update: subtitle Basic authorization...
Signed-off-by: BinaryHB0916 <davidduan0916@gmail.com>
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: support the read only application shown
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support delete the readonly application
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: use Record replace Map
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support the conditions for ui schema and add some extend components about helm
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add fault tolerance logic code
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: enable i18n
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: update zh.json
* Feat: update zh language
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: change some code
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: revise EN wording and localize all parts except in Applications
* Feat: add up zh doc in creating compoents without cloud service part
* Fix: updates on more zh
* Feat: change some translation
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: change some translations
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add show app status page
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: move component status to before conditions
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Added version info in the velaux
Signed-off-by: Tyler Henderson <henderson.tyler@outlook.com>
* Removed a div
Signed-off-by: Tyler Henderson <henderson.tyler@outlook.com>
* Changed width to paddling-left
Changed width and text-align to padding-left
Signed-off-by: Tyler Henderson <henderson.tyler@outlook.com>
The metrics and logging doesn't show correctly
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: support show log and grafana dashboard link
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support show container log
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support independent env management
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support filter namespace by annotation
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support show addon status in list
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: fix some ui bug
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support HelmValues extends
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: adapt to the registry list API changes
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: service endpoint did not show and show target cluster alias
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: edit envbinding bug
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support set and cancel workflow default attribute
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change words that don't make sense
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: deliveryTargets page dev
* Fix: run eslint pretty
* Fix: code optimization
* Feat: remove business that does not need to be displayed
* Fix: code style and deliveryTargetDialog ref remove
* Fix: pagination size change
* Fix: code style and deliveTaget interface apply
Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
* Optimize the basic style,such as topbar and leftmenu
* add tsx-control-statements to beautify the code
* Add more business components
* rebuild envplan component
* fix bug
* update workflow content
* Improve complex form components, including struts, strings, etc. Adjust the entire display effect
* Feat: draw dva loading components
* Feat: implementation of service detail interface joint debugging and interaction
* Feat: topology files rename
* Feat: update application componentDefinition api
* Feat: the data of application details is stored in state
Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
* Optimize the basic style,such as topbar and leftmenu
* add tsx-control-statements to beautify the code
* Add more business components
* rebuild envplan component
* Fix: solve the problem of syntax errors in the new version of vscode ts
* Feat: cluster interface Harmonization and Interaction Processing
* Fix: formatting issiues
* Feat: application Creation Add Environmental Planning and Yaml Creation
* Fix: lint style and format
* Feat: remove console.log and detail optimization
* Fix: lint style and code format
Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
* Fix: solve the problem of syntax errors in the new version of vscode ts
* Feat: cluster interface Harmonization and Interaction Processing
* Fix: formatting issiues
Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
* Style: modify the sidebar font style and the ayout background color
* Feat: application management list for mock interface test
* Feat: add general style files and apply list page optimization
* Style: sidebar navigation style optimization
* Feat: cluster list page mock test
* Feat: add DVA and mock interface test to encapsulate request library
* Feat: Optimize routing naming and data structure
* Fix: static syntax problems for standard processing
* feat: add mock instruction to distinguish between mock interface and real interface
* Feat: add component details static
* Style: multi level breadcrumb style optimization
* Feat: sidebar configurable and specification optimized
* Feat: ui specification details optimization
* Feat: file directory display optimization
* Feat: title Component generic, component specification optimization
* Feat: remove redundant files and optimize directory specifications
* Feat: specification details optimization
Co-authored-by: wb-wb665667 <wb-wb665667@alibaba-inc.com>
* change cluster rpcinfo to configmap
* add get app and list app
* remove all datastore in cluster
* fix application all
* change catalog and capability
* fix
* abstract the shared part
* add status code and err message
* fix
* seperate frontend
* fix port and proxy
* rm datastore package
* fix
* change cluster rpcinfo to configmap
* add get app and list app
* remove all datastore in cluster
* fix application all
* change catalog and capability
* fix
* abstract the shared part
* add status code and err message
* fix
// need to ignore emotion's `css` prop, see https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options
# 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
Briefly describe what this pull request does. We love pull requests that resolve an open KubeVela issue. If yours does, you
can uncomment the below line to indicate which issue your PR fixes, for example
"Fixes #500":
-->
Fixes #
I have:
- [ ] Read and followed KubeVela's [contribution process](https://github.com/oam-dev/kubevela/blob/master/contribute/create-pull-request.md).
- [ ] [Related Docs](https://github.com/oam-dev/kubevela.io) updated properly. In a new feature or configuration option, an update to the documentation is necessary.
- [ ] Run `yarn lint` to ensure the frontend changes are ready for review.
- [ ] Run `make reviewable`to ensure the server changes are ready for review.
- [ ] Added `backport release-x.y` labels to auto-backport this PR if necessary.
### Special notes for your reviewer
<!--
Be sure to direct your reviewers'
attention to anything that needs special consideration.
The [KubeVela](https://github.com/oam-dev/kubevela) User Experience (UX) Dashboard. Designed as an extensible, application-oriented delivery platform.
KubeVela control plane (velacp) includes the UI/CLI and HTTP server components to provide application and cluster management experience based on KubeVela & K8s.
To help us create a safe and positive community experience for all, we require all participants to adhere to the [Code of Conduct](https://github.com/oam-dev/kubevela/blob/master/CODE_OF_CONDUCT.md).
This document is a guide to help you through the process of contributing to velacp.
This document is a guide to help you through the process of contributing to VelaUX.
## Become a contributor
You can contribute to velacp in several ways. Here are some examples:
You can contribute to VelaUX in several ways. Here are some examples:
* Contribute to the velacp codebase.
* Contribute to the VelaUX codebase.
* Report and triage bugs.
* Write technical documentation and blog posts, for users and contributors.
* Organize meetups and user groups in your local area.
* Help others by answering questions about velacp.
* Help others by answering questions about VelaUX.
For more ways to contribute, check out the [Open Source Guides](https://opensource.guide/how-to-contribute/).
@ -23,13 +24,13 @@ For more ways to contribute, check out the [Open Source Guides](https://opensour
Unsure where to begin contributing to KubeVela? Start by browsing issues labeled `good first issue` or `help wanted`.
- [Good first issue](https://github.com/oam-dev/velacp/labels/good%20first%20issue) issues are generally straightforward to complete.
- [Help wanted](https://github.com/oam-dev/velacp/labels/help%20wanted) issues are problems we would like the community to help us with regardless of complexity.
- [Good first issue](https://github.com/oam-dev/velaux/labels/good%20first%20issue) issues are generally straightforward to complete.
- [Help wanted](https://github.com/oam-dev/velaux/labels/help%20wanted) issues are problems we would like the community to help us with regardless of complexity.
If you're looking to make a code change, see how to set up your environment for [frontend development](docs/contributing/frontend.md) and [backend development](docs/contributing/backend.md).
If you're looking to make a code change, see [how to set up your environment](docs/contributing/velaux.md).
When you're ready to contribute, it's time to [Create a pull request](https://github.com/oam-dev/kubevela/blob/master/contribute/create-pull-request.md).
### Report bugs / Suggest enhancements / Answering questions etc.
velacp follows the KubeVela [CONTRIBUTING Guide](https://github.com/oam-dev/kubevela/blob/master/CONTRIBUTING.md)
VelaUX follows the KubeVela [CONTRIBUTING Guide](https://github.com/oam-dev/kubevela/blob/master/CONTRIBUTING.md)
RUN apk add --no-cache git make clang build-base python3
RUN yarn install && yarn build
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:2381c1e5f8350a901597d633b2e517775eeac7a6682be39225a93b22cfd0f8bb as server-builder
ARG GOPROXY
ENVGOPROXY=${GOPROXY:-https://goproxy.cn}
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
@ -9,19 +20,28 @@ COPY go.sum go.sum
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Copy the go source
COPY main.go main.go
COPY api/ api/
COPY controllers/ controllers/
# Copy the go source for building server
COPY cmd/server/ cmd/server/
COPY pkg/ pkg/
# Build
RUNCGO_ENABLED=0GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
ARG TARGETARCH
ARG VERSION
ARG GITVERSION
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}"\
-o apiserver-${TARGETARCH} cmd/server/main.go
ENTRYPOINT["/manager"]
FROM ${BASE_IMAGE:-alpine@sha256:e2e16842c9b54d985bf1ef9242a313f36b856181f188de21313820e177002501}
RUN yarn install && yarn build && yarn packages:plugins
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:2381c1e5f8350a901597d633b2e517775eeac7a6682be39225a93b22cfd0f8bb as server-builder
ARG GOPROXY
ENVGOPROXY=${GOPROXY:-https://goproxy.cn}
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}"\
-o apiserver-${TARGETARCH} cmd/server/main.go
FROM ${BASE_IMAGE:-alpine@sha256:e2e16842c9b54d985bf1ef9242a313f36b856181f188de21313820e177002501}
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-alpine@sha256:2381c1e5f8350a901597d633b2e517775eeac7a6682be39225a93b22cfd0f8bb as server-builder
ARG GOPROXY
ENVGOPROXY=${GOPROXY:-https://goproxy.cn}
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}"\
-o apiserver-${TARGETARCH} cmd/server/main.go
FROM ${BASE_IMAGE:-alpine@sha256:e2e16842c9b54d985bf1ef9242a313f36b856181f188de21313820e177002501}
KubeVela control plane (velacp) includes the UI/CLI and HTTP server components to provide application and cluster management experience based on KubeVela & K8s.
This project is based on the following tech stacks:
[VelaUX](https://github.com/kubevela/velaux) is a web portal for KubeVela end users, and also functions as an opinionated application delivery platform. Additionally, it operates as a highly adaptable plugin framework, empowering developers to create bespoke plugins and smoothly integrate them into the KubeVela platform. This approach delivers unparalleled flexibility and customization options for scaling up the platform's capabilities.
- React and [Ant Design Pro](https://pro.ant.design/)
- Mongodb
### Highlights

*Customizable User Interface*: With VelaUX, enterprises can tailor the user interface to their specific needs for managing applications and infrastructure. This feature leads to a more intuitive and efficient user experience, resulting in increased productivity and better resource utilization.
## Quickstart
*Easy Integration*: VelaUX is designed for seamless integration with the KubeVela platform, simplifying the deployment and management of cloud-native atomic capabilities within the platform. This makes it easier for enterprises to build platforms that meet their needs for continuous application delivery, observability, security, and other requirements based on these cloud-native atomic capabilities.
Build cli and server binaries:
*Out-of-Box Platform*: VelaUX provides a comprehensive set of features that empower enterprises to deploy and monitor their applications effectively. These features include multi-cluster and multi-environment support, pipeline management, observability, and more. Additionally, VelaUX streamlines the complexities of Kubernetes, making it simpler for users to manage their deployments.
```
mkdir -p _bin/
make
## Quick Start
### Users
Please refer to this guide to install: [https://kubevela.net/docs/install](https://kubevela.net/docs/install)
### Developers
#### Build the frontend
Make sure you have installed [yarn 2.0](https://yarnpkg.com/getting-started/install), This is required.
Install frontend dependencies and build the frontend.
```shell
yarn install
yarn build
```
Setup a mongodb instance. Check the [official doc](https://docs.mongodb.com/guides/server/install/).
1. There is a generic datastore interface defined in `pkg/datastore/datastore.go`. Its mongo backend is implemented in `pkg/datastore/mongodb/mongodb.go`. For each service, you will implement a more specific store adapter to handle its own types and special logic, e.g. ClusterStore.
All specific store adapter is defined in `pkg/datastore/storeadapter/`. Create one for ClusterStore:
```
touch pkg/datastore/storeadapter/clusterstore.go
```
We can see its interface:
```go
type ClusterStore interface {
PutCluster(cluster *model.Cluster) error
ListClusters() ([]*model.Cluster, error)
DelCluster(name string) error
}
```
Its returned model, i.e. `model.Cluster`, is defined in the `pkg/proto/model/cluster.proto`.
- Users want to define base application template and add patches based on environment. For example, in dev environment users would use ephemeral disk, while in prod environment use persistent volumes.
- Users want to define environments as the shared-bases for applications. For example, applications might need shared definitions, secrets, health checks, network gateways, etc.
To support the above scenarios, we will add the following concepts:
- AppTemplate that defines the template base as well as the env-based patches:
```yaml
name: example-app-template
base: # the base template
components:
- name: backend
settings:
cmd:
- /bin/myservice
traits:
- name: logging
properties:
rotate: 1d
patch: # kustomize-style overlay patch to base template based on env matching
- envs:
- dev # the name of the Environment
components:
- name: backend
settings:
image: dev/myimage
traits:
- name: scaler
properties:
replicas: 1
- envs:
- prod-beijing
- prod-shenzhen
components:
- name: backend
settings:
image: production/myimage
traits:
- name: scaler
properties:
replicas: 10
```
- Environment that defines a shared-base for applications:
```yaml
name: prod
clusters: # deploy to the following clusters
- prod-cluster
secrets: # The secrets that will be created for applications if not existed.
- name: redis
data:
url: redis-url
password: redis-password
definitions: # The definitions that will be created for applications if not existed.
- type: Component
name: function
source:
git: catalog-url
path: pacakge/function
- type: Trait
name: logging
source:
git: catalog-url
path: package/logging
```
> Note: we will define a definition catalog/package format: https://github.com/hongchaodeng/catalog-example
With the above concepts, the user story goes as:
- The operations/admin team sets up environments first
- The developer users prepare app templates and individual patches for each environment that will have apps to deploy to.
- Users choose a template, then choose an environment, and deploy!
- velacp will render the final Application based on the template and env
- velacp will prepare the necessary secrets, definitions in the environment for the applications
- The Application can use any of the definitions, secrets in this env.
An environment is a shared infra-base consisting of the same clusters, packages (equiv. capabilities), etc.
to which the applications are deployed.
Below are two examples of `staging-env` and `prod-env` environments:
```yaml
name: staging-env
clusters:
- name: staging-cluster
packages:
- catalog: staging-catalog
package: inmem-logging
---
name: prod-env
clusters:
- name: prod-cluster
packages:
- catalog: prod-catalog
package: loki-logging
```
We are going to explain what an environment includes in the following.
## 2. Clusters
An environment consists of a group of clusters. For example, multiple small clusters from different data centers could form a staging environment to simplify management and serve maximum availability. While each production environment might consist of only one cluster and users need to calibrate high availability for their apps.
When deploying apps to an environment, you might specify only the environment which will deploy to all clusters. Or you might pick some clusters within an environment.
```yaml
# When deploying an app you could choose env and select clusters within the env.
name: example-app
env: env-1
clusters:
- cluster-1
```
The clusters that environments reference to are abstraction over a k8s cluster. It could be an existing one which should have credentials set, or a need-to-be-created one that VelaCP can call over some cloud providers (e.g. ACK, GKE, EKS) to create one.
### Cluster Setup Workflow
Before creating any Environment, users need to create Clusters first. Here is an example:
```yaml
name: prod-cluster
spec:
external: # This is pointing to externally managed clusters without VelaCP reconciling
kubeconfig: "..."
managed: # This would trigger cluster reconciler in VelaCP to create and manage a cluster
provider: ack
parameters:
master:
instanceType: ecs.g6.large
worker:
instanceType: ecs.g6.small
replicas: 3
cni: terway
```
Once the cluster is setup, then create environments to reference it:
```yaml
name: prod-env
clusters:
- prod-cluster
```
## 3. Packages
Within an environment, deployment on all clusters should be consistent. Thus, all packages should be installed the same across clusters.
To provide such guarantee, environment includes `packages` list to ensure those dependencies are declared and installed consistently.
A package is an abstraction over manifests to prepare infrastructure environments. It could be Helm Charts, Kube resources, or Terraform resources. You can use it to set up Operators (Prometheus, ELK, Istio), RBAC rules, OAM Definitions, etc.
### Package Setup Workflow
First of all, the packages should be uploaded to a remote store. We support two kinds of storage backends:
- Git.
- Object storage.
The catalog and package structure must follow predefined format. Here is an example of the structure format: [catalog-example](https://github.com/hongchaodeng/catalog-example).
Before creating the Environment, create the Catalogs first. Here is an example: