istio: Index | Files

package crd

import ""


Package Files

config.go conversion.go

func ConvertObject Uses

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 FromJSON Uses

func FromJSON(s collection.Schema, js string) (config.Spec, error)

FromJSON converts a canonical JSON to a proto message

func FromJSONMap Uses

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:

func FromYAML Uses

func FromYAML(s collection.Schema, yml string) (config.Spec, error)

FromYAML converts a canonical YAML to a proto message

func IstioStatusJSONFromMap Uses

func IstioStatusJSONFromMap(jsonMap map[string]interface{}) (config.Status, error)

type IstioKind Uses

type IstioKind struct {
    meta_v1.TypeMeta   `json:",inline"`
    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 Uses

func ParseInputs(inputs string) ([]config.Config, []IstioKind, error)

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 Uses

func (in *IstioKind) DeepCopy() *IstioKind

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IstioKind.

func (*IstioKind) DeepCopyInto Uses

func (in *IstioKind) DeepCopyInto(out *IstioKind)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IstioKind) DeepCopyObject Uses

func (in *IstioKind) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*IstioKind) GetObjectMeta Uses

func (in *IstioKind) GetObjectMeta() meta_v1.ObjectMeta

GetObjectMeta from a wrapper

func (*IstioKind) GetSpec Uses

func (in *IstioKind) GetSpec() map[string]interface{}

GetSpec from a wrapper

func (*IstioKind) GetStatus Uses

func (in *IstioKind) GetStatus() map[string]interface{}

GetStatus from a wrapper

type IstioObject Uses

type IstioObject interface {
    GetSpec() map[string]interface{}
    GetStatus() map[string]interface{}
    GetObjectMeta() meta_v1.ObjectMeta

IstioObject is a k8s wrapper interface for config objects

func ConvertConfig Uses

func ConvertConfig(cfg config.Config) (IstioObject, error)

ConvertConfig translates Istio config to k8s config JSON

Package crd imports 16 packages (graph) and is imported by 26 packages. Updated 2020-10-19. Refresh now. Tools for package owners.