resultservice

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package resultservice connects durable delivery to the manager lifecycle. Trust is provisioned separately and reloaded from bounded mounted files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Endpoint, Address, CertificateDirectory         string
	Uploads                                         int
	UploadTimeout                                   time.Duration
	Consumer                                        resultconsumer.Options
	ReloadInterval                                  time.Duration
	EnrollmentPolicyNamespace, EnrollmentPolicyName string
	// TokenReviews selects receiver-audience Pod authentication. The manager
	// supplies its API client; runners receive no API permissions.
	TokenReviews resultauthority.TokenReviewer
}

type Service

type Service struct {
	Consumer *resultconsumer.Reader
	// contains filtered or unexported fields
}

func New

func New(config Config, writer client.Client, reader client.Reader) (*Service, error)

New never generates or fetches trust through the Kubernetes API. Both replicas must mount the same dedicated client signing authority and overlapping trust. Required files: tls.crt, tls.key, ca.crt (server trust), client-ca.crt, client-ca.key, and client-trust.crt (current and overlapping client signers).

func (*Service) AuthorizePublication

func (s *Service) AuthorizePublication(ctx context.Context, binding resultstore.Binding) (resultdelivery.Identity, error)

func (*Service) Ensure

These delegates load one immutable snapshot per call. The stable Service pointer is shared by reconciliation and admission; neither retains a retired signer after the mount changes. Existing canonical credentials keep their keys.

func (*Service) NeedLeaderElection

func (*Service) NeedLeaderElection() bool

func (*Service) Ready

func (s *Service) Ready(*http.Request) error

func (*Service) ServerTrust

func (s *Service) ServerTrust() []byte

ServerTrust returns only the public bundle for a new Job's immutable admission snapshot. A projection reload never rewrites an existing Job.

func (*Service) Start

func (s *Service) Start(ctx context.Context) error

Start serves on every replica. Publication is idempotent through the API; neither the listener nor background reading depends on leader election.

func (*Service) ValidateCreate

func (s *Service) ValidateCreate(ctx context.Context, secret *corev1.Secret) error

func (*Service) ValidateRecordCreate

func (s *Service) ValidateRecordCreate(ctx context.Context, record *api.PtahResultRecord) error

Jump to

Keyboard shortcuts

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