Documentation ¶
Overview ¶
Copyright 2020 The OpenShift Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func DecodeProviderSpec(codec *minterv1.ProviderCodec, cr *minterv1.CredentialsRequest) (*minterv1.VSphereProviderSpec, error)
- func DecodeProviderStatus(codec *minterv1.ProviderCodec, cr *minterv1.CredentialsRequest) (*minterv1.VSphereProviderStatus, error)
- type VSphereActuator
- func (a *VSphereActuator) Create(ctx context.Context, cr *minterv1.CredentialsRequest) error
- func (a *VSphereActuator) Delete(ctx context.Context, cr *minterv1.CredentialsRequest) error
- func (a *VSphereActuator) Exists(ctx context.Context, cr *minterv1.CredentialsRequest) (bool, error)
- func (a *VSphereActuator) GetCredentialsRootSecret(ctx context.Context, cr *minterv1.CredentialsRequest) (*corev1.Secret, error)
- func (a *VSphereActuator) GetCredentialsRootSecretLocation() types.NamespacedName
- func (a *VSphereActuator) Update(ctx context.Context, cr *minterv1.CredentialsRequest) error
- func (a *VSphereActuator) Upgradeable(mode operatorv1.CloudCredentialsMode) *configv1.ClusterOperatorStatusCondition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeProviderSpec ¶
func DecodeProviderSpec(codec *minterv1.ProviderCodec, cr *minterv1.CredentialsRequest) (*minterv1.VSphereProviderSpec, error)
DecodeProviderSpec returns a decoded VSphereProviderSpec from a CredentialsRequest
func DecodeProviderStatus ¶
func DecodeProviderStatus(codec *minterv1.ProviderCodec, cr *minterv1.CredentialsRequest) (*minterv1.VSphereProviderStatus, error)
DecodeProviderStatus returns a decoded VSphereProviderStatus from a CredentialsRequest
Types ¶
type VSphereActuator ¶
type VSphereActuator struct { Codec *minterv1.ProviderCodec Client client.Client }
VSphereActuator implements the CredentialsRequest Actuator interface to process CredentialsRequests in vSphere.
func NewVSphereActuator ¶
func NewVSphereActuator(client client.Client) (*VSphereActuator, error)
NewVSphereActuator creates a new VSphereActuator.
func (*VSphereActuator) Create ¶
func (a *VSphereActuator) Create(ctx context.Context, cr *minterv1.CredentialsRequest) error
Create will handle creating the credentials.
func (*VSphereActuator) Delete ¶
func (a *VSphereActuator) Delete(ctx context.Context, cr *minterv1.CredentialsRequest) error
Delete the credentials. If no error is returned, it is assumed that all dependent resources have been cleaned up.
func (*VSphereActuator) Exists ¶
func (a *VSphereActuator) Exists(ctx context.Context, cr *minterv1.CredentialsRequest) (bool, error)
Exists will check if the credentials currently exist. To do this we will check if the target secret exists. This call is only used to determine if we're doing a Create or an Update, but in the context of this acutator it makes no difference.
func (*VSphereActuator) GetCredentialsRootSecret ¶
func (a *VSphereActuator) GetCredentialsRootSecret(ctx context.Context, cr *minterv1.CredentialsRequest) (*corev1.Secret, error)
func (*VSphereActuator) GetCredentialsRootSecretLocation ¶
func (a *VSphereActuator) GetCredentialsRootSecretLocation() types.NamespacedName
GetCredentialsRootSecretLocation returns the namespace and name where the parent credentials secret is stored.
func (*VSphereActuator) Update ¶
func (a *VSphereActuator) Update(ctx context.Context, cr *minterv1.CredentialsRequest) error
Update will update the credentials to satisfy the CredentialsRequest.
func (*VSphereActuator) Upgradeable ¶
func (a *VSphereActuator) Upgradeable(mode operatorv1.CloudCredentialsMode) *configv1.ClusterOperatorStatusCondition
Upgradeable returns a ClusterOperator status condition for the upgradeable type if the system is considered not upgradeable. Otherwise, return nil as the default value is for things to be upgradeable.