cluster

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 97 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JiraBaseURL                   = "https://redhat.atlassian.net"
	JiraTokenRegistrationPath     = "/secure/ViewProfile.jspa?selectedTab=com.atlassian.pats.pats-plugin:jira-user-personal-access-tokens" // #nosec G101
	PagerDutyTokenRegistrationUrl = "https://martindstone.github.io/PDOAuth/"                                                              // #nosec G101
	ClassicSplunkURL              = ""                                                                                                     /* 126-byte string literal not displayed */
	HCPSplunkURL                  = ""                                                                                                     /* 172-byte string literal not displayed */
	SGPSplunkURL                  = ""                                                                                                     /* 165-byte string literal not displayed */

)
View Source
const (
	EtcdNamespaceName       = "openshift-etcd"
	EtcdMemberConditionType = "EtcdMembersAvailable"
	ContainerName           = "etcdctl"
	MasterNodeLabel         = "node-role.kubernetes.io/master"
	EtcdPodMatchLabelName   = "k8s-app"
	EtcdPodMatchValueName   = "etcd"
	EtcdLabelSelector       = "k8s-app=etcd"
)
View Source
const (
	EtcdQuorumTurnOffPatch = `{"spec": {"unsupportedConfigOverrides": {"useUnsupportedUnsafeNonHANonProductionUnstableEtcd": true}}}`
	EtcdQuorumTurnOnPatch  = `{"spec": {"unsupportedConfigOverrides": null}}`
	EtcdForceRedeployPatch = `{"spec": {"forceRedeploymentReason": "single-master-recovery-%s"}}`
)

Patch Constants

View Source
const (
	CheckSyncMaxAttempts = 24

	SL_TRANSFER_INITIATED = "https://raw.githubusercontent.com/openshift/managed-notifications/refs/heads/master/osd/clustertransfer_starting.json"
	SL_TRANSFER_COMPLETE  = "https://raw.githubusercontent.com/openshift/managed-notifications/refs/heads/master/osd/clustertransfer_completed.json"
)
View Source
const BanCodeExportControlCompliance = "export_control_compliance"
View Source
const HYPERSHIFT_URL = "/api/clusters_mgmt/v1/clusters/{cluster_id}/hypershift"
View Source
const Namespace = "openshift-monitoring"
View Source
const (
	OldFlowSupportRole = "role/RH-Technical-Support-Access"
)
View Source
const VPSExample string = `` /* 384-byte string literal not displayed */

Variables

View Source
var BackplaneClusterAdmin = "backplane-cluster-admin"
View Source
var ErrSecretMissingDockerConfigJson = errors.New("secret missing '.dockerconfigjson'? See servicelog: https://raw.githubusercontent.com/openshift/managed-notifications/master/osd/pull_secret_change_breaking_upgradesync.json")

Custom error types to help with unit tests...

Functions

func CheckBannedUser added in v0.14.0

func CheckBannedUser(clusterID string) error

func ControlplaneNodeStatus added in v0.18.0

func ControlplaneNodeStatus(kubeCli client.Client) error

func EtcdCrStatus added in v0.18.0

func EtcdCrStatus(kubeCli client.Client) (string, error)

func EtcdHealthCheck added in v0.18.0

func EtcdHealthCheck(opts etcdHealthCheckOptions) error

func EtcdPodStatus added in v0.18.0

func EtcdPodStatus(kubeCli client.Client) (*corev1.PodList, error)

func Etcdctlhealth added in v0.18.0

func Etcdctlhealth(kconfig *rest.Config, clientset *kubernetes.Clientset, etcdctlCmd string, etcdPodName string) (string, error)

func GetCloudTrailLogsForCluster added in v0.14.4

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

func NewCmdCluster

func NewCmdCluster(streams genericclioptions.IOStreams, client *k8s.LazyClient, globalOpts *globalflags.GlobalOptions) *cobra.Command

NewCmdCluster implements the cluster utility

func NewCmdHypershiftInfo added in v0.18.0

func NewCmdHypershiftInfo(streams genericclioptions.IOStreams) *cobra.Command

