[EnMasse] Upcoming REST API changes

Lohmann Carsten (INST/ECS4) Carsten.Lohmann at bosch-si.com
Wed May 9 08:17:28 UTC 2018


> 
> Agreed with this logic, it might not be an issue then. So just thinking about the
> resource then, it could be something like:
> 
> apiVersion: enmasse.io/v1
> kind: AddressSpace
> metadata:
>    name: myspace
> spec:
>    type: standard
>    plan: small-standard
>    addresses:
>      - address: myqueue
>        type: queue
>        plan: small-queue
>      - address: mytopic
>        type: topic
>        plan: small-topic
> status:
>    isReady: true
>    addresses:
>      - address: myqueue
>        phase: Configuring
>        isReady: false
>        messages:
>          - "Autolink not present on router"
>          - "Address not present on router"
>      - address: mytopic
>        phase: Active
>        isReady: true
> 
> Making status a subresource, we can then also assign permissions so that only the
> internal controllers may update the status whereas the user only get read
> permissions (same as for pods).
> 
> I think doing this would be a great simplification from a user POV, so I really hope
> it can work.
> 
> As a first step, I can modify the API server to consume this format and convert
> to/from the configmaps we use today.
> 
> Wdyt? Are there any tests we should/can do to ensure that this approach will
> actually work? Any other concerns?

One thing to note here, is that I guess with this solution, there is no direct way to delete single addresses via kubectl.

>From what I see, with a command like this
kubectl patch AddressSpace my-addressspace --type json -p='[{"op": "remove", "path": "/spec/addresses[0]"}]'
referencing a specific "address" element can only be done using indexes, not via a value match.

Concerning the HTTP API, I guess there would be need to be "non-standard" methods/resources added in order to support adding/deleting single addresses (so that no replacing of the whole address list in the address space is needed by the API user).

Best regards,
Carsten


> 
> Best regards,
> 
> Ulf
> 
> _______________________________________________
> enmasse mailing list
> enmasse at redhat.com
> https://www.redhat.com/mailman/listinfo/enmasse




More information about the enmasse mailing list