Documentation ¶
Index ¶
- func BuildClientConfig(kubeconfig, context string) (*rest.Config, error)
- func ParseK8SYAMLToIstioControlPlaneSpec(yml string) (*v1alpha2.IstioControlPlaneSpec, *schema.GroupVersionKind, error)
- func RenderToDir(manifests name.ManifestMap, outputDir string, dryRun, verbose bool) error
- type ComponentApplyOutput
- type CompositeOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildClientConfig ¶
BuildClientConfig is a helper function that builds client config from a kubeconfig filepath. It overrides the current context with the one provided (empty to use default).
This is a modified version of k8s.io/client-go/tools/clientcmd/BuildConfigFromFlags with the difference that it loads default configs if not running in-cluster.
func ParseK8SYAMLToIstioControlPlaneSpec ¶
func ParseK8SYAMLToIstioControlPlaneSpec(yml string) (*v1alpha2.IstioControlPlaneSpec, *schema.GroupVersionKind, error)
ParseK8SYAMLToIstioControlPlaneSpec parses a YAML string IstioControlPlane CustomResource and unmarshals in into an IstioControlPlaneSpec object. It returns the object and an API group/version with it.
func RenderToDir ¶
func RenderToDir(manifests name.ManifestMap, outputDir string, dryRun, verbose bool) error
RenderToDir writes manifests to a local filesystem directory tree.
Types ¶
type ComponentApplyOutput ¶
type ComponentApplyOutput struct { // Stdout is the stdout output. Stdout string // Stderr is the stderr output. Stderr string // Error is the error output. Err error // Manifest is the manifest applied to the cluster. Manifest string }
ComponentApplyOutput is used to capture errors and stdout/stderr outputs for a command, per component.
type CompositeOutput ¶
type CompositeOutput map[name.ComponentName]*ComponentApplyOutput