newCmdPool gets the current status of the AWS Account Operator AccountPool

func NewCmdVerifyDNS added in v0.52.0

func NewCmdVerifyDNS(streams genericclioptions.IOStreams) *cobra.Command

NewCmdVerifyDNS implements the verify-dns command

Types

type ChanReturn added in v0.18.0

type ChanReturn[T retrievable] struct {
	Value T
	Error error
}

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 ClusterSnapshot added in v0.55.0

type ClusterSnapshot struct {
	Metadata   SnapshotMetadata          `yaml:"metadata"`
	Namespaces []NamespaceSnapshot       `yaml:"namespaces,omitempty"`
	Nodes      []NodeSnapshot            `yaml:"nodes,omitempty"`
	Operators  []OperatorSnapshot        `yaml:"operators,omitempty"`
	Resources  map[string][]ResourceInfo `yaml:"resources,omitempty"`
}

ClusterSnapshot represents a point-in-time capture of cluster state

type CreatorPatch added in v0.12.0

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

type DiffResult added in v0.55.0

type DiffResult struct {
	BeforeSnapshot   string                    `yaml:"beforeSnapshot" json:"beforeSnapshot"`
	AfterSnapshot    string                    `yaml:"afterSnapshot" json:"afterSnapshot"`
	Summary          DiffSummary               `yaml:"summary" json:"summary"`
	NodeChanges      []NodeDiff                `yaml:"nodeChanges,omitempty" json:"nodeChanges,omitempty"`
	OperatorChanges  []OperatorDiff            `yaml:"operatorChanges,omitempty" json:"operatorChanges,omitempty"`
	NamespaceChanges []NamespaceDiff           `yaml:"namespaceChanges,omitempty" json:"namespaceChanges,omitempty"`
	ResourceChanges  map[string][]ResourceDiff `yaml:"resourceChanges,omitempty" json:"resourceChanges,omitempty"`
}

DiffResult represents the comparison between two snapshots

type DiffSummary added in v0.55.0

type DiffSummary struct {
	TotalChanges      int `yaml:"totalChanges" json:"totalChanges"`
	NodesChanged      int `yaml:"nodesChanged" json:"nodesChanged"`
	OperatorsChanged  int `yaml:"operatorsChanged" json:"operatorsChanged"`
	NamespacesChanged int `yaml:"namespacesChanged" json:"namespacesChanged"`
	ResourcesChanged  int `yaml:"resourcesChanged" json:"resourcesChanged"`
}

DiffSummary provides high-level change counts

type ErrorAuthEmailNotFound added in v0.43.0

type ErrorAuthEmailNotFound struct {
	// contains filtered or unexported fields
}

func (*ErrorAuthEmailNotFound) Error added in v0.43.0

func (e *ErrorAuthEmailNotFound) Error() string

type ErrorParseSecret added in v0.43.0

type ErrorParseSecret struct {
	// contains filtered or unexported fields
}

func (*ErrorParseSecret) Error added in v0.43.0

func (e *ErrorParseSecret) Error() string

type ErrorSecretAuthNotFound added in v0.43.0

type ErrorSecretAuthNotFound struct {
	// contains filtered or unexported fields
}

func (*ErrorSecretAuthNotFound) Error added in v0.43.0

func (e *ErrorSecretAuthNotFound) Error() string

type LogCapture added in v0.28.0

type LogCapture struct {
	// contains filtered or unexported fields
}

func (*LogCapture) GetStdOut added in v0.28.0

func (capture *LogCapture) GetStdOut() string

func (*LogCapture) Write added in v0.28.0

func (capture *LogCapture) Write(p []byte) (n int, err error)

type NamespaceDiff added in v0.55.0

type NamespaceDiff struct {
	Name       string `yaml:"name" json:"name"`
	ChangeType string `yaml:"changeType" json:"changeType"`
	Before     string `yaml:"before,omitempty" json:"before,omitempty"`
	After      string `yaml:"after,omitempty" json:"after,omitempty"`
}

NamespaceDiff represents changes to a namespace

type NamespaceSnapshot added in v0.55.0

