Open process0 opened 5 years ago
MCI does not support this currently. We reuse the single cluster ingress spec and hence we will need to change that to add the bucket params as suggested here.
The workarounds you enumerated for using GCP Web UI or gcloud will work. Note that they will be overwritten anytime you run kubemci create again.
Hello @nikhiljindal , I am planning to add storage bucket storage support to kubemci. The design in my mind is like following:
apiVersion: v1
kind: Service
metadata:
name: prod-static-bucket
labels:
app: djangoapp
annotations:
kubernetes.io/ingress.storage-bucket-name: "bucket_name"
spec:
clusterIP: None
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: zoneprinter
annotations:
kubernetes.io/ingress.class: gce-multi-cluster
kubernetes.io/ingress.global-static-ip-name: $ZP_KUBEMCI_IP
spec:
rules:
- http:
paths:
- path: "/static/*"
backend:
serviceName: prod-static-bucket
servicePort: 3000 #Simply ignored
In addition, BackendConfig can be supported by kubemci to enable CDN for this endpoints.
What do you think?
@cagataygurturk Heya, did you make any progress on this?
Any updates on this? Thanks
Is there a way to define a route to a backend bucket on GCP using the MCI yaml file? I know I can edit the Load Balancer to add the route manually using the GCP web UI. I can also manually edit the URL maps file using gcloud and a file editor, but there is no nice way to automate this.
I suggest having
bucketName
andbucketCdn
elements for thebackend
section. We could check for the existence of the cloud storage bucket, and create the backend bucket if it exists or fail if it does not exist.