util

package
v0.0.0-...-d3e8332 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Overview

Package util provides functions for creating Kubernetes resources required for running WorkflowDefinitions in a cluster

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUserClusterKubeconfig

func CreateUserClusterKubeconfig(reqBytes []byte, msg *nats.Msg, natsInfo map[string]string)

CreateUserClusterKubeconfig is a synchronous subscriber used to create new Key and Certificate to allow a user to access a Kubernetes cluster. It will create the new file and respond with it to the API Service to save in Vault

func Delete

func Delete(reqBytes []byte, natsInfo map[string]string)

Delete is used to delete a WorkflowDefinition and all related resources from the user's Kubernetes cluster

func GetUnstructuredScaledObject

func GetUnstructuredScaledObject(name, namespace string) *unstructured.Unstructured

GetUnstructuredScaledObject creates a K8s Unstructured object that is a KEDA ScaledObject

func Run

func Run(reqBytes []byte, natsInfo map[string]string)

Run is used to handle most of Pleo's functionality for running different resources on a user's Kubernetes cluster

func ScaleUp

func ScaleUp(reqBytes []byte, natsInfo map[string]string)

ScaleUp is used when a user attempts to access a Workflow that is no longer running. This will start up some new Pods for the user to use

Types

type Request

type Request struct {
	common.BasicRequest
	TCPPorts           []core.ServicePort                    `json:"tcp_ports,omitempty"`
	HTTPPorts          []core.ServicePort                    `json:"http_ports,omitempty"`
	AuthDisabled       bool                                  `json:"auth_disabled,omitempty"`
	Namespace          string                                `json:"namespace,omitempty"`
	WorkflowDefinition workflowdefinition.WorkflowDefinition `json:"data,omitempty"`
}

Request is a struct containing the necessary fields for all Pleo operations coming from the API

Jump to

Keyboard shortcuts

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