k8s

package
v0.0.0-...-7b8e0ff Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Copyright © 2019 Banzai Cloud

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 ApplyResources

func ApplyResources(client k8sclient.Client, objects object.K8sObjects, waitFuncs ...WaitForResourceConditionsFunc) error

func CRDEstablishedConditionCheck

func CRDEstablishedConditionCheck(obj *unstructured.Unstructured, k8serror error) bool

func DeleteResources

func DeleteResources(client k8sclient.Client, objects object.K8sObjects, waitFuncs ...WaitForResourceConditionsFunc) error

func ExistsConditionCheck

func ExistsConditionCheck(obj *unstructured.Unstructured, k8serror error) bool

func GetTokenForServiceAccountName

func GetTokenForServiceAccountName(client k8sclient.Client, key types.NamespacedName) (string, error)

GetTokenForServiceAccountName retrieves an auth token of service account from the related secret

func NonExistsConditionCheck

func NonExistsConditionCheck(obj *unstructured.Unstructured, k8serror error) bool

func ReadyReplicasConditionCheck

func ReadyReplicasConditionCheck(obj *unstructured.Unstructured, k8serror error) bool

func WaitForResourcesConditions

func WaitForResourcesConditions(client k8sclient.Client, objects []NamespacedNameWithGVK, backoff wait.Backoff, checkFuncs ...ResourceConditionCheck) error

Types

type NamespacedNameWithGVK

type NamespacedNameWithGVK struct {
	types.NamespacedName
	schema.GroupVersionKind
}

func NamesWithGVKFromK8sObjects

func NamesWithGVKFromK8sObjects(objects object.K8sObjects, kind ...string) []NamespacedNameWithGVK

func (NamespacedNameWithGVK) String

func (o NamespacedNameWithGVK) String() string

func (NamespacedNameWithGVK) Unstructured

type Object

type Object interface {
	metav1.Object
	metav1.Type
	schema.ObjectKind
}

type PostResourceApplyFunc

type PostResourceApplyFunc func(k8sclient.Client, Object) error

func WaitForCRD

func WaitForCRD(backoff wait.Backoff) PostResourceApplyFunc

type PostResourceDeleteFunc

type PostResourceDeleteFunc func(k8sclient.Client, Object) error

func WaitForFinalizers

func WaitForFinalizers(backoff wait.Backoff) PostResourceDeleteFunc

type ResourceConditionCheck

type ResourceConditionCheck func(*unstructured.Unstructured, error) bool

type WaitForResourceConditionsFunc

type WaitForResourceConditionsFunc func(k8sclient.Client, *unstructured.Unstructured) error

func WaitForResourceConditions

func WaitForResourceConditions(backoff wait.Backoff, checkFuncs ...ResourceConditionCheck) WaitForResourceConditionsFunc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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