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