-
Notifications
You must be signed in to change notification settings - Fork 0
exposeServices
Cesar Celis Hernandez edited this page Sep 2, 2023
·
1 revision
https://blog.min.io/expose-minio-eks/
apiVersion: minio.min.io/v2
kind: Tenant
metadata:
name: minio-tenant-1
namespace: minio-tenant-1
Spec:
...
exposeServices:
console: true
minio: true
...
serviceMetadata:
consoleServiceAnnotations:
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: instance
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
service.beta.kubernetes.io/aws-load-balancer-type: external
minioServiceAnnotations:
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: instance
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
service.beta.kubernetes.io/aws-load-balancer-type: externalThere is logic to change the services in our Operator:
https://github.com/minio/operator/issues/1312
https://github.com/minio/operator/pull/1333
O es load balancer o cluster IP en console.go
svc.ObjectMeta.Annotations = expectedSvc.ObjectMeta.Annotations
svc.ObjectMeta.Labels = expectedSvc.ObjectMeta.Labels
svc.Spec.Ports = expectedSvc.Spec.Ports
// Only when ExposeServices is set an explicit value we do modifications to the service type
if tenant.Spec.ExposeServices != nil {
if tenant.Spec.ExposeServices.Console {
svc.Spec.Type = v1.ServiceTypeLoadBalancer
} else {
svc.Spec.Type = v1.ServiceTypeClusterIP
}
}I0902 10:19:41.983167 74820 console.go:75] Console Service don't match: Service type doesn't match. Conciliating
I0902 10:19:41.983509 74820 event.go:285] Event(v1.ObjectReference{Kind:"Tenant", Namespace:"tenant-lite", Name:"myminio", UID:"ffcc7080-52aa-44f2-879a-017f7974ca21", APIVersion:"minio.min.io/v2", ResourceVersion:"76334", FieldPath:""}): type: 'Normal' reason: 'Updated' MinIO Service Updated
I0902 10:19:41.997240 74820 event.go:285] Event(v1.ObjectReference{Kind:"Tenant", Namespace:"tenant-lite", Name:"myminio", UID:"ffcc7080-52aa-44f2-879a-017f7974ca21", APIVersion:"minio.min.io/v2", ResourceVersion:"76334", FieldPath:""}): type: 'Normal' reason: 'Updated' Console Service Updated
spec:
exposeServices: {}spec:
exposeServices:
console: true
minio: true// Only when ExposeServices is set an explicit value we do modifications to the service type
Y tambien lo que es cierto es que aun cuando cambiemos estos servicios, se pueden crear otros servicios para lo mismo que el operador no puede tocar
y asi aun cuando operador cambie estos, el usuario puede usar otros que operador no puede tocar y esto seria intracendente.
klog.Infof("Console Service don't match: %s. Conciliating", err) <--- este log cuando nosotros le metemos cambios.