platformidentification

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArchitectureS390    = "s390x"
	ArchitectureAMD64   = "amd64"
	ArchitecturePPC64le = "ppc64le"
	ArchitectureARM64   = "arm64"
)

Variables

View Source
var (
	ValidBugzillaComponents = sets.NewString(
		"apiserver-auth",
		"assisted-installer",
		"Bare Metal Hardware Provisioning",
		"Build",
		"Cloud Compute",
		"Cloud Credential Operator",
		"Cluster Autoscaler",
		"Cluster Loader",
		"Cluster Version Operator",
		"CNF Variant Validation",
		"Compliance Operator",
		"config-operator",
		"Console Kubevirt Plugin",
		"Console Metal3 Plugin",
		"Console Storage Plugin",
		"Containers",
		"crc",
		"Dev Console",
		"DNS",
		"Documentation",
		"Etcd",
		"Federation",
		"File Integrity Operator",
		"Fuse",
		"Hawkular",
		"ibm-roks-toolkit",
		"Image",
		"Image Registry",
		"Insights Operator",
		"Installer",
		"ISV Operators",
		"Jenkins",
		"kata-containers",
		"kube-apiserver",
		"kube-controller-manager",
		"kube-scheduler",
		"kube-storage-version-migrator",
		"Logging",
		"Machine Config Operator",
		"Management Console",
		"Metering Operator",
		"Migration Tooling",
		"Monitoring",
		"Multi-Arch",
		"Multi-cluster-management",
		"Networking",
		"Node",
		"Node Feature Discovery Operator",
		"Node Tuning Operator",
		"oauth-apiserver",
		"oauth-proxy",
		"oc",
		"OLM",
		"openshift-apiserver",
		"openshift-controller-manager",
		"Operator SDK",
		"Performance Addon Operator",
		"Reference Architecture",
		"Registry Console",
		"Release",
		"RHCOS",
		"RHMI Monitoring",
		"Routing",
		"Samples",
		"Security",
		"Service Broker",
		"Service Catalog",
		"service-ca",
		"Special Resources Operator",
		"Storage",
		"Templates",
		"Test Infrastructure",
		"Unknown",
		"Windows Containers",
	)

	// nothing fancy, I just copied the listing
	KnownOperators = sets.NewString(
		"authentication",
		"baremetal",
		"cloud-controller-manager",
		"cloud-credential",
		"cluster-autoscaler",
		"config-operator",
		"console",
		"control-plane-machine-set",
		"csi-snapshot-controller",
		"dns",
		"etcd",
		"image-registry",
		"ingress",
		"insights",
		"kube-apiserver",
		"kube-controller-manager",
		"kube-scheduler",
		"kube-storage-version-migrator",
		"machine-api",
		"machine-approver",
		"machine-config",
		"marketplace",
		"monitoring",
		"network",
		"node-tuning",
		"olm",
		"openshift-apiserver",
		"openshift-controller-manager",
		"openshift-samples",
		"operator-lifecycle-manager",
		"operator-lifecycle-manager-catalog",
		"operator-lifecycle-manager-packageserver",
		"service-ca",
		"storage",
	)

	NamespaceOther  = "all the other namespaces"
	KnownNamespaces = sets.String{}
)

Functions

func DidUpgradeHappenDuringCollection

func DidUpgradeHappenDuringCollection(intervals monitorapi.Intervals, beginning, end time.Time) bool

func GetBugzillaComponentForOperator

func GetBugzillaComponentForOperator(operator string) string

func GetNamespacesToBugzillaComponents

func GetNamespacesToBugzillaComponents() map[string]string

func IsPlatformNamespace

func IsPlatformNamespace(nsName string) bool

IsPlatformNamespace is a utility to detect if the namespace is considered platform

func UpgradeNumberDuringCollection

func UpgradeNumberDuringCollection(intervals monitorapi.Intervals, beginning, end time.Time) int

func VersionFromHistory

func VersionFromHistory(history configv1.UpdateHistory) string

Types

type ClusterData

type ClusterData struct {
	JobType               `json:",inline"`
	NetworkStack          string
	CloudRegion           string
	CloudZone             string
	ClusterVersionHistory []string
	MasterNodesUpdated    string
}

Superset of JobType can be added to as needed to collect more data

func BuildClusterData

func BuildClusterData(ctx context.Context, clientConfig *rest.Config) (ClusterData, *[]error)

type JobType

type JobType struct {
	Release      string
	FromRelease  string
	Platform     string
	Architecture string
	Network      string
	Topology     string
}

JobType is used as a key for Disruption and other data grouping consider this immutable unless you are fully aware of what you are doing

func CloneJobType

func CloneJobType(in JobType) JobType

func GetJobType

func GetJobType(ctx context.Context, clientConfig *rest.Config) (*JobType, error)

GetJobType returns information that can be used to identify a job

Jump to

Keyboard shortcuts

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