k8s_utils

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPodLog

func GetPodLog(ctx context.Context, config *rest.Config, pod *corev1.Pod, containerName string) (string, error)

func IsPodRunning added in v0.4.0

func IsPodRunning(pod *corev1.Pod) bool

func MergeTolerations added in v1.0.0

func MergeTolerations(first, second []corev1.Toleration) []corev1.Toleration

func ParseK8sObjects

func ParseK8sObjects(y string) ([]runtime.Object, error)

func PopNamespaceFromObjectList added in v0.5.0

func PopNamespaceFromObjectList(objects []runtime.Object) (nsObject runtime.Object, otherObjects []runtime.Object)

func RestartDaemonSet added in v0.5.5

func RestartDaemonSet(ctx context.Context, cli client.Client, dsUpdate *appsv1.DaemonSet) error

RestartDaemonSet restarts all pods that belong to the daemonset

Types

type KubeQuerySecretsMethod added in v0.5.0

type KubeQuerySecretsMethod func(ctx context.Context) (*corev1.SecretList, error)

func QuerySecrets added in v0.5.0

func QuerySecrets(cli client.Client, opts ...client.ListOption) KubeQuerySecretsMethod

func QuerySecretsInNamespace added in v0.5.0

func QuerySecretsInNamespace(cli client.Client, namespace string) KubeQuerySecretsMethod

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL