Back to godoc.org

Package boshdeployment

v1.0.3
Latest Go to latest

The latest major version is .

Published: Jan 13, 2020 | License: Apache-2.0 | Module: code.cloudfoundry.org/cf-operator

Index

func AddBPM

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

AddBPM creates a new BPM controller to watch for BPM configs and instance group manifests. It will reconcile those into k8s resources (QuarksStatefulSet, QuarksJob), which represent BOSH instance groups and BOSH errands.

func AddDeployment

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

AddDeployment creates a new BOSHDeployment controller to watch for BOSHDeployment manifest custom resources and start the rendering, which will finally produce the "desired manifest", the instance group manifests and the BPM configs.

func AddGeneratedVariable

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

AddGeneratedVariable creates a new generated variable controller to watch for the intermediate "with-ops" manifest and reconcile them into one QuarksSecret for each explicit variable.

func NewBOSHDeploymentValidator

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

NewBOSHDeploymentValidator creates a validating hook for BOSHDeployment and adds it to the Manager

func NewBPMReconciler

func NewBPMReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, resolver converter.DesiredManifest, srf setReferenceFunc, kubeConverter KubeConverter) reconcile.Reconciler

NewBPMReconciler returns a new reconcile.Reconciler

func NewDeploymentReconciler

func NewDeploymentReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, resolver converter.Resolver, jobFactory JobFactory, srf setReferenceFunc) reconcile.Reconciler

NewDeploymentReconciler returns a new reconcile.Reconciler

func NewGeneratedVariableReconciler

func NewGeneratedVariableReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, srf setReferenceFunc, kubeConverter KubeConverter) reconcile.Reconciler

NewGeneratedVariableReconciler returns a new reconcile.Reconciler

func NewValidator

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

NewValidator returns a new BOSHDeploymentValidator

type JobFactory

type JobFactory interface {
	VariableInterpolationJob(manifest bdm.Manifest) (*qjv1a1.QuarksJob, error)
	InstanceGroupManifestJob(manifest bdm.Manifest, linkInfos converter.LinkInfos, initialRollout bool) (*qjv1a1.QuarksJob, error)
}

JobFactory creates Jobs for a given manifest

type KubeConverter

type KubeConverter interface {
	BPMResources(manifestName string, dns bdm.DomainNameService, qStsVersion string, instanceGroup *bdm.InstanceGroup, releaseImageProvider converter.ReleaseImageProvider, bpmConfigs bpm.Configs, igResolvedSecretVersion string) (*converter.BPMResources, error)
	Variables(manifestName string, variables []bdm.Variable) ([]qsv1a1.QuarksSecret, error)
}

KubeConverter converts k8s resources from single BOSH manifest

type ReconcileBOSHDeployment

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

ReconcileBOSHDeployment reconciles a BOSHDeployment object

func (*ReconcileBOSHDeployment) Reconcile

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

Reconcile starts the deployment process for a BOSHDeployment and deploys QuarksJobs to generate required properties for instance groups and rendered BPM

type ReconcileBPM

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

ReconcileBPM reconciles an Instance Group BPM versioned secret

func (*ReconcileBPM) Reconcile

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

Reconcile reconciles an Instance Group BPM versioned secret read the corresponding desired manifest. It then applies BPM information and deploys instance groups.

type ReconcileGeneratedVariable

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

ReconcileGeneratedVariable reconciles a manifest with ops

func (*ReconcileGeneratedVariable) Reconcile

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

Reconcile creates or updates variables quarksSecrets

type Validator

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

Validator s

func (*Validator) Handle

func (v *Validator) Handle(_ context.Context, req admission.Request) admission.Response

Handle validates a BOSHDeployment

func (*Validator) InjectClient

func (v *Validator) InjectClient(c client.Client) error

InjectClient injects the client.

func (*Validator) InjectDecoder

func (v *Validator) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

func (*Validator) OpsResourcesExist

func (v *Validator) OpsResourcesExist(ctx context.Context, specOpsResource []bdv1.ResourceReference, ns string) (bool, string)

OpsResourcesExist verify if a resource exist in the namespace, it will check its existence during 5 seconds, otherwise it will timeout.

Package Files

  • bpm_controller.go
  • bpm_reconciler.go
  • deployment_controller.go
  • deployment_reconciler.go
  • generated_variable_controller.go
  • generated_variable_reconciler.go
  • validating_webhook.go
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier