Skip to content

Commit

Permalink
improve addon display
Browse files Browse the repository at this point in the history
  • Loading branch information
mms-gianni committed Dec 15, 2023
1 parent 6ef7ce1 commit 883c2ab
Show file tree
Hide file tree
Showing 12 changed files with 134 additions and 11 deletions.
Binary file modified client/public/img/addons/Memcached.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/addons/kuberoCouchDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Plugin, IPlugin, IPluginFormFields} from './plugin';
// Classname must be same as the CRD's Name
export class KuberoCouchDB extends Plugin implements IPlugin {
public id: string = 'kubero-operator';//same as operator name
public displayName = 'Kubero CouchDB'
public displayName = 'CouchDB'
public icon = '/img/addons/CouchDB.png'
public install: string = ''
public url = 'https://artifacthub.io/packages/olm/community-operators/kubero-operator'
Expand Down
2 changes: 1 addition & 1 deletion src/addons/kuberoElasticsearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Plugin, IPlugin, IPluginFormFields} from './plugin';
// Classname must be same as the CRD's Name
export class KuberoElasticsearch extends Plugin implements IPlugin {
public id: string = 'kubero-operator';//same as operator name
public displayName = 'Kubero Elasticsearch'
public displayName = 'Elasticsearch'
public icon = '/img/addons/Elasticsearch.png'
public install: string = ''
public url = 'https://artifacthub.io/packages/olm/community-operators/kubero-operator'
Expand Down
2 changes: 1 addition & 1 deletion src/addons/kuberoKafka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Plugin, IPlugin, IPluginFormFields} from './plugin';
// Classname must be same as the CRD's Name
export class KuberoKafka extends Plugin implements IPlugin {
public id: string = 'kubero-operator';//same as operator name
public displayName = 'Kubero Kafka'
public displayName = 'Kafka'
public icon = '/img/addons/Kafka.png'
public install: string = ''
public url = 'https://artifacthub.io/packages/olm/community-operators/kubero-operator'
Expand Down
2 changes: 1 addition & 1 deletion src/addons/kuberoMail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Plugin, IPlugin, IPluginFormFields} from './plugin';
// Classname must be same as the CRD's Name
export class KuberoMail extends Plugin implements IPlugin {
public id: string = 'kubero-operator';//same as operator name
public displayName = 'Kubero Haraka Mail Server'
public displayName = 'Haraka Mail Server'
public icon = '/img/addons/Haraka.png'
public install: string = ''
public url = 'https://artifacthub.io/packages/olm/community-operators/kubero-operator'
Expand Down
119 changes: 119 additions & 0 deletions src/addons/kuberoMemcached.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
import {Plugin, IPlugin, IPluginFormFields} from './plugin';

// Classname must be same as the CRD's Name
export class KuberoMemcached extends Plugin implements IPlugin {
public id: string = 'kubero-operator';//same as operator name
public displayName = 'Memcached'
public icon = '/img/addons/Memcached.png'
public install: string = ''
public url = 'https://artifacthub.io/packages/olm/community-operators/kubero-operator'
public docs = [
{
title: 'Kubero Docs', url: ''
}
]
public artifact_url = 'https://artifacthub.io/api/v1/packages/olm/kubero/kubero-operator'
public beta: boolean = false;

public formfields: {[key: string]: IPluginFormFields} = {
'KuberoMemcached.metadata.name':{
type: 'text',
label: 'Name',
name: 'metadata.name',
required: true,
default: 'memcached',
description: 'The name of the Memcached instance'
},
'KuberoMemcached.spec.memcached.architecture':{
type: 'select',
label: 'Architecture*',
options: ['standalone', 'high-availability'],
name: 'spec.memcached.architecture',
default: 'standalone',
required: true,
description: 'Architecture of the Memcached instance'
},
'KuberoMemcached.spec.memcached.global.storageClass':{
type: 'select-storageclass',
label: 'Storage Class',
// options: ['default', 'local-path', 'nfs-client', 'rook-ceph-block'],
name: 'spec.memcached.global.storageClass',
default: 'default',
required: true
},
'KuberoMemcached.spec.memcached.auth.enabled':{
type: 'switch',
label: 'Enable Authentication',
name: 'spec.memcached.auth.username',
default: true,
required: false,
description: 'Enable Memcached authentication'
},
'KuberoMemcached.spec.memcached.auth.username':{
type: 'text',
label: 'Username',
name: 'spec.memcached.auth.username',
default: '',
required: false,
description: 'Memcached admin user'
},
'KuberoMemcached.spec.memcached.auth.password':{
type: 'text',
label: 'Password',
name: 'spec.memcached.auth.password',
default: '',
required: false,
description: 'Memcached admin password'
},
'KuberoMemcached.spec.memcached.resources.requests.memory':{
type: 'text',
label: 'Memory',
name: 'spec.memcached.resources.requests.memory',
default: '256Mi',
required: true,
description: 'Memcached memory reservation'
},
'KuberoMemcached.spec.memcached.replicaCount':{
type: 'number',
label: 'Replica Count',
name: 'spec.memcached.replicaCount',
default: 1,
required: true,
description: 'Number of Memcached replicas'
},
'KuberoMemcached.spec.memcached.autoscaling.enabled':{
type: 'switch',
label: 'Enable Autoscaling',
name: 'spec.memcached.autoscaling.enabled',
default: true,
required: false,
description: 'Requires Architecture "high-avialable"'
},
'KuberoMemcached.spec.memcached.autoscaling.minReplicas':{
type: 'number',
label: 'Min Replica Count',
name: 'spec.memcached.autoscaling.minReplicas',
default: 3,
required: false,
description: 'Minimal number of Memcached replicas'
},
'KuberoMemcached.spec.memcached.autoscaling.maxReplicas':{
type: 'number',
label: 'Max Replica Count',
name: 'spec.memcached.autoscaling.maxReplicas',
default: 6,
required: false,
description: 'Maximal number of Memcached replicas'
},
};

public env: any[] = []

protected additionalResourceDefinitions: Object = {}

constructor(availableOperators: any) {
super();
super.init(availableOperators);
}

}
6 changes: 3 additions & 3 deletions src/addons/kuberoMongoDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Plugin, IPlugin, IPluginFormFields} from './plugin';
// Classname must be same as the CRD's Name
export class KuberoMongoDB extends Plugin implements IPlugin {
public id: string = 'kubero-operator';//same as operator name
public displayName = 'Kubero MongoDB'
public displayName = 'MongoDB'
public icon = '/img/addons/MongoDB.png'
public install: string = ''
public url = 'https://artifacthub.io/packages/olm/community-operators/kubero-operator'
Expand Down Expand Up @@ -42,10 +42,10 @@ export class KuberoMongoDB extends Plugin implements IPlugin {
},
'KuberoMongoDB.spec.mongodb.architecture':{
type: 'select',
label: 'Storage Class',
label: 'Architecture*',
options: ['standalone', 'replicaset'],
name: 'spec.mongodb.architecture',
default: 'default',
default: 'standalone',
required: true
},
'KuberoMongoDB.spec.mongodb.auth.databases[0]':{
Expand Down
2 changes: 1 addition & 1 deletion src/addons/kuberoMysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Plugin, IPlugin, IPluginFormFields} from './plugin';
// Classname must be same as the CRD's Name
export class KuberoMysql extends Plugin implements IPlugin {
public id: string = 'kubero-operator';//same as operator name
public displayName = 'Kubero MySQL'
public displayName = 'MySQL'
public icon = '/img/addons/MySQL.png'
public install: string = ''
public url = 'https://artifacthub.io/packages/olm/community-operators/kubero-operator'
Expand Down
2 changes: 1 addition & 1 deletion src/addons/kuberoPostgresql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Plugin, IPlugin, IPluginFormFields} from './plugin';
// Classname must be same as the CRD's Name
export class KuberoPostgresql extends Plugin implements IPlugin {
public id: string = 'kubero-operator';//same as operator name
public displayName = 'Kubero Postgresql'
public displayName = 'Postgresql'
public icon = '/img/addons/postgresql.png'
public install: string = ''
public url = 'https://artifacthub.io/packages/olm/community-operators/kubero-operator'
Expand Down
2 changes: 1 addition & 1 deletion src/addons/kuberoRedis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Plugin, IPlugin, IPluginFormFields} from './plugin';
// Classname must be same as the CRD's Name
export class KuberoRedis extends Plugin implements IPlugin {
public id: string = 'kubero-operator';//same as operator name
public displayName = 'Kubero Redis'
public displayName = 'Redis'
public icon = '/img/addons/Redis.png'
public install: string = ''
public url = 'https://artifacthub.io/packages/olm/community-operators/kubero-operator'
Expand Down
2 changes: 1 addition & 1 deletion src/addons/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export abstract class Plugin {

this.resourceDefinitions[crd.spec.names.kind] = exampleCRD;

this.displayName = artefactCRD.displayName;
//this.displayName = artefactCRD.displayName;
this.description = artefactCRD.description;
break;
}
Expand Down
4 changes: 4 additions & 0 deletions src/modules/addons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Redis } from '../addons/redis';
import { KuberoMysql } from '../addons/kuberoMysql';
import { KuberoRedis } from '../addons/kuberoRedis';
import { KuberoPostgresql } from '../addons/kuberoPostgresql';
import { KuberoMemcached } from '../addons/kuberoMemcached';
import { KuberoMongoDB } from '../addons/kuberoMongoDB';
import { KuberoElasticsearch } from '../addons/kuberoElasticsearch';
import { KuberoCouchDB } from '../addons/kuberoCouchDB';
Expand Down Expand Up @@ -90,6 +91,9 @@ export class Addons {
const kuberoMongoDB = new KuberoMongoDB(this.CRDList)
this.addonsList.push(kuberoMongoDB)

const kuberoMemcached = new KuberoMemcached(this.CRDList)
this.addonsList.push(kuberoMemcached)

const kuberoElasticsearch = new KuberoElasticsearch(this.CRDList)
this.addonsList.push(kuberoElasticsearch)

Expand Down

0 comments on commit 883c2ab

Please sign in to comment.