Documentation ¶
Index ¶
- Constants
- func CreateLivenessProbe(appWorkload korifiv1alpha1.AppWorkload) *corev1.Probe
- func CreateReadinessProbe(appWorkload korifiv1alpha1.AppWorkload) *corev1.Probe
- func GetStatefulSetName(appWorkload korifiv1alpha1.AppWorkload) (string, error)
- func MebibyteQuantity(miB int64) resource.Quantity
- func StatefulSetLabelSelector(appWorkload *korifiv1alpha1.AppWorkload) *metav1.LabelSelector
- type AppWorkloadReconciler
- type PDB
- type PDBUpdater
Constants ¶
View Source
const ( // Environment Variable Names EnvPodName = "POD_NAME" EnvCFInstanceIP = "CF_INSTANCE_IP" EnvCFInstanceGUID = "CF_INSTANCE_GUID" EnvCFInstanceInternalIP = "CF_INSTANCE_INTERNAL_IP" EnvCFInstanceIndex = "CF_INSTANCE_INDEX" // StatefulSet Keys AnnotationVersion = "korifi.cloudfoundry.org/version" AnnotationAppID = "korifi.cloudfoundry.org/application-id" AnnotationProcessGUID = "korifi.cloudfoundry.org/process-guid" LabelGUID = "korifi.cloudfoundry.org/guid" LabelVersion = "korifi.cloudfoundry.org/version" LabelAppGUID = "korifi.cloudfoundry.org/app-guid" LabelAppWorkloadGUID = "korifi.cloudfoundry.org/appworkload-guid" LabelProcessType = "korifi.cloudfoundry.org/process-type" LabelStatefulSetRunnerIndex = "korifi.cloudfoundry.org/add-stsr-index" ApplicationContainerName = "application" LivenessFailureThreshold = 4 ReadinessFailureThreshold = 1 PodAffinityTermWeight = 100 )
View Source
const PdbMinAvailableInstances = "50%"
Variables ¶
This section is empty.
Functions ¶
func CreateLivenessProbe ¶
func CreateLivenessProbe(appWorkload korifiv1alpha1.AppWorkload) *corev1.Probe
func CreateReadinessProbe ¶
func CreateReadinessProbe(appWorkload korifiv1alpha1.AppWorkload) *corev1.Probe
func GetStatefulSetName ¶
func GetStatefulSetName(appWorkload korifiv1alpha1.AppWorkload) (string, error)
func MebibyteQuantity ¶
func StatefulSetLabelSelector ¶
func StatefulSetLabelSelector(appWorkload *korifiv1alpha1.AppWorkload) *metav1.LabelSelector
Types ¶
type AppWorkloadReconciler ¶
type AppWorkloadReconciler struct { client.Client Scheme *runtime.Scheme Log logr.Logger // contains filtered or unexported fields }
AppWorkloadReconciler reconciles a AppWorkload object
func (*AppWorkloadReconciler) Convert ¶
func (r *AppWorkloadReconciler) Convert(appWorkload korifiv1alpha1.AppWorkload) (*appsv1.StatefulSet, error)
func (*AppWorkloadReconciler) SetupWithManager ¶
func (r *AppWorkloadReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PDB ¶
type PDB interface {
Update(ctx context.Context, statefulSet *appsv1.StatefulSet) error
}
type PDBUpdater ¶
type PDBUpdater struct {
// contains filtered or unexported fields
}
func NewPDBUpdater ¶
func NewPDBUpdater(client client.Client) *PDBUpdater
func (*PDBUpdater) Update ¶
func (c *PDBUpdater) Update(ctx context.Context, statefulSet *appsv1.StatefulSet) error
Click to show internal directories.
Click to hide internal directories.