Documentation
¶
Overview ¶
SnapshotService — namespace-scoped gRPC handlers for Snapshot resources.
Package service — StorageClassService gRPC handlers ¶
VolumeService — namespace-scoped gRPC handlers for Volume resources.
Driver-capability lint for Volume resources at the API write path.
Today the storage drivers enforce capability invariants at provision time (Driver.Provision returns an error and the controller marks the Volume Failed/Stalled). Surfacing the same checks at the gRPC write path turns "operator submits cast → orchestrator quietly fails on next reconcile" into "operator submits cast → cast fails with a clear error". This file implements the cast-time half of that guarantee: AccessMode must be in driver Capabilities; local-host volumes must declare a parameters.hostPath that resolves inside the runefile allowlist. Anything we cannot determine without driver instantiation (e.g. block-device formatting) is intentionally left to the controller.
All checks fail OPEN: if the StorageClass is missing, if the driver is unregistered, or if driver instantiation errors, the lint defers to the controller. This keeps the unit-test surface small (callers that did not seed a StorageClass keep working) while the production path — where the controller seeds the built-in classes at boot — is fully covered.
Volume live-usage enrichment (dashboard "Used" column).
Index ¶
- Constants
- func IsNotFound(err error) bool
- type AdminService
- func (s *AdminService) AddRegistry(ctx context.Context, req *generated.AddRegistryRequest) (*generated.AddRegistryResponse, error)
- func (s *AdminService) AdminBootstrap(ctx context.Context, _ *generated.AdminBootstrapRequest) (*generated.AdminBootstrapResponse, error)
- func (s *AdminService) BootstrapAuth(ctx context.Context, req *generated.BootstrapAuthRequest) (*generated.BootstrapAuthResponse, error)
- func (s *AdminService) GetRegistry(ctx context.Context, req *generated.GetRegistryRequest) (*generated.GetRegistryResponse, error)
- func (s *AdminService) ListRegistries(ctx context.Context, _ *generated.ListRegistriesRequest) (*generated.ListRegistriesResponse, error)
- func (s *AdminService) NetworkStatus(_ context.Context, _ *generated.NetworkStatusRequest) (*generated.NetworkStatusResponse, error)
- func (s *AdminService) PolicyAttachToSubject(ctx context.Context, req *generated.PolicyAttachToSubjectRequest) (*generated.PolicyAttachToSubjectResponse, error)
- func (s *AdminService) PolicyCreate(ctx context.Context, req *generated.PolicyCreateRequest) (*generated.PolicyCreateResponse, error)
- func (s *AdminService) PolicyDelete(ctx context.Context, req *generated.PolicyDeleteRequest) (*generated.PolicyDeleteResponse, error)
- func (s *AdminService) PolicyDetachFromSubject(ctx context.Context, req *generated.PolicyDetachFromSubjectRequest) (*generated.PolicyDetachFromSubjectResponse, error)
- func (s *AdminService) PolicyGet(ctx context.Context, req *generated.PolicyGetRequest) (*generated.PolicyGetResponse, error)
- func (s *AdminService) PolicyList(ctx context.Context, _ *generated.PolicyListRequest) (*generated.PolicyListResponse, error)
- func (s *AdminService) PolicyUpdate(ctx context.Context, req *generated.PolicyUpdateRequest) (*generated.PolicyUpdateResponse, error)
- func (s *AdminService) RegistriesStatus(ctx context.Context, _ *generated.RegistriesStatusRequest) (*generated.RegistriesStatusResponse, error)
- func (s *AdminService) RemoveRegistry(ctx context.Context, req *generated.RemoveRegistryRequest) (*generated.RemoveRegistryResponse, error)
- func (s *AdminService) SetNetworkStatusProvider(p NetworkStatusProvider)
- func (s *AdminService) TestRegistry(ctx context.Context, req *generated.TestRegistryRequest) (*generated.TestRegistryResponse, error)
- func (s *AdminService) TokenList(ctx context.Context, _ *generated.TokenListRequest) (*generated.TokenListResponse, error)
- func (s *AdminService) UpdateRegistry(ctx context.Context, req *generated.UpdateRegistryRequest) (*generated.UpdateRegistryResponse, error)
- func (s *AdminService) UserCreate(ctx context.Context, req *generated.UserCreateRequest) (*generated.UserCreateResponse, error)
- func (s *AdminService) UserList(ctx context.Context, _ *generated.UserListRequest) (*generated.UserListResponse, error)
- type AuditService
- type AuthService
- func (s *AuthService) CreateToken(ctx context.Context, req *generated.CreateTokenRequest) (*generated.CreateTokenResponse, error)
- func (s *AuthService) Enroll(ctx context.Context, req *generated.EnrollRequest) (*generated.EnrollResponse, error)
- func (s *AuthService) RedeemEnrollment(ctx context.Context, req *generated.RedeemEnrollmentRequest) (*generated.RedeemEnrollmentResponse, error)
- func (s *AuthService) Refresh(ctx context.Context, req *generated.RefreshRequest) (*generated.RefreshResponse, error)
- func (s *AuthService) RevokeToken(ctx context.Context, req *generated.RevokeTokenRequest) (*generated.RevokeTokenResponse, error)
- func (s *AuthService) SetRefreshManager(m *session.Manager)
- func (s *AuthService) WhoAmI(ctx context.Context, _ *generated.WhoAmIRequest) (*generated.WhoAmIResponse, error)
- type ConfigmapService
- func (s *ConfigmapService) CreateConfigmap(ctx context.Context, req *generated.CreateConfigmapRequest) (*generated.ConfigmapResponse, error)
- func (s *ConfigmapService) DeleteConfigmap(ctx context.Context, req *generated.DeleteConfigmapRequest) (*generated.Status, error)
- func (s *ConfigmapService) GetConfigmap(ctx context.Context, req *generated.GetConfigmapRequest) (*generated.ConfigmapResponse, error)
- func (s *ConfigmapService) ListConfigmapVersions(ctx context.Context, req *generated.ListConfigmapVersionsRequest) (*generated.ListConfigmapVersionsResponse, error)
- func (s *ConfigmapService) ListConfigmaps(ctx context.Context, req *generated.ListConfigmapsRequest) (*generated.ListConfigmapsResponse, error)
- func (s *ConfigmapService) PatchConfigmap(ctx context.Context, req *generated.PatchConfigmapRequest) (*generated.ConfigmapResponse, error)
- func (s *ConfigmapService) RollbackConfigmap(ctx context.Context, req *generated.RollbackConfigmapRequest) (*generated.ConfigmapResponse, error)
- func (s *ConfigmapService) UpdateConfigmap(ctx context.Context, req *generated.UpdateConfigmapRequest) (*generated.ConfigmapResponse, error)
- type DescribeService
- type EventService
- type ExecService
- type HealthService
- func (s *HealthService) DetectAndSetCapacity()
- func (s *HealthService) GetHealth(ctx context.Context, req *generated.GetHealthRequest) (*generated.GetHealthResponse, error)
- func (s *HealthService) GetServerVersion(_ context.Context, _ *generated.GetServerVersionRequest) (*generated.GetServerVersionResponse, error)
- func (s *HealthService) SetCapacity(cpuCores float64, memBytes int64)
- type InstanceService
- func (s *InstanceService) GetInstance(ctx context.Context, req *generated.GetInstanceRequest) (*generated.InstanceResponse, error)
- func (s *InstanceService) ListInstances(ctx context.Context, req *generated.ListInstancesRequest) (*generated.ListInstancesResponse, error)
- func (s *InstanceService) ProtoInstanceToInstanceModel(protoInstance *generated.Instance) (*types.Instance, error)
- func (s *InstanceService) RestartInstance(ctx context.Context, req *generated.InstanceActionRequest) (*generated.InstanceResponse, error)
- func (s *InstanceService) StartInstance(ctx context.Context, req *generated.InstanceActionRequest) (*generated.InstanceResponse, error)
- func (s *InstanceService) StopInstance(ctx context.Context, req *generated.InstanceActionRequest) (*generated.InstanceResponse, error)
- type LogService
- type MockExecServiceStream
- type NamespaceService
- func (s *NamespaceService) CreateNamespace(ctx context.Context, req *generated.CreateNamespaceRequest) (*generated.CreateNamespaceResponse, error)
- func (s *NamespaceService) DeleteNamespace(ctx context.Context, req *generated.DeleteNamespaceRequest) (*generated.DeleteNamespaceResponse, error)
- func (s *NamespaceService) GetNamespace(ctx context.Context, req *generated.GetNamespaceRequest) (*generated.GetNamespaceResponse, error)
- func (s *NamespaceService) ListNamespaces(ctx context.Context, req *generated.ListNamespacesRequest) (*generated.ListNamespacesResponse, error)
- func (s *NamespaceService) WatchNamespaces(req *generated.WatchNamespacesRequest, ...) error
- type NetworkStatusProvider
- type ObserveService
- func (s *ObserveService) DeleteAlertRule(ctx context.Context, req *generated.DeleteAlertRuleRequest) (*generated.DeleteAlertRuleResponse, error)
- func (s *ObserveService) DeleteChannel(ctx context.Context, req *generated.DeleteChannelRequest) (*generated.DeleteChannelResponse, error)
- func (s *ObserveService) DeleteSavedView(ctx context.Context, req *generated.DeleteSavedViewRequest) (*generated.DeleteSavedViewResponse, error)
- func (s *ObserveService) Enabled() bool
- func (s *ObserveService) Execute(req *generated.ObserveQuery, stream generated.ObserveService_ExecuteServer) error
- func (s *ObserveService) GetCapabilities(ctx context.Context, _ *generated.CapabilitiesRequest) (*generated.ObserveCapabilities, error)
- func (s *ObserveService) GetObserveStats(ctx context.Context, _ *generated.ObserveStatsRequest) (*generated.ObserveStats, error)
- func (s *ObserveService) Ingest(ctx context.Context, records []observe.LogRecord) error
- func (s *ObserveService) ListAlertRules(ctx context.Context, _ *generated.ListAlertRulesRequest) (*generated.ListAlertRulesResponse, error)
- func (s *ObserveService) ListChannels(ctx context.Context, _ *generated.ListChannelsRequest) (*generated.ListChannelsResponse, error)
- func (s *ObserveService) ListSavedViews(ctx context.Context, _ *generated.ListSavedViewsRequest) (*generated.ListSavedViewsResponse, error)
- func (s *ObserveService) PushLogs(ctx context.Context, req *generated.PushLogsRequest) (*generated.PushLogsResponse, error)
- func (s *ObserveService) SaveAlertRule(ctx context.Context, req *generated.SaveAlertRuleRequest) (*generated.SaveAlertRuleResponse, error)
- func (s *ObserveService) SaveChannel(ctx context.Context, req *generated.SaveChannelRequest) (*generated.SaveChannelResponse, error)
- func (s *ObserveService) SaveView(ctx context.Context, req *generated.SaveViewRequest) (*generated.SaveViewResponse, error)
- func (s *ObserveService) SetAlerting(rules *repos.AlertRuleRepo, channels *repos.ChannelRepo, ...)
- type PortForwardService
- type ReleaseService
- func (s *ReleaseService) Cast(ctx context.Context, req *generated.CastRequest) (*generated.CastResponse, error)
- func (s *ReleaseService) DeleteRelease(ctx context.Context, req *generated.DeleteReleaseRequest) (*generated.Status, error)
- func (s *ReleaseService) GetRelease(ctx context.Context, req *generated.GetReleaseRequest) (*generated.ReleaseResponse, error)
- func (s *ReleaseService) History(ctx context.Context, req *generated.HistoryRequest) (*generated.HistoryResponse, error)
- func (s *ReleaseService) ListReleases(ctx context.Context, req *generated.ListReleasesRequest) (*generated.ListReleasesResponse, error)
- func (s *ReleaseService) Plan(ctx context.Context, req *generated.PlanRequest) (*generated.PlanResponse, error)
- func (s *ReleaseService) Rollback(ctx context.Context, req *generated.RollbackReleaseRequest) (*generated.ReleaseResponse, error)
- type ResourceTarget
- type RunnerHealthReporter
- type SecretService
- func (s *SecretService) CreateSecret(ctx context.Context, req *generated.CreateSecretRequest) (*generated.SecretResponse, error)
- func (s *SecretService) DeleteSecret(ctx context.Context, req *generated.DeleteSecretRequest) (*generated.Status, error)
- func (s *SecretService) GetSecret(ctx context.Context, req *generated.GetSecretRequest) (*generated.SecretResponse, error)
- func (s *SecretService) ListSecretVersions(ctx context.Context, req *generated.ListSecretVersionsRequest) (*generated.ListSecretVersionsResponse, error)
- func (s *SecretService) ListSecrets(ctx context.Context, req *generated.ListSecretsRequest) (*generated.ListSecretsResponse, error)
- func (s *SecretService) PatchSecret(ctx context.Context, req *generated.PatchSecretRequest) (*generated.SecretResponse, error)
- func (s *SecretService) RevealSecret(ctx context.Context, req *generated.RevealSecretRequest) (*generated.SecretResponse, error)
- func (s *SecretService) RevealSecretVersion(ctx context.Context, req *generated.RevealSecretVersionRequest) (*generated.SecretResponse, error)
- func (s *SecretService) RollbackSecret(ctx context.Context, req *generated.RollbackSecretRequest) (*generated.SecretResponse, error)
- func (s *SecretService) UpdateSecret(ctx context.Context, req *generated.UpdateSecretRequest) (*generated.SecretResponse, error)
- type ServiceService
- func (s *ServiceService) CreateService(ctx context.Context, req *generated.CreateServiceRequest) (*generated.ServiceResponse, error)
- func (s *ServiceService) DeleteService(ctx context.Context, req *generated.DeleteServiceRequest) (*generated.DeleteServiceResponse, error)
- func (s *ServiceService) GetDeletionStatus(ctx context.Context, req *generated.GetDeletionStatusRequest) (*generated.GetDeletionStatusResponse, error)
- func (s *ServiceService) GetService(ctx context.Context, req *generated.GetServiceRequest) (*generated.ServiceResponse, error)
- func (s *ServiceService) ListDeletionOperations(ctx context.Context, req *generated.ListDeletionOperationsRequest) (*generated.ListDeletionOperationsResponse, error)
- func (s *ServiceService) ListServices(ctx context.Context, req *generated.ListServicesRequest) (*generated.ListServicesResponse, error)
- func (s *ServiceService) RestartService(ctx context.Context, req *generated.RestartServiceRequest) (*generated.RestartServiceResponse, error)
- func (s *ServiceService) ScaleService(ctx context.Context, req *generated.ScaleServiceRequest) (*generated.ServiceResponse, error)
- func (s *ServiceService) SetVIPAllocator(a VIPAllocator)
- func (s *ServiceService) UpdateService(ctx context.Context, req *generated.UpdateServiceRequest) (*generated.ServiceResponse, error)
- func (s *ServiceService) WatchScaling(req *generated.WatchScalingRequest, ...) error
- func (s *ServiceService) WatchServices(req *generated.WatchServicesRequest, ...) error
- type SnapshotService
- func (s *SnapshotService) CreateSnapshot(ctx context.Context, req *generated.CreateSnapshotRequest) (*generated.SnapshotResponse, error)
- func (s *SnapshotService) DeleteSnapshot(ctx context.Context, req *generated.DeleteSnapshotRequest) (*generated.Status, error)
- func (s *SnapshotService) GetSnapshot(ctx context.Context, req *generated.GetSnapshotRequest) (*generated.SnapshotResponse, error)
- func (s *SnapshotService) ListSnapshots(ctx context.Context, req *generated.ListSnapshotsRequest) (*generated.ListSnapshotsResponse, error)
- func (s *SnapshotService) RestoreVolume(ctx context.Context, req *generated.RestoreVolumeRequest) (*generated.VolumeResponse, error)
- type SnapshotServiceOption
- type StorageClassService
- func (s *StorageClassService) CreateStorageClass(ctx context.Context, req *generated.CreateStorageClassRequest) (*generated.StorageClassResponse, error)
- func (s *StorageClassService) DeleteStorageClass(ctx context.Context, req *generated.DeleteStorageClassRequest) (*generated.Status, error)
- func (s *StorageClassService) GetStorageClass(ctx context.Context, req *generated.GetStorageClassRequest) (*generated.StorageClassResponse, error)
- func (s *StorageClassService) ListStorageClasses(ctx context.Context, req *generated.ListStorageClassesRequest) (*generated.ListStorageClassesResponse, error)
- func (s *StorageClassService) UpdateStorageClass(ctx context.Context, req *generated.UpdateStorageClassRequest) (*generated.StorageClassResponse, error)
- type VIPAllocator
- type VolumeService
- func (s *VolumeService) CreateVolume(ctx context.Context, req *generated.CreateVolumeRequest) (*generated.VolumeResponse, error)
- func (s *VolumeService) DeleteVolume(ctx context.Context, req *generated.DeleteVolumeRequest) (*generated.Status, error)
- func (s *VolumeService) DetachVolume(ctx context.Context, req *generated.DetachVolumeRequest) (*generated.VolumeResponse, error)
- func (s *VolumeService) GetVolume(ctx context.Context, req *generated.GetVolumeRequest) (*generated.VolumeResponse, error)
- func (s *VolumeService) ListVolumes(ctx context.Context, req *generated.ListVolumesRequest) (*generated.ListVolumesResponse, error)
- func (s *VolumeService) RetryProvisionVolume(ctx context.Context, req *generated.RetryProvisionVolumeRequest) (*generated.VolumeResponse, error)
- func (s *VolumeService) UpdateVolume(ctx context.Context, req *generated.UpdateVolumeRequest) (*generated.VolumeResponse, error)
- type VolumeServiceOption
Constants ¶
const (
// DefaultNamespace is the default namespace for services.
DefaultNamespace = "default"
)
const RestoreFromSnapshotParam = types.RestoreFromSnapshotParam
RestoreFromSnapshotParam is re-exported for compatibility; the canonical definition lives in pkg/types/snapshot.go.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
IsNotFound returns true if the error is a "not found" error.
Types ¶
type AdminService ¶
type AdminService struct {
generated.UnimplementedAdminServiceServer
// contains filtered or unexported fields
}
AdminService implements generated.AdminServiceServer
func NewAdminService ¶
func NewAdminService(st store.Store, logger log.Logger) *AdminService
func (*AdminService) AddRegistry ¶
func (s *AdminService) AddRegistry(ctx context.Context, req *generated.AddRegistryRequest) (*generated.AddRegistryResponse, error)
func (*AdminService) AdminBootstrap ¶
func (s *AdminService) AdminBootstrap(ctx context.Context, _ *generated.AdminBootstrapRequest) (*generated.AdminBootstrapResponse, error)
AdminBootstrap creates the built-in root subject and returns a management token (opaque secret once)
func (*AdminService) BootstrapAuth ¶
func (s *AdminService) BootstrapAuth(ctx context.Context, req *generated.BootstrapAuthRequest) (*generated.BootstrapAuthResponse, error)
func (*AdminService) GetRegistry ¶
func (s *AdminService) GetRegistry(ctx context.Context, req *generated.GetRegistryRequest) (*generated.GetRegistryResponse, error)
func (*AdminService) ListRegistries ¶
func (s *AdminService) ListRegistries(ctx context.Context, _ *generated.ListRegistriesRequest) (*generated.ListRegistriesResponse, error)
Registry admin RPCs
func (*AdminService) NetworkStatus ¶
func (s *AdminService) NetworkStatus(_ context.Context, _ *generated.NetworkStatusRequest) (*generated.NetworkStatusResponse, error)
NetworkStatus returns the current ClusterNetwork CIDR plus VIP allocation summary. Returns Unavailable if the allocator hasn't been wired in (e.g. during startup or in tests that don't construct one).
func (*AdminService) PolicyAttachToSubject ¶
func (s *AdminService) PolicyAttachToSubject(ctx context.Context, req *generated.PolicyAttachToSubjectRequest) (*generated.PolicyAttachToSubjectResponse, error)
PolicyAttachToSubject attaches a policy to a user subject (MVP: users only)
func (*AdminService) PolicyCreate ¶
func (s *AdminService) PolicyCreate(ctx context.Context, req *generated.PolicyCreateRequest) (*generated.PolicyCreateResponse, error)
PolicyCreate creates or updates a policy
func (*AdminService) PolicyDelete ¶
func (s *AdminService) PolicyDelete(ctx context.Context, req *generated.PolicyDeleteRequest) (*generated.PolicyDeleteResponse, error)
PolicyDelete deletes a policy
func (*AdminService) PolicyDetachFromSubject ¶
func (s *AdminService) PolicyDetachFromSubject(ctx context.Context, req *generated.PolicyDetachFromSubjectRequest) (*generated.PolicyDetachFromSubjectResponse, error)
PolicyDetachFromSubject detaches a policy from a user subject (MVP: users only)
func (*AdminService) PolicyGet ¶
func (s *AdminService) PolicyGet(ctx context.Context, req *generated.PolicyGetRequest) (*generated.PolicyGetResponse, error)
PolicyGet fetches a policy
func (*AdminService) PolicyList ¶
func (s *AdminService) PolicyList(ctx context.Context, _ *generated.PolicyListRequest) (*generated.PolicyListResponse, error)
PolicyList lists policies
func (*AdminService) PolicyUpdate ¶
func (s *AdminService) PolicyUpdate(ctx context.Context, req *generated.PolicyUpdateRequest) (*generated.PolicyUpdateResponse, error)
PolicyUpdate updates a policy
func (*AdminService) RegistriesStatus ¶
func (s *AdminService) RegistriesStatus(ctx context.Context, _ *generated.RegistriesStatusRequest) (*generated.RegistriesStatusResponse, error)
func (*AdminService) RemoveRegistry ¶
func (s *AdminService) RemoveRegistry(ctx context.Context, req *generated.RemoveRegistryRequest) (*generated.RemoveRegistryResponse, error)
func (*AdminService) SetNetworkStatusProvider ¶
func (s *AdminService) SetNetworkStatusProvider(p NetworkStatusProvider)
SetNetworkStatusProvider plugs in the live VIP allocator. Calling NetworkStatus before this is invoked returns codes.Unavailable.
func (*AdminService) TestRegistry ¶
func (s *AdminService) TestRegistry(ctx context.Context, req *generated.TestRegistryRequest) (*generated.TestRegistryResponse, error)
func (*AdminService) TokenList ¶
func (s *AdminService) TokenList(ctx context.Context, _ *generated.TokenListRequest) (*generated.TokenListResponse, error)
TokenList lists tokens (admin-only). Does not return secrets.
func (*AdminService) UpdateRegistry ¶
func (s *AdminService) UpdateRegistry(ctx context.Context, req *generated.UpdateRegistryRequest) (*generated.UpdateRegistryResponse, error)
func (*AdminService) UserCreate ¶
func (s *AdminService) UserCreate(ctx context.Context, req *generated.UserCreateRequest) (*generated.UserCreateResponse, error)
UserCreate upserts a user and attaches policies (MVP)
func (*AdminService) UserList ¶
func (s *AdminService) UserList(ctx context.Context, _ *generated.UserListRequest) (*generated.UserListResponse, error)
UserList lists users (subjects)
type AuditService ¶
type AuditService struct {
generated.UnimplementedAuditServiceServer
// contains filtered or unexported fields
}
AuditService exposes the append-only security audit trail. RBAC is enforced upstream by the standard rbac interceptor — see methodToAction in pkg/api/server/utils.go (resource: "audit").
func NewAuditService ¶
func NewAuditService(coreStore store.Store, logger log.Logger) *AuditService
func (*AuditService) ListAuditEvents ¶
func (s *AuditService) ListAuditEvents(ctx context.Context, req *generated.ListAuditEventsRequest) (*generated.ListAuditEventsResponse, error)
type AuthService ¶
type AuthService struct {
generated.UnimplementedAuthServiceServer
// contains filtered or unexported fields
}
AuthService implements generated.AuthServiceServer
func NewAuthService ¶
func NewAuthService(st store.Store, logger log.Logger) *AuthService
func (*AuthService) CreateToken ¶
func (s *AuthService) CreateToken(ctx context.Context, req *generated.CreateTokenRequest) (*generated.CreateTokenResponse, error)
func (*AuthService) Enroll ¶
func (s *AuthService) Enroll(ctx context.Context, req *generated.EnrollRequest) (*generated.EnrollResponse, error)
Enroll issues a one-time enrollment code (admin-gated via the default AuthService RBAC requirement). It validates the requested policies up front so a typo fails here rather than at redeem time.
func (*AuthService) RedeemEnrollment ¶
func (s *AuthService) RedeemEnrollment(ctx context.Context, req *generated.RedeemEnrollmentRequest) (*generated.RedeemEnrollmentResponse, error)
RedeemEnrollment exchanges a valid code for a freshly minted session. It is self-authenticating on the code (exempt from the auth/rbac interceptors): the redeemer receives the refresh secret directly, so an admin never handles a usable credential.
func (*AuthService) Refresh ¶
func (s *AuthService) Refresh(ctx context.Context, req *generated.RefreshRequest) (*generated.RefreshResponse, error)
Refresh exchanges a refresh grant for a fresh access token and a rotated refresh token (RUNE-201). It is self-authenticating on the refresh secret — the auth/rbac interceptors exempt this method — so any grant holder can renew their own session, and only their own.
func (*AuthService) RevokeToken ¶
func (s *AuthService) RevokeToken(ctx context.Context, req *generated.RevokeTokenRequest) (*generated.RevokeTokenResponse, error)
func (*AuthService) SetRefreshManager ¶
func (s *AuthService) SetRefreshManager(m *session.Manager)
SetRefreshManager wires the shared RUNE-201 rotation manager. Injected by the server after construction so the gRPC Refresh RPC and the HTTP cookie endpoint share one in-memory grace cache. When nil, Refresh returns Unimplemented.
func (*AuthService) WhoAmI ¶
func (s *AuthService) WhoAmI(ctx context.Context, _ *generated.WhoAmIRequest) (*generated.WhoAmIResponse, error)
AuthService implementation
type ConfigmapService ¶
type ConfigmapService struct {
generated.UnimplementedConfigmapServiceServer
// contains filtered or unexported fields
}
func NewConfigmapService ¶
func NewConfigmapService(st store.Store, logger log.Logger) *ConfigmapService
func (*ConfigmapService) CreateConfigmap ¶
func (s *ConfigmapService) CreateConfigmap(ctx context.Context, req *generated.CreateConfigmapRequest) (*generated.ConfigmapResponse, error)
func (*ConfigmapService) DeleteConfigmap ¶
func (s *ConfigmapService) DeleteConfigmap(ctx context.Context, req *generated.DeleteConfigmapRequest) (*generated.Status, error)
func (*ConfigmapService) GetConfigmap ¶
func (s *ConfigmapService) GetConfigmap(ctx context.Context, req *generated.GetConfigmapRequest) (*generated.ConfigmapResponse, error)
func (*ConfigmapService) ListConfigmapVersions ¶
func (s *ConfigmapService) ListConfigmapVersions(ctx context.Context, req *generated.ListConfigmapVersionsRequest) (*generated.ListConfigmapVersionsResponse, error)
ListConfigmapVersions returns the configmap's version history, newest first.
func (*ConfigmapService) ListConfigmaps ¶
func (s *ConfigmapService) ListConfigmaps(ctx context.Context, req *generated.ListConfigmapsRequest) (*generated.ListConfigmapsResponse, error)
func (*ConfigmapService) PatchConfigmap ¶
func (s *ConfigmapService) PatchConfigmap(ctx context.Context, req *generated.PatchConfigmapRequest) (*generated.ConfigmapResponse, error)
PatchConfigmap applies a key-scoped merge (set/unset) to a configmap's data under a per-configmap lock, producing a new version. Mirrors PatchSecret but without encryption or audit (configmaps are plaintext).
func (*ConfigmapService) RollbackConfigmap ¶
func (s *ConfigmapService) RollbackConfigmap(ctx context.Context, req *generated.RollbackConfigmapRequest) (*generated.ConfigmapResponse, error)
RollbackConfigmap rewrites HEAD to the data of a prior version (head+1).
func (*ConfigmapService) UpdateConfigmap ¶
func (s *ConfigmapService) UpdateConfigmap(ctx context.Context, req *generated.UpdateConfigmapRequest) (*generated.ConfigmapResponse, error)
type DescribeService ¶
type DescribeService struct {
generated.UnimplementedDescribeServiceServer
// contains filtered or unexported fields
}
DescribeService implements the gRPC DescribeService (RUNE-126).
It assembles the one-shot diagnostic view for a single resource server-side: the target is read, its obvious references are walked one level deep against the same store, and the assembled DescribeResult is returned. A consistent snapshot under one read pass, one authz check (RUNE-126).
func NewDescribeService ¶
func NewDescribeService(st store.Store, eventLog events.EventLog, logger log.Logger) *DescribeService
NewDescribeService constructs a DescribeService over the given store. eventLog is optional (nil-safe): when set, describe folds the most recent events for the target resource into the result (RUNE-126 Phase 2). Tests that don't care about events pass nil.
func (*DescribeService) Describe ¶
func (s *DescribeService) Describe(ctx context.Context, req *generated.DescribeRequest) (*generated.DescribeResponse, error)
Describe returns the assembled diagnostic view for one resource.
type EventService ¶
type EventService struct {
generated.UnimplementedEventServiceServer
// contains filtered or unexported fields
}
EventService implements the gRPC EventService (RUNE-126 Phase 2). Thin wrapper around the EventLog — the recorder owns storage and fold semantics; this service is just transport.
func NewEventService ¶
func NewEventService(eventLog events.EventLog, logger log.Logger) *EventService
NewEventService constructs an EventService over the given EventLog.
func (*EventService) ListEvents ¶
func (s *EventService) ListEvents(ctx context.Context, req *generated.ListEventsRequest) (*generated.ListEventsResponse, error)
ListEvents returns the most-recent events for the requested target. For="<kind>/<name>" narrows to one resource; empty For lists across the namespace (currently implemented as "all recent events" — the EventLog has no namespace-wide indexed view yet, so we fall back to the global Seq cursor and filter by namespace in process). Limit defaults to 20 when zero.
type ExecService ¶
type ExecService struct {
generated.UnimplementedExecServiceServer
// contains filtered or unexported fields
}
ExecService implements the gRPC ExecService.
func NewExecService ¶
func NewExecService(logger log.Logger, orchestrator orchestrator.Orchestrator) *ExecService
NewExecService creates a new ExecService with the given runners, store, and logger.
func (*ExecService) StreamExec ¶
func (s *ExecService) StreamExec(stream generated.ExecService_StreamExecServer) error
StreamExec provides bidirectional streaming for exec operations.
type HealthService ¶
type HealthService struct {
generated.UnimplementedHealthServiceServer
// contains filtered or unexported fields
}
HealthService implements the gRPC HealthService.
func NewHealthService ¶
func NewHealthService(store store.Store, runners RunnerHealthReporter, logger log.Logger) *HealthService
NewHealthService creates a new HealthService. runners may be nil (the "runner" component then reports nothing rather than failing).
func (*HealthService) DetectAndSetCapacity ¶
func (s *HealthService) DetectAndSetCapacity()
DetectAndSetCapacity runs capacity detection and caches the result in the service.
func (*HealthService) GetHealth ¶
func (s *HealthService) GetHealth(ctx context.Context, req *generated.GetHealthRequest) (*generated.GetHealthResponse, error)
GetHealth retrieves health status of platform components.
func (*HealthService) GetServerVersion ¶
func (s *HealthService) GetServerVersion(_ context.Context, _ *generated.GetServerVersionRequest) (*generated.GetServerVersionResponse, error)
GetServerVersion returns build/version metadata for the running server binary. Intentionally cheap and unauthenticated so `rune version` can report it before the user has logged in.
func (*HealthService) SetCapacity ¶
func (s *HealthService) SetCapacity(cpuCores float64, memBytes int64)
SetCapacity allows the API server to inject cached node capacity for reporting.
type InstanceService ¶
type InstanceService struct {
generated.UnimplementedInstanceServiceServer
// contains filtered or unexported fields
}
InstanceService implements the gRPC InstanceService.
func NewInstanceService ¶
func NewInstanceService(store store.Store, runnerManager manager.IRunnerManager, logger log.Logger) *InstanceService
NewInstanceService creates a new InstanceService with the given store, runners, and logger.
func (*InstanceService) GetInstance ¶
func (s *InstanceService) GetInstance(ctx context.Context, req *generated.GetInstanceRequest) (*generated.InstanceResponse, error)
GetInstance retrieves an instance by ID.
func (*InstanceService) ListInstances ¶
func (s *InstanceService) ListInstances(ctx context.Context, req *generated.ListInstancesRequest) (*generated.ListInstancesResponse, error)
ListInstances lists instances with optional filtering.
func (*InstanceService) ProtoInstanceToInstanceModel ¶
func (s *InstanceService) ProtoInstanceToInstanceModel(protoInstance *generated.Instance) (*types.Instance, error)
ProtoInstanceToInstanceModel converts a protobuf message to a domain model instance.
func (*InstanceService) RestartInstance ¶
func (s *InstanceService) RestartInstance(ctx context.Context, req *generated.InstanceActionRequest) (*generated.InstanceResponse, error)
RestartInstance restarts an instance.
func (*InstanceService) StartInstance ¶
func (s *InstanceService) StartInstance(ctx context.Context, req *generated.InstanceActionRequest) (*generated.InstanceResponse, error)
StartInstance starts an instance.
func (*InstanceService) StopInstance ¶
func (s *InstanceService) StopInstance(ctx context.Context, req *generated.InstanceActionRequest) (*generated.InstanceResponse, error)
StopInstance stops an instance.
type LogService ¶
type LogService struct {
generated.UnimplementedLogServiceServer
// contains filtered or unexported fields
}
LogService implements the gRPC LogService.
func NewLogService ¶
func NewLogService(store store.Store, logger log.Logger, orchestrator orchestrator.Orchestrator) *LogService
NewLogService creates a new LogService with the given runners, store, and logger.
func (*LogService) GetLogs ¶
func (s *LogService) GetLogs(req *generated.LogRequest, stream generated.LogService_GetLogsServer) error
GetLogs is the server-streaming (browser-callable) equivalent of StreamLogs: one LogRequest in, a stream of LogResponses out. connect-web / gRPC-Web support server-streaming, so this is the path the dashboard uses for both history (follow=false) and live tail (follow=true). See RUNE-200C.
func (*LogService) StreamLogs ¶
func (s *LogService) StreamLogs(stream generated.LogService_StreamLogsServer) error
StreamLogs provides bidirectional streaming for logs (CLI path). The client sends an initial LogRequest; the server streams log content back. The bidi shape exists for historical reasons (mid-stream parameter updates) but only the initial request is read — see serveLogs.
Browser clients cannot call bidi RPCs; they use GetLogs instead (RUNE-200C).
type MockExecServiceStream ¶
type MockExecServiceStream struct {
mock.Mock
grpc.ServerStream
// contains filtered or unexported fields
}
MockExecServiceStream is a mock implementation of the generated.ExecService_StreamExecServer interface
func NewMockExecServiceStream ¶
func NewMockExecServiceStream(ctx context.Context) *MockExecServiceStream
NewMockExecServiceStream creates a new MockExecServiceStream with the given context
func (*MockExecServiceStream) Context ¶
func (m *MockExecServiceStream) Context() context.Context
Context returns the context
func (*MockExecServiceStream) Recv ¶
func (m *MockExecServiceStream) Recv() (*generated.ExecRequest, error)
Recv mocks the Recv method
func (*MockExecServiceStream) Send ¶
func (m *MockExecServiceStream) Send(resp *generated.ExecResponse) error
Send mocks the Send method
type NamespaceService ¶
type NamespaceService struct {
generated.UnimplementedNamespaceServiceServer
// contains filtered or unexported fields
}
NamespaceService implements the gRPC NamespaceService.
func NewNamespaceService ¶
func NewNamespaceService(store store.Store, logger log.Logger) *NamespaceService
NewNamespaceService creates a new NamespaceService with the given store and logger.
func (*NamespaceService) CreateNamespace ¶
func (s *NamespaceService) CreateNamespace(ctx context.Context, req *generated.CreateNamespaceRequest) (*generated.CreateNamespaceResponse, error)
CreateNamespace creates a new namespace.
func (*NamespaceService) DeleteNamespace ¶
func (s *NamespaceService) DeleteNamespace(ctx context.Context, req *generated.DeleteNamespaceRequest) (*generated.DeleteNamespaceResponse, error)
DeleteNamespace removes a namespace.
func (*NamespaceService) GetNamespace ¶
func (s *NamespaceService) GetNamespace(ctx context.Context, req *generated.GetNamespaceRequest) (*generated.GetNamespaceResponse, error)
GetNamespace retrieves a namespace by name.
func (*NamespaceService) ListNamespaces ¶
func (s *NamespaceService) ListNamespaces(ctx context.Context, req *generated.ListNamespacesRequest) (*generated.ListNamespacesResponse, error)
ListNamespaces lists namespaces with optional filtering.
func (*NamespaceService) WatchNamespaces ¶
func (s *NamespaceService) WatchNamespaces(req *generated.WatchNamespacesRequest, stream generated.NamespaceService_WatchNamespacesServer) error
WatchNamespaces watches namespaces for changes.
type NetworkStatusProvider ¶
type NetworkStatusProvider interface {
Status() (cn types.ClusterNetwork, pendingReleases int)
}
NetworkStatusProvider is the minimal surface AdminService needs to answer NetworkStatus RPCs. The vip allocator implements it. The indirection keeps AdminService independent of the networking package so existing admin tests don't grow a transitive dep.
type ObserveService ¶
type ObserveService struct {
generated.UnimplementedObserveServiceServer
// contains filtered or unexported fields
}
ObserveService implements the gRPC ObserveService: the native observability (RuneSight) query + ingest seam (plan §4.4). It parses the LogQL subset into the observe.Query AST, runs it against the configured LogStore, and reports Capabilities so the dashboard can feature-flag Advanced-tier widgets.
It also backs the control-plane ingest path: the agent forwarder calls Ingest in-process on single-node, or PushLogs over gRPC on multi-node. Both funnel into LogStore.Write.
When observability is disabled (no store wired), the service is constructed with a nil store; Execute/PushLogs return FailedPrecondition and GetCapabilities reports enabled=false so clients can fall back to the live ephemeral log stream.
func NewObserveService ¶
func NewObserveService(store observe.LogStore, views *repos.SavedViewRepo, logger log.Logger) *ObserveService
NewObserveService constructs the service. A nil store means observability is disabled; the service still registers so clients get a clean "observability disabled" signal rather than an unimplemented method. views persists saved Log Explorer queries; nil disables the saved-view RPCs the same way.
func (*ObserveService) DeleteAlertRule ¶
func (s *ObserveService) DeleteAlertRule(ctx context.Context, req *generated.DeleteAlertRuleRequest) (*generated.DeleteAlertRuleResponse, error)
DeleteAlertRule removes a rule by name.
func (*ObserveService) DeleteChannel ¶
func (s *ObserveService) DeleteChannel(ctx context.Context, req *generated.DeleteChannelRequest) (*generated.DeleteChannelResponse, error)
DeleteChannel removes a channel by name.
func (*ObserveService) DeleteSavedView ¶
func (s *ObserveService) DeleteSavedView(ctx context.Context, req *generated.DeleteSavedViewRequest) (*generated.DeleteSavedViewResponse, error)
DeleteSavedView removes a view by name.
func (*ObserveService) Enabled ¶
func (s *ObserveService) Enabled() bool
Enabled reports whether a backend store is wired.
func (*ObserveService) Execute ¶
func (s *ObserveService) Execute(req *generated.ObserveQuery, stream generated.ObserveService_ExecuteServer) error
Execute parses the LogQL subset, runs it, and server-streams results.
func (*ObserveService) GetCapabilities ¶
func (s *ObserveService) GetCapabilities(ctx context.Context, _ *generated.CapabilitiesRequest) (*generated.ObserveCapabilities, error)
GetCapabilities reports the backend handshake. When disabled, enabled=false.
func (*ObserveService) GetObserveStats ¶
func (s *ObserveService) GetObserveStats(ctx context.Context, _ *generated.ObserveStatsRequest) (*generated.ObserveStats, error)
GetObserveStats reports store-level facts for the Sources page. Stores that don't own their storage (loki/clickhouse) report supported=false — the dashboard shows "managed by the backend" for the disk cards and still renders the query-derived volume/coverage panels.
func (*ObserveService) Ingest ¶
Ingest is the in-process ingest path (single-node). The agent forwarder calls it directly with already-enriched records, bypassing the gRPC envelope. It is a no-op when observability is disabled.
func (*ObserveService) ListAlertRules ¶
func (s *ObserveService) ListAlertRules(ctx context.Context, _ *generated.ListAlertRulesRequest) (*generated.ListAlertRulesResponse, error)
ListAlertRules returns every rule plus the alerter's live statuses.
func (*ObserveService) ListChannels ¶
func (s *ObserveService) ListChannels(ctx context.Context, _ *generated.ListChannelsRequest) (*generated.ListChannelsResponse, error)
ListChannels returns every notification channel.
func (*ObserveService) ListSavedViews ¶
func (s *ObserveService) ListSavedViews(ctx context.Context, _ *generated.ListSavedViewsRequest) (*generated.ListSavedViewsResponse, error)
ListSavedViews returns every saved view, pinned first then newest-updated.
func (*ObserveService) PushLogs ¶
func (s *ObserveService) PushLogs(ctx context.Context, req *generated.PushLogsRequest) (*generated.PushLogsResponse, error)
PushLogs is the multi-node ingest RPC. Remote agents call it; it validates and writes the batch via LogStore.Write.
func (*ObserveService) SaveAlertRule ¶
func (s *ObserveService) SaveAlertRule(ctx context.Context, req *generated.SaveAlertRuleRequest) (*generated.SaveAlertRuleResponse, error)
SaveAlertRule upserts a rule by name. The LogQL is parsed (and must be a plain log query — the alerter adds the aggregation) before persisting.
func (*ObserveService) SaveChannel ¶
func (s *ObserveService) SaveChannel(ctx context.Context, req *generated.SaveChannelRequest) (*generated.SaveChannelResponse, error)
SaveChannel upserts a channel by name.
func (*ObserveService) SaveView ¶
func (s *ObserveService) SaveView(ctx context.Context, req *generated.SaveViewRequest) (*generated.SaveViewResponse, error)
SaveView upserts a view by name. The LogQL is parsed before persisting so a saved view can never hold an unparseable query.
func (*ObserveService) SetAlerting ¶
func (s *ObserveService) SetAlerting(rules *repos.AlertRuleRepo, channels *repos.ChannelRepo, alerter *alerting.Alerter)
SetAlerting wires the alerting backends: rule + channel persistence and the live alerter (for statuses). Any nil disables the corresponding RPCs with FailedPrecondition.
type PortForwardService ¶
type PortForwardService struct {
generated.UnimplementedPortForwardServiceServer
// contains filtered or unexported fields
}
PortForwardService implements the gRPC PortForwardService (RUNE-122).
One gRPC stream per `rune port-forward` invocation. The client multiplexes any number of accepted local connections over the stream using a per-connection conn_id; the server holds one net.Conn per conn_id, fanning bytes through.
func NewPortForwardService ¶
func NewPortForwardService(logger log.Logger, orch orchestrator.Orchestrator, controlPlaneAddr string) *PortForwardService
NewPortForwardService constructs a PortForwardService. controlPlaneAddr is the loopback address of runed's HTTP/dashboard listener (e.g. "127.0.0.1:7861"), or "" if the HTTP server is not enabled.
func (*PortForwardService) StreamPortForward ¶
func (s *PortForwardService) StreamPortForward(stream generated.PortForwardService_StreamPortForwardServer) error
StreamPortForward is the single bidi RPC implementing the service.
type ReleaseService ¶
type ReleaseService struct {
generated.UnimplementedReleaseServiceServer
// contains filtered or unexported fields
}
ReleaseService implements the gRPC ReleaseService for stateful runeset releases (RUNESET_STATEFUL_RELEASES.md). Write/diff verbs (Cast, Plan, DeleteRelease, Rollback) flow through the releasectl.Controller, which runs the server-side 3-way reconcile (C1) against the orchestrator + store. Read verbs (List, Get, History) read directly from the ReleaseRepo.
RBAC verb: resource "releases" with verbs derived per method in pkg/api/server/utils.go (create/list/get/delete/update).
func NewReleaseService ¶
func NewReleaseService(ctl *releasectl.Controller, coreStore store.Store, logger log.Logger) *ReleaseService
NewReleaseService builds the service from a constructed controller and store.
func (*ReleaseService) Cast ¶
func (s *ReleaseService) Cast(ctx context.Context, req *generated.CastRequest) (*generated.CastResponse, error)
Cast creates or upgrades a release via server-side reconcile.
func (*ReleaseService) DeleteRelease ¶
func (s *ReleaseService) DeleteRelease(ctx context.Context, req *generated.DeleteReleaseRequest) (*generated.Status, error)
DeleteRelease uninstalls a release (soft by default, --purge to forget — D4).
func (*ReleaseService) GetRelease ¶
func (s *ReleaseService) GetRelease(ctx context.Context, req *generated.GetReleaseRequest) (*generated.ReleaseResponse, error)
GetRelease returns a single release record.
func (*ReleaseService) History ¶
func (s *ReleaseService) History(ctx context.Context, req *generated.HistoryRequest) (*generated.HistoryResponse, error)
History returns the revision log of a release, newest first.
func (*ReleaseService) ListReleases ¶
func (s *ReleaseService) ListReleases(ctx context.Context, req *generated.ListReleasesRequest) (*generated.ListReleasesResponse, error)
ListReleases returns releases, optionally across all namespaces.
func (*ReleaseService) Plan ¶
func (s *ReleaseService) Plan(ctx context.Context, req *generated.PlanRequest) (*generated.PlanResponse, error)
Plan computes the reconcile plan without applying (dry-run / diff).
func (*ReleaseService) Rollback ¶
func (s *ReleaseService) Rollback(ctx context.Context, req *generated.RollbackReleaseRequest) (*generated.ReleaseResponse, error)
Rollback rolls a release forward to a prior revision.
Rollback is driven CLIENT-SIDE (see pkg/cli/cmd/cast_rollback.go): because rendering is client-side (C1), the CLI re-materializes the historical revision's reproducible source, re-renders it with the stored values, and casts it forward through the normal Cast RPC. The server therefore does not re-render here; this RPC remains Unimplemented as a deliberate signal that rollback orchestration lives in the client, not the server.
type ResourceTarget ¶
type ResourceTarget struct {
Type types.ResourceType
Resource interface{}
}
func (ResourceTarget) GetInstance ¶
func (r ResourceTarget) GetInstance() (*types.Instance, error)
func (ResourceTarget) GetService ¶
func (r ResourceTarget) GetService() (*types.Service, error)
type RunnerHealthReporter ¶
RunnerHealthReporter reports per-runner readiness ("ready" or "unreachable: <reason>"). Satisfied by *manager.RunnerManager; kept as a local interface so the health service doesn't depend on the manager package (and stays nil-safe when no manager is wired, e.g. in tests).
type SecretService ¶
type SecretService struct {
generated.UnimplementedSecretServiceServer
// contains filtered or unexported fields
}
SecretService implements the gRPC SecretService.
As of dev.33, the read-side surface is split:
- GetSecret / ListSecrets return metadata only (no plaintext payload). They populate Secret.data_keys instead of data.
- RevealSecret returns the plaintext payload and requires the secrets:reveal RBAC verb.
Every Create / Update / Delete / Reveal / Get call emits an AuditEvent so that operators have a queryable trail separate from the structured app log.
func NewSecretService ¶
func NewSecretService(coreStore store.Store, logger log.Logger) *SecretService
func (*SecretService) CreateSecret ¶
func (s *SecretService) CreateSecret(ctx context.Context, req *generated.CreateSecretRequest) (*generated.SecretResponse, error)
func (*SecretService) DeleteSecret ¶
func (s *SecretService) DeleteSecret(ctx context.Context, req *generated.DeleteSecretRequest) (*generated.Status, error)
func (*SecretService) GetSecret ¶
func (s *SecretService) GetSecret(ctx context.Context, req *generated.GetSecretRequest) (*generated.SecretResponse, error)
func (*SecretService) ListSecretVersions ¶
func (s *SecretService) ListSecretVersions(ctx context.Context, req *generated.ListSecretVersionsRequest) (*generated.ListSecretVersionsResponse, error)
ListSecretVersions returns metadata for every historical version of a secret, newest first. Plaintext data is stripped; data_keys is populated. Use RevealSecretVersion to fetch the payload of a specific version.
func (*SecretService) ListSecrets ¶
func (s *SecretService) ListSecrets(ctx context.Context, req *generated.ListSecretsRequest) (*generated.ListSecretsResponse, error)
func (*SecretService) PatchSecret ¶
func (s *SecretService) PatchSecret(ctx context.Context, req *generated.PatchSecretRequest) (*generated.SecretResponse, error)
PatchSecret applies a key-scoped merge to an existing secret: `set` entries upsert, `unset` keys are removed. Runs under a per-secret lock so concurrent patches don't clobber each other. The response carries metadata only — no plaintext — so callers don't need secrets:reveal to rotate a single key.
Idempotency:
- If neither set nor unset is provided, returns InvalidArgument.
- unset keys that don't exist are silently ignored.
- If the merge produces a map identical to the current head, no new version is written and no audit event is emitted (matches UpdateSecret's unchanged-short-circuit behaviour).
Audit:
- On success, action="patch" with metadata listing the key names that were set/unset and the resulting keyCount/version. Values are never logged.
func (*SecretService) RevealSecret ¶
func (s *SecretService) RevealSecret(ctx context.Context, req *generated.RevealSecretRequest) (*generated.SecretResponse, error)
RevealSecret returns the plaintext payload of a single secret. It is rate limited identically to GetSecret and emits a `reveal` audit event on every call (success or denial).
func (*SecretService) RevealSecretVersion ¶
func (s *SecretService) RevealSecretVersion(ctx context.Context, req *generated.RevealSecretVersionRequest) (*generated.SecretResponse, error)
RevealSecretVersion returns the plaintext payload of a specific historical version of a secret. Gated by secrets:reveal.
func (*SecretService) RollbackSecret ¶
func (s *SecretService) RollbackSecret(ctx context.Context, req *generated.RollbackSecretRequest) (*generated.SecretResponse, error)
RollbackSecret rewrites HEAD to the contents of the given prior version, producing a new HEAD version. Old versions are retained in history. Gated by secrets:update; emits a `rollback` audit event whose metadata records fromVersion (previous head), toVersion (rollback target), and newVersion (the freshly written head).
func (*SecretService) UpdateSecret ¶
func (s *SecretService) UpdateSecret(ctx context.Context, req *generated.UpdateSecretRequest) (*generated.SecretResponse, error)
type ServiceService ¶
type ServiceService struct {
generated.UnimplementedServiceServiceServer
// contains filtered or unexported fields
}
ServiceService implements the gRPC ServiceService.
func NewServiceService ¶
func NewServiceService(store store.Store, orchestrator orchestrator.Orchestrator, runnerManager *manager.RunnerManager, logger log.Logger) *ServiceService
NewServiceService creates a new ServiceService with the given orchestrator and logger.
func (*ServiceService) CreateService ¶
func (s *ServiceService) CreateService(ctx context.Context, req *generated.CreateServiceRequest) (*generated.ServiceResponse, error)
CreateService creates a new service.
func (*ServiceService) DeleteService ¶
func (s *ServiceService) DeleteService(ctx context.Context, req *generated.DeleteServiceRequest) (*generated.DeleteServiceResponse, error)
DeleteService removes a service.
func (*ServiceService) GetDeletionStatus ¶
func (s *ServiceService) GetDeletionStatus(ctx context.Context, req *generated.GetDeletionStatusRequest) (*generated.GetDeletionStatusResponse, error)
GetDeletionStatus gets the status of a deletion operation.
func (*ServiceService) GetService ¶
func (s *ServiceService) GetService(ctx context.Context, req *generated.GetServiceRequest) (*generated.ServiceResponse, error)
GetService retrieves a service by name.
func (*ServiceService) ListDeletionOperations ¶
func (s *ServiceService) ListDeletionOperations(ctx context.Context, req *generated.ListDeletionOperationsRequest) (*generated.ListDeletionOperationsResponse, error)
ListDeletionOperations lists deletion operations with optional filtering.
func (*ServiceService) ListServices ¶
func (s *ServiceService) ListServices(ctx context.Context, req *generated.ListServicesRequest) (*generated.ListServicesResponse, error)
ListServices lists services with optional filtering.
func (*ServiceService) RestartService ¶
func (s *ServiceService) RestartService(ctx context.Context, req *generated.RestartServiceRequest) (*generated.RestartServiceResponse, error)
RestartService restarts a service in place (issue #140): one atomic template restamp on the server makes the reconciler replace every instance at the current spec, without the desired scale ever dipping through zero. The response carries the stamped template generation — instances created for this restart record a generation >= it, which is what clients wait on.
func (*ServiceService) ScaleService ¶
func (s *ServiceService) ScaleService(ctx context.Context, req *generated.ScaleServiceRequest) (*generated.ServiceResponse, error)
ScaleService changes the scale of a service.
func (*ServiceService) SetVIPAllocator ¶
func (s *ServiceService) SetVIPAllocator(a VIPAllocator)
SetVIPAllocator wires in the cluster VIP allocator. Calling this is optional; when unset, services are created without a VIP (matching pre-RUNE-040 behavior). runed wires the live allocator in main.go.
func (*ServiceService) UpdateService ¶
func (s *ServiceService) UpdateService(ctx context.Context, req *generated.UpdateServiceRequest) (*generated.ServiceResponse, error)
UpdateService updates an existing service.
func (*ServiceService) WatchScaling ¶
func (s *ServiceService) WatchScaling(req *generated.WatchScalingRequest, stream generated.ServiceService_WatchScalingServer) error
WatchScaling watches a service for scaling status changes and streams updates to the client.
func (*ServiceService) WatchServices ¶
func (s *ServiceService) WatchServices(req *generated.WatchServicesRequest, stream generated.ServiceService_WatchServicesServer) error
WatchServices watches services for changes.
type SnapshotService ¶
type SnapshotService struct {
generated.UnimplementedSnapshotServiceServer
// contains filtered or unexported fields
}
SnapshotService implements generated.SnapshotServiceServer.
func NewSnapshotService ¶
func NewSnapshotService(st store.Store, logger log.Logger, opts ...SnapshotServiceOption) *SnapshotService
NewSnapshotService constructs a SnapshotService.
func (*SnapshotService) CreateSnapshot ¶
func (s *SnapshotService) CreateSnapshot(ctx context.Context, req *generated.CreateSnapshotRequest) (*generated.SnapshotResponse, error)
func (*SnapshotService) DeleteSnapshot ¶
func (s *SnapshotService) DeleteSnapshot(ctx context.Context, req *generated.DeleteSnapshotRequest) (*generated.Status, error)
func (*SnapshotService) GetSnapshot ¶
func (s *SnapshotService) GetSnapshot(ctx context.Context, req *generated.GetSnapshotRequest) (*generated.SnapshotResponse, error)
func (*SnapshotService) ListSnapshots ¶
func (s *SnapshotService) ListSnapshots(ctx context.Context, req *generated.ListSnapshotsRequest) (*generated.ListSnapshotsResponse, error)
func (*SnapshotService) RestoreVolume ¶
func (s *SnapshotService) RestoreVolume(ctx context.Context, req *generated.RestoreVolumeRequest) (*generated.VolumeResponse, error)
RestoreVolume provisions a new Volume from this Snapshot. The new Volume starts in Pending with a Parameters["rune.io/restoreFromSnapshot"] stamp; the VolumeController routes that to Driver.RestoreFromSnapshot instead of Driver.Provision on first reconcile.
type SnapshotServiceOption ¶
type SnapshotServiceOption func(*SnapshotService)
SnapshotServiceOption configures optional SnapshotService behaviour.
func WithSnapshotDriverConfigs ¶
func WithSnapshotDriverConfigs(cfg map[string]map[string]any) SnapshotServiceOption
WithSnapshotDriverConfigs supplies the runefile [storage.drivers] map so the service can perform driver-capability lint at the write path (reject CreateSnapshot when the source volume's driver does not declare Capabilities.Snapshots).
type StorageClassService ¶
type StorageClassService struct {
generated.UnimplementedStorageClassServiceServer
// contains filtered or unexported fields
}
StorageClassService implements generated.StorageClassServiceServer. StorageClass is cluster-scoped (no namespace).
The service enforces the at-most-one-Default invariant on the API write path: when a Create or Update lands a class with Default=true, the handler atomically demotes any other class that currently has Default=true (writes go through the repo with EventSourceAPI so the VolumeController's watch-side enforcer treats them as external and skips its own re-demote pass). The orchestrator-side enforcer in pkg/orchestrator/controllers/volume_controller.go remains as belt-and-braces for clusters whose StorageClass rows pre-date this API check.
func NewStorageClassService ¶
func NewStorageClassService(st store.Store, logger log.Logger) *StorageClassService
NewStorageClassService constructs a StorageClassService.
func (*StorageClassService) CreateStorageClass ¶
func (s *StorageClassService) CreateStorageClass(ctx context.Context, req *generated.CreateStorageClassRequest) (*generated.StorageClassResponse, error)
func (*StorageClassService) DeleteStorageClass ¶
func (s *StorageClassService) DeleteStorageClass(ctx context.Context, req *generated.DeleteStorageClassRequest) (*generated.Status, error)
func (*StorageClassService) GetStorageClass ¶
func (s *StorageClassService) GetStorageClass(ctx context.Context, req *generated.GetStorageClassRequest) (*generated.StorageClassResponse, error)
func (*StorageClassService) ListStorageClasses ¶
func (s *StorageClassService) ListStorageClasses(ctx context.Context, req *generated.ListStorageClassesRequest) (*generated.ListStorageClassesResponse, error)
func (*StorageClassService) UpdateStorageClass ¶
func (s *StorageClassService) UpdateStorageClass(ctx context.Context, req *generated.UpdateStorageClassRequest) (*generated.StorageClassResponse, error)
type VIPAllocator ¶
VIPAllocator is the minimal surface ServiceService needs to allocate a stable cluster VIP for each new service. Implemented by pkg/networking/vip.Allocator. The interface keeps service.go free of a dependency on the networking package and lets tests inject a fake.
type VolumeService ¶
type VolumeService struct {
generated.UnimplementedVolumeServiceServer
// contains filtered or unexported fields
}
VolumeService implements generated.VolumeServiceServer.
func NewVolumeService ¶
func NewVolumeService(st store.Store, logger log.Logger, opts ...VolumeServiceOption) *VolumeService
NewVolumeService constructs a VolumeService.
func (*VolumeService) CreateVolume ¶
func (s *VolumeService) CreateVolume(ctx context.Context, req *generated.CreateVolumeRequest) (*generated.VolumeResponse, error)
func (*VolumeService) DeleteVolume ¶
func (s *VolumeService) DeleteVolume(ctx context.Context, req *generated.DeleteVolumeRequest) (*generated.Status, error)
func (*VolumeService) DetachVolume ¶
func (s *VolumeService) DetachVolume(ctx context.Context, req *generated.DetachVolumeRequest) (*generated.VolumeResponse, error)
DetachVolume clears bind state on a volume so a replacement instance can attach it. Without force=true the volume must already be Released or have no BoundClaim (i.e. it's safe to clear). With force=true the caller assumes responsibility for any data-loss risk if the previous holder is still alive; bind state is cleared regardless of status and the volume is moved to Available.
func (*VolumeService) GetVolume ¶
func (s *VolumeService) GetVolume(ctx context.Context, req *generated.GetVolumeRequest) (*generated.VolumeResponse, error)
func (*VolumeService) ListVolumes ¶
func (s *VolumeService) ListVolumes(ctx context.Context, req *generated.ListVolumesRequest) (*generated.ListVolumesResponse, error)
func (*VolumeService) RetryProvisionVolume ¶
func (s *VolumeService) RetryProvisionVolume(ctx context.Context, req *generated.RetryProvisionVolumeRequest) (*generated.VolumeResponse, error)
RetryProvisionVolume resets a Failed/Stalled volume back to Pending so the controller will attempt provisioning again. Volumes already in any other state are rejected with FailedPrecondition.
func (*VolumeService) UpdateVolume ¶
func (s *VolumeService) UpdateVolume(ctx context.Context, req *generated.UpdateVolumeRequest) (*generated.VolumeResponse, error)
type VolumeServiceOption ¶
type VolumeServiceOption func(*VolumeService)
VolumeServiceOption configures optional VolumeService behaviour.
func WithDriverConfigs ¶
func WithDriverConfigs(cfg map[string]map[string]any) VolumeServiceOption
WithDriverConfigs supplies the runefile [storage.drivers] map so the service can perform driver-capability lint at the write path (e.g. reject Volumes whose AccessMode is not in the driver's Capabilities.AccessModes, or whose local-host hostPath is outside the runefile allowlist). Optional — when omitted, driver-capability lint is skipped and the controller surfaces capability errors at provision time instead.
Source Files
¶
- admin.go
- audit.go
- auth.go
- auth_context.go
- auth_enroll.go
- configmap.go
- describe.go
- event.go
- exec.go
- health.go
- instance.go
- logs.go
- mocks.go
- namespace.go
- observe.go
- observe_alerting.go
- observe_stats.go
- portforward.go
- release.go
- secret.go
- service.go
- snapshot.go
- storageclass.go
- usage.go
- utils.go
- volume.go
- volume_lint.go
- volume_usage.go