hotplug

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JudgeJsonEqual

func JudgeJsonEqual(a interface{}, b interface{}) bool

judge json equal

func MergeHotplug

func MergeHotplug(commonConfig, clusterConfig hotplugv1.Hotplug) hotplugv1.Hotplug

MergeHotplug use clusterConfig to cover commonConfig.

func MergeJson

func MergeJson(a, b map[string]interface{}) map[string]interface{}

merge json

func MergeYamlString

func MergeYamlString(ayaml, byaml string) (string, error)

merge yaml string

func SetupWithManager

func SetupWithManager(mgr ctrl.Manager, isMemberCluster bool, clusterName string) error

SetupWithManager sets up the controller with the Manager.

func YamlStringToJson

func YamlStringToJson(yamlStr string) (map[string]interface{}, error)

translate string to json

Types

type Helm

type Helm struct {
	K8sConfig    *rest.Config
	ActionConfig map[string]*action.Configuration
}

func NewHelm

func NewHelm() *Helm

func (*Helm) GetActionConfig

func (h *Helm) GetActionConfig(namespace string) (*action.Configuration, error)

get action config

func (*Helm) GetValues

func (h *Helm) GetValues(namespace string, name string) (map[string]interface{}, error)

helm get values xxx

func (*Helm) Install

func (h *Helm) Install(namespace, name, pkgName string, envs map[string]interface{}) (*release.Release, error)

helm install

func (*Helm) List

func (h *Helm) List(namespace string) ([]*release.Release, error)

helm list

func (*Helm) Status

func (h *Helm) Status(namespace string, name string) (*release.Release, error)

helm status

func (*Helm) Uninstall

func (h *Helm) Uninstall(namespace string, name string) error

helm uninstall

func (*Helm) Upgrade

func (h *Helm) Upgrade(namespace, name, pkgName string, envs map[string]interface{}) (*release.Release, error)

helm upgrade

type HotplugReconciler

type HotplugReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

HotplugReconciler reconciles a Hotplug object

func (*HotplugReconciler) Reconcile

func (h *HotplugReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

list/watch hotplug config and helm install/upgrade components 1、get change config and parse 2、judge is change 3、install/upgrade component

Jump to

Keyboard shortcuts

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