apply

package
v0.11.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

README

kubernetes-apply (platform)

The Kubernetes Apply plugin deploys Kubernetes resources directly from a single file or a directory of YAML or JSON files.

Components

  1. Platform
  1. Docker

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_waypoint_builtin_k8s_apply_plugin_proto protoreflect.FileDescriptor
View Source
var Options = []sdk.Option{
	sdk.WithComponents(&Platform{}),
}

Options are the SDK options to use for instantiation for the plugin.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The path to the job specification to load.
	Path string `hcl:"path,attr"`

	// Prune label is the label to use to destroy resources that don't match.
	PruneLabel string `hcl:"prune_label,attr"`

	// PruneAllowlist is a list of Kubernetes Objects that are allowed to be pruned
	// An empty list means the defaults. Specify them as group/version/kind (e.g: apps/v1/Deployment)
	// (see https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands --prune-allowlist)
	PruneAllowlist []string `hcl:"prune_allowlist,optional"`

	// KubeconfigPath is the path to the kubeconfig file.
	KubeconfigPath string `hcl:"kubeconfig,optional"`

	// Kubernetes context to use in the kubeconfig
	Context string `hcl:"context,optional"`
}

Config is the configuration structure for the Platform.

type Deployment

type Deployment struct {
	PruneLabel     string   `protobuf:"bytes,1,opt,name=prune_label,json=pruneLabel,proto3" json:"prune_label,omitempty"`
	PruneAllowlist []string `protobuf:"bytes,2,rep,name=prune_allowlist,json=pruneAllowlist,proto3" json:"prune_allowlist,omitempty"`
	// contains filtered or unexported fields
}

func (*Deployment) Descriptor deprecated

func (*Deployment) Descriptor() ([]byte, []int)

Deprecated: Use Deployment.ProtoReflect.Descriptor instead.

func (*Deployment) GetPruneAllowlist added in v0.11.0

func (x *Deployment) GetPruneAllowlist() []string

func (*Deployment) GetPruneLabel

func (x *Deployment) GetPruneLabel() string

func (*Deployment) ProtoMessage

func (*Deployment) ProtoMessage()

func (*Deployment) ProtoReflect

func (x *Deployment) ProtoReflect() protoreflect.Message

func (*Deployment) Reset

func (x *Deployment) Reset()

func (*Deployment) String

func (x *Deployment) String() string

type Platform

type Platform struct {
	// contains filtered or unexported fields
}

Platform is the Platform implementation

func (*Platform) Config

func (p *Platform) Config() (interface{}, error)

Config implements Configurable

func (*Platform) Deploy

func (p *Platform) Deploy(
	ctx context.Context,
	log hclog.Logger,
	deployConfig *component.DeploymentConfig,
	ui terminal.UI,
) (*Deployment, error)

Deploy deploys to Kubernetes

func (*Platform) DeployFunc

func (p *Platform) DeployFunc() interface{}

DeployFunc implements component.Platform

func (*Platform) Destroy

func (p *Platform) Destroy(
	ctx context.Context,
	log hclog.Logger,
	deployment *Deployment,
	ui terminal.UI,
) error

Destroy

func (*Platform) DestroyFunc

func (p *Platform) DestroyFunc() interface{}

DestroyFunc implements component.Destroyer

func (*Platform) Documentation

func (p *Platform) Documentation() (*docs.Documentation, error)

func (*Platform) Generation

func (p *Platform) Generation(
	ctx context.Context,
) ([]byte, error)

Generation returns the generation ID.

func (*Platform) GenerationFunc

func (p *Platform) GenerationFunc() interface{}

GenerationFunc implements component.Generation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL