kubernetes

package
v0.0.0-...-787377c Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelTrustedPodsNamespace            string = "coop.comrade/apocryph-namespace"
	AnnotationsTrustedPodsPaymentChannel string = "coop.comrade/apocryph-payment-contract"
	LabelIpfsP2P                         string = "coop.comrade/apocryph-p2p-helper"
	AnnotationsIpfsP2P                   string = "coop.comrade/apocryph-p2p-helper"
)

Variables

View Source
var TrustedPodsNamespaceFilter = client.HasLabels{LabelTrustedPodsNamespace}

Functions

func ApplyPodRequest

func ApplyPodRequest(
	ctx context.Context,
	client k8cl.Client,
	namespace string,
	update bool,
	podManifest *pb.Pod,
	images map[string]string,
	secrets map[string][]byte,
	response *pb.ProvisionPodResponse,
) error

func GetClient

func GetClient(kubeConfig string, dryRun bool) (client.Client, error)

func GetConfig

func GetConfig(kubeConfig string) (*rest.Config, error)

func GetResource

func GetResource(kind string) interface{}

func GetScheme

func GetScheme() (*runtime.Scheme, error)

func NewHttpSo

func NewHttpSo(namespace, name string) *kedahttpv1alpha1.HTTPScaledObject

func NewService

func NewService(port *pb.Container_Port, portName string, httpSO *kedahttpv1alpha1.HTTPScaledObject, labels map[string]string) (*corev1.Service, int32, error)

func NewTrustedPodsNamespace

func NewTrustedPodsNamespace(name string, paymentChannel *pb.PaymentChannel) *corev1.Namespace

func RunInNamespaceOrRevert

func RunInNamespaceOrRevert(ctx context.Context, cl client.Client, namespace *corev1.Namespace, dryRun bool, block func(client.Client) error) error

func TrustedPodsNamespaceGetChannel

func TrustedPodsNamespaceGetChannel(namespace *corev1.Namespace) (*pb.PaymentChannel, error)

Types

type FetchSecret

type FetchSecret func(cid []byte) (map[string][]byte, error)

Jump to

Keyboard shortcuts

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