Documentation
¶
Index ¶
- Constants
- func NewKubeAuth(rootLogger *zap.Logger, config *rest.Config, opts KubeAuthOptions) (grpc_auth.AuthFunc, error)
- func RecordRequestLatency(ctx context.Context, code string, latency float64)
- func RecordRequestTotal(ctx context.Context, code string)
- type GRPC
- type KubeAuthOptions
- type Options
- type Server
- func (s *Server) AddEnvironments(ctx context.Context, in *pb.AddEnvironmentsRequest) (*pb.AddEnvironmentsResult, error)
- func (s *Server) Cancel()
- func (s *Server) Destroy(in *pb.DestroyRequest, srv pb.AutomationService_DestroyServer) error
- func (s *Server) Info(ctx context.Context, in *pb.InfoRequest) (*pb.InfoResult, error)
- func (s *Server) Install(ctx context.Context, in *pb.InstallRequest) (*pb.InstallResult, error)
- func (s *Server) Preview(in *pb.PreviewRequest, srv pb.AutomationService_PreviewServer) error
- func (s *Server) Refresh(in *pb.RefreshRequest, srv pb.AutomationService_RefreshServer) error
- func (s *Server) SelectStack(ctx context.Context, in *pb.SelectStackRequest) (*pb.SelectStackResult, error)
- func (s *Server) SetAllConfig(ctx context.Context, in *pb.SetAllConfigRequest) (*pb.SetAllConfigResult, error)
- func (s *Server) Up(in *pb.UpRequest, srv pb.AutomationService_UpServer) error
- func (s *Server) WhoAmI(ctx context.Context, in *pb.WhoAmIRequest) (*pb.WhoAmIResult, error)
Constants ¶
const (
ServiceAccountPermissionsErrorMessage = `` /* 455-byte string literal not displayed */
)
Variables ¶
This section is empty.
Functions ¶
func NewKubeAuth ¶
func NewKubeAuth(rootLogger *zap.Logger, config *rest.Config, opts KubeAuthOptions) (grpc_auth.AuthFunc, error)
NewKubeAuth provides a grpc_auth.AuthFunc for authentication and authorization. Requests will be authenticated (via TokenReviews) and authorized (via SubjectAccessReviews) with the kube-apiserver. For the authentication and authorization the agent needs a role with the following rules: * apiGroups: authentication.k8s.io, resources: tokenreviews, verbs: create * apiGroups: authorization.k8s.io, resources: subjectaccessreviews, verbs: create
To make RPC requests e.g. as the Operator the client needs a role with the following rule: * apiGroups: auto.pulumi.com, resources: workspaces/rpc, verbs: use
func RecordRequestLatency ¶
RecordRequestLatency measures request latency in seconds for the delegated authentication. Broken down by status code.
func RecordRequestTotal ¶
RecordRequestTotal increments the total number of requests for the delegated authentication.
Types ¶
type GRPC ¶
GRPC serves the automation service.
type KubeAuthOptions ¶
type KubeAuthOptions struct { Audiences []string WorkspaceName types.NamespacedName }
type Server ¶
type Server struct { pb.UnimplementedAutomationServiceServer // contains filtered or unexported fields }
func (*Server) AddEnvironments ¶ added in v2.1.0
func (s *Server) AddEnvironments(ctx context.Context, in *pb.AddEnvironmentsRequest) (*pb.AddEnvironmentsResult, error)
func (*Server) Cancel ¶
func (s *Server) Cancel()
Cancel attempts to send an interrupt to all of our outstanding Automation API subprocesses -- simulating a user's ctrl-C. This call is advisory and non-blocking; it is intended to be used alongside grpc.GracefulStop to allow outstanding handlers to return. If a handler needs to spawn multiple long-running Automation API subprocesses it should check whether the server is stopping before doing so.
func (*Server) Destroy ¶
func (s *Server) Destroy(in *pb.DestroyRequest, srv pb.AutomationService_DestroyServer) error
Destroy implements proto.AutomationServiceServer.
func (*Server) Info ¶
func (s *Server) Info(ctx context.Context, in *pb.InfoRequest) (*pb.InfoResult, error)
func (*Server) Install ¶
func (s *Server) Install(ctx context.Context, in *pb.InstallRequest) (*pb.InstallResult, error)
func (*Server) Preview ¶
func (s *Server) Preview(in *pb.PreviewRequest, srv pb.AutomationService_PreviewServer) error
Preview implements proto.AutomationServiceServer.
func (*Server) Refresh ¶
func (s *Server) Refresh(in *pb.RefreshRequest, srv pb.AutomationService_RefreshServer) error
Refresh implements proto.AutomationServiceServer.
func (*Server) SelectStack ¶
func (s *Server) SelectStack(ctx context.Context, in *pb.SelectStackRequest) (*pb.SelectStackResult, error)
func (*Server) SetAllConfig ¶
func (s *Server) SetAllConfig(ctx context.Context, in *pb.SetAllConfigRequest) (*pb.SetAllConfigResult, error)
func (*Server) WhoAmI ¶
func (s *Server) WhoAmI(ctx context.Context, in *pb.WhoAmIRequest) (*pb.WhoAmIResult, error)