Documentation ¶
Overview ¶
Package boshdeployment handles the boshdeployment resource. It directs the deployment of BOSH releases on k8s.
Index ¶
- Constants
- func AddBDPLStatusReconcilers(ctx context.Context, config *config.Config, mgr manager.Manager) error
- func AddBPM(ctx context.Context, config *config.Config, mgr manager.Manager) error
- func AddDeployment(ctx context.Context, config *config.Config, mgr manager.Manager) error
- func AddWithOps(ctx context.Context, config *config.Config, mgr manager.Manager) error
- func NewBOSHDeploymentValidator(log *zap.SugaredLogger, config *config.Config) *wh.OperatorWebhook
- func NewBPMReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, ...) reconcile.Reconciler
- func NewDeploymentReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, ...) reconcile.Reconciler
- func NewQJobStatusReconciler(ctx context.Context, config *config.Config, mgr manager.Manager) reconcile.Reconciler
- func NewStatusQSTSReconciler(ctx context.Context, config *config.Config, mgr manager.Manager) reconcile.Reconciler
- func NewValidator(log *zap.SugaredLogger, config *config.Config) admission.Handler
- func NewWithOpsReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, ...) reconcile.Reconciler
- type BPMConverter
- type DesiredManifest
- type InterpolateSecrets
- type JobFactory
- type NewDNSFunc
- type ReconcileBOSHDeployment
- type ReconcileBPM
- type ReconcileBoshDeploymentQJobStatus
- type ReconcileBoshDeploymentQSTSStatus
- type ReconcileWithOps
- type Validator
- type VariablesConverter
- type WithOps
Constants ¶
const ( // BDPLStateDeployed is the Bosh Deployment Status spec Deployed State BDPLStateDeployed = "Deployed" // BDPLStateConverting is the Bosh Deployment Status spec State during conversion BDPLStateConverting = "Converting to Kube resource" // BDPLStateResolving is the Bosh Deployment Status spec during the resolving phase BDPLStateResolving = "Resolving Manifest" )
const BDPLStateCreating = "Creating/Updating"
BDPLStateCreating is the Bosh Deployment Status spec Creating State
const ReconcileSkipDuration = 10 * time.Second
ReconcileSkipDuration is the duration of merging consecutive triggers.
Variables ¶
This section is empty.
Functions ¶
func AddBDPLStatusReconcilers ¶
func AddBDPLStatusReconcilers(ctx context.Context, config *config.Config, mgr manager.Manager) error
AddBDPLStatusReconcilers creates a new BDPL Status controller to update BDPL status.
func AddBPM ¶
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 ¶
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 AddWithOps ¶
AddWithOps creates a new WithOps controller to watch for withops secret and starts the rendering, which will finally produce the desired manifest secret.
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 DesiredManifest, srf setReferenceFunc, converter BPMConverter) reconcile.Reconciler
NewBPMReconciler returns a new reconcile.Reconciler
func NewDeploymentReconciler ¶
func NewDeploymentReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, withops WithOps, jobFactory JobFactory, converter VariablesConverter, srf setReferenceFunc) reconcile.Reconciler
NewDeploymentReconciler returns a new reconcile.Reconciler
func NewQJobStatusReconciler ¶
func NewQJobStatusReconciler(ctx context.Context, config *config.Config, mgr manager.Manager) reconcile.Reconciler
NewQJobStatusReconciler returns a new reconcile.Reconciler for QuarksStatefulSets Status
func NewStatusQSTSReconciler ¶
func NewStatusQSTSReconciler(ctx context.Context, config *config.Config, mgr manager.Manager) reconcile.Reconciler
NewStatusQSTSReconciler returns a new reconcile.Reconciler for QuarksStatefulSets Status
func NewValidator ¶
NewValidator returns a new BOSHDeploymentValidator
func NewWithOpsReconciler ¶
func NewWithOpsReconciler(ctx context.Context, config *config.Config, mgr manager.Manager, resolver InterpolateSecrets, srf setReferenceFunc, dns NewDNSFunc) reconcile.Reconciler
NewWithOpsReconciler returns a new reconcile.Reconciler
Types ¶
type BPMConverter ¶
type BPMConverter interface {
Resources(manifest bdm.Manifest, namespace string, manifestName string, serviceIP string, qStsVersion string, instanceGroup *bdm.InstanceGroup, bpmConfigs bpm.Configs, igResolvedSecretVersion string) (*bpmconverter.Resources, error)
}
BPMConverter converts k8s resources from single BOSH manifest
type DesiredManifest ¶
type DesiredManifest interface {
DesiredManifest(ctx context.Context, namespace string) (*bdm.Manifest, error)
}
DesiredManifest unmarshals desired manifest from the manifest secret
type InterpolateSecrets ¶
type InterpolateSecrets interface {
InterpolateVariableFromSecrets(ctx context.Context, withOpsManifestData []byte, namespace string, boshdeploymentName string) ([]byte, error)
}
InterpolateSecrets renders manifest variables from quarkssecrets.
type JobFactory ¶
type JobFactory interface {
InstanceGroupManifestJob(namespace string, deploymentName string, manifest bdm.Manifest, linkInfos converter.LinkInfos, initialRollout bool) (*qjv1a1.QuarksJob, error)
}
JobFactory creates Jobs for a given manifest
type NewDNSFunc ¶
type NewDNSFunc func(m bdm.Manifest) (boshdns.DomainNameService, error)
NewDNSFunc returns a dns client for the manifest
type ReconcileBOSHDeployment ¶
type ReconcileBOSHDeployment struct {
// contains filtered or unexported fields
}
ReconcileBOSHDeployment reconciles a BOSHDeployment object
func (*ReconcileBOSHDeployment) Reconcile ¶
func (r *ReconcileBOSHDeployment) Reconcile(_ context.Context, 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
type ReconcileBoshDeploymentQJobStatus ¶
type ReconcileBoshDeploymentQJobStatus struct {
// contains filtered or unexported fields
}
ReconcileBoshDeploymentQJobStatus reconciles an QuarksStatefulSet object for its status
func (*ReconcileBoshDeploymentQJobStatus) Reconcile ¶
func (r *ReconcileBoshDeploymentQJobStatus) Reconcile(_ context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile reads that state of QuarksJobs and QuarksStatefulSets and updates the bosh deployment status accordingly. The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
type ReconcileBoshDeploymentQSTSStatus ¶
type ReconcileBoshDeploymentQSTSStatus struct {
// contains filtered or unexported fields
}
ReconcileBoshDeploymentQSTSStatus reconciles an QuarksStatefulSet object for its status
func (*ReconcileBoshDeploymentQSTSStatus) Reconcile ¶
func (r *ReconcileBoshDeploymentQSTSStatus) Reconcile(_ context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile reads that state of QuarksJobs and QuarksStatefulSets and updates the bosh deployment status accordingly. and makes changes based on the state read and what is in the QuarksStatefulSet.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
type ReconcileWithOps ¶
type ReconcileWithOps struct {
// contains filtered or unexported fields
}
ReconcileWithOps reconciles the with ops manifest secret
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator struct contains all fields for the deployment validator
func (*Validator) InjectClient ¶
InjectClient injects the client.
type VariablesConverter ¶
type VariablesConverter interface {
Variables(namespace string, manifestName string, variables []bdm.Variable) ([]qsv1a1.QuarksSecret, error)
}
VariablesConverter converts BOSH variables into QuarksSecrets