type NamespaceSnapshot struct {
	Name   string            `yaml:"name"`
	Status string            `yaml:"status"`
	Labels map[string]string `yaml:"labels,omitempty"`
}

NamespaceSnapshot captures namespace state

type NodeDiff added in v0.55.0

type NodeDiff struct {
	Name       string `yaml:"name" json:"name"`
	ChangeType string `yaml:"changeType" json:"changeType"` // added, removed, modified
	Before     string `yaml:"before,omitempty" json:"before,omitempty"`
	After      string `yaml:"after,omitempty" json:"after,omitempty"`
}

NodeDiff represents changes to a node

type NodeSnapshot added in v0.55.0

type NodeSnapshot struct {
	Name       string            `yaml:"name"`
	Status     string            `yaml:"status"`
	Roles      []string          `yaml:"roles,omitempty"`
	Version    string            `yaml:"version"`
	Conditions []string          `yaml:"conditions,omitempty"`
	Labels     map[string]string `yaml:"labels,omitempty"`
}

NodeSnapshot captures node state

type OperatorDiff added in v0.55.0

type OperatorDiff struct {
	Name       string `yaml:"name" json:"name"`
	ChangeType string `yaml:"changeType" json:"changeType"`
	Field      string `yaml:"field,omitempty" json:"field,omitempty"`
	Before     string `yaml:"before,omitempty" json:"before,omitempty"`
	After      string `yaml:"after,omitempty" json:"after,omitempty"`
}

OperatorDiff represents changes to a ClusterOperator

type OperatorSnapshot added in v0.55.0

type OperatorSnapshot struct {
	Name        string   `yaml:"name"`
	Available   bool     `yaml:"available"`
	Progressing bool     `yaml:"progressing"`
	Degraded    bool     `yaml:"degraded"`
	Version     string   `yaml:"version,omitempty"`
	Conditions  []string `yaml:"conditions,omitempty"`
}

OperatorSnapshot captures ClusterOperator state

type OrgId added in v0.21.0

type OrgId struct {
	// contains filtered or unexported fields
}

func (*OrgId) Run added in v0.21.0

func (o *OrgId) Run() error

type OrgIdOutput added in v0.21.0

type OrgIdOutput struct {
	ExternalId string `json:"external_id"`
	InternalId string `json:"internal_id"`
}

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"`
}

type ResourceDiff added in v0.55.0

type ResourceDiff struct {
	Name       string `yaml:"name" json:"name"`
	Namespace  string `yaml:"namespace,omitempty" json:"namespace,omitempty"`
	ChangeType string `yaml:"changeType" json:"changeType"`
	Before     string `yaml:"before,omitempty" json:"before,omitempty"`
	After      string `yaml:"after,omitempty" json:"after,omitempty"`
}

ResourceDiff represents changes to a resource

type ResourceInfo added in v0.55.0

type ResourceInfo struct {
	Name      string `yaml:"name"`
	Namespace string `yaml:"namespace,omitempty"`
	Kind      string `yaml:"kind"`
	Status    string `yaml:"status,omitempty"`
}

ResourceInfo captures basic resource information

type Result added in v0.43.0

type Result int
const (
	Fail Result = iota
	Pass
	NotRun
)

Const values for results table entries

type Resync added in v0.19.0

type Resync struct {
	// contains filtered or unexported fields
}

func (*Resync) New added in v0.19.0

func (r *Resync) New() error

func (*Resync) Run added in v0.19.0

func (r *Resync) Run(ctx context.Context) error

type SnapshotMetadata added in v0.55.0

type SnapshotMetadata struct {
	ClusterID     string            `yaml:"clusterId"`
	ClusterName   string            `yaml:"clusterName"`
	Timestamp     time.Time         `yaml:"timestamp"`
	Version       string            `yaml:"version"`
	Platform      string            `yaml:"platform"`
	IsHCP         bool              `yaml:"isHCP"`
	CaptureErrors map[string]string `yaml:"captureErrors,omitempty"`
}

SnapshotMetadata contains information about when/how the snapshot was taken

Directories

Path Synopsis
internal
dns

Jump to

Keyboard shortcuts

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