Documentation
¶
Index ¶
- type AWSClient
- type AWSFactory
- type AWSOptions
- type ActualAWSFactory
- type Binding
- type DemoPolicyDetails
- type DemoPolicyRequest
- type KubeClient
- type Kubectl
- func (k Kubectl) AnnotateServiceAccount(ctx context.Context, namespace, name string, annotations map[string]string) error
- func (k Kubectl) Apply(ctx context.Context, manifest string) error
- func (k Kubectl) CheckCertManager(ctx context.Context) error
- func (k Kubectl) CheckServiceAccountPermissions(ctx context.Context, namespace, name string, verbs []string, resource string) error
- func (k Kubectl) CheckWebhookMutation(ctx context.Context, accountID, region string) error
- func (k Kubectl) CreateServiceAccount(ctx context.Context, namespace, name string) error
- func (k Kubectl) CreateToken(ctx context.Context, namespace, name, audience, duration string) (string, error)
- func (k Kubectl) DeletePod(ctx context.Context, namespace, name string) error
- func (k Kubectl) PodExists(ctx context.Context, namespace, name string) (bool, error)
- func (k Kubectl) Raw(ctx context.Context, path string) ([]byte, error)
- func (k Kubectl) RemoveServiceAccountAnnotations(ctx context.Context, namespace, name string, annotations []string) error
- func (k Kubectl) RunDemoPod(ctx context.Context, namespace, name, serviceAccount, region, roleName string) ([]byte, error)
- func (k Kubectl) ServiceAccountExists(ctx context.Context, namespace, name string) (bool, error)
- func (k Kubectl) ServiceAccountRoleARN(ctx context.Context, namespace, name string) (string, error)
- func (k Kubectl) WaitDeploymentAvailable(ctx context.Context, namespace, name, timeout string) error
- type Progress
- type Runner
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSClient ¶
type AWSClient interface {
Region() string
AccountID(context.Context) (string, error)
EnsureIssuer(context.Context, State, []byte, []byte) error
CheckIssuerObjects(context.Context, State, []byte, []byte) error
EnsureOIDCProvider(context.Context, State) (string, error)
CheckOIDCProvider(context.Context, State) error
EnsureRole(context.Context, State, Binding) (string, error)
EnsureDemoPolicy(context.Context, State, DemoPolicyRequest) (DemoPolicyDetails, error)
AssumeRoleWithWebIdentity(context.Context, string, string, int32) (string, error)
DeleteDemoPolicy(context.Context, State, DemoPolicyRequest) (bool, error)
CleanupRole(context.Context, State, Binding) (bool, error)
CleanupProvider(context.Context, State) (bool, error)
CleanupIssuer(context.Context, State, bool) (bool, error)
}
type AWSFactory ¶
type AWSFactory interface {
New(context.Context, AWSOptions) (AWSClient, error)
}
type AWSOptions ¶
type ActualAWSFactory ¶
type ActualAWSFactory struct{}
func (ActualAWSFactory) New ¶
func (ActualAWSFactory) New(ctx context.Context, opts AWSOptions) (AWSClient, error)
type DemoPolicyDetails ¶
type DemoPolicyRequest ¶
type KubeClient ¶
type KubeClient interface {
Raw(context.Context, string) ([]byte, error)
CheckCertManager(context.Context) error
Apply(context.Context, string) error
WaitDeploymentAvailable(context.Context, string, string, string) error
CheckServiceAccountPermissions(context.Context, string, string, []string, string) error
CheckWebhookMutation(context.Context, string, string) error
ServiceAccountExists(context.Context, string, string) (bool, error)
CreateServiceAccount(context.Context, string, string) error
AnnotateServiceAccount(context.Context, string, string, map[string]string) error
RemoveServiceAccountAnnotations(context.Context, string, string, []string) error
ServiceAccountRoleARN(context.Context, string, string) (string, error)
CreateToken(context.Context, string, string, string, string) (string, error)
PodExists(context.Context, string, string) (bool, error)
RunDemoPod(context.Context, string, string, string, string, string) ([]byte, error)
DeletePod(context.Context, string, string) error
}
type Kubectl ¶
type Kubectl struct {
ContextName string
}
func (Kubectl) AnnotateServiceAccount ¶
func (Kubectl) CheckServiceAccountPermissions ¶
func (Kubectl) CheckWebhookMutation ¶
func (Kubectl) CreateServiceAccount ¶
func (Kubectl) CreateToken ¶
func (Kubectl) RemoveServiceAccountAnnotations ¶
func (Kubectl) RunDemoPod ¶
func (Kubectl) ServiceAccountExists ¶
func (Kubectl) ServiceAccountRoleARN ¶
type Runner ¶
type Runner struct {
AWSFactory AWSFactory
KubectlFactory func(contextName string) KubeClient
IssuerIDGenerator func() (string, error)
Env func(string) string
HomeDir func() (string, error)
}
type State ¶
type State struct {
Name string `json:"name"`
Region string `json:"region"`
IssuerID string `json:"issuerID,omitempty"`
Bucket string `json:"bucket"`
IssuerURL string `json:"issuerURL"`
AccountID string `json:"accountID"`
Profile string `json:"profile,omitempty"`
Bindings []Binding `json:"bindings,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.