cluster

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JiraTokenConfigKey            = "jira_token"
	JiraBaseURL                   = "https://issues.redhat.com"
	JiraTokenRegistrationPath     = "/secure/ViewProfile.jspa?selectedTab=com.atlassian.pats.pats-plugin:jira-user-personal-access-tokens"
	PagerDutyOauthTokenConfigKey  = "pd_oauth_token"
	PagerDutyUserTokenConfigKey   = "pd_user_token"
	PagerDutyTokenRegistrationUrl = "https://martindstone.github.io/PDOAuth/"
	PagerDutyTeamIDs              = "team_ids"
)
View Source
const (
	Undefined optionsDialogResponse = 0
	Retry                           = 1
	Skip                            = 2
	Force                           = 3
	Cancel                          = 4
)
View Source
const BanCodeExportControlCompliance = "export_control_compliance"

Variables

View Source
var BackplaneClusterAdmin = "backplane-cluster-admin"

Functions

func CheckBannedUser added in v0.14.0

func CheckBannedUser(clusterID string) error

func GetCloudTrailLogsForCluster added in v0.14.4

func GetCloudTrailLogsForCluster(awsProfile string, clusterID string, maxPages int) ([]*cloudtrail.Event, error)

func GetCurrentPDAlertsForCluster added in v0.14.4

func GetCurrentPDAlertsForCluster(pdServiceIDs []string, pdUsertoken string, pdAuthtoken string) (map[string][]pd.Incident, error)

func GetHistoricalPDAlertsForCluster added in v0.14.4

func GetHistoricalPDAlertsForCluster(pdServiceIDs []string, pdUsertoken string, pdAuthtoken string) (map[string][]*IncidentOccurrenceTracker, error)

func GetJiraClient added in v0.14.4

func GetJiraClient() (*jira.Client, error)

GetJiraClient creates a jira client that connects to https://issues.redhat.com. To work, the jiraToken needs to be set in the config

func GetJiraIssuesForCluster added in v0.14.4

func GetJiraIssuesForCluster(clusterID string, externalClusterID string) ([]jira.Issue, error)

func GetJiraSupportExceptionsForOrg added in v0.14.4

func GetJiraSupportExceptionsForOrg(organizationID string) ([]jira.Issue, error)

func GetPDServiceID added in v0.14.4

func GetPDServiceID(baseDomain string, usertoken string, oauthtoken string, team_ids []string) ([]string, error)

func GetPagerdutyClient added in v0.13.0

func GetPagerdutyClient(usertoken string, oauthtoken string) (*pd.Client, error)

func GetServiceLogsSince added in v0.14.4

func GetServiceLogsSince(clusterID string, days int) ([]sl.ServiceLogShort, error)

GetServiceLogsSince returns the Servicelogs for a cluster sent between time.Now() and time.Now()-duration. the first parameter will contain a slice of the servicelogs from the given time period, while the second return value indicates if an error has happened.

func NewCmdCluster

func NewCmdCluster(streams genericclioptions.IOStreams, flags *genericclioptions.ConfigFlags, client client.Client, globalOpts *globalflags.GlobalOptions) *cobra.Command

NewCmdCluster implements the cluster utility

func ValidatePullSecret added in v0.14.0

func ValidatePullSecret(clusterID string, kubeCli client.Client, flags *genericclioptions.ConfigFlags) error

Types

type ClusterHealthCondensedObject

type ClusterHealthCondensedObject struct {
	ID       string   `yaml:"ID"`
	Name     string   `yaml:"Name"`
	Provider string   `yaml:"Provider"`
	AZs      []string `yaml:"AZs"`
	Expected struct {
		Master int         `yaml:"Master"`
		Infra  int         `yaml:"Infra"`
		Worker interface{} `yaml:"Worker"`
	} `yaml:"Expected nodes"`
	Actual struct {
		Total          int `yaml:"Total"`
		Stopped        int `yaml:"Stopped"`
		RunningMasters int `yaml:"Running Masters"`
		RunningInfra   int `yaml:"Running Infra"`
		RunningWorker  int `yaml:"Running Worker"`
	} `yaml:"Actual nodes"`
}

type CreatorPatch added in v0.12.0

type CreatorPatch struct {
	Creator_ID string `json:"creator_id"`
}

type IncidentOccurrenceTracker added in v0.14.4

type IncidentOccurrenceTracker struct {
	IncidentName   string
	Count          int
	LastOccurrence string
}

type RegisterCluster added in v0.12.0

type RegisterCluster struct {
	External_id     string `json:"external_id"`
	Subscription_id string `json:"subscription_id"`
	Organization_id string `json:"organization_id"`
	Console_url     string `json:"console_url"`
	Display_name    string `json:"display_name"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL