k8sutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TCSFinalizer = "tcs.intel.com/issuer-protection"
)

Variables

This section is empty.

Functions

func CreateCASecret

func CreateCASecret(ctx context.Context, c client.Client, cert *x509.Certificate, name, ns string, owner metav1.OwnerReference, labels map[string]string) error

func DeleteCASecret

func DeleteCASecret(ctx context.Context, c client.Client, name, ns string) error

func GetNamespace

func GetNamespace() string

GetNamespace returns the namespace of the operator pod

func QuoteAttestationDelete

func QuoteAttestationDelete(ctx context.Context, c client.Client, req types.NamespacedName) error

func QuoteAttestationDeliver

func QuoteAttestationDeliver(
	ctx context.Context,
	c client.Client,
	req types.NamespacedName,
	requestType tcsapi.QuoteAttestationRequestType,
	signerName string,
	quote []byte,
	quotePubKey interface{},
	tokenLabel string,
	ownerRef *metav1.OwnerReference,
	labels map[string]string) error

func SignerNameToResourceNameAndNamespace

func SignerNameToResourceNameAndNamespace(signerName string) (string, string)

Converts signer name to valid Kubernetes object name and nanespace

Ex:- intel.com/tcs -> tcs.intel.com, ""

/ tcsissuer.tcs.intel.com/sandbox.sgx-ca -> sgx-ca.tcs.intel.com, sandbox

tcsclusterissuer.tcs.intel.com/sgx-ca1 -> sgx-ca1.tcsclusterissuer.intel.tcs.com, ""

func UnsetFinalizer

func UnsetFinalizer(ctx context.Context, c client.Client, obj client.Object, copier func() client.Object) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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