Documentation ¶
Index ¶
- Constants
- func Creation(c CreateConfig) (*unstructured.Unstructured, error)
- func Deletion(c DeleteConfig) error
- func Read(c ReadConfig) (*unstructured.Unstructured, error)
- func Update(c UpdateConfig) (*unstructured.Unstructured, error)
- type AggregatedError
- type CreateConfig
- type DeleteConfig
- type PartialError
- type PodAggregator
- type ProviderConfig
- type ReadConfig
- type ResourceId
- type UpdateConfig
Constants ¶
const (
DefaultDeploymentTimeoutMins = 10
)
const (
DefaultIngressTimeoutMins = 10
)
const (
DefaultJobTimeoutMins = 10
)
const (
DefaultPodTimeoutMins = 10
)
const (
DefaultServiceTimeoutMins = 10
)
const (
DefaultStatefulSetTimeoutMins = 10
)
Variables ¶
This section is empty.
Functions ¶
func Creation ¶
func Creation(c CreateConfig) (*unstructured.Unstructured, error)
Creation (as the usage, `await.Creation`, implies) will block until one of the following is true: (1) the Kubernetes resource is reported to be initialized; (2) the initialization timeout has occurred; or (3) an error has occurred while the resource was being initialized.
func Deletion ¶
func Deletion(c DeleteConfig) error
Deletion (as the usage, `await.Deletion`, implies) will block until one of the following is true: (1) the Kubernetes resource is reported to be deleted; (2) the initialization timeout has occurred; or (3) an error has occurred while the resource was being deleted.
func Read ¶ added in v0.15.0
func Read(c ReadConfig) (*unstructured.Unstructured, error)
Read checks a resource, returning the object if it was created and initialized successfully.
func Update ¶
func Update(c UpdateConfig) (*unstructured.Unstructured, error)
Update takes `lastSubmitted` (the last version of a Kubernetes API object submitted to the API server) and `currentSubmitted` (the version of the Kubernetes API object being submitted for an update currently) and blocks until one of the following is true: (1) the Kubernetes resource is reported to be updated; (2) the update timeout has occurred; or (3) an error has occurred while the resource was being updated.
Update updates an existing resource with new values. Currently this client supports the Kubernetes-standard three-way JSON patch. See references here[1] and here[2].
nolint [1]: https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/#use-a-json-merge-patch-to-update-a-deployment [2]: https://kubernetes.io/docs/concepts/overview/object-management-kubectl/declarative-config/#how-apply-calculates-differences-and-merges-changes
Types ¶
type AggregatedError ¶ added in v0.15.0
type AggregatedError interface {
SubErrors() []string
}
AggregatedError represents an error with 0 or more sub-errors.
type CreateConfig ¶ added in v0.20.0
type CreateConfig struct { ProviderConfig Inputs *unstructured.Unstructured Timeout float64 }
type DeleteConfig ¶ added in v0.20.0
type DeleteConfig struct { ProviderConfig Inputs *unstructured.Unstructured Name string Timeout float64 }
type PartialError ¶ added in v0.20.0
type PartialError interface {
Object() *unstructured.Unstructured
}
PartialError represents an object that failed to complete its current operation.
type PodAggregator ¶ added in v1.1.0
type PodAggregator struct { // Synchronization sync.Mutex // contains filtered or unexported fields }
PodAggregator tracks status for any Pods related to the owner resource, and writes warning/error messages to a channel that can be consumed by a resource awaiter.
func NewPodAggregator ¶ added in v1.1.0
func NewPodAggregator(owner ResourceId, clientset *clients.DynamicClientSet) (*PodAggregator, error)
NewPodAggregator returns an initialized PodAggregator.
func (*PodAggregator) Read ¶ added in v1.2.1
func (pa *PodAggregator) Read() logging.Messages
Read lists existing Pods and returns any related warning/error messages.
func (*PodAggregator) ResultChan ¶ added in v1.1.0
func (pa *PodAggregator) ResultChan() <-chan logging.Messages
ResultChan returns a reference to the message channel used by the PodAggregator to communicate warning/error messages to a resource awaiter.
func (*PodAggregator) Stop ¶ added in v1.1.0
func (pa *PodAggregator) Stop()
Stop safely stops a PodAggregator and underlying watch client.
type ProviderConfig ¶ added in v0.20.0
type ProviderConfig struct { Context context.Context Host *pulumiprovider.HostClient URN resource.URN InitialApiVersion string ClientSet *clients.DynamicClientSet DedupLogger *logging.DedupLogger Resources k8sopenapi.Resources }
type ReadConfig ¶ added in v0.20.0
type ReadConfig struct { ProviderConfig Inputs *unstructured.Unstructured Name string }
type ResourceId ¶ added in v1.1.0
type ResourceId struct { Name string Namespace string // Namespace should never be "" (use "default" instead). GVK schema.GroupVersionKind Generation int64 }
func ResourceIdFromUnstructured ¶ added in v1.1.0
func ResourceIdFromUnstructured(uns *unstructured.Unstructured) ResourceId
func (ResourceId) GVKString ¶ added in v1.2.0
func (r ResourceId) GVKString() string
func (ResourceId) String ¶ added in v1.1.0
func (r ResourceId) String() string
type UpdateConfig ¶ added in v0.20.0
type UpdateConfig struct { ProviderConfig Previous *unstructured.Unstructured Inputs *unstructured.Unstructured Timeout float64 }