Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Find API call to create object from yaml config #387

Closed
@tom-bowles

Description

@tom-bowles

I have a yaml file containing configs that I would like to apply as kubectl apply -f my_file.yml would. It is possible to pass configs loaded from yaml unmodified to API calls as discussed in #63 and illustrated in the create_deployment.py example. However, if you have a collection of objects you have to figure out which call to make on which API version to apply each item of config, while the apiVersion and kind keys in the config, which carry this information, get ignored.

Is there any way to find the right API version object and function given the apiVersion and kind values other than to have a mapping in my own code? If not, would it be possible to add such a thing, and maybe generic create and delete calls that read those attributes from the body, thus behaving similarly to kubectl?

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions