Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterNameFromURL ¶ added in v0.32.0
ClusterNameFromURL extracts the OpenShift cluster name from a console, API, or OAuth URL.
Types ¶
type ClusterConfig ¶ added in v0.32.0
type ClusterConfig struct {
Name string
APIURL string
TokenExchangeURL string
AudienceID string
LoginApplicationID string
AuthURL string
}
ClusterConfig describes the DNS-published configuration for an OpenShift cluster.
func LookupClusterConfig ¶ added in v0.32.0
func LookupClusterConfig(clusterName string) (*ClusterConfig, error)
LookupClusterConfig fetches the OpenShift cluster configuration from DNS TXT records.
func (*ClusterConfig) Validate ¶ added in v0.32.0
func (c *ClusterConfig) Validate() error
Validate verifies that the required cluster settings are present and plausible.
type LoginCommandResult ¶
LoginCommandResult contains the extracted `oc login` command details.
func FetchLoginCommand ¶
func FetchLoginCommand( oauthBaseURL string, clusterURL string, authHost string, cookies []*http.Cookie, verifyCerts bool, logf LogFunc, ) (*LoginCommandResult, error)
FetchLoginCommand fetches the OpenShift token page and extracts the login command.
func FetchLoginCommandWithDeviceExchange ¶ added in v0.32.0
func FetchLoginCommandWithDeviceExchange( clusterURL string, verifyCerts bool, logf LogFunc, promptf func(auth.DeviceAuthorizationPrompt), ) (*LoginCommandResult, error)
FetchLoginCommandWithDeviceExchange authenticates to OpenShift using the CERN OIDC device flow.
Click to show internal directories.
Click to hide internal directories.