fakeworkertest

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package fakeworkertest issues pod-identity-shaped certificates for tests of the fake data plane's capacity relay: a throwaway CA, and leaf certificates that carry a SPIFFE ID as their only SAN, as the pod-identity signer's do.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Rotate

func Rotate(t *testing.T, path string, cas ...*CA)

Rotate replaces the trust bundle at path with the certificates of cas, as kubelet rotates a projected trust bundle: a new file renamed over the old.

Types

type CA

type CA struct {

	// TrustBundle is the path of the CA certificate as a PEM trust bundle.
	TrustBundle string
	// contains filtered or unexported fields
}

CA is a throwaway signer whose files live in a test's temp dir.

func NewCA

func NewCA(t *testing.T) *CA

NewCA creates a CA and writes its trust bundle.

func (*CA) Issue

func (ca *CA) Issue(t *testing.T, spiffeID string) string

Issue writes a credential bundle (leaf certificate, then its PKCS #8 key) for spiffeID and returns its path.

Jump to

Keyboard shortcuts

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