Documentation ¶
Index ¶
- Constants
- Variables
- func NewDiscoverEC2UserTask(spec *usertasksv1.UserTaskSpec, opts ...UserTaskOption) (*usertasksv1.UserTask, error)
- func NewDiscoverEKSUserTask(spec *usertasksv1.UserTaskSpec, opts ...UserTaskOption) (*usertasksv1.UserTask, error)
- func NewDiscoverRDSUserTask(spec *usertasksv1.UserTaskSpec, opts ...UserTaskOption) (*usertasksv1.UserTask, error)
- func TaskNameForDiscoverEC2(parts TaskNameForDiscoverEC2Parts) string
- func TaskNameForDiscoverEKS(parts TaskNameForDiscoverEKSParts) string
- func TaskNameForDiscoverRDS(parts TaskNameForDiscoverRDSParts) string
- func ValidateUserTask(ut *usertasksv1.UserTask) error
- func WithExpiration(t time.Time) func(ut *usertasksv1.UserTask)
- type TaskNameForDiscoverEC2Parts
- type TaskNameForDiscoverEKSParts
- type TaskNameForDiscoverRDSParts
- type UserTaskOption
Constants ¶
const ( // TaskStateOpen identifies an issue with an instance that is not yet resolved. TaskStateOpen = "OPEN" // TaskStateResolved identifies an issue with an instance that is resolved. TaskStateResolved = "RESOLVED" )
const ( // TaskTypeDiscoverEC2 identifies a User Tasks that is created // when an auto-enrollment of an EC2 instance fails. // UserTasks that have this Task Type must include the DiscoverEC2 field. TaskTypeDiscoverEC2 = "discover-ec2" // TaskTypeDiscoverEKS identifies a User Tasks that is created // when an auto-enrollment of an EKS cluster fails. // UserTasks that have this Task Type must include the DiscoverEKS field. TaskTypeDiscoverEKS = "discover-eks" // TaskTypeDiscoverRDS identifies a User Tasks that is created // when an auto-enrollment of an RDS database fails or needs attention. // UserTasks that have this Task Type must include the DiscoverRDS field. TaskTypeDiscoverRDS = "discover-rds" )
const ( // AutoDiscoverEC2IssueSSMInstanceNotRegistered is used to identify instances that failed to auto-enroll // because they are not present in Amazon Systems Manager. // This usually means that the Instance does not have the SSM Agent running, // or that the instance's IAM Profile does not allow have the managed IAM Policy AmazonSSMManagedInstanceCore assigned to it. AutoDiscoverEC2IssueSSMInstanceNotRegistered = "ec2-ssm-agent-not-registered" // AutoDiscoverEC2IssueSSMInstanceConnectionLost is used to identify instances that failed to auto-enroll // because the agent lost connection to Amazon Systems Manager. // This can happen if the user changed some setting in the instance's network or IAM profile. AutoDiscoverEC2IssueSSMInstanceConnectionLost = "ec2-ssm-agent-connection-lost" // AutoDiscoverEC2IssueSSMInstanceUnsupportedOS is used to identify instances that failed to auto-enroll // because its OS is not supported by teleport. // This can happen if the instance is running Windows. AutoDiscoverEC2IssueSSMInstanceUnsupportedOS = "ec2-ssm-unsupported-os" // AutoDiscoverEC2IssueSSMScriptFailure is used to identify instances that failed to auto-enroll // because the installation script failed. // The invocation url must be included in the report, so that users can see what was wrong. AutoDiscoverEC2IssueSSMScriptFailure = "ec2-ssm-script-failure" // AutoDiscoverEC2IssueSSMInvocationFailure is used to identify instances that failed to auto-enroll // because the SSM Script Run (also known as Invocation) failed. // This happens when there's a failure with permissions or an invalid configuration (eg, invalid document name). AutoDiscoverEC2IssueSSMInvocationFailure = "ec2-ssm-invocation-failure" )
List of Auto Discover EC2 issues identifiers. This value is used to populate the UserTasks.Spec.IssueType for Discover EC2 tasks. The Web UI will then use those identifiers to show detailed instructions on how to fix the issue.
const ( // AutoDiscoverEKSIssueStatusNotActive is used to identify clusters that failed to auto-enroll // because their Status is not Active. AutoDiscoverEKSIssueStatusNotActive = "eks-status-not-active" // AutoDiscoverEKSIssueMissingEndpoingPublicAccess is used to identify clusters that failed to auto-enroll // because they don't have a public endpoint and this Teleport Cluster is running in Teleport Cloud. AutoDiscoverEKSIssueMissingEndpoingPublicAccess = "eks-missing-endpoint-public-access" // AutoDiscoverEKSIssueAuthenticationModeUnsupported is used to identify clusters that failed to auto-enroll // because their Authentication Mode is not supported. // Accepted values are API and API_AND_CONFIG_MAP. AutoDiscoverEKSIssueAuthenticationModeUnsupported = "eks-authentication-mode-unsupported" // AutoDiscoverEKSIssueClusterUnreachable is used to identify clusters that failed to auto-enroll // because Teleport Cluster is not able to reach the cluster's API. // Similar to AutoDiscoverEKSIssueMissingEndpoingPublicAccess, which is only used when Teleport is running in Teleport Cloud. AutoDiscoverEKSIssueClusterUnreachable = "eks-cluster-unreachable" // AutoDiscoverEKSIssueAgentNotConnecting is used to identify clusters that Teleport tried to // install the HELM chart but the Kube Agent is not connecting to Teleport. // This can be a transient issue (eg kube agent is in the process of joining), or some non-recoverable issue. // To get more information, users can follow the following link: // https://<region>.console.aws.amazon.com/eks/home?#/clusters/<cluster-name>/statefulsets/teleport-kube-agent?namespace=teleport-agent AutoDiscoverEKSIssueAgentNotConnecting = "eks-agent-not-connecting" )
List of Auto Discover EKS issues identifiers. This value is used to populate the UserTasks.Spec.IssueType for Discover EKS tasks.
const ( // AutoDiscoverRDSIssueIAMAuthenticationDisabled is used to identify databases that won't be // accessible because IAM Authentication is not enabled. AutoDiscoverRDSIssueIAMAuthenticationDisabled = "rds-iam-auth-disabled" )
List of Auto Discover RDS issues identifiers. This value is used to populate the UserTasks.Spec.IssueType for Discover RDS tasks.
Variables ¶
var DiscoverEC2IssueTypes = []string{ AutoDiscoverEC2IssueSSMInstanceNotRegistered, AutoDiscoverEC2IssueSSMInstanceConnectionLost, AutoDiscoverEC2IssueSSMInstanceUnsupportedOS, AutoDiscoverEC2IssueSSMScriptFailure, AutoDiscoverEC2IssueSSMInvocationFailure, }
DiscoverEC2IssueTypes is a list of issue types that can occur when trying to auto enroll EC2 instances.
var DiscoverEKSIssueTypes = []string{ AutoDiscoverEKSIssueStatusNotActive, AutoDiscoverEKSIssueMissingEndpoingPublicAccess, AutoDiscoverEKSIssueAuthenticationModeUnsupported, AutoDiscoverEKSIssueClusterUnreachable, AutoDiscoverEKSIssueAgentNotConnecting, }
DiscoverEKSIssueTypes is a list of issue types that can occur when trying to auto enroll EKS clusters.
var DiscoverRDSIssueTypes = []string{ AutoDiscoverRDSIssueIAMAuthenticationDisabled, }
DiscoverRDSIssueTypes is a list of issue types that can occur when trying to auto enroll RDS databases.
Functions ¶
func NewDiscoverEC2UserTask ¶
func NewDiscoverEC2UserTask(spec *usertasksv1.UserTaskSpec, opts ...UserTaskOption) (*usertasksv1.UserTask, error)
NewDiscoverEC2UserTask creates a new DiscoverEC2 User Task Type.
func NewDiscoverEKSUserTask ¶
func NewDiscoverEKSUserTask(spec *usertasksv1.UserTaskSpec, opts ...UserTaskOption) (*usertasksv1.UserTask, error)
NewDiscoverEKSUserTask creates a new DiscoverEKS User Task Type.
func NewDiscoverRDSUserTask ¶
func NewDiscoverRDSUserTask(spec *usertasksv1.UserTaskSpec, opts ...UserTaskOption) (*usertasksv1.UserTask, error)
NewDiscoverRDSUserTask creates a new DiscoverRDS User Task Type.
func TaskNameForDiscoverEC2 ¶
func TaskNameForDiscoverEC2(parts TaskNameForDiscoverEC2Parts) string
TaskNameForDiscoverEC2 returns a deterministic name for the DiscoverEC2 task type. This method is used to ensure a single UserTask is created to report issues in enrolling EC2 instances for a given integration, issue type, account id and region.
func TaskNameForDiscoverEKS ¶
func TaskNameForDiscoverEKS(parts TaskNameForDiscoverEKSParts) string
TaskNameForDiscoverEKS returns a deterministic name for the DiscoverEKS task type. This method is used to ensure a single UserTask is created to report issues in enrolling EKS clusters for a given integration, issue type, account id and region.
func TaskNameForDiscoverRDS ¶
func TaskNameForDiscoverRDS(parts TaskNameForDiscoverRDSParts) string
TaskNameForDiscoverRDS returns a deterministic name for the DiscoverRDS task type. This method is used to ensure a single UserTask is created to report issues in enrolling RDS databases for a given integration, issue type, account id and region.
func ValidateUserTask ¶
func ValidateUserTask(ut *usertasksv1.UserTask) error
ValidateUserTask validates the UserTask object without modifying it.
func WithExpiration ¶
func WithExpiration(t time.Time) func(ut *usertasksv1.UserTask)
WithExpiration sets the expiration of the UserTask resource.
Types ¶
type TaskNameForDiscoverEC2Parts ¶
type TaskNameForDiscoverEC2Parts struct { Integration string IssueType string AccountID string Region string SSMDocument string InstallerScript string }
TaskNameForDiscoverEC2Parts are the fields that deterministically compute a Discover EC2 task name. To be used with TaskNameForDiscoverEC2 function.
type TaskNameForDiscoverEKSParts ¶
type TaskNameForDiscoverEKSParts struct { Integration string IssueType string AccountID string Region string AppAutoDiscover bool }
TaskNameForDiscoverEKSParts are the fields that deterministically compute a Discover EKS task name. To be used with TaskNameForDiscoverEKS function.
type TaskNameForDiscoverRDSParts ¶
type TaskNameForDiscoverRDSParts struct { Integration string IssueType string AccountID string Region string }
TaskNameForDiscoverRDSParts are the fields that deterministically compute a Discover RDS task name. To be used with TaskNameForDiscoverRDS function.
type UserTaskOption ¶
type UserTaskOption func(ut *usertasksv1.UserTask)
UserTaskOption defines a function that mutates a User Task.