Documentation ¶
Index ¶
- func ExpandResource(ctx context.Context, path string) (result []byte, err error)
- func Kubeapply(ctx context.Context, kubeinfo *k8s.KubeInfo, perPhaseTimeout time.Duration, ...) error
- func LoadResources(ctx context.Context, path string) (result []k8s.Resource, err error)
- func MarshalResources(resources []k8s.Resource) ([]byte, error)
- func Ready(r k8s.Resource) bool
- func ReadyImplemented(r k8s.Resource) bool
- func SaveResources(path string, resources []k8s.Resource) error
- type Waiter
- type YAMLCollection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandResource ¶
ExpandResource takes a path to a YAML file, and returns its contents, with any kubeapply templating expanded.
func Kubeapply ¶
func Kubeapply(ctx context.Context, kubeinfo *k8s.KubeInfo, perPhaseTimeout time.Duration, debug, dryRun bool, files ...string) error
Kubeapply applies the supplied manifests to the kubernetes cluster indicated via the kubeinfo argument. If kubeinfo is nil, it will look in the standard default places for cluster configuration. If any phase takes longer than perPhaseTimeout to become ready, then it returns early with an error.
func LoadResources ¶
LoadResources is like ExpandResource, but follows it up by actually parsing the YAML.
func MarshalResources ¶
MarshalResources serializes a list of k8s.Resources in to YAML.
func Ready ¶
Ready returns whether or not this resource is ready; if this package does not know how to check whether the resource is ready, then it returns true.
func ReadyImplemented ¶
ReadyImplemented returns whether or not this package knows how to wait for this resource to be ready.
Types ¶
type Waiter ¶
type Waiter struct {
// contains filtered or unexported fields
}
Waiter takes some YAML and waits for all of the resources described in it to be ready.
type YAMLCollection ¶
A YAMLCollection is a collection of YAML files to later be applied.
func CollectYAML ¶
func CollectYAML(paths ...string) (YAMLCollection, error)
CollectYAML takes several file or directory paths, and returns a collection of the YAML files in them.
func (YAMLCollection) ApplyAndWait ¶
func (collection YAMLCollection) ApplyAndWait( ctx context.Context, kubeinfo *k8s.KubeInfo, perPhaseTimeout time.Duration, debug, dryRun bool, ) error
ApplyAndWait applies the collection of YAML, and waits for all Resources described in it to be ready. If any phase takes longer than perPhaseTimeout to become ready, then it returns early with an error.