Documentation
¶
Index ¶
- Constants
- Variables
- func CheckBannedUser(clusterID string) error
- func ControlplaneNodeStatus(kubeCli client.Client) error
- func EtcdCrStatus(kubeCli client.Client) (string, error)
- func EtcdHealthCheck(opts etcdHealthCheckOptions) error
- func EtcdPodStatus(kubeCli client.Client) (*corev1.PodList, error)
- func Etcdctlhealth(kconfig *rest.Config, clientset *kubernetes.Clientset, etcdctlCmd string, ...) (string, error)
- func GetCloudTrailLogsForCluster(awsProfile string, clusterID string, maxPages int) ([]*types.Event, error)
- func NewCmdCluster(streams genericclioptions.IOStreams, client *k8s.LazyClient, ...) *cobra.Command
- func NewCmdHypershiftInfo(streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdVerifyDNS(streams genericclioptions.IOStreams) *cobra.Command
- type ChanReturn
- type ClusterHealthCondensedObject
- type ClusterSnapshot
- type CreatorPatch
- type DiffResult
- type DiffSummary
- type ErrorAuthEmailNotFound
- type ErrorParseSecret
- type ErrorSecretAuthNotFound
- type LogCapture
- type NamespaceDiff
- type NamespaceSnapshot
- type NodeDiff
- type NodeSnapshot
- type OperatorDiff
- type OperatorSnapshot
- type OrgId
- type OrgIdOutput
- type RegisterCluster
- type ResourceDiff
- type ResourceInfo
- type Result
- type Resync
- type SnapshotMetadata
Constants ¶
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 */ )
const ( EtcdNamespaceName = "openshift-etcd" EtcdMemberConditionType = "EtcdMembersAvailable" ContainerName = "etcdctl" MasterNodeLabel = "node-role.kubernetes.io/master" EtcdPodMatchLabelName = "k8s-app" EtcdPodMatchValueName = "etcd" EtcdLabelSelector = "k8s-app=etcd" )
const ( EtcdQuorumTurnOffPatch = `{"spec": {"unsupportedConfigOverrides": {"useUnsupportedUnsafeNonHANonProductionUnstableEtcd": true}}}` EtcdQuorumTurnOnPatch = `{"spec": {"unsupportedConfigOverrides": null}}` EtcdForceRedeployPatch = `{"spec": {"forceRedeploymentReason": "single-master-recovery-%s"}}` )
Patch Constants
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" )
const BanCodeExportControlCompliance = "export_control_compliance"
const HYPERSHIFT_URL = "/api/clusters_mgmt/v1/clusters/{cluster_id}/hypershift"
const Namespace = "openshift-monitoring"
const (
OldFlowSupportRole = "role/RH-Technical-Support-Access"
)
const VPSExample string = `` /* 384-byte string literal not displayed */
Variables ¶
var BackplaneClusterAdmin = "backplane-cluster-admin"
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 ControlplaneNodeStatus ¶ added in v0.18.0
func EtcdHealthCheck ¶ added in v0.18.0
func EtcdHealthCheck(opts etcdHealthCheckOptions) error
func EtcdPodStatus ¶ added in v0.18.0
func Etcdctlhealth ¶ added in v0.18.0
func GetCloudTrailLogsForCluster ¶ added in v0.14.4
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
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 OrgIdOutput ¶ added in v0.21.0
type RegisterCluster ¶ added in v0.12.0
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 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