Documentation ¶
Index ¶
- Constants
- func ComputeOffsetIP(subnet *net.IPNet, offset int64) (net.IP, error)
- func DeleteAlertmanager(ctx context.Context, k8sClient client.Client, namespace string) error
- func DeleteGrafana(ctx context.Context, k8sClient kubernetes.Interface, namespace string) error
- func DeleteLokiRetainPvc(ctx context.Context, k8sClient client.Client, namespace string, ...) error
- func DeletePlutono(ctx context.Context, k8sClient kubernetes.Interface, namespace string) error
- func DeleteVali(ctx context.Context, k8sClient client.Client, namespace string) error
- func FilterEntriesByPrefix(prefix string, entries []string) []string
- func GenerateAddonConfig(values map[string]interface{}, enabled bool) map[string]interface{}
- func LokiPvcExists(ctx context.Context, k8sClient client.Client, namespace string, ...) (bool, error)
- func RenameLokiPvcToValiPvc(ctx context.Context, k8sClient client.Client, namespace string, ...) error
Constants ¶
const ( // VPNTunnel dictates that VPN is used as a tunnel between seed and shoot networks. VPNTunnel string = "vpn-shoot" // KubeAPIServerPrefix is a constant for a prefix used for the KubeAPIServer instance which uses a TLS certificate from a trusted origin. KubeAPIServerPrefix = "api" // PlutonoUsersPrefix is a constant for a prefix used for the users Plutono instance. PlutonoUsersPrefix = "gu" // PrometheusPrefix is a constant for a prefix used for the Prometheus instance. PrometheusPrefix = "p" // AlertManagerPrefix is a constant for a prefix used for the AlertManager instance. AlertManagerPrefix = "au" // ValiPrefix is a constant for a prefix used for the Vali instance. ValiPrefix = "v" // ManagedResourceShootCoreName is the name of the shoot core managed resource. ManagedResourceShootCoreName = "shoot-core" // ManagedResourceAddonsName is the name of the addons managed resource. ManagedResourceAddonsName = "addons" // ShootDNSIngressName is a constant for the DNS resources used for the shoot ingress addon. ShootDNSIngressName = "ingress" )
Variables ¶
This section is empty.
Functions ¶
func ComputeOffsetIP ¶ added in v1.1.0
ComputeOffsetIP parses the provided <subnet> and offsets with the value of <offset>. For example, <subnet> = 100.64.0.0/11 and <offset> = 10 the result would be 100.64.0.10 IPv6 and IPv4 is supported.
func DeleteAlertmanager ¶
DeleteAlertmanager deletes all resources of the Alertmanager in a given namespace.
func DeleteGrafana ¶ added in v1.64.0
DeleteGrafana deletes the Grafana resources that are no longer necessary due to the migration to Plutono.
func DeleteLokiRetainPvc ¶ added in v1.71.0
func DeleteLokiRetainPvc(ctx context.Context, k8sClient client.Client, namespace string, log logr.Logger) error
DeleteLokiRetainPvc deletes all Loki resources in a given namespace.
func DeletePlutono ¶ added in v1.71.0
DeletePlutono deletes the monitoring stack for the shoot owner.
func DeleteVali ¶ added in v1.71.0
DeleteVali deletes all resources of the Vali in a given namespace.
func FilterEntriesByPrefix ¶ added in v1.28.3
FilterEntriesByPrefix returns a list of strings which begin with the given prefix.
func GenerateAddonConfig ¶
GenerateAddonConfig returns the provided <values> in case <enabled> is true. Otherwise, nil is being returned.
func LokiPvcExists ¶ added in v1.71.0
func LokiPvcExists(ctx context.Context, k8sClient client.Client, namespace string, log logr.Logger) (bool, error)
LokiPvcExists checks if the loki-loki-0 PVC exists in the given namespace.
func RenameLokiPvcToValiPvc ¶ added in v1.71.0
func RenameLokiPvcToValiPvc(ctx context.Context, k8sClient client.Client, namespace string, log logr.Logger) error
RenameLokiPvcToValiPvc "renames" the PVC used by the loki-0 pod: "loki-loki-0" to "vali-vali-0". It can then be used by the vali-0 pod of the vali StatefulSet. It is not possible in kubernetes to rename a PVC, so we have to create a new PVC after deleting the old one. The PV of the PVC is retained and reused by the new PVC. To achieve this, the PV's ReclaimPolicy is temporarily set to "Retain" before deleting the PVC. The PV's ReclaimPolicy is reset at the end back to "Delete" so that the PV is deleted when the PVC is deleted for another reason.
Types ¶
This section is empty.