Skip to content

Commit 66f1113

Browse files
authored
Merge pull request #619 from kubero-dev/main-refactored
Kubero V3 refactoring
2 parents 7d62716 + f68e2f6 commit 66f1113

File tree

286 files changed

+27391
-17543
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

286 files changed

+27391
-17543
lines changed

.dockerignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**/node_modules_AAAA
1+
**/node_modules
22
Dockerfile
33
.dockerignore
44
.git
@@ -9,4 +9,4 @@ docker-compose.*
99
kind.*
1010
.eslintrc.js
1111
README.md
12-
**/dist_AAAAA
12+
**/dist

.github/workflows/docker-prerelease.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
# https://github.com/docker/build-push-action
7575
- name: Build and push Docker image
7676
id: kubero-build-and-push
77-
uses: docker/build-push-action@v5
77+
uses: docker/build-push-action@v6
7878
with:
7979
context: .
8080
push: true

.github/workflows/jest-codecov.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Jest Codecov'
2+
on:
3+
workflow_dispatch:
4+
defaults:
5+
run:
6+
working-directory: ./server
7+
jobs:
8+
codecov:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4 # checkout the repo
12+
- name: Install dependencies # install dependencies
13+
run: yarn install --frozen-lockfile
14+
- run: yarn build # install packages
15+
- run: yarn test # run tests (configured to use jest-junit reporter)
16+
- name: Upload coverage reports to Codecov
17+
uses: codecov/codecov-action@v5
18+
with:
19+
directory: server/coverage
20+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/jest-pr.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 'Jest PR Test'
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
permissions:
6+
pull-requests: write
7+
defaults:
8+
run:
9+
working-directory: ./server
10+
jobs:
11+
build-test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4 # checkout the repo
15+
- name: Install dependencies # install dependencies
16+
run: yarn install --frozen-lockfile
17+
- run: yarn build # install packages
18+
- run: yarn test:ci # run tests (configured to use jest-junit reporter)
19+
- name: Jest Coverage Comment
20+
uses: MishaKav/jest-coverage-comment@main
21+
with:
22+
coverage-summary-path: server/coverage/coverage-summary.json
23+
junitxml-path: server/reports/jest-junit.xml
24+
- uses: actions/upload-artifact@v4 # upload test results
25+
if: ${{ !cancelled() }} # run this step even if previous step failed
26+
with:
27+
name: test-results # Name of the check run which will be created
28+
path: server/reports/jest-junit.xml
29+
reporter: jest-junit # Format of test results

.github/workflows/jest-report.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Jest Test Report'
2+
on:
3+
workflow_run:
4+
workflows: ['Jest PR Test'] # runs after 'Jest PR Test' workflow
5+
types:
6+
- completed
7+
permissions:
8+
contents: read
9+
actions: read
10+
checks: write
11+
jobs:
12+
report:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: dorny/test-reporter@v2
16+
with:
17+
artifact: test-results # artifact name
18+
name: JEST Tests # Name of the check run which will be created
19+
path: '*.xml' # Path to test results (inside artifact .zip)
20+
reporter: jest-junit # Format of test results

.github/workflows/stargazers.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,21 @@ jobs:
88
name: 'stargazers'
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: 💌 Send email, you star
11+
- name: Send email
1212
uses: dawidd6/[email protected]
1313
with:
1414
server_address: smtp.gmail.com
1515
server_port: 465
1616
username: ${{ secrets.GMAIL_USER }}
1717
password: ${{ secrets.GMAIL_PASS }}
18-
subject: Your a star ✨
19-
body: ${{ github.actor }} just starred your mail-on-star repo!!! ${{ github.repository }}
18+
subject: ${{ github.event.repository.stargazers_count }} ✨ ${{ github.actor }} stared ${{ github.repository }}
19+
body: |
20+
${{ github.actor }} just starred your mail-on-star repo!!!
21+
${{ github.event.repository.html_url }}
22+
Forks: ${{ github.event.repository.forks_count }}
23+
Stars: ${{ github.event.repository.stargazers_count }}
24+
Issues: ${{ github.event.repository.open_issues_count }}
25+
26+
${{ github.repository }}
2027
to: ${{ secrets.GMAIL_ADDRESS }}
2128
from: ${{ secrets.GMAIL_ADDRESS }}

CONTRIBUTING.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,22 @@ Willing to contribute something, but you don't know where to start? Have a look
1313
5. Open a PR
1414

