Documentation ¶
Index ¶
- Constants
- Variables
- func CheckUpgradeRequired(statusVersion string, bomVersion *semver.SemVersion) error
- func CleanTempFiles(log *zap.SugaredLogger) error
- func CombineErrors(errs []error) error
- func GetClient(scheme *runtime.Scheme) (client.Client, error)
- func GetCurrentBomVersion() (*semver.SemVersion, error)
- func GetInstallSecret(client client.Client, secretName string, secret *corev1.Secret) error
- func GetPlatformOperatorPodList(runtimeClient client.Client) (corev1.PodList, error)
- func ValidateFluentdConfigData(secret *corev1.Secret) error
- func ValidateNewVersion(currStatusVerString string, currSpecVerString string, newVerString string, ...) error
- func ValidatePrivateKey(secretName string, pemData []byte) error
- func ValidateSecretContents(secretName string, bytes []byte, target interface{}) error
- func ValidateSecretKey(secret *corev1.Secret, dataKey string, target interface{}) ([]byte, error)
- func ValidateUpgradeRequest(newSpecVerString string, currStatusVerString string, currSpecVerString string) error
- func ValidateVersion(requestedVersion string) error
- func ValidateVersionHigherOrEqual(currentVersion string, requestedVersion string) bool
- func VerifyPlatformOperatorSingleton(runtimeClient client.Client) error
- type AuthData
- type AuthenticationType
- type OciAuth
Constants ¶
const ( FluentdOCISecretConfigEntry = "config" // UserPrincipal is default auth type UserPrincipal AuthenticationType = "user_principal" // InstancePrincipal is used for instance principle auth type InstancePrincipal AuthenticationType = "instance_principal" ValidateInProgressError = "Updates to resource not allowed while uninstall or upgrade is in progress" FluentdOCISecretPrivateKeyEntry = "key" OciDNSSecretFileName = "oci.yaml" // InstancePrincipalDelegationToken is used for instance principle delegation token auth type InstancePrincipalDelegationToken AuthenticationType = "instance_principle_delegation_token" // UnknownAuthenticationType is used for none meaningful auth type UnknownAuthenticationType AuthenticationType = "unknown_auth_type" )
Variables ¶
var ValidateKubernetesVersionSupported = validateKubernetesVersionSupportedInCluster
Functions ¶
func CheckUpgradeRequired ¶
func CheckUpgradeRequired(statusVersion string, bomVersion *semver.SemVersion) error
checkUpgradeRequired Returns an error if the current installed version is < the BOM version; if we're validating an update, this is an error condition, as we don't want to allow any updates without an upgrade
func CleanTempFiles ¶
func CleanTempFiles(log *zap.SugaredLogger) error
func CombineErrors ¶
combineErrors combines multiple errors into one error, nil if no error
func GetCurrentBomVersion ¶
func GetCurrentBomVersion() (*semver.SemVersion, error)
GetCurrentBomVersion Get the version string from the bom and return it as a semver object
func GetInstallSecret ¶
func GetPlatformOperatorPodList ¶ added in v1.7.0
func ValidateFluentdConfigData ¶
validateFluentdConfigData - Validate the OCI config contents in the Fluentd secret
func ValidateNewVersion ¶
func ValidatePrivateKey ¶
func ValidateSecretContents ¶
func ValidateSecretKey ¶
func ValidateUpgradeRequest ¶
func ValidateUpgradeRequest(newSpecVerString string, currStatusVerString string, currSpecVerString string) error
ValidateUpgradeRequest Ensures hat an upgrade is requested as part of an update if necessary, and that the version of an upgrade request is valid.
func ValidateVersion ¶
ValidateVersion check that requestedVersion matches BOM requestedVersion
func ValidateVersionHigherOrEqual ¶
ValidateVersionHigherOrEqual checks that currentVersion matches requestedVersion or is a higher version
func VerifyPlatformOperatorSingleton ¶ added in v1.4.7
VerifyPlatformOperatorSingleton Verifies that only one instance of the VPO is running; when upgrading operators, if the terminationGracePeriod for the pod is > 0 there's a chance that an old version may try to handle resource updates before terminating. In the longer term we may want some kind of leader-election strategy to support multiple instances, if that makes sense.
Types ¶
type AuthData ¶
type AuthData struct { Region string `json:"region"` Tenancy string `json:"tenancy"` User string `json:"user"` Key string `json:"key"` Fingerprint string `json:"fingerprint"` AuthType AuthenticationType `json:"authtype"` }
OCI DNS Secret Auth
type AuthenticationType ¶
type AuthenticationType string