Documentation ¶
Index ¶
- func ConvertObject(schema collection.Schema, object IstioObject, domain string) (*config.Config, error)
- func FromJSON(s collection.Schema, js string) (config.Spec, error)
- func FromJSONMap(s collection.Schema, data interface{}) (config.Spec, error)
- func FromYAML(s collection.Schema, yml string) (config.Spec, error)
- func IstioStatusJSONFromMap(jsonMap map[string]interface{}) (config.Status, error)
- type IstioKind
- func (in *IstioKind) DeepCopy() *IstioKind
- func (in *IstioKind) DeepCopyInto(out *IstioKind)
- func (in *IstioKind) DeepCopyObject() runtime.Object
- func (in *IstioKind) GetObjectMeta() meta_v1.ObjectMeta
- func (in *IstioKind) GetSpec() map[string]interface{}
- func (in *IstioKind) GetStatus() map[string]interface{}
- type IstioObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertObject ¶
func ConvertObject(schema collection.Schema, object IstioObject, domain string) (*config.Config, error)
ConvertObject converts an IstioObject k8s-style object to the internal configuration model.
func FromJSONMap ¶
func FromJSONMap(s collection.Schema, data interface{}) (config.Spec, error)
FromJSONMap converts from a generic map to a proto message using canonical JSON encoding JSON encoding is specified here: https://developers.google.com/protocol-buffers/docs/proto3#json
Types ¶
type IstioKind ¶
type IstioKind struct { meta_v1.TypeMeta meta_v1.ObjectMeta `json:"metadata"` Spec map[string]interface{} `json:"spec"` Status map[string]interface{} `json:"status,omitempty"` }
IstioKind is the generic Kubernetes API object wrapper
func ParseInputs ¶
ParseInputs reads multiple documents from `kubectl` output and checks with the schema. It also returns the list of unrecognized kinds as the second response.
NOTE: This function only decodes a subset of the complete k8s ObjectMeta as identified by the fields in model.Meta. This would typically only be a problem if a user dumps an configuration object with kubectl and then re-ingests it.
func (*IstioKind) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IstioKind.
func (*IstioKind) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IstioKind) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*IstioKind) GetObjectMeta ¶
func (in *IstioKind) GetObjectMeta() meta_v1.ObjectMeta
GetObjectMeta from a wrapper
type IstioObject ¶
type IstioObject interface { runtime.Object GetSpec() map[string]interface{} GetStatus() map[string]interface{} GetObjectMeta() meta_v1.ObjectMeta }
IstioObject is a k8s wrapper interface for config objects
func ConvertConfig ¶
func ConvertConfig(cfg config.Config) (IstioObject, error)
ConvertConfig translates Istio config to k8s config JSON