Documentation
¶
Index ¶
- func CharmStorageParams(controllerUUID string, storageClassName string, modelCfg *config.Config, ...) (*params.KubernetesFilesystemParams, error)
- type API
- func (a *API) ApplicationOCIResources(args params.Entities) (params.CAASApplicationOCIResourceResults, error)
- func (a *API) CAASApplicationGarbageCollect(args params.CAASApplicationGarbageCollectArgs) (params.ErrorResults, error)
- func (a *API) ProvisioningInfo(args params.Entities) (params.CAASApplicationProvisioningInfoResults, error)
- func (a *API) SetOperatorStatus(args params.SetStatus) (params.ErrorResults, error)
- func (a *API) Units(args params.Entities) (params.CAASUnitsResults, error)
- func (a *API) UpdateApplicationsUnits(args params.UpdateApplicationUnitArgs) (params.UpdateApplicationUnitResults, error)
- func (a *API) WatchApplications() (params.StringsWatchResult, error)
- type APIGroup
- type Application
- type CAASApplicationControllerState
- type CAASApplicationProvisionerState
- type Charm
- type Model
- type NewResourceOpenerFunc
- type Resources
- type StorageBackend
- type Unit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CharmStorageParams ¶
func CharmStorageParams( controllerUUID string, storageClassName string, modelCfg *config.Config, poolName string, poolManager poolmanager.PoolManager, registry storage.ProviderRegistry, ) (*params.KubernetesFilesystemParams, error)
CharmStorageParams returns filesystem parameters needed to provision storage used for a charm operator or workload.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func NewCAASApplicationProvisionerAPI ¶
func NewCAASApplicationProvisionerAPI( ctrlSt CAASApplicationControllerState, st CAASApplicationProvisionerState, resources facade.Resources, newResourceOpener NewResourceOpenerFunc, authorizer facade.Authorizer, sb StorageBackend, storagePoolManager poolmanager.PoolManager, registry storage.ProviderRegistry, clock clock.Clock, ) (*API, error)
NewCAASApplicationProvisionerAPI returns a new CAAS operator provisioner API facade.
func (*API) ApplicationOCIResources ¶
func (a *API) ApplicationOCIResources(args params.Entities) (params.CAASApplicationOCIResourceResults, error)
ApplicationOCIResources returns the OCI image resources for an application.
func (*API) CAASApplicationGarbageCollect ¶
func (a *API) CAASApplicationGarbageCollect(args params.CAASApplicationGarbageCollectArgs) (params.ErrorResults, error)
CAASApplicationGarbageCollect cleans up units that have gone away permanently. Only observed units will be deleted as new units could have surfaced between the capturing of kuberentes pod state/application state and this call.
func (*API) ProvisioningInfo ¶
func (a *API) ProvisioningInfo(args params.Entities) (params.CAASApplicationProvisioningInfoResults, error)
ProvisioningInfo returns the info needed to provision a caas application.
func (*API) SetOperatorStatus ¶
SetOperatorStatus sets the status of each given entity.
func (*API) UpdateApplicationsUnits ¶
func (a *API) UpdateApplicationsUnits(args params.UpdateApplicationUnitArgs) (params.UpdateApplicationUnitResults, error)
UpdateApplicationsUnits updates the Juju data model to reflect the given units of the specified application.
func (*API) WatchApplications ¶
func (a *API) WatchApplications() (params.StringsWatchResult, error)
WatchApplications starts a StringsWatcher to watch applications deployed to this model.
type APIGroup ¶
type APIGroup struct { *common.PasswordChanger *common.LifeGetter *common.AgentEntityWatcher *API // contains filtered or unexported fields }
func NewStateCAASApplicationProvisionerAPI ¶
NewStateCAASApplicationProvisionerAPI provides the signature required for facade registration.
func (*APIGroup) ApplicationCharmInfo ¶
ApplicationCharmInfo returns information about an application's charm.
type Application ¶
type Application interface { Charm() (ch Charm, force bool, err error) SetOperatorStatus(status.StatusInfo) error AllUnits() ([]Unit, error) UpdateUnits(unitsOp *state.UpdateUnitsOperation) error StorageConstraints() (map[string]state.StorageConstraints, error) DeviceConstraints() (map[string]state.DeviceConstraints, error) Name() string Constraints() (constraints.Value, error) Life() state.Life Series() string SetStatus(statusInfo status.StatusInfo) error CharmModifiedVersion() int CharmURL() (curl *charm.URL, force bool) ApplicationConfig() (application.ConfigAttributes, error) GetScale() int }
type CAASApplicationControllerState ¶
type CAASApplicationControllerState interface { ControllerConfig() (controller.Config, error) Addresses() ([]string, error) ModelUUID() string APIHostPortsForAgents() ([]network.SpaceHostPorts, error) WatchAPIHostPortsForAgents() state.NotifyWatcher }
CAASApplicationControllerState provides the subset of controller state required by the CAAS operator provisioner facade.
type CAASApplicationProvisionerState ¶
type CAASApplicationProvisionerState interface { Model() (Model, error) Application(string) (Application, error) ResolveConstraints(cons constraints.Value) (constraints.Value, error) Resources() (Resources, error) WatchApplications() state.StringsWatcher }
CAASApplicationProvisionerState provides the subset of model state required by the CAAS operator provisioner facade.
type NewResourceOpenerFunc ¶
type StorageBackend ¶
type StorageBackend interface { StorageInstance(names.StorageTag) (state.StorageInstance, error) Filesystem(names.FilesystemTag) (state.Filesystem, error) StorageInstanceFilesystem(names.StorageTag) (state.Filesystem, error) UnitStorageAttachments(unit names.UnitTag) ([]state.StorageAttachment, error) SetFilesystemInfo(names.FilesystemTag, state.FilesystemInfo) error SetFilesystemAttachmentInfo(names.Tag, names.FilesystemTag, state.FilesystemAttachmentInfo) error Volume(tag names.VolumeTag) (state.Volume, error) StorageInstanceVolume(tag names.StorageTag) (state.Volume, error) SetVolumeInfo(names.VolumeTag, state.VolumeInfo) error SetVolumeAttachmentInfo(names.Tag, names.VolumeTag, state.VolumeAttachmentInfo) error // These are for cleanup up orphaned filesystems when pods are recreated. // TODO(caas) - record unit id on the filesystem so we can query by unit AllFilesystems() ([]state.Filesystem, error) DestroyStorageInstance(tag names.StorageTag, destroyAttachments bool, force bool, maxWait time.Duration) (err error) DestroyFilesystem(tag names.FilesystemTag, force bool) (err error) }
StorageBackend provides the subset of backend storage functionality required by the CAAS app provisioner facade.
type Unit ¶
type Unit interface { Tag() names.Tag DestroyOperation() *state.DestroyUnitOperation EnsureDead() error ContainerInfo() (state.CloudContainer, error) UpdateOperation(props state.UnitUpdateProperties) *state.UpdateUnitOperation Status() (status.StatusInfo, error) }