Documentation ¶
Index ¶
- Constants
- Variables
- type CLI
- func (c *CLI) Apply(ctx context.Context, out io.Writer, manifests manifest.ManifestList) error
- func (c *CLI) Delete(ctx context.Context, out io.Writer, manifests manifest.ManifestList) error
- func (c *CLI) Kustomize(ctx context.Context, args []string) ([]byte, error)
- func (c *CLI) ReadManifests(ctx context.Context, manifests []string) (manifest.ManifestList, error)
- func (c *CLI) WaitForDeletions(ctx context.Context, out io.Writer, manifests manifest.ManifestList) error
- type Config
- type Deployer
- func (k *Deployer) Cleanup(ctx context.Context, out io.Writer) error
- func (k *Deployer) Dependencies() ([]string, error)
- func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) error
- func (k *Deployer) GetAccessor() access.Accessor
- func (k *Deployer) GetDebugger() debug.Debugger
- func (k *Deployer) GetLogger() log.Logger
- func (k *Deployer) GetStatusMonitor() status.Monitor
- func (k *Deployer) GetSyncer() sync.Syncer
- func (k *Deployer) RegisterLocalImages(images []graph.Artifact)
- func (k *Deployer) Render(ctx context.Context, out io.Writer, builds []graph.Artifact, offline bool, ...) error
- func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact)
Constants ¶
View Source
const ( KubectlVersion112 = `{"clientVersion":{"major":"1","minor":"12"}}` KubectlVersion118 = `{"clientVersion":{"major":"1","minor":"18"}}` )
View Source
const DeploymentAppYAML = `apiVersion: v1
kind: Pod
metadata:
name: leeroy-app
spec:
containers:
- name: leeroy-app
image: leeroy-app`
View Source
const DeploymentAppYAMLv1 = `apiVersion: v1
kind: Pod
metadata:
name: leeroy-app
spec:
containers:
- image: leeroy-app:v1
name: leeroy-app`
View Source
const DeploymentAppYAMLv2 = `apiVersion: v1
kind: Pod
metadata:
name: leeroy-app
spec:
containers:
- image: leeroy-app:v2
name: leeroy-app`
View Source
const DeploymentWebYAML = `apiVersion: v1
kind: Pod
metadata:
name: leeroy-web
spec:
containers:
- name: leeroy-web
image: leeroy-web`
View Source
const DeploymentWebYAMLv1 = `apiVersion: v1
kind: Pod
metadata:
name: leeroy-web
spec:
containers:
- image: leeroy-web:v1
name: leeroy-web`
Variables ¶
View Source
var TestKubeConfig = "kubeconfig"
View Source
var TestKubeContext = "kubecontext"
View Source
var TestNamespace = "testNamespace"
View Source
var TestNamespace2 = "testNamespace2"
View Source
var TestNamespace2FromEnvTemplate = "test{{.MYENV}}ace2" // needs `MYENV=Namesp` environment variable
Functions ¶
This section is empty.
Types ¶
type CLI ¶
type CLI struct { *kubectl.CLI Flags latestV1.KubectlFlags // contains filtered or unexported fields }
CLI holds parameters to run kubectl.
func NewCLI ¶ added in v1.7.1
func NewCLI(cfg Config, flags latestV1.KubectlFlags, defaultNamespace string) CLI
func (*CLI) ReadManifests ¶ added in v0.22.0
ReadManifests reads a list of manifests in yaml format.
func (*CLI) WaitForDeletions ¶ added in v1.7.1
func (c *CLI) WaitForDeletions(ctx context.Context, out io.Writer, manifests manifest.ManifestList) error
WaitForDeletions waits for resource marked for deletion to complete their deletion.
type Config ¶ added in v1.7.1
type Config interface { kubectl.Config kstatus.Config kloader.Config portforward.Config deploy.Config ForceDeploy() bool WaitForDeletions() config.WaitForDeletions Mode() config.RunMode HydratedManifests() []string DefaultPipeline() latestV1.Pipeline Tail() bool PipelineForImage(imageName string) (latestV1.Pipeline, bool) }
type Deployer ¶ added in v1.7.1
type Deployer struct { *latestV1.KubectlDeploy // contains filtered or unexported fields }
Deployer deploys workflows using kubectl CLI.
func NewDeployer ¶ added in v1.7.1
func NewDeployer(cfg Config, labeller *label.DefaultLabeller, d *latestV1.KubectlDeploy) (*Deployer, error)
NewDeployer returns a new Deployer for a DeployConfig filled with the needed configuration for `kubectl apply`
func (*Deployer) Dependencies ¶ added in v1.7.1
Dependencies lists all the files that describe what needs to be deployed.
func (*Deployer) Deploy ¶ added in v1.7.1
Deploy templates the provided manifests with a simple `find and replace` and runs `kubectl apply` on those manifests
func (*Deployer) GetAccessor ¶ added in v1.27.0
func (*Deployer) GetDebugger ¶ added in v1.27.0
func (*Deployer) GetStatusMonitor ¶ added in v1.27.0
func (*Deployer) RegisterLocalImages ¶ added in v1.28.0
func (*Deployer) TrackBuildArtifacts ¶ added in v1.27.0
Click to show internal directories.
Click to hide internal directories.