Skip to content

Commit 62745e9

Browse files
authored
Added log search & prometheus extra params configuration (#700)
1 parent c81da22 commit 62745e9

17 files changed

+640
-530
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ require (
2121
github.com/minio/mc v0.0.0-20210301162250-f9d36f9b5243
2222
github.com/minio/minio v0.0.0-20210301203133-e8d8dfa3ae8f
2323
github.com/minio/minio-go/v7 v7.0.10
24-
github.com/minio/operator v0.0.0-20210317030027-207337abe7fd
24+
github.com/minio/operator v0.0.0-20210419212754-93a9239fd18b
2525
github.com/minio/operator/logsearchapi v0.0.0-20210201110528-753019b838b4
2626
github.com/minio/selfupdate v0.3.1
2727
github.com/mitchellh/go-homedir v1.1.0

go.sum

Lines changed: 40 additions & 2 deletions
Large diffs are not rendered by default.

models/create_tenant_request.go

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

models/log_search_configuration.go

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

models/prometheus_configuration.go

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

portal-ui/src/common/types.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ export interface ITenantCreator {
6666
idp?: IIDPConfiguration;
6767
annotations?: Object;
6868
image_registry?: ImageRegistry;
69+
logSearchConfiguration?: LogSearchConfiguration,
70+
prometheusConfiguration?: PrometheusConfiguration,
6971
}
7072

7173
export interface ImageRegistry {
@@ -339,3 +341,13 @@ export interface IErasureCodeCalc {
339341
defaultEC: string;
340342
storageFactors: IStorageFactors[];
341343
}
344+
345+
export interface LogSearchConfiguration {
346+
storageClass: string;
347+
storageSize: number;
348+
}
349+
350+
export interface PrometheusConfiguration {
351+
storageClass: string;
352+
storageSize: number;
353+
}

portal-ui/src/screens/Console/Tenants/AddTenant/AddTenant.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,13 @@ const AddTenant = ({
152152
const ecParity = fields.tenantSize.ecParity;
153153
const distribution = fields.tenantSize.distribution;
154154
const memorySize = fields.tenantSize.memorySize;
155+
const logSearchCustom = fields.configure.logSearchCustom;
156+
const prometheusCustom = fields.configure.prometheusCustom;
157+
const logSearchVolumeSize = fields.configure.logSearchVolumeSize;
158+
const logSearchSelectedStorageClass = fields.configure.logSearchSelectedStorageClass;
159+
const prometheusSelectedStorageClass = fields.configure.prometheusSelectedStorageClass;
160+
const prometheusVolumeSize = fields.configure.prometheusVolumeSize;
161+
155162

156163
if (addSending) {
157164
const poolName = generatePoolName([]);
@@ -210,6 +217,26 @@ const AddTenant = ({
210217
};
211218
}
212219

220+
if(logSearchCustom) {
221+
dataSend = {
222+
...dataSend,
223+
logSearchConfiguration: {
224+
storageClass: logSearchSelectedStorageClass,
225+
storageSize: parseInt(logSearchVolumeSize),
226+
}
227+
};
228+
}
229+
230+
if(prometheusCustom) {
231+
dataSend = {
232+
...dataSend,
233+
prometheusConfiguration: {
234+
storageClass: prometheusSelectedStorageClass,
235+
storageSize: parseInt(prometheusVolumeSize),
236+
}
237+
};
238+
}
239+
213240
let tenantCerts: any = null;
214241
let consoleCerts: any = null;
215242
let caCerts: any = null;

0 commit comments

Comments
 (0)