action

package
v1.0.9-6 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enroll

func Enroll(instance EnrollInstance, enrollment *current.Enrollment, storagePath string, client k8sclient.Client, scheme *runtime.Scheme, ecert bool, timeouts enroller.HSMEnrollJobTimeouts) (*config.Response, error)

func HSMInitContainer

func HSMInitContainer(instance *current.IBPPeer, hsmConfig *config.HSMConfig) *container.Container

HSMInitContainer creates a container that copies the HSM library to shared volume

func Reenroll

func Reenroll(reenroller Reenroller, client k8sclient.Client, certType common.SecretType, instance ReenrollInstance, newKey bool) error

func Restart

func Restart(client k8sclient.Client, name, namespace string) error

By triggering a component restart by updating its annotations instead of deleting the deployment, components will be restarted with the rolling update strategy unless their deployments specify a recreate strategy. This will allow ibpconsole components with rolling update strategies to not have any downtime.

func StartJob

func StartJob(client controller.Client, job *batchv1.Job, opt controller.CreateOption) error

StartJob uses the client to create a job on kubernetes client

func UpgradeDBs

func UpgradeDBs(deploymentManager DeploymentReset, client controller.Client, instance UpgradeInstance, timeouts oconfig.DBMigrationTimeouts) error

UpgradeDBs will update the database and peform all necessary clean up and restart logic

Types

type DeploymentReset

type DeploymentReset interface {
	Get(v1.Object) (k8sclient.Object, error)
	DeploymentStatus(v1.Object) (appsv1.DeploymentStatus, error)
	GetScheme() *runtime.Scheme
}

DeploymentReset defines the contract to manage deployment reousrce

type EnrollInstance

type EnrollInstance interface {
	runtime.Object
	metav1.Object
	IsHSMEnabled() bool
	UsingHSMProxy() bool
	GetConfigOverride() (interface{}, error)
	EnrollerImage() string
	GetPullSecrets() []corev1.LocalObjectReference
	PVCName() string
	GetResource(current.Component) corev1.ResourceRequirements
}

type ReenrollInstance

type ReenrollInstance interface {
	runtime.Object
	v1.Object
	ResetEcertReenroll()
	ResetTLSReenroll()
}

type Reenroller

type Reenroller interface {
	RenewCert(certType common.SecretType, instance runtime.Object, newKey bool) error
}

type UpgradeInstance

type UpgradeInstance interface {
	runtime.Object
	v1.Object
	UsingCouchDB() bool
	UsingHSMProxy() bool
	IsHSMEnabled() bool
}

UpgradeInstance defines the contract to update the insstance database

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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