Documentation ¶
Index ¶
- Constants
- func AddStatefulSetChanges(dc *api.CassandraDatacenter, statefulSet *appsv1.StatefulSet) *appsv1.StatefulSet
- func CheckEMM(spi EMMSPI) result.ReconcileResult
- func CheckNetworkPolicies(spi CheckNetworkPoliciesSPI) result.ReconcileResult
- func CheckPVCHealth(spi EMMSPI) result.ReconcileResult
- func GetExtensionID() string
- type Catalog
- type CheckNetworkPoliciesSPI
- type DAO
- type DAOImpl
- type EMMChecks
- type EMMFailure
- type EMMOperations
- type EMMSPI
- type EMMService
- type EMMServiceImpl
- type EMMTaintValue
- type Health
- type HealthStatus
- type HealthStatusUpdater
- type HealthStatusUpdaterImpl
- type InstanceHealth
- type NoOpUpdater
- type Spec
- type Status
- type VolumeHealth
Constants ¶
const ( EMMFailureAnnotation = "appplatform.vmware.com/emm-failure" VolumeHealthAnnotation = "volumehealth.storage.kubernetes.io/health" EMMTaintKey = "node.vmware.com/drain" )
const ( ExtensionIDLabel string = "appplatform.vmware.com/extension-id" InstanceIDLabel string = "appplatform.vmware.com/instance-id" EMMIntegratedAnnotation string = "appplatform.vmware.com/vsphere-emm-integrated" ExtensionIDEnv string = "PSP_EXTENSION_ID" )
const ( HealthLabel = "vmware.vsphere.health" HealthLabelCatalogValue = "catalog" HealthLabelHealthValue = "health" )
Variables ¶
This section is empty.
Functions ¶
func AddStatefulSetChanges ¶
func AddStatefulSetChanges(dc *api.CassandraDatacenter, statefulSet *appsv1.StatefulSet) *appsv1.StatefulSet
func CheckEMM ¶
func CheckEMM(spi EMMSPI) result.ReconcileResult
func CheckNetworkPolicies ¶
func CheckNetworkPolicies(spi CheckNetworkPoliciesSPI) result.ReconcileResult
VMWare with Kubernetes does not permit network traffic between namespaces by default. This means a NetworkPolicy must be created to allow the operator to make requests to the Management API.
NOTE: The way VMWare implements NetworkPolicy appears to be non-standard. For example, typially setting the namespace selector to an empty value _should_ select all namespaces, but it does not in VMWare with Kubernetes. Consequently, it is important that changes here be verified in that environment.
func CheckPVCHealth ¶
func CheckPVCHealth(spi EMMSPI) result.ReconcileResult
func GetExtensionID ¶
func GetExtensionID() string
The return value here _should_ be the same as `vSphereExtensionKey` in the VCUIPlugin resource:
apiVersion: appplatform.wcp.vmware.com/v1beta1 kind: VCUIPlugin metadata: labels: controller-tools.k8s.io: "1.0" name: datastax-vulcan namespace: {{ .service.namespace }} spec: name: datastax-vulcan uiBackendSecret: datastax-vulcan-tls uiBackendService: datastax-vulcan vSphereUiPluginUrl: plugin.json vSphereExtensionKey: com.datastax.vulcan
Types ¶
type CheckNetworkPoliciesSPI ¶
type DAO ¶
type DAOImpl ¶
type DAOImpl struct {
// contains filtered or unexported fields
}
func (*DAOImpl) GetHealthData ¶
func (*DAOImpl) UpsertCatalog ¶
func (*DAOImpl) UpsertHealthData ¶
type EMMFailure ¶
type EMMFailure string
const ( GenericFailure EMMFailure = "GenericFailure" NotEnoughResources EMMFailure = "NotEnoughResources" TooManyExistingFailures EMMFailure = "TooManyExistingFailures" )
type EMMOperations ¶
type EMMOperations interface {
// contains filtered or unexported methods
}
type EMMSPI ¶
type EMMSPI interface { GetAllNodesInDC() ([]*corev1.Node, error) GetDCPods() []*corev1.Pod GetNotReadyPodsBootstrappedInDC() []*corev1.Pod GetAllPodsNotReadyInDC() []*corev1.Pod GetPodPVCs(pod *corev1.Pod) ([]*corev1.PersistentVolumeClaim, error) StartNodeReplace(podName string) error GetInProgressNodeReplacements() []string RemovePod(pod *corev1.Pod) error UpdatePod(pod *corev1.Pod) error IsStopped() bool IsInitialized() bool GetLogger() logr.Logger GetAllNodes() ([]*corev1.Node, error) }
This interface is what, in practice, the ReconciliationContext will need to implement. Its intention is to keep coupling with the reconciliation package low and also to keep this package relatively sheltered from certain thorny details, like determining which pods represent cassandra nodes that have bootstrapped at some point.
type EMMService ¶
type EMMService interface { EMMOperations EMMChecks // contains filtered or unexported methods }
type EMMTaintValue ¶
type EMMTaintValue string
const ( EvacuateAllData EMMTaintValue = "drain" PlannedDowntime = "planned-downtime" )
type HealthStatus ¶
type HealthStatus string
const ( HealthGreen HealthStatus = "green" HealthYellow HealthStatus = "yellow" HealthRed HealthStatus = "red" )
type HealthStatusUpdater ¶
type HealthStatusUpdater interface {
Update(dc api.CassandraDatacenter) error
}
func NewHealthStatusUpdater ¶
func NewHealthStatusUpdater(client runtimeClient.Client, namespace string) HealthStatusUpdater
type HealthStatusUpdaterImpl ¶
type HealthStatusUpdaterImpl struct {
// contains filtered or unexported fields
}
func (*HealthStatusUpdaterImpl) Update ¶
func (updater *HealthStatusUpdaterImpl) Update(dc api.CassandraDatacenter) error
type InstanceHealth ¶
type InstanceHealth struct { Instance string `json:"instance"` Namespace string `json:"namespace"` Health HealthStatus `json:"health"` }
type NoOpUpdater ¶
type NoOpUpdater struct{}
func (*NoOpUpdater) Update ¶
func (*NoOpUpdater) Update(dc api.CassandraDatacenter) error
type Status ¶
type Status struct {
InstanceHealth []InstanceHealth `json:"instanceHealth"`
}
type VolumeHealth ¶
type VolumeHealth string
const (
VolumeHealthInaccessible VolumeHealth = "inaccessible"
)