Documentation ¶
Index ¶
- func Delete(key string, doc []byte) ([]byte, error)
- func Merge(_ context.Context, c *Config, logger logr.Logger) (string, error)
- func MergeOut(ctx context.Context, c *Config, logger logr.Logger) error
- func Move(start, end string, doc []byte) ([]byte, bool, error)
- func Run(_ context.Context, c *Config, logger logr.Logger) (string, error)
- func RunOut(ctx context.Context, c *Config, logger logr.Logger) error
- type Config
- type IngressValues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
Delete takes a JSON path and JSON document and returns a JSON document with the input path deleted.
func Merge ¶
Merge combines the "controller" and "gateway" sections of an "ingress" chart values.yaml into a single root-level collection of settings for use with the 3.x "kong" chart. It must be run after an initial pass of the main command to migrate moved keys to their new locations.
func Move ¶
Move takes a start and end JSON path string and a document, and returns a document with the start path moved to the end path. It also returns a boolean indicating if the start path is not present, in which case the input document is returned unmodified.
Types ¶
type Config ¶
type Config struct { // SourceChart indicates whether the values.yaml to migrate comes from the "kong" or "ingress" chart SourceChart string // InputFile is the values.yaml filename to migrate. InputFile string // OutputFormat is the output format. OutputFormat string // contains filtered or unexported fields }
type IngressValues ¶
type IngressValues struct { Gateway map[string]interface{} `json:"gateway,omitempty" yaml:"gateway,omitempty"` Controller map[string]interface{} `json:"controller,omitempty" yaml:"controller,omitempty"` // IngressController should not exist in normal ingress values, only those that have first passed through the // migrate command. IngressController map[string]interface{} `json:"ingressController,omitempty" yaml:"ingressController,omitempty"` }
Click to show internal directories.
Click to hide internal directories.