Documentation ¶
Index ¶
- Constants
- func ListEventsForObject(ctx context.Context, client kubernetes.Interface, namespace string, ...) ([]corev1.Event, error)
- type Applier
- type DaemonSet
- func (ds *DaemonSet) Apply(ctx context.Context, client kubernetes.Interface) error
- func (ds *DaemonSet) Clone() Resource
- func (ds *DaemonSet) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
- func (ds *DaemonSet) Delete(ctx context.Context, client kubernetes.Interface) error
- func (ds *DaemonSet) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
- func (ds *DaemonSet) Get(ctx context.Context, client kubernetes.Interface) error
- type Deployment
- func (d *Deployment) Apply(ctx context.Context, client kubernetes.Interface) error
- func (d *Deployment) Clone() Resource
- func (d *Deployment) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
- func (d *Deployment) Delete(ctx context.Context, client kubernetes.Interface) error
- func (d *Deployment) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
- func (d *Deployment) Get(ctx context.Context, client kubernetes.Interface) error
- type PersistentVolume
- func (pv *PersistentVolume) Apply(ctx context.Context, client kubernetes.Interface) error
- func (pv *PersistentVolume) Clone() Resource
- func (pv *PersistentVolume) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
- func (pv *PersistentVolume) Delete(ctx context.Context, client kubernetes.Interface) error
- func (pv *PersistentVolume) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
- func (pv *PersistentVolume) Get(ctx context.Context, client kubernetes.Interface) error
- type PersistentVolumeClaim
- func (pvc *PersistentVolumeClaim) Apply(ctx context.Context, client kubernetes.Interface) error
- func (pvc *PersistentVolumeClaim) Clone() Resource
- func (pvc *PersistentVolumeClaim) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
- func (pvc *PersistentVolumeClaim) Delete(ctx context.Context, client kubernetes.Interface) error
- func (pvc *PersistentVolumeClaim) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
- func (pvc *PersistentVolumeClaim) Get(ctx context.Context, client kubernetes.Interface) error
- type Pod
- func (p *Pod) Apply(ctx context.Context, client kubernetes.Interface) error
- func (p *Pod) Clone() Resource
- func (p *Pod) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
- func (p *Pod) Delete(ctx context.Context, client kubernetes.Interface) error
- func (p *Pod) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
- func (p *Pod) Get(ctx context.Context, client kubernetes.Interface) error
- type Resource
- type Secret
- func (s *Secret) Apply(ctx context.Context, client kubernetes.Interface) error
- func (s *Secret) Clone() Resource
- func (s *Secret) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
- func (s *Secret) Delete(ctx context.Context, client kubernetes.Interface) error
- func (s *Secret) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
- func (s *Secret) Get(ctx context.Context, client kubernetes.Interface) error
- type Service
- func (s *Service) Apply(ctx context.Context, client kubernetes.Interface) error
- func (s *Service) Clone() Resource
- func (s *Service) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
- func (s *Service) Delete(ctx context.Context, client kubernetes.Interface) error
- func (s *Service) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
- func (s *Service) Get(ctx context.Context, client kubernetes.Interface) error
- type StatefulSet
- func (ss *StatefulSet) Apply(ctx context.Context, client kubernetes.Interface) error
- func (ss *StatefulSet) Clone() Resource
- func (ss *StatefulSet) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
- func (ss *StatefulSet) Delete(ctx context.Context, client kubernetes.Interface) error
- func (ss *StatefulSet) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
- func (ss *StatefulSet) Get(ctx context.Context, client kubernetes.Interface) error
- type StorageClass
- func (sc *StorageClass) Apply(ctx context.Context, client kubernetes.Interface) error
- func (sc *StorageClass) Clone() Resource
- func (sc *StorageClass) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
- func (sc *StorageClass) Delete(ctx context.Context, client kubernetes.Interface) error
- func (sc *StorageClass) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
- func (sc *StorageClass) Get(ctx context.Context, client kubernetes.Interface) error
Constants ¶
const (
// JujuFieldManager marks the resource changes were made by Juju.
JujuFieldManager = "juju"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Applier ¶
type Applier interface { // Apply adds an apply operation to the applier. Apply(Resource) // Delete adds an delete operation to the applier. Delete(Resource) // Run processes the slice of the operations. Run(ctx context.Context, client kubernetes.Interface, noRollback bool) error }
Applier defines methods for processing a slice of resource operations.
type DaemonSet ¶
DaemonSet extends the k8s daemonset.
func NewDaemonSet ¶
NewDaemonSet creates a new daemonSet resource.
func (*DaemonSet) ComputeStatus ¶
func (ds *DaemonSet) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
ComputeStatus returns a juju status for the resource.
type Deployment ¶
type Deployment struct {
appsv1.Deployment
}
Deployment extends the k8s deployment.
func NewDeployment ¶
func NewDeployment(name string, namespace string, in *appsv1.Deployment) *Deployment
NewDeployment creates a new deployment resource.
func (*Deployment) Apply ¶
func (d *Deployment) Apply(ctx context.Context, client kubernetes.Interface) error
Apply patches the resource change.
func (*Deployment) Clone ¶
func (d *Deployment) Clone() Resource
Clone returns a copy of the resource.
func (*Deployment) ComputeStatus ¶
func (d *Deployment) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
ComputeStatus returns a juju status for the resource.
func (*Deployment) Delete ¶
func (d *Deployment) Delete(ctx context.Context, client kubernetes.Interface) error
Delete removes the resource.
func (*Deployment) Events ¶
func (d *Deployment) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
Events emitted by the resource.
func (*Deployment) Get ¶
func (d *Deployment) Get(ctx context.Context, client kubernetes.Interface) error
Get refreshes the resource.
type PersistentVolume ¶
type PersistentVolume struct {
corev1.PersistentVolume
}
PersistentVolume extends the k8s persistentVolume.
func NewPersistentVolume ¶
func NewPersistentVolume(name string, in *corev1.PersistentVolume) *PersistentVolume
NewPersistentVolume creates a new persistent volume resource.
func (*PersistentVolume) Apply ¶
func (pv *PersistentVolume) Apply(ctx context.Context, client kubernetes.Interface) error
Apply patches the resource change.
func (*PersistentVolume) Clone ¶
func (pv *PersistentVolume) Clone() Resource
Clone returns a copy of the resource.
func (*PersistentVolume) ComputeStatus ¶
func (pv *PersistentVolume) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
ComputeStatus returns a juju status for the resource.
func (*PersistentVolume) Delete ¶
func (pv *PersistentVolume) Delete(ctx context.Context, client kubernetes.Interface) error
Delete removes the resource.
func (*PersistentVolume) Events ¶
func (pv *PersistentVolume) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
Events emitted by the resource.
func (*PersistentVolume) Get ¶
func (pv *PersistentVolume) Get(ctx context.Context, client kubernetes.Interface) error
Get refreshes the resource.
type PersistentVolumeClaim ¶
type PersistentVolumeClaim struct {
corev1.PersistentVolumeClaim
}
PersistentVolumeClaim extends the k8s persistentVolumeClaim.
func NewPersistentVolumeClaim ¶
func NewPersistentVolumeClaim(name string, namespace string, in *corev1.PersistentVolumeClaim) *PersistentVolumeClaim
NewPersistentVolumeClaim creates a new persistent volume claim resource.
func (*PersistentVolumeClaim) Apply ¶
func (pvc *PersistentVolumeClaim) Apply(ctx context.Context, client kubernetes.Interface) error
Apply patches the resource change.
func (*PersistentVolumeClaim) Clone ¶
func (pvc *PersistentVolumeClaim) Clone() Resource
Clone returns a copy of the resource.
func (*PersistentVolumeClaim) ComputeStatus ¶
func (pvc *PersistentVolumeClaim) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
ComputeStatus returns a juju status for the resource.
func (*PersistentVolumeClaim) Delete ¶
func (pvc *PersistentVolumeClaim) Delete(ctx context.Context, client kubernetes.Interface) error
Delete removes the resource.
func (*PersistentVolumeClaim) Events ¶
func (pvc *PersistentVolumeClaim) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
Events emitted by the resource.
func (*PersistentVolumeClaim) Get ¶
func (pvc *PersistentVolumeClaim) Get(ctx context.Context, client kubernetes.Interface) error
Get refreshes the resource.
type Pod ¶
Pod extends the k8s service.
func ListPods ¶
func ListPods(ctx context.Context, client kubernetes.Interface, namespace string, opts metav1.ListOptions) ([]Pod, error)
ListPods returns a list of storage classes.
func (*Pod) ComputeStatus ¶
func (p *Pod) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
ComputeStatus returns a juju status for the resource.
type Resource ¶
type Resource interface { // Clone returns a copy of the resource. Clone() Resource // Apply patches the resource change. Apply(ctx context.Context, client kubernetes.Interface) error // Get refreshes the resource. Get(ctx context.Context, client kubernetes.Interface) error // Delete removes the resource. Delete(ctx context.Context, client kubernetes.Interface) error // String returns a string format containing the name and type of the resource. String() string // ComputeStatus returns a juju status for the resource. ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error) // Events emitted by the object. Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error) }
Resource defines methods for manipulating a k8s resource.
type Secret ¶
Secret extends the k8s secret.
func (*Secret) ComputeStatus ¶
func (s *Secret) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
ComputeStatus returns a juju status for the resource.
type Service ¶
Service extends the k8s service.
func NewService ¶
NewService creates a new service resource.
func (*Service) ComputeStatus ¶
func (s *Service) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
ComputeStatus returns a juju status for the resource.
type StatefulSet ¶
type StatefulSet struct {
appsv1.StatefulSet
}
StatefulSet extends the k8s statefulSet.
func NewStatefulSet ¶
func NewStatefulSet(name string, namespace string, in *appsv1.StatefulSet) *StatefulSet
NewStatefulSet creates a new statefulset resource.
func (*StatefulSet) Apply ¶
func (ss *StatefulSet) Apply(ctx context.Context, client kubernetes.Interface) error
Apply patches the resource change.
func (*StatefulSet) Clone ¶
func (ss *StatefulSet) Clone() Resource
Clone returns a copy of the resource.
func (*StatefulSet) ComputeStatus ¶
func (ss *StatefulSet) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
ComputeStatus returns a juju status for the resource.
func (*StatefulSet) Delete ¶
func (ss *StatefulSet) Delete(ctx context.Context, client kubernetes.Interface) error
Delete removes the resource.
func (*StatefulSet) Events ¶
func (ss *StatefulSet) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
Events emitted by the resource.
func (*StatefulSet) Get ¶
func (ss *StatefulSet) Get(ctx context.Context, client kubernetes.Interface) error
Get refreshes the resource.
type StorageClass ¶
type StorageClass struct {
storagev1.StorageClass
}
StorageClass extends the k8s storageClass.
func ListStorageClass ¶
func ListStorageClass(ctx context.Context, client kubernetes.Interface, opts metav1.ListOptions) ([]StorageClass, error)
ListStorageClass returns a list of storage classes.
func NewStorageClass ¶
func NewStorageClass(name string, in *storagev1.StorageClass) *StorageClass
NewStorageClass creates a new storage class resource.
func (*StorageClass) Apply ¶
func (sc *StorageClass) Apply(ctx context.Context, client kubernetes.Interface) error
Apply patches the resource change.
func (*StorageClass) Clone ¶
func (sc *StorageClass) Clone() Resource
Clone returns a copy of the resource.
func (*StorageClass) ComputeStatus ¶
func (sc *StorageClass) ComputeStatus(ctx context.Context, client kubernetes.Interface, now time.Time) (string, status.Status, time.Time, error)
ComputeStatus returns a juju status for the resource.
func (*StorageClass) Delete ¶
func (sc *StorageClass) Delete(ctx context.Context, client kubernetes.Interface) error
Delete removes the resource.
func (*StorageClass) Events ¶
func (sc *StorageClass) Events(ctx context.Context, client kubernetes.Interface) ([]corev1.Event, error)
Events emitted by the resource.
func (*StorageClass) Get ¶
func (sc *StorageClass) Get(ctx context.Context, client kubernetes.Interface) error
Get refreshes the resource.