Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v2.1.0 #307

Merged
merged 53 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
74fbecb
(WIP) add first forms
mms-gianni Feb 26, 2024
f5b0ce4
improve secrets view
mms-gianni Feb 29, 2024
65c9537
improve config forms
mms-gianni Mar 1, 2024
53932d6
improve configuration section
mms-gianni Mar 7, 2024
bc31c30
improve config forms
mms-gianni Mar 7, 2024
11f62e6
New service account annotation feature.
xorl Mar 7, 2024
9a2913b
implement config safe oin dev mode
mms-gianni Mar 8, 2024
260f897
implement config safe oin dev mode
mms-gianni Mar 8, 2024
83aeaa4
improve forms and breadcrumbs
mms-gianni Mar 8, 2024
c52de21
improve forms and breadcrumbs
mms-gianni Mar 8, 2024
bdb10dc
add buildpackform
mms-gianni Mar 8, 2024
4a81684
Fix for sAAnnotations.
xorl Mar 9, 2024
e9d6d57
make forms editable
mms-gianni Mar 9, 2024
42263f7
refactoring Forms
mms-gianni Mar 12, 2024
930729f
improve settings forms
mms-gianni Mar 12, 2024
27d4e9d
Merge branch 'main' into 284-make-kubero-configurable-in-the-ui
mms-gianni Mar 13, 2024
4ee5be4
remove useless text
mms-gianni Mar 13, 2024
60499dd
Add some more form fields
mms-gianni Mar 14, 2024
a2f3422
Convert object to array, modify it to keep reactivity, then convert b…
xorl Mar 15, 2024
6475762
Remove unnecessary comments.
xorl Mar 15, 2024
68608ab
Cleaning up more comments.
xorl Mar 15, 2024
a10dd86
add secrets management
mms-gianni Mar 15, 2024
9a80038
save secrets
mms-gianni Mar 15, 2024
d97b5a9
implement secrets save
mms-gianni Mar 16, 2024
6aff328
add admin switch
mms-gianni Mar 16, 2024
a76b2c0
Fix for reduce.
xorl Mar 17, 2024
1c5c876
Final fix, found a few issues.
xorl Mar 17, 2024
fdf9b63
add admin config flag
mms-gianni Mar 17, 2024
0785807
fix app form breadcrumb
mms-gianni Mar 18, 2024
ef5ca6d
Merge branch 'main' into release/v2.1.0
mms-gianni Mar 18, 2024
ab73860
Add build registry configuration and enable admin access in console …
mms-gianni Mar 19, 2024
8e6395c
Using CRD vs. using direct API which will be overwritten.
xorl Mar 20, 2024
9dc69f9
Fix for serviceAccount panel being open when 0 entries.
xorl Mar 20, 2024
38c8b3d
Removing erroneous getServiceAccount.
xorl Mar 20, 2024
b38b921
fix: prevent usage of 'new' keyword
cskiwi Mar 20, 2024
07fb193
feat: setting default branch based on repo's default branch
cskiwi Mar 21, 2024
869cea1
Merge branch 'main' into release/v2.1.0
mms-gianni Mar 21, 2024
0f1b2ea
Merge pull request #292 from JSR-Digital/new-serviceaccount-annotations
mms-gianni Mar 21, 2024
4feff0d
some minor cleanup
mms-gianni Mar 21, 2024
7a2b5f7
Merge pull request #305 from kubero-dev/feature/new-serviceaccount-an…
mms-gianni Mar 21, 2024
832ee9f
Merge pull request #300 from cskiwi/fix/make-sure-new-keyword-isn't-used
mms-gianni Mar 21, 2024
625e3e5
fix panel styling and open when not empty
mms-gianni Mar 21, 2024
a61b6b2
Merge branch 'release/v2.1.0' of github.com:kubero-dev/kubero into re…
mms-gianni Mar 21, 2024
113fac3
Merge pull request #304 from cskiwi/fix/set-default-branch-based-on-b…
mms-gianni Mar 22, 2024
b36dc27
update swagger docs
mms-gianni Mar 22, 2024
6e9f385
Merge branch 'release/v2.1.0' of github.com:kubero-dev/kubero into re…
mms-gianni Mar 22, 2024
d2e2dd4
Merge branch 'main' into release/v2.1.0
mms-gianni Mar 22, 2024
c4534c4
Fix Breadcrumbs with a hack
mms-gianni Mar 22, 2024
67aa9c4
Update the form deployment UI to display information about configura…
mms-gianni Mar 23, 2024
e0ba11f
add storage class dropdown
mms-gianni Mar 23, 2024
4568f71
Fix handling of disabled admin property by adding a null check
mms-gianni Mar 24, 2024
69f6469
Add condition to show GitHub organization field in the form only if …
mms-gianni Mar 24, 2024
7da1d22
update env on save to update them without a restart
mms-gianni Mar 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ example-*.json
.dockerdata

