quarkslink

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: Apache-2.0 Imports: 35 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DeploymentKey is the key to retrieve the name of the deployment,
	// which provides the variables for the pod
	DeploymentKey = "quarks.cloudfoundry.org/deployment"
	// ConsumesKey is the key for identifying the provider to be consumed, in the
	// format of 'type.job'
	ConsumesKey = "quarks.cloudfoundry.org/consumes"
)

Variables

View Source
var RestartKey = fmt.Sprintf("%s/restart-by-entanglement", apis.GroupName)

RestartKey has the timestamp of the last restart triggered by this reconciler

Functions

func AddRestart

func AddRestart(ctx context.Context, config *config.Config, mgr manager.Manager) error

AddRestart creates a new controller to restart statefulsets and deployments if one of their pods has changed entanglement information

func NewBOSHLinkPodMutator

func NewBOSHLinkPodMutator(log *zap.SugaredLogger, config *config.Config) *wh.OperatorWebhook

NewBOSHLinkPodMutator returns a new webhook to mount BOSH link secrets on entangled pods

func NewPodMutator

func NewPodMutator(log *zap.SugaredLogger, config *config.Config) admission.Handler

NewPodMutator returns a new mutator to mount secrets on entangled pods

func NewRestartReconciler

func NewRestartReconciler(ctx context.Context, config *config.Config, mgr manager.Manager) reconcile.Reconciler

NewRestartReconciler returns a new reconciler to restart deployments and statefulsets of entangled pods

Types

type PodMutator

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

PodMutator for mounting quark link secrets on entangled pods

func (*PodMutator) Handle

Handle checks if the pod is an entangled pod and mounts the quarkslink secret, returns the unmodified pod otherwise

func (*PodMutator) InjectClient

func (m *PodMutator) InjectClient(c client.Client) error

InjectClient injects the client.

func (*PodMutator) InjectDecoder

func (m *PodMutator) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

type ReconcileRestart

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

ReconcileRestart contains necessary state for the reconcile

func (*ReconcileRestart) Reconcile

func (r *ReconcileRestart) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile adds an annotation to deployments and statefulsets which own the entangled pod

Source Files

  • entanglement.go
  • pod_mutator.go
  • pod_webhook.go
  • restart_controller.go
  • restart_reconciler.go

Jump to

Keyboard shortcuts

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