sidecar

package
v1.12.7 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

Sidecar Plugin

The rigdev.sidecar plugin adds a sidecar to the Capsule's deployment. Specifically, it appends the configured container to the Deployment's initcontainers with a restartPolicy of Always.

The config can be templated with standard Go templating and has

.capsule

as its templating context.

Example

Config:

config:
  pipeline:
    steps:
      - plugins:
          - plugin: rigdev.sidecar
            config: |
              container:
                name: my-sidecar
                image: my-container-image:v1.1

The resulting Deployment resource of the Capsule

kind: Deployment
...
spec:
  template:
    spec:
      initContainers:
        - name: my-sidecar
          image: my-container-image:v1.1
          restartPolicy: Always
      ...

Config

Configuration for the sidecar plugin

Field Description
container Container Container is the configuration of the sidecar injected into the deployment

Documentation

Overview

+groupName=plugins.rig.dev -- Only used for config doc generation

Index

Constants

View Source
const Name = "rigdev.sidecar"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Container is the configuration of the sidecar injected into the deployment
	Container *corev1.Container `json:"container"`
}

Configuration for the sidecar plugin +kubebuilder:object:root=true

type Plugin

type Plugin struct {
	plugin.NoWatchObjectStatus
	// contains filtered or unexported fields
}

func (*Plugin) ComputeConfig added in v1.12.0

func (p *Plugin) ComputeConfig(ctx context.Context, req pipeline.CapsuleRequest, logger hclog.Logger) (string, error)

func (*Plugin) Initialize

func (p *Plugin) Initialize(req plugin.InitializeRequest) error

func (*Plugin) Run

func (p *Plugin) Run(_ context.Context, req pipeline.CapsuleRequest, _ hclog.Logger) error

Jump to

Keyboard shortcuts

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