Skip to content

Commit 4e7331f

Browse files
authored
Merge pull request #490 from kubero-dev/feature/singlefile-download
improve template download
2 parents 93c88a7 + dc61372 commit 4e7331f

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

server/src/modules/application.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,18 @@ export class KubectlTemplate implements IKubectlTemplate{
221221
this.kind = "KuberoApp";
222222
this.metadata = {
223223
name: app.name,
224+
annotations: {
225+
'kubero.dev/template.architecture': '[]',
226+
'kubero.dev/template.description': '',
227+
'kubero.dev/template.icon': '',
228+
'kubero.dev/template.installation': '',
229+
'kubero.dev/template.links': '[]',
230+
'kubero.dev/template.screenshots': '[]',
231+
'kubero.dev/template.source': '',
232+
'kubero.dev/template.tags': '[]',
233+
'kubero.dev/template.title': '',
234+
'kubero.dev/template.website': ''
235+
},
224236
labels: {
225237
manager: 'kubero',
226238
}
@@ -233,11 +245,13 @@ export class Template implements ITemplate{
233245
public name: string
234246
public deploymentstrategy: 'git' | 'docker'
235247
public envVars: {}[] = []
248+
/*
236249
public serviceAccount: {
237250
annotations: Object
238251
create: boolean,
239252
name: string,
240253
};
254+
*/
241255
public extraVolumes: IExtraVolume[] = []
242256
public cronjobs: ICronjob[] = []
243257
public addons: IAddon[] = []
@@ -255,12 +269,14 @@ export class Template implements ITemplate{
255269
pullPolicy?: 'Always',
256270
repository: string,
257271
tag: string,
272+
/*
258273
run: {
259274
repository: string,
260275
tag: string,
261276
readOnlyAppStorage?: boolean,
262277
securityContext: ISecurityContext
263278
}
279+
*/
264280
};
265281
constructor(
266282
app: IApp
@@ -270,7 +286,7 @@ export class Template implements ITemplate{
270286

271287
this.envVars = app.envVars
272288

273-
this.serviceAccount = app.serviceAccount;
289+
//this.serviceAccount = app.serviceAccount;
274290

275291
this.extraVolumes = app.extraVolumes
276292

@@ -290,11 +306,11 @@ export class Template implements ITemplate{
290306
pullPolicy: 'Always',
291307
repository: app.image.repository || 'ghcr.io/kubero-dev/idler',
292308
tag: app.image.tag || 'v1',
293-
run: app.image.run,
309+
//run: app.image.run,
294310
}
295311

296312
// function to set security context, required for backwards compatibility
297313
// Added in v1.11.0
298-
this.image.run.securityContext = Buildpack.SetSecurityContext(this.image.run.securityContext)
314+
//this.image.run.securityContext = Buildpack.SetSecurityContext(this.image.run.securityContext)
299315
}
300316
}

server/src/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export interface ITemplate {
131131
name: string,
132132
deploymentstrategy: 'git' | 'docker',
133133
envVars: {}[],
134-
serviceAccount: {
134+
serviceAccount?: {
135135
annotations: {},
136136
create: boolean,
137137
name: string,
@@ -141,7 +141,7 @@ export interface ITemplate {
141141
tag: string,
142142
pullPolicy?: 'Always',
143143
containerPort: number,
144-
run: {
144+
run?: {
145145
repository: string,
146146
readOnlyAppStorage?: boolean,
147147
tag: string,
@@ -251,6 +251,7 @@ export interface IKubectlMetadata {
251251
creationTimestamp?: Date;
252252
generation?: number;
253253
//labels?: [Object];
254+
annotations?: Object;
254255
labels?: {
255256
'kubernetes.io/metadata.name'?: String,
256257
manager?: string;

0 commit comments

Comments
 (0)