Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2aa1349f8 | ||
|
|
8b62aec7fb | ||
|
|
83fe33b499 | ||
|
|
54d0a1d342 |
@@ -15,7 +15,7 @@ spec:
|
||||
serviceAccountName: console-sa
|
||||
containers:
|
||||
- name: console
|
||||
image: minio/console:v0.3.15
|
||||
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.15
|
||||
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"`
|
||||
|
||||
|
||||
@@ -207,6 +207,9 @@ func (m *Zone) UnmarshalBinary(b []byte) error {
|
||||
// swagger:model ZoneVolumeConfiguration
|
||||
type ZoneVolumeConfiguration struct {
|
||||
|
||||
// labels
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
|
||||
// size
|
||||
// Required: true
|
||||
Size *int64 `json:"size"`
|
||||
|
||||
@@ -626,7 +626,7 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
||||
return nil, err
|
||||
}
|
||||
|
||||
const consoleVersion = "minio/console:v0.3.15"
|
||||
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
|
||||
@@ -1141,7 +1150,8 @@ func parseTenantZoneRequest(zoneParams *models.Zone, annotations map[string]stri
|
||||
// Pass annotations to the volume
|
||||
vct := &corev1.PersistentVolumeClaim{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "data",
|
||||
Name: "data",
|
||||
Labels: zoneParams.VolumeConfiguration.Labels,
|
||||
},
|
||||
Spec: volTemp,
|
||||
}
|
||||
|
||||
@@ -871,7 +871,7 @@ func Test_UpdateTenantAction(t *testing.T) {
|
||||
},
|
||||
params: admin_api.UpdateTenantParams{
|
||||
Body: &models.UpdateTenantRequest{
|
||||
ConsoleImage: "minio/console:v0.3.15",
|
||||
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
|
||||
@@ -3250,6 +3254,12 @@ func init() {
|
||||
"size"
|
||||
],
|
||||
"properties": {
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"size": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -5721,6 +5731,12 @@ func init() {
|
||||
"size"
|
||||
],
|
||||
"properties": {
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"size": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -5980,6 +5996,10 @@ func init() {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"enable_prometheus": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"enable_tls": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
@@ -7126,6 +7146,12 @@ func init() {
|
||||
"size"
|
||||
],
|
||||
"properties": {
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"size": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
||||
@@ -1837,6 +1837,9 @@ definitions:
|
||||
enable_tls:
|
||||
type: boolean
|
||||
default: true
|
||||
enable_prometheus:
|
||||
type: boolean
|
||||
default: false
|
||||
namespace:
|
||||
type: string
|
||||
erasureCodingParity:
|
||||
@@ -2088,6 +2091,10 @@ definitions:
|
||||
type: integer
|
||||
storage_class_name:
|
||||
type: string
|
||||
labels:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
resources:
|
||||
$ref: "#/definitions/zoneResources"
|
||||
node_selector:
|
||||
|
||||
Reference in New Issue
Block a user