Documentation
¶
Overview ¶
Package resultservice connects durable delivery to the manager lifecycle. Trust is provisioned separately and reloaded from bounded mounted files.
Index ¶
- type Config
- type Service
- func (s *Service) AuthorizePublication(ctx context.Context, binding resultstore.Binding) (resultdelivery.Identity, error)
- func (s *Service) Ensure(ctx context.Context, identity resultdelivery.Identity) (resultcredentials.Credential, error)
- func (*Service) NeedLeaderElection() bool
- func (s *Service) Ready(*http.Request) error
- func (s *Service) ServerTrust() []byte
- func (s *Service) Start(ctx context.Context) error
- func (s *Service) ValidateCreate(ctx context.Context, secret *corev1.Secret) error
- func (s *Service) ValidateRecordCreate(ctx context.Context, record *api.PtahResultRecord) error
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 ¶
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 ¶
func (s *Service) Ensure(ctx context.Context, identity resultdelivery.Identity) (resultcredentials.Credential, error)
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) ServerTrust ¶
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 ¶
Start serves on every replica. Publication is idempotent through the API; neither the listener nor background reading depends on leader election.