1515
## Techstack
16-
**Infrastructure**
17-
- [Kubernetes](https://kubernetes.io/)
18-
- [Operator SDK](https://sdk.operatorframework.io/)
19-
- [Helm (Operator)](https://helm.sh/)
20-
- [Kind (Development)](https://kind.sigs.k8s.io/)
21-
22-
**Code**
23-
- [Express](https://expressjs.com/)
24-
- [TypeScript](https://www.typescriptlang.org/)
25-
- [Vue.js](https://vuejs.org/)
26-
- [Vuetify](https://vuetifyjs.com/en/)
16+
- Backend
17+
- [NestJS](https://nestjs.com/)
18+
- [TypeScript](https://www.typescriptlang.org/)
19+
- [Jest](https://jestjs.io/)
20+
- Frontend
21+
- [Vue.js](https://vuejs.org/)
22+
- [Vuetify](https://vuetifyjs.com/en/)
23+
- CLI
24+
- [Go](https://golang.org/)
25+
- [Cobra](https://cobra.dev/)
26+
- Operator
27+
- [Operator SDK](https://sdk.operatorframework.io/)
28+
- [Helm](https://helm.sh/)
29+
- Infrastructure
30+
- [Kubernetes](https://kubernetes.io/)
31+
- [Kind (Development)](https://kind.sigs.k8s.io/)
2732

2833

2934
## Development setup for the Kubero UI

Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ COPY server ./server
88
RUN cd /build/server && \
99
yarn install
1010
RUN cd /build/server && \
11-
yarn build && \
12-
yarn swaggergen
11+
yarn build
1312

1413
## Client
1514
COPY client ./client
@@ -18,7 +17,7 @@ RUN cd /build/client && \
1817
RUN cd /build/client && \
1918
yarn build
2019

21-
FROM build AS release
20+
FROM node:22-alpine AS release
2221
ARG VERSION=unknown
2322

2423
LABEL maintainer='www.kubero.dev'
@@ -30,13 +29,15 @@ WORKDIR /app/
3029

3130
COPY --from=build /build/server/dist /app/server
3231
COPY --from=build /build/server/package.json /app/server/package.json
33-
COPY --from=build /build/server/src/modules/templates /app/server/modules/templates
32+
COPY --from=build /build/server/src/deployments/templates /app/server/deployments/templates
3433
COPY --from=build /build/server/node_modules /app/server/node_modules
35-
COPY --from=build /build/server/swagger.json /app/swagger.json
34+
35+
# temporary fix for the public folder
36+
COPY --from=build /build/server/dist/public /app/server/public
3637

3738

3839
RUN echo -n $VERSION > /app/server/VERSION
3940

4041
WORKDIR /app/server
4142

42-
CMD [ "node", "index.js" ]
43+
CMD [ "node", "main" ]

README.md

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,36 @@
44

55
[![License](https://img.shields.io/github/license/kubero-dev/kubero?style=flat-square&color=blue")](https://github.com/kubero-dev/kubero/blob/main/LICENSE)
66
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/kubero-dev/kubero?style=flat-square&color=brightgreen)](https://github.com/kubero-dev/kubero/releases/latest)
7+
[![codecov](https://codecov.io/github/kubero-dev/kubero/branch/main-refactored/graph/badge.svg?token=3J3CWUXG5Z&style=flat-square)](https://codecov.io/github/kubero-dev/kubero)
78
[![Discord](https://img.shields.io/discord/1051249947472826408?style=flat-square)](https://discord.gg/tafRPMWS4r)
89
[![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/kubero-dev/kubero?style=flat-square)](https://github.com/kubero-dev/kubero/releases/latest)
910
[![Demo](https://img.shields.io/badge/demo-up-sucess?style=flat-square&color=blue)](https://demo.kubero.dev)
1011

1112
Kubero [pronounced: Kube Hero] is a self-hosted PaaS (Platform as a Service) that allows any developer to deploy their application on Kubernetes without specialized knowledge. Kubero follows the principles of 12-factor apps. It is possible to run apps based on existing containers or from source code.
1213

13-
> [!NOTE]
14-
> Kubero v3.0.0 is on the way!
15-
>
16-
> We're gearing up for the Kubero v3.0.0 release! 🎉 This major update features a rewritten backend, now powered by NestJS, bringing best practices and maintainability.
17-
1814
![](https://raw.githubusercontent.com/kubero-dev/docs/refs/heads/main/static/assets/screenshots/createapp.gif)
1915

2016
More [Screenshots](https://www.kubero.dev/docs/screenshots) and a full video on
2117
[YouTube](https://www.youtube.com/watch?v=kmqhddc6UlI)
2218

2319
## Features ([DEMO](https://demo.kubero.dev))
24-
- **CI/CD Pipelines:** Create unlimited pipelines with up to 4 separate staging environments for all your applications.
25-
- **GitOps Review Apps:** Automatically build, start, and clean up review apps when opening or closing pull requests.
26-
- **Automatic Redeployments:** Trigger app redeployments on pushes to branches or tags.
27-
- **Docker Deployments:** Deploy Docker containers on Kubernetes without needing Helm charts.
28-
- **App Templates:** Deploy popular applications like WordPress and Grafana with ready-to-use templates.
29-
- **Add-ons Integration:** Seamlessly deploy add-ons such as PostgreSQL and Redis alongside your applications.
30-
- **API & CLI:** Integrate seamlessly with existing tools and CI/CD workflows.
31-
- **Metrics & Monitoring:** Access integrated metrics to monitor application health.
32-
- **Notifications:** Get build and deployment updates via Discord, Slack, or Webhooks.
33-
- **Vulnerability Scans:** Perform scheduled or triggered scans for running applications.
34-
- **Application Logs:** View logs directly from the web UI for easy monitoring.
35-
- **Safe Restarts:** Restart applications safely and easily through the web UI.
36-
- **Web Console:** Use the built-in container web console for direct access.
37-
- **Scheduled Tasks:** Easily create and manage cronjobs.
38-
- **Multi-Tenancy:** Support for managing multiple tenants.
39-
- **Single Sign-On (SSO):** Authenticate securely with GitHub and OAuth2.
40-
- **Basic Auth:** Configure Basic Auth for your applications with ease.
20+
- **CI/CD Pipelines** <br> Create unlimited pipelines with up to 4 separate staging environments for all your applications.
21+
- **GitOps Review Apps** <br> Automatically build, start, and clean up review apps when opening or closing pull requests.
22+
- **Automatic Redeployments** <br> Trigger app redeployments on pushes to branches or tags.
23+
- **Docker Deployments** <br> Deploy Docker containers on Kubernetes without needing Helm charts.
24+
- **App Templates** <br> Deploy popular applications like WordPress and Grafana with ready-to-use templates.
25+
- **Add-ons Integration** <br> Seamlessly deploy add-ons such as PostgreSQL and Redis alongside your applications.
26+
- **API & CLI** <br> Integrate seamlessly with existing tools and CI/CD workflows.
27+
- **Metrics & Monitoring** <br> Access integrated metrics to monitor application health.
28+
- **Notifications** <br> Get build and deployment updates via Discord, Slack, or Webhooks.
29+
- **Vulnerability Scans** <br> Perform scheduled or triggered scans for running applications.
30+
- **Application Logs** <br> View logs directly from the web UI for easy monitoring.
31+
- **Safe Restarts** <br> Restart applications safely and easily through the web UI.
32+
- **Web Console** <br> Use the built-in container web console for direct access.
33+
- **Scheduled Tasks** <br> Easily create and manage cronjobs.
34+
- **Multi-Tenancy** <br> Support for managing multiple tenants.
35+
- **Single Sign-On (SSO)** <br> Authenticate securely with GitHub and OAuth2.
36+
- **Basic Auth** <br> Configure Basic Auth for your applications with ease.
4137

4238

4339
## Basic Concept
@@ -134,11 +130,28 @@ Basically *everything* that can be packaged in a single container can be deploye
134130

135131
Kubero starts now building your app. Once the build is complete, Kubero will launch the final container and make it accessible via the configured domain.
136132

137-
## Documentation
138-
https://www.kubero.dev/docs/quickstart
139-
140-
## Roadmap
141-
https://github.com/orgs/kubero-dev/projects/1/views/3
133+
## Techstack
134+
135+
- Backend
136+
- [NestJS](https://nestjs.com/)
137+
- [TypeScript](https://www.typescriptlang.org/)
138+
- [Jest](https://jestjs.io/)
139+
- Frontend
140+
- [Vue.js](https://vuejs.org/)
141+
- [Vuetify](https://vuetifyjs.com/en/)
142+
- CLI
143+
- [Go](https://golang.org/)
144+
- [Cobra](https://cobra.dev/)
145+
- Operator
146+
- [Operator SDK](https://sdk.operatorframework.io/)
147+
- [Helm](https://helm.sh/)
148+
- Infrastructure
149+
- [Kubernetes](https://kubernetes.io/)
150+
- [Kind (Development)](https://kind.sigs.k8s.io/)
151+
152+
## Links
153+
- Documentation https://www.kubero.dev/docs/
154+
- Roadmap https://github.com/orgs/kubero-dev/projects/1/views/3
142155

143156
## Community
144157
[![kubero Discord server Banner](https://discordapp.com/api/guilds/1051249947472826408/widget.png?style=banner2)](https://discord.gg/tafRPMWS4r)

SECURITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
| Version | Supported |
66
| ------- | ------------------ |
77
| 2.X.X | :white_check_mark: |
8+
| 2.X.X | EOL 31.03.2025 |
89
| 1.X.X | EOL 28.09.2024 |
910
| 0.X.X | |
1011

client/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"private": true,
44
"license": "GPL-3.0",
55
"scripts": {
6-
"dev": "vite",
7-
"watch": "vue-tsc --noEmit && vite build --watch",
6+
"run": "vite",
7+
"dev": "vue-tsc --noEmit && vite build --watch",
88
"build": "vue-tsc --noEmit && vite build",
99
"preview": "vite preview",
1010
"lint": "eslint . --fix --ignore-path .gitignore"
@@ -44,8 +44,8 @@
4444
"sass": "^1.60.0",
4545
"typescript": "^5.0.0",
4646
"unplugin-fonts": "^1.0.3",
47-
"vite": "^5.1.8",
48-
"vite-plugin-vuetify": "^1.0.0",
49-
"vue-tsc": "^2.1.0"
47+
"vite": "^6.3.4",
48+
"vite-plugin-vuetify": "^2.1.1",
49+
"vue-tsc": "^2.2.10"
5050
}
5151
}

client/src/components/apps/addons.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ export default defineComponent({
281281
this.dialog = true;
282282
},
283283
loadStorageClasses() {
284-
axios.get(`/api/config/storageclasses`)
284+
axios.get(`/api/kubernetes/storageclasses`)
285285
.then(response => {
286286
for (let storageClass of response.data) {
287287
this.availableStorageClasses.push({

client/src/components/apps/alerts.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default {
8484
}, 10000);
8585
},
8686
loadRules() {
87-
axios.get(`/api/rules/${this.pipeline}/${this.phase}/${this.app}`)
87+
axios.get(`/api/metrics/rules/${this.pipeline}/${this.phase}/${this.app}`)
8888
.then(response => {
8989
this.rules = response.data
9090
})

client/src/components/apps/appstats.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ export default defineComponent({
480480
},
481481
methods: {
482482
loadUptimes() {
483-
axios.get(`/api/uptimes/${this.pipeline}/${this.phase}`)
483+
axios.get(`/api/metrics/uptimes/${this.pipeline}/${this.phase}`)
484484
.then(response => {
485485
this.uptimes = response.data;
486486
this.loadMetrics();
@@ -491,7 +491,7 @@ export default defineComponent({
491491
},
492492
493493
loadMetrics() {
494-
axios.get(`/api/metrics/${this.pipeline}/${this.phase}/${this.app}`)
494+
axios.get(`/api/metrics/resources/${this.pipeline}/${this.phase}/${this.app}`)
495495
.then(response => {
496496
for (var i = 0; i < response.data.length; i++) {
497497
if (response.data[i].cpu.percentage != null && response.data[i].memory.percentage != null) {

client/src/components/apps/buildsform.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export default defineComponent({
137137
const repoB64 = btoa(this.appData?.spec.gitrepo.ssh_url)
138138
//const provider = this.appData?.spec.gitrepo.provider
139139
const provider = "github" // TODO: FIX: get provider from appData
140-
axios.get(`/api/repo/${provider}/${repoB64}/references/list`)
140+
axios.get(`/api/repo/${provider}/${repoB64}/references`)
141141
.then(response => {
142142
this.references = response.data
143143
})

client/src/components/apps/console.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default defineComponent({
109109
}),
110110
methods: {
111111
loadPods() {
112-
axios.get(`/api/status/pods/${this.pipeline}/${this.phase}/${this.app}`).then((response) => {
112+
axios.get(`/api/apps/${this.pipeline}/${this.phase}/${this.app}/pods`).then((response) => {
113113
//this.loadContainers();
114114
for (let pod of response.data) {
115115
const p = {name: pod.name, containers: pod.containers.map((c: any) => c.name)} as Pod;
@@ -258,7 +258,7 @@ export default defineComponent({
258258
});
259259
},
260260
execInContainer(){
261-
axios.post(`/api/console/${this.pipeline}/${this.phase}/${this.app}/exec`, {
261+
axios.post(`/api/apps/${this.pipeline}/${this.phase}/${this.app}/console`, {
262262
podName: this.pod.name,
263263
containerName: this.container,
264264
command: this.command,

0 commit comments

Comments
 (0)