Documentation ¶
Index ¶
- Variables
- func AddFinalizer(ctx context.Context, log logr.Logger, cluster *capi.Cluster, ...) error
- func RemoveFinalizer(ctx context.Context, log logr.Logger, cluster *capi.Cluster, ...) error
- type Client
- type Teleport
- func (t *Teleport) CreateConfigMap(ctx context.Context, log logr.Logger, ctrlClient client.Client, ...) error
- func (t *Teleport) CreateSecret(ctx context.Context, log logr.Logger, ctrlClient client.Client, ...) error
- func (t *Teleport) DeleteConfigMap(ctx context.Context, log logr.Logger, ctrlClient client.Client, ...) error
- func (t *Teleport) DeleteSecret(ctx context.Context, log logr.Logger, ctrlClient client.Client, ...) error
- func (t *Teleport) DeleteToken(ctx context.Context, log logr.Logger, registerName string) error
- func (t *Teleport) GenerateToken(ctx context.Context, registerName string, tokenType string) (string, error)
- func (t *Teleport) GetConfigMap(ctx context.Context, log logr.Logger, ctrlClient client.Client, ...) (*corev1.ConfigMap, error)
- func (t *Teleport) GetSecret(ctx context.Context, log logr.Logger, ctrlClient client.Client, ...) (*corev1.Secret, error)
- func (t *Teleport) GetTokenFromConfigMap(ctx context.Context, configMap *corev1.ConfigMap) (string, error)
- func (t *Teleport) GetTokenFromSecret(ctx context.Context, secret *corev1.Secret) (string, error)
- func (t *Teleport) IsTokenValid(ctx context.Context, registerName string, oldToken string, tokenType string) (bool, error)
- func (t *Teleport) UpdateConfigMap(ctx context.Context, log logr.Logger, ctrlClient client.Client, ...) error
- func (t *Teleport) UpdateSecret(ctx context.Context, log logr.Logger, ctrlClient client.Client, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var NewClient = func(ctx context.Context, proxyAddr, identityFile string) (Client, error) { teleportClient, err := tc.New(ctx, tc.Config{ Addrs: []string{ proxyAddr, }, Credentials: []tc.Credentials{ tc.LoadIdentityFileFromString(identityFile), }, }) if err != nil { return nil, microerror.Mask(err) } _, err = teleportClient.Ping(ctx) if err != nil { return nil, microerror.Mask(err) } return teleportClient, nil }
Functions ¶
func AddFinalizer ¶
Types ¶
type Client ¶
type Client interface { Ping(ctx context.Context) (proto.PingResponse, error) GetToken(ctx context.Context, name string) (types.ProvisionToken, error) GetTokens(ctx context.Context) ([]types.ProvisionToken, error) CreateToken(ctx context.Context, token types.ProvisionToken) error UpsertToken(ctx context.Context, token types.ProvisionToken) error DeleteToken(ctx context.Context, name string) error }
type Teleport ¶
type Teleport struct { Config *config.Config Identity *config.IdentityConfig TeleportClient Client Namespace string TokenGenerator token.Generator }
func (*Teleport) CreateConfigMap ¶
func (*Teleport) CreateSecret ¶
func (*Teleport) DeleteConfigMap ¶
func (*Teleport) DeleteSecret ¶
func (*Teleport) DeleteToken ¶
func (*Teleport) GenerateToken ¶
func (*Teleport) GetConfigMap ¶
func (*Teleport) GetTokenFromConfigMap ¶
func (*Teleport) GetTokenFromSecret ¶
func (*Teleport) IsTokenValid ¶
func (*Teleport) UpdateConfigMap ¶
Click to show internal directories.
Click to hide internal directories.