secrets.yaml
config.yaml

db
22 changes: 22 additions & 0 deletions client/src/components/apps/appstats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,28 @@
</tbody>
</v-table>
</div>
<div class="mb-5 mt-10">
<h3>Service Acccount Annotations</h3>
<v-table density="compact" style="background:rgb(var(--v-theme-background))">
<thead>
<tr>
<th class="text-left">
Name
</th>
<th class="text-left">
Value
</th>
</tr>
</thead>
<tbody>
<tr
v-for="saAnnotation in appData.spec.saAnnotations" :key="saAnnotation.name">
<td>{{ saAnnotation.name }}</td>
<td>{{ saAnnotation.value }}</td>
</tr>
</tbody>
</v-table>
</div>
<div class="mb-5" v-if="appData.spec?.extraVolumes?.length > 0">
<h3>Volumes</h3>
<!--{{ appData.spec.extraVolumes }}-->
Expand Down
8 changes: 4 additions & 4 deletions client/src/components/apps/detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,22 @@ export default defineComponent({
tab: null,
breadcrumbItems: [
{
text: 'DASHBOARD',
title: 'dashboard.-',
disabled: false,
to: { name: 'Pipelines', params: {}}
},
{
text: 'PIPELINE:'+this.pipeline,
title: 'Pipeline.'+this.pipeline,
disabled: false,
to: { name: 'Pipeline Apps', params: { pipeline: this.pipeline }}
},
{
text: 'PHASE:'+this.phase,
title: 'Phase.'+this.phase,
disabled: true,
href: `/pipeline/${this.pipeline}/${this.phase}/${this.app}/detail`,
},
{
text: 'APP:'+this.app,
title: 'App-'+this.app,
disabled: true,
href: `/pipeline/${this.pipeline}/${this.phase}/${this.app}/detail`,
}
Expand Down
154 changes: 137 additions & 17 deletions client/src/components/apps/form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
</v-expansion-panel>

<!-- SECURITY -->
<v-expansion-panel bg-color="rgb(var(--v-theme-cardBackground))" :style="advanced ? 'display: block;' : 'display: none;'">
<v-expansion-panel bg-color="rgb(var(--v-theme-on-surface-variant))" :style="advanced ? 'display: block;' : 'display: none;'">
<v-expansion-panel-title class="text-uppercase text-caption-2 font-weight-medium" color="secondary">Security</v-expansion-panel-title>
<v-expansion-panel-text color="secondary">

Expand Down Expand Up @@ -481,7 +481,7 @@


<!-- NETWORKING -->
<v-expansion-panel bg-color="rgb(var(--v-theme-cardBackground))" :style="advanced ? 'display: block;' : 'display: none;'">
<v-expansion-panel bg-color="rgb(var(--v-theme-on-surface-variant))" :style="advanced ? 'display: block;' : 'display: none;'">
<v-expansion-panel-title class="text-uppercase text-caption-2 font-weight-medium" color="secondary">Networking</v-expansion-panel-title>
<v-expansion-panel-text color="secondary">

Expand Down Expand Up @@ -534,7 +534,7 @@


<!-- CORS -->
<v-expansion-panel bg-color="rgb(var(--v-theme-cardBackground))" :style="advanced ? 'display: block;' : 'display: none;'">
<v-expansion-panel bg-color="rgb(var(--v-theme-on-surface-variant))" :style="advanced ? 'display: block;' : 'display: none;'">
<v-expansion-panel-title class="text-uppercase text-caption-2 font-weight-medium" color="secondary">Cors</v-expansion-panel-title>
<v-expansion-panel-text color="secondary">

Expand Down Expand Up @@ -624,6 +624,65 @@
</v-expansion-panel-text>
</v-expansion-panel>

<!-- SERVICEACCOUNT ANNOTATIONS -->
<v-expansion-panel bg-color="rgb(var(--v-theme-on-surface-variant))" :style="advanced ? 'display: block;' : 'display: none;'">
<v-expansion-panel-title class="text-uppercase text-caption-2 font-weight-medium" color="secondary">ServiceAcccount Annotations</v-expansion-panel-title>
<v-expansion-panel-text color="secondary">
<v-row v-for="(annotation, index) in sAAnnotations" :key="index">
<v-col
cols="12"
md="5"
>
<v-text-field
v-model="annotation.annotation"
label="annotation"
:counter="120"
></v-text-field>
</v-col>
<v-col
cols="12"
md="6"
>
<v-text-field
v-model="annotation.value"
label="value"
></v-text-field>
</v-col>
<v-col
cols="12"
md="1"
>
<v-btn
elevation="2"
icon
small
@click="removeSAAnnotationLine(annotation.annotation)"
>
<v-icon dark >
mdi-minus
</v-icon>
</v-btn>
</v-col>
</v-row>
<v-row>
<v-col
cols="12"
>
<v-btn
elevation="2"
icon
small
@click="addSAAnnotationLine()"
>
<v-icon dark >
mdi-plus
</v-icon>
</v-btn>
</v-col>
</v-row>
</v-expansion-panel-text>
</v-expansion-panel>

<!-- ENVIRONMENT VARS -->
<v-expansion-panel bg-color="rgb(var(--v-theme-cardBackground))">
<v-expansion-panel-title class="text-uppercase text-caption-2 font-weight-medium" color="cardBackground">Environment Variables</v-expansion-panel-title>
Expand Down Expand Up @@ -1016,7 +1075,7 @@ import { defineComponent } from 'vue'
import { useKuberoStore } from '../../stores/kubero'
import { mapState } from 'pinia'
import Breadcrumbs from "../breadcrumbs.vue";
import { remove } from "lodash";
type App = {
name: string,
Expand Down Expand Up @@ -1084,6 +1143,10 @@ type Ingress = {
}[],
}
type ServiceAccount = {
annotations: any,
}
type Buildpack = {
name?: string,
run: BuildpackStepConfig,
Expand Down Expand Up @@ -1131,6 +1194,11 @@ type EnvVar = {
value: string,
}
type SAAnnotations = {
annotation: string,
value: string,
}
export default defineComponent({
props: {
pipeline: {
Expand All @@ -1144,28 +1212,29 @@ export default defineComponent({
app: {
type: String,
default: "new"
}
},
},
data () {
return {
breadcrumbItems: [
{
text: 'DASHBOARD',
title: 'dashboard.-',
disabled: false,
to: { name: 'Pipelines', params: {}}
},
{
text: 'PIPELINE:'+this.pipeline,
title: 'Pipeline.'+this.pipeline,
text: this.pipeline,
disabled: false,
to: { name: 'Pipeline Apps', params: { pipeline: this.pipeline }}
},
{
text: 'PHASE:'+this.phase,
title: 'Phase.'+this.phase,
disabled: false,
to: this.getAppBreadcrumbLink(),
},
{
text: 'APP:'+this.app,
title: 'App.'+this.app,
disabled: false,
to: this.getAppBreadcrumbLink(),
}
Expand Down Expand Up @@ -1295,6 +1364,9 @@ export default defineComponent({
envvars: [
//{ name: '', value: '' },
] as EnvVar[],
sAAnnotations: [
//{ annotation: '', value: '' },
] as SAAnnotations[],
containerPort: 8080,
podsize: '',
podsizes: [
Expand Down Expand Up @@ -1363,6 +1435,9 @@ export default defineComponent({
drop: [],
}
},
serviceAccount: {
annotations: {} as any,
} as ServiceAccount,
ingress: {
annotations: {
'nginx.ingress.kubernetes.io/whitelist-source-range': '',
Expand Down Expand Up @@ -1524,6 +1599,7 @@ export default defineComponent({
this.docker.tag = response.data.image.tag;
this.envvars = response.data.envVars;
this.sAAnnotations = Object.entries(response.data.serviceAccount.annotations).map(([key, value]) => ({annotation: key, value: value as string}));
this.extraVolumes = response.data.extraVolumes;
this.cronjobs = response.data.cronjobs;
this.addons = response.data.addons;
Expand All @@ -1539,13 +1615,16 @@ export default defineComponent({
// Open Panel if there is some data to show
if (this.envvars.length > 0) {
this.panel.push(1)
this.panel.push(5)
}
if (Object.keys(this.sAAnnotations).length > 0) {
this.panel.push(4)
}
if (this.extraVolumes.length > 0) {
this.panel.push(3)
this.panel.push(7)
}
if (this.cronjobs.length > 0) {
this.panel.push(4)
this.panel.push(8)
}
// Backward compatibility older v1.11.1
Expand Down Expand Up @@ -1617,9 +1696,21 @@ export default defineComponent({
const gitprovider = this.pipelineData.git.provider;
axios.get('/api/repo/'+gitprovider+"/"+gitrepoB64+"/branches/list").then(response => {
if (response.data.length === 0) {
return;
}
for (let i = 0; i < response.data.length; i++) {
this.branchesList.push(response.data[i]);
}
// set default branch based on te repository's default branch
let defaultBranch = this.pipelineData.git.repository.default_branch;
if (this.branchesList.includes(defaultBranch)) {
this.branch = defaultBranch;
} else {
this.branch = this.branchesList[0];
}
});
},
Expand Down Expand Up @@ -1684,13 +1775,16 @@ export default defineComponent({
// Open Panel if there is some data to show
if (response.data.spec.envVars.length > 0) {
this.panel.push(1)
this.panel.push(5)
}
if (Object.entries(response.data.spec.serviceAccount.annotations).length > 0) {
this.panel.push(4)
}
if (response.data.spec.extraVolumes.length > 0) {
this.panel.push(3)
this.panel.push(7)
}
if (response.data.spec.cronjobs.length > 0) {
this.panel.push(4)
this.panel.push(8)
}
this.security = response.data.spec.image.run.securityContext || {};
Expand All @@ -1712,6 +1806,8 @@ export default defineComponent({
this.autodeploy = response.data.spec.autodeploy;
this.domain = response.data.spec.domain;
this.envvars = response.data.spec.envVars;
this.serviceAccount = response.data.spec.serviceAccount;
this.sAAnnotations = Object.entries(response.data.spec.serviceAccount.annotations).map(([key, value]) => ({annotation: key, value: value as string}));
this.extraVolumes = response.data.spec.extraVolumes;
this.containerPort = response.data.spec.image.containerPort;
this.podsize = response.data.spec.podsize;
Expand Down Expand Up @@ -1814,6 +1910,13 @@ export default defineComponent({
domain: this.domain,
ssl: this.ssl,
envvars: this.envvars,
// loop through serviceaccount annotations and convert to object
serviceAccount: {
annotations: this.sAAnnotations.reduce((acc, cur) => {
acc[cur.annotation] = cur.value;
return acc;
}, {} as any),
},
podsize: this.podsize,
autoscale: this.autoscale,
web: {
Expand Down Expand Up @@ -1905,6 +2008,12 @@ export default defineComponent({
domain: this.domain.toLowerCase(),
ssl: this.ssl,
envvars: this.envvars,
serviceAccount: {
annotations: this.sAAnnotations.reduce((acc, cur) => {
acc[cur.annotation] = cur.value;
return acc;
}, {} as any),
},
podsize: this.podsize,
autoscale: this.autoscale,
web: {
Expand Down Expand Up @@ -1978,6 +2087,19 @@ export default defineComponent({
}
}
},
addSAAnnotationLine() {
this.sAAnnotations.push({
annotation: '',
value: '',
});
},
removeSAAnnotationLine(index: string) {
for (let i = 0; i < this.sAAnnotations.length; i++) {
if (this.sAAnnotations[i].annotation === index) {
this.sAAnnotations.splice(i, 1);
}
}
},
handleFileInput() {
for (let i = 0; i < this.envFile.length; i++) {
const file = this.envFile[i];
Expand All @@ -1992,8 +2114,6 @@ export default defineComponent({
// clear file input
this.envFile = [];
},
parseEnvFile(text: any) {
const lines = text.split('\n');
for (const line of lines) {
Expand Down
Loading
Loading