operation

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package operation provides utilities for managing and manipulating Kubernetes resources. It includes functionalities for handling Kubernetes operations such as getting existing manifests, and managing resources to be removed.

The package uses the "github.com/nextbillion-ai/goreman-util/global" library for global configurations and specifications, "github.com/zhchang/goquiver/k8s" for Kubernetes operations, and "github.com/zhchang/goquiver/raw" for raw data operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Remove

func Remove(rc global.ResourceContext, name, namespace string, options ...OperationOption) error

Remove removes a resource from a given namespace. It takes a resource context, the name and namespace of the resource to be removed, and optional operation options. It returns an error if there was a problem removing the resource.

func Rollout

func Rollout(rc global.ResourceContext, chartPath string, values raw.Map, options ...OperationOption) error

Rollout applies a rolling update to the Kubernetes resources defined in the specified chart. It compares the existing resources with the new resources and performs necessary updates. The function takes a resource context, chart path, values, and optional operation options as parameters. It returns an error if any error occurs during the rollout process.

Types

type OperationOption

type OperationOption func(*operationOptions)

func WithWait

func WithWait(d time.Duration) OperationOption

WithWait sets the wait duration for an operation. The wait duration specifies how long the operation should wait before timing out. It returns an OperationOption that can be used to configure the operation.

Jump to

Keyboard shortcuts

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