Documentation ¶
Index ¶
- Variables
- type Discoverer
- type K8SBasedPlatformVersioner
- func (K8SBasedPlatformVersioner) DefaultArgs(client Discoverer, cfg *rest.Config) (Discoverer, *rest.Config, error)
- func (pv K8SBasedPlatformVersioner) GetPlatformInfo(client Discoverer, cfg *rest.Config) (PlatformInfo, error)
- func (pv K8SBasedPlatformVersioner) LookupOpenShiftVersion(client Discoverer, cfg *rest.Config) (OpenShiftVersion, error)
- type OpenShiftVersion
- type PlatformClusterInfo
- type PlatformInfo
- type PlatformType
- type PlatformVersioner
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ClusterVersionApiPath = "apis/config.openshift.io/v1/clusterversions/version"
)
Functions ¶
This section is empty.
Types ¶
type Discoverer ¶
type K8SBasedPlatformVersioner ¶
type K8SBasedPlatformVersioner struct{}
func (K8SBasedPlatformVersioner) DefaultArgs ¶
func (K8SBasedPlatformVersioner) DefaultArgs(client Discoverer, cfg *rest.Config) (Discoverer, *rest.Config, error)
deal with cfg coming from legacy method signature and allow injection for client testing
func (K8SBasedPlatformVersioner) GetPlatformInfo ¶
func (pv K8SBasedPlatformVersioner) GetPlatformInfo(client Discoverer, cfg *rest.Config) (PlatformInfo, error)
func (K8SBasedPlatformVersioner) LookupOpenShiftVersion ¶
func (pv K8SBasedPlatformVersioner) LookupOpenShiftVersion(client Discoverer, cfg *rest.Config) (OpenShiftVersion, error)
OCP4.1+ requires elevated cluster configuration user security permissions for version fetch REST call URL requiring permissions: /apis/config.openshift.io/v1/clusterversions
type OpenShiftVersion ¶
type OpenShiftVersion struct {
Version string `json:"ocpVersion"`
}
func (OpenShiftVersion) BuildVersion ¶
func (info OpenShiftVersion) BuildVersion() string
func (OpenShiftVersion) MajorVersion ¶
func (info OpenShiftVersion) MajorVersion() string
func (OpenShiftVersion) MinorVersion ¶
func (info OpenShiftVersion) MinorVersion() string
func (OpenShiftVersion) String ¶
func (info OpenShiftVersion) String() string
type PlatformClusterInfo ¶
type PlatformClusterInfo struct { Status struct { Desired struct { Version string `json:"version"` } `json:"desired"` } `json:"status"` }
full generated 'version' API fetch result struct @ gist.github.com/jeremyary/5a66530611572a057df7a98f3d2902d5
type PlatformInfo ¶
type PlatformInfo struct { Name PlatformType `json:"name"` K8SVersion string `json:"k8sVersion"` OS string `json:"os"` }
func (PlatformInfo) IsKubernetes ¶
func (info PlatformInfo) IsKubernetes() bool
func (PlatformInfo) IsOpenShift ¶
func (info PlatformInfo) IsOpenShift() bool
func (PlatformInfo) K8SMajorVersion ¶
func (info PlatformInfo) K8SMajorVersion() string
func (PlatformInfo) K8SMinorVersion ¶
func (info PlatformInfo) K8SMinorVersion() string
func (PlatformInfo) String ¶
func (info PlatformInfo) String() string
type PlatformType ¶
type PlatformType string
const ( OpenShift PlatformType = "OpenShift" Kubernetes PlatformType = "Kubernetes" )
type PlatformVersioner ¶
type PlatformVersioner interface {
GetPlatformInfo(discoverer Discoverer, cfg *rest.Config) (PlatformInfo, error)
}
Click to show internal directories.
Click to hide internal directories.