Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2aa1349f8 | ||
|
|
8b62aec7fb |
@@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: console-sa
|
serviceAccountName: console-sa
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: console
|
||||||
image: minio/console:v0.3.16
|
image: minio/console:v0.3.17
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
args:
|
args:
|
||||||
- server
|
- server
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
serviceAccountName: console-sa
|
serviceAccountName: console-sa
|
||||||
containers:
|
containers:
|
||||||
- name: console
|
- name: console
|
||||||
image: minio/console:v0.3.16
|
image: minio/console:v0.3.17
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
env:
|
env:
|
||||||
- name: CONSOLE_OPERATOR_MODE
|
- name: CONSOLE_OPERATOR_MODE
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ type CreateTenantRequest struct {
|
|||||||
// enable console
|
// enable console
|
||||||
EnableConsole *bool `json:"enable_console,omitempty"`
|
EnableConsole *bool `json:"enable_console,omitempty"`
|
||||||
|
|
||||||
|
// enable prometheus
|
||||||
|
EnablePrometheus *bool `json:"enable_prometheus,omitempty"`
|
||||||
|
|
||||||
// enable tls
|
// enable tls
|
||||||
EnableTLS *bool `json:"enable_tls,omitempty"`
|
EnableTLS *bool `json:"enable_tls,omitempty"`
|
||||||
|
|
||||||
|
|||||||
@@ -626,7 +626,7 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
const consoleVersion = "minio/console:v0.3.16"
|
const consoleVersion = "minio/console:v0.3.17"
|
||||||
minInst.Spec.Console = &operator.ConsoleConfiguration{
|
minInst.Spec.Console = &operator.ConsoleConfiguration{
|
||||||
Replicas: 1,
|
Replicas: 1,
|
||||||
Image: consoleVersion,
|
Image: consoleVersion,
|
||||||
@@ -681,10 +681,12 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
}
|
}
|
||||||
// add annotations
|
// add annotations
|
||||||
var annotations map[string]string
|
var annotations map[string]string
|
||||||
if len(tenantReq.Annotations) > 0 {
|
if minInst.Spec.Metadata == nil {
|
||||||
if minInst.Spec.Metadata == nil {
|
minInst.Spec.Metadata = &metav1.ObjectMeta{
|
||||||
minInst.Spec.Metadata = &metav1.ObjectMeta{}
|
Annotations: map[string]string{},
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if len(tenantReq.Annotations) > 0 {
|
||||||
annotations = tenantReq.Annotations
|
annotations = tenantReq.Annotations
|
||||||
minInst.Spec.Metadata.Annotations = annotations
|
minInst.Spec.Metadata.Annotations = annotations
|
||||||
}
|
}
|
||||||
@@ -718,6 +720,13 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prometheus annotations support
|
||||||
|
if tenantReq.EnablePrometheus != nil && *tenantReq.EnablePrometheus && minInst.Spec.Metadata != nil && minInst.Spec.Metadata.Annotations != nil {
|
||||||
|
minInst.Spec.Metadata.Annotations["prometheus.io/path"] = "/minio/prometheus/metrics"
|
||||||
|
minInst.Spec.Metadata.Annotations["prometheus.io/port"] = fmt.Sprint(operator.MinIOPort)
|
||||||
|
minInst.Spec.Metadata.Annotations["prometheus.io/scrape"] = "true"
|
||||||
|
}
|
||||||
|
|
||||||
// set console image if provided
|
// set console image if provided
|
||||||
if tenantReq.ConsoleImage != "" {
|
if tenantReq.ConsoleImage != "" {
|
||||||
minInst.Spec.Console.Image = tenantReq.ConsoleImage
|
minInst.Spec.Console.Image = tenantReq.ConsoleImage
|
||||||
|
|||||||
@@ -871,7 +871,7 @@ func Test_UpdateTenantAction(t *testing.T) {
|
|||||||
},
|
},
|
||||||
params: admin_api.UpdateTenantParams{
|
params: admin_api.UpdateTenantParams{
|
||||||
Body: &models.UpdateTenantRequest{
|
Body: &models.UpdateTenantRequest{
|
||||||
ConsoleImage: "minio/console:v0.3.16",
|
ConsoleImage: "minio/console:v0.3.17",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2038,6 +2038,10 @@ func init() {
|
|||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
|
"enable_prometheus": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
"enable_tls": {
|
"enable_tls": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
@@ -5992,6 +5996,10 @@ func init() {
|
|||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
|
"enable_prometheus": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
"enable_tls": {
|
"enable_tls": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
|
|||||||
@@ -1837,6 +1837,9 @@ definitions:
|
|||||||
enable_tls:
|
enable_tls:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
|
enable_prometheus:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
namespace:
|
namespace:
|
||||||
type: string
|
type: string
|
||||||
erasureCodingParity:
|
erasureCodingParity:
|
||||||
|
|||||||
Reference in New Issue
Block a user