v1.0.3 Latest Latest

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: 0




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"


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

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


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


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

Jump to

Keyboard shortcuts

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