Observability Libs
- Jon Seager
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/edge | 53 | 13 Dec 2024 |
juju deploy observability-libs --channel edge
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
charms.observability_libs.v1.kubernetes_service_patch
-
- Last updated 05 Dec 2024
- Revision Library version 1.13
[DEPRECATED!] KubernetesServicePatch Library.
The kubernetes_service_patch
library is DEPRECATED and will be removed in October 2025.
For patching the Kubernetes service created by Juju during the deployment of a charm,
ops.Unit.set_ports
functionality should be used instead.
Index
class KubernetesServicePatch
Description
A utility for patching the Kubernetes service set up by Juju. None
Methods
KubernetesServicePatch. __init__( self , charm: CharmBase , ports , service_name , service_type: ServiceType , additional_labels , additional_selectors , additional_annotations )
Constructor for KubernetesServicePatch.
Arguments
the charm that is instantiating the library.
a list of ServicePorts
allows setting custom name to the patched service. If none given, application name will be used.
desired type of K8s service. Default value is in line with ServiceSpec's default value.
Labels to be added to the kubernetes service (by default only "app.kubernetes.io/name" is set to the service name)
Selectors to be added to the kubernetes service (by default only "app.kubernetes.io/name" is set to the service name)
Annotations to be added to the kubernetes service.
an optional bound event or list of bound events which
will be observed to re-apply the patch (e.g. on port change).
The install
and upgrade-charm
events would be observed regardless.
KubernetesServicePatch. is_patched( self )
Reports if the service patch has been applied.
Returns
A boolean indicating if the service patch has been applied.