Documentation ¶
Overview ¶
Package scope implements scope types.
Index ¶
- Constants
- func ConvertToSdkNodePool(nodePool infrav1exp.GCPManagedMachinePool, ...) *containerpb.NodePool
- func ConvertToSdkNodePools(nodePools []infrav1exp.GCPManagedMachinePool, ...) []*containerpb.NodePool
- type ClusterScope
- func (s *ClusterScope) AdditionalLabels() infrav1.Labels
- func (s *ClusterScope) AddressSpec() *compute.Address
- func (s *ClusterScope) BackendServiceSpec() *compute.BackendService
- func (s *ClusterScope) Close() error
- func (s *ClusterScope) Cloud() cloud.Cloud
- func (s *ClusterScope) ControlPlaneEndpoint() clusterv1.APIEndpoint
- func (s *ClusterScope) FailureDomains() clusterv1.FailureDomains
- func (s *ClusterScope) FirewallRulesSpec() []*compute.Firewall
- func (s *ClusterScope) ForwardingRuleSpec() *compute.ForwardingRule
- func (s *ClusterScope) HealthCheckSpec() *compute.HealthCheck
- func (s *ClusterScope) InstanceGroupSpec(zone string) *compute.InstanceGroup
- func (s *ClusterScope) Name() string
- func (s *ClusterScope) Namespace() string
- func (s *ClusterScope) NatRouterSpec() *compute.Router
- func (s *ClusterScope) Network() *infrav1.Network
- func (s *ClusterScope) NetworkLink() string
- func (s *ClusterScope) NetworkName() string
- func (s *ClusterScope) NetworkSpec() *compute.Network
- func (s *ClusterScope) PatchObject() error
- func (s *ClusterScope) Project() string
- func (s *ClusterScope) Region() string
- func (s *ClusterScope) SetControlPlaneEndpoint(endpoint clusterv1.APIEndpoint)
- func (s *ClusterScope) SetFailureDomains(fd clusterv1.FailureDomains)
- func (s *ClusterScope) SetReady()
- func (s *ClusterScope) SubnetSpecs() []*compute.Subnetwork
- func (s *ClusterScope) TargetTCPProxySpec() *compute.TargetTcpProxy
- type ClusterScopeGetter
- type ClusterScopeGetterFunc
- type ClusterScopeParams
- type Credential
- type GCPRateLimiter
- type GCPServices
- type MachineScope
- func (m *MachineScope) Close() error
- func (m *MachineScope) Cloud() cloud.Cloud
- func (m *MachineScope) ControlPlaneGroupName() string
- func (m *MachineScope) GetBootstrapData() (string, error)
- func (m *MachineScope) GetInstanceID() *string
- func (m *MachineScope) GetInstanceStatus() *infrav1.InstanceStatus
- func (m *MachineScope) GetProviderID() string
- func (m *MachineScope) InstanceAdditionalDiskSpec() []*compute.AttachedDisk
- func (m *MachineScope) InstanceAdditionalMetadataSpec() *compute.Metadata
- func (m *MachineScope) InstanceImageSpec() *compute.AttachedDisk
- func (m *MachineScope) InstanceNetworkInterfaceSpec() *compute.NetworkInterface
- func (m *MachineScope) InstanceServiceAccountsSpec() *compute.ServiceAccount
- func (m *MachineScope) InstanceSpec(log logr.Logger) *compute.Instance
- func (m *MachineScope) IsControlPlane() bool
- func (m *MachineScope) Name() string
- func (m *MachineScope) Namespace() string
- func (m *MachineScope) PatchObject() error
- func (m *MachineScope) Project() string
- func (m *MachineScope) Role() string
- func (m *MachineScope) SetAddresses(addressList []corev1.NodeAddress)
- func (m *MachineScope) SetAnnotation(key, value string)
- func (m *MachineScope) SetFailureMessage(v error)
- func (m *MachineScope) SetFailureReason(v capierrors.MachineStatusError)
- func (m *MachineScope) SetInstanceStatus(v infrav1.InstanceStatus)
- func (m *MachineScope) SetProviderID()
- func (m *MachineScope) SetReady()
- func (m *MachineScope) Zone() string
- type MachineScopeGetter
- type MachineScopeGetterFunc
- type MachineScopeParams
- type ManagedClusterScope
- func (s *ManagedClusterScope) AdditionalLabels() infrav1.Labels
- func (s *ManagedClusterScope) Close() error
- func (s *ManagedClusterScope) Cloud() cloud.Cloud
- func (s *ManagedClusterScope) ControlPlaneEndpoint() clusterv1.APIEndpoint
- func (s *ManagedClusterScope) FailureDomains() clusterv1.FailureDomains
- func (s *ManagedClusterScope) FirewallRulesSpec() []*compute.Firewall
- func (s *ManagedClusterScope) Name() string
- func (s *ManagedClusterScope) Namespace() string
- func (s *ManagedClusterScope) NatRouterSpec() *compute.Router
- func (s *ManagedClusterScope) Network() *infrav1.Network
- func (s *ManagedClusterScope) NetworkLink() string
- func (s *ManagedClusterScope) NetworkName() string
- func (s *ManagedClusterScope) NetworkSpec() *compute.Network
- func (s *ManagedClusterScope) PatchObject() error
- func (s *ManagedClusterScope) Project() string
- func (s *ManagedClusterScope) Region() string
- func (s *ManagedClusterScope) SetControlPlaneEndpoint(endpoint clusterv1.APIEndpoint)
- func (s *ManagedClusterScope) SetFailureDomains(fd clusterv1.FailureDomains)
- func (s *ManagedClusterScope) SetReady()
- func (s *ManagedClusterScope) SubnetSpecs() []*compute.Subnetwork
- type ManagedClusterScopeParams
- type ManagedControlPlaneScope
- func (s *ManagedControlPlaneScope) Client() client.Client
- func (s *ManagedControlPlaneScope) Close() error
- func (s *ManagedControlPlaneScope) ClusterFullName() string
- func (s *ManagedControlPlaneScope) ClusterLocation() string
- func (s *ManagedControlPlaneScope) ClusterName() string
- func (s *ManagedControlPlaneScope) ConditionSetter() conditions.Setter
- func (s *ManagedControlPlaneScope) CredentialsClient() *credentials.IamCredentialsClient
- func (s *ManagedControlPlaneScope) GetAllNodePools(ctx context.Context) ([]infrav1exp.GCPManagedMachinePool, []clusterv1exp.MachinePool, error)
- func (s *ManagedControlPlaneScope) GetCredential() *Credential
- func (s *ManagedControlPlaneScope) IsAutopilotCluster() bool
- func (s *ManagedControlPlaneScope) ManagedControlPlaneClient() *container.ClusterManagerClient
- func (s *ManagedControlPlaneScope) PatchObject() error
- func (s *ManagedControlPlaneScope) Region() string
- func (s *ManagedControlPlaneScope) SetEndpoint(host string)
- type ManagedControlPlaneScopeParams
- type ManagedMachinePoolScope
- func (s *ManagedMachinePoolScope) Close() error
- func (s *ManagedMachinePoolScope) ConditionSetter() conditions.Setter
- func (s *ManagedMachinePoolScope) InstanceGroupManagersClient() *compute.InstanceGroupManagersClient
- func (s *ManagedMachinePoolScope) ManagedMachinePoolClient() *container.ClusterManagerClient
- func (s *ManagedMachinePoolScope) NodePoolFullName() string
- func (s *ManagedMachinePoolScope) NodePoolLocation() string
- func (s *ManagedMachinePoolScope) NodePoolName() string
- func (s *ManagedMachinePoolScope) NodePoolVersion() *string
- func (s *ManagedMachinePoolScope) PatchObject() error
- func (s *ManagedMachinePoolScope) Region() string
- func (s *ManagedMachinePoolScope) SetReplicas(replicas int32)
- type ManagedMachinePoolScopeParams
Constants ¶
const (
// APIServerPort is the port of the GKE api server.
APIServerPort = 443
)
const ( // ConfigFileEnvVar is the name of the environment variable // that contains the path to the credentials file. ConfigFileEnvVar = "GOOGLE_APPLICATION_CREDENTIALS" )
Variables ¶
This section is empty.
Functions ¶
func ConvertToSdkNodePool ¶ added in v1.3.0
func ConvertToSdkNodePool(nodePool infrav1exp.GCPManagedMachinePool, machinePool clusterv1exp.MachinePool, regional bool) *containerpb.NodePool
ConvertToSdkNodePool converts a node pool to format that is used by GCP SDK.
func ConvertToSdkNodePools ¶ added in v1.3.0
func ConvertToSdkNodePools(nodePools []infrav1exp.GCPManagedMachinePool, machinePools []clusterv1exp.MachinePool, regional bool) []*containerpb.NodePool
ConvertToSdkNodePools converts node pools to format that is used by GCP SDK.
Types ¶
type ClusterScope ¶
type ClusterScope struct { Cluster *clusterv1.Cluster GCPCluster *infrav1.GCPCluster GCPServices // contains filtered or unexported fields }
ClusterScope defines the basic context for an actuator to operate upon.
func NewClusterScope ¶
func NewClusterScope(ctx context.Context, params ClusterScopeParams) (*ClusterScope, error)
NewClusterScope creates a new Scope from the supplied parameters. This is meant to be called for each reconcile iteration.
func (*ClusterScope) AdditionalLabels ¶ added in v0.4.0
func (s *ClusterScope) AdditionalLabels() infrav1.Labels
AdditionalLabels returns the cluster additional labels.
func (*ClusterScope) AddressSpec ¶ added in v0.4.0
func (s *ClusterScope) AddressSpec() *compute.Address
AddressSpec returns google compute address spec.
func (*ClusterScope) BackendServiceSpec ¶ added in v0.4.0
func (s *ClusterScope) BackendServiceSpec() *compute.BackendService
BackendServiceSpec returns google compute backend-service spec.
func (*ClusterScope) Close ¶
func (s *ClusterScope) Close() error
Close closes the current scope persisting the cluster configuration and status.
func (*ClusterScope) Cloud ¶ added in v0.4.0
func (s *ClusterScope) Cloud() cloud.Cloud
Cloud returns initialized cloud.
func (*ClusterScope) ControlPlaneEndpoint ¶ added in v0.4.0
func (s *ClusterScope) ControlPlaneEndpoint() clusterv1.APIEndpoint
ControlPlaneEndpoint returns the cluster control-plane endpoint.
func (*ClusterScope) FailureDomains ¶ added in v0.4.0
func (s *ClusterScope) FailureDomains() clusterv1.FailureDomains
FailureDomains returns the cluster failure domains.
func (*ClusterScope) FirewallRulesSpec ¶ added in v0.4.0
func (s *ClusterScope) FirewallRulesSpec() []*compute.Firewall
FirewallRulesSpec returns google compute firewall spec.
func (*ClusterScope) ForwardingRuleSpec ¶ added in v0.4.0
func (s *ClusterScope) ForwardingRuleSpec() *compute.ForwardingRule
ForwardingRuleSpec returns google compute forwarding-rule spec.
func (*ClusterScope) HealthCheckSpec ¶ added in v0.4.0
func (s *ClusterScope) HealthCheckSpec() *compute.HealthCheck
HealthCheckSpec returns google compute health-check spec.
func (*ClusterScope) InstanceGroupSpec ¶ added in v0.4.0
func (s *ClusterScope) InstanceGroupSpec(zone string) *compute.InstanceGroup
InstanceGroupSpec returns google compute instance-group spec.
func (*ClusterScope) Namespace ¶
func (s *ClusterScope) Namespace() string
Namespace returns the cluster namespace.
func (*ClusterScope) NatRouterSpec ¶ added in v0.4.0
func (s *ClusterScope) NatRouterSpec() *compute.Router
NatRouterSpec returns google compute nat router spec.
func (*ClusterScope) Network ¶
func (s *ClusterScope) Network() *infrav1.Network
Network returns the cluster network object.
func (*ClusterScope) NetworkLink ¶ added in v1.1.0
func (s *ClusterScope) NetworkLink() string
NetworkLink returns the partial URL for the network.
func (*ClusterScope) NetworkName ¶
func (s *ClusterScope) NetworkName() string
NetworkName returns the cluster network unique identifier.
func (*ClusterScope) NetworkSpec ¶ added in v0.4.0
func (s *ClusterScope) NetworkSpec() *compute.Network
NetworkSpec returns google compute network spec.
func (*ClusterScope) PatchObject ¶
func (s *ClusterScope) PatchObject() error
PatchObject persists the cluster configuration and status.
func (*ClusterScope) Project ¶
func (s *ClusterScope) Project() string
Project returns the current project name.
func (*ClusterScope) Region ¶
func (s *ClusterScope) Region() string
Region returns the cluster region.
func (*ClusterScope) SetControlPlaneEndpoint ¶ added in v0.4.0
func (s *ClusterScope) SetControlPlaneEndpoint(endpoint clusterv1.APIEndpoint)
SetControlPlaneEndpoint sets cluster control-plane endpoint.
func (*ClusterScope) SetFailureDomains ¶ added in v0.4.0
func (s *ClusterScope) SetFailureDomains(fd clusterv1.FailureDomains)
SetFailureDomains sets cluster failure domains.
func (*ClusterScope) SetReady ¶ added in v0.4.0
func (s *ClusterScope) SetReady()
SetReady sets cluster ready status.
func (*ClusterScope) SubnetSpecs ¶ added in v1.2.0
func (s *ClusterScope) SubnetSpecs() []*compute.Subnetwork
SubnetSpecs returns google compute subnets spec.
func (*ClusterScope) TargetTCPProxySpec ¶ added in v0.4.0
func (s *ClusterScope) TargetTCPProxySpec() *compute.TargetTcpProxy
TargetTCPProxySpec returns google compute target-tcp-proxy spec.
type ClusterScopeGetter ¶
type ClusterScopeGetter interface {
ClusterScope(params ClusterScopeParams) (*ClusterScope, error)
}
ClusterScopeGetter is a Service which knows how to retrieve the scope for a cluster.
type ClusterScopeGetterFunc ¶
type ClusterScopeGetterFunc func(params ClusterScopeParams) (*ClusterScope, error)
ClusterScopeGetterFunc ...
func (ClusterScopeGetterFunc) ClusterScope ¶
func (f ClusterScopeGetterFunc) ClusterScope(params ClusterScopeParams) (*ClusterScope, error)
ClusterScope returns the cluster scope.
type ClusterScopeParams ¶
type ClusterScopeParams struct { GCPServices Client client.Client Cluster *clusterv1.Cluster GCPCluster *infrav1.GCPCluster }
ClusterScopeParams defines the input parameters used to create a new Scope.
type Credential ¶ added in v1.3.0
type Credential struct { Type string `json:"type"` ProjectID string `json:"project_id"` ClientEmail string `json:"client_email"` ClientID string `json:"client_id"` }
Credential is a struct to hold GCP credential data.
type GCPRateLimiter ¶ added in v0.4.0
type GCPRateLimiter struct{}
GCPRateLimiter implements cloud.RateLimiter.
func (*GCPRateLimiter) Accept ¶ added in v0.4.0
func (rl *GCPRateLimiter) Accept(ctx context.Context, key *cloud.RateLimitKey) error
Accept blocks until the operation can be performed.
func (*GCPRateLimiter) Observe ¶ added in v1.3.0
func (rl *GCPRateLimiter) Observe(context.Context, error, *cloud.RateLimitKey)
Observe does nothing.
type GCPServices ¶ added in v0.4.0
type GCPServices struct {
Compute *compute.Service
}
GCPServices contains all the gcp services used by the scopes.
type MachineScope ¶
type MachineScope struct { ClusterGetter cloud.ClusterGetter Machine *clusterv1.Machine GCPMachine *infrav1.GCPMachine // contains filtered or unexported fields }
MachineScope defines a scope defined around a machine and its cluster.
func NewMachineScope ¶
func NewMachineScope(params MachineScopeParams) (*MachineScope, error)
NewMachineScope creates a new MachineScope from the supplied parameters. This is meant to be called for each reconcile iteration.
func (*MachineScope) Close ¶
func (m *MachineScope) Close() error
Close closes the current scope persisting the cluster configuration and status.
func (*MachineScope) Cloud ¶ added in v0.4.0
func (m *MachineScope) Cloud() cloud.Cloud
Cloud returns initialized cloud.
func (*MachineScope) ControlPlaneGroupName ¶ added in v0.4.0
func (m *MachineScope) ControlPlaneGroupName() string
ControlPlaneGroupName returns the control-plane instance group name.
func (*MachineScope) GetBootstrapData ¶
func (m *MachineScope) GetBootstrapData() (string, error)
GetBootstrapData returns the bootstrap data from the secret in the Machine's bootstrap.dataSecretName.
func (*MachineScope) GetInstanceID ¶
func (m *MachineScope) GetInstanceID() *string
GetInstanceID returns the GCPMachine instance id by parsing Spec.ProviderID.
func (*MachineScope) GetInstanceStatus ¶
func (m *MachineScope) GetInstanceStatus() *infrav1.InstanceStatus
GetInstanceStatus returns the GCPMachine instance status.
func (*MachineScope) GetProviderID ¶
func (m *MachineScope) GetProviderID() string
GetProviderID returns the GCPMachine providerID from the spec.
func (*MachineScope) InstanceAdditionalDiskSpec ¶ added in v0.4.0
func (m *MachineScope) InstanceAdditionalDiskSpec() []*compute.AttachedDisk
InstanceAdditionalDiskSpec returns compute instance additional attched-disk spec.
func (*MachineScope) InstanceAdditionalMetadataSpec ¶ added in v0.4.0
func (m *MachineScope) InstanceAdditionalMetadataSpec() *compute.Metadata
InstanceAdditionalMetadataSpec returns additional metadata spec.
func (*MachineScope) InstanceImageSpec ¶ added in v0.4.0
func (m *MachineScope) InstanceImageSpec() *compute.AttachedDisk
InstanceImageSpec returns compute instance image attched-disk spec.
func (*MachineScope) InstanceNetworkInterfaceSpec ¶ added in v0.4.0
func (m *MachineScope) InstanceNetworkInterfaceSpec() *compute.NetworkInterface
InstanceNetworkInterfaceSpec returns compute network interface spec.
func (*MachineScope) InstanceServiceAccountsSpec ¶ added in v0.4.0
func (m *MachineScope) InstanceServiceAccountsSpec() *compute.ServiceAccount
InstanceServiceAccountsSpec returns service-account spec.
func (*MachineScope) InstanceSpec ¶ added in v0.4.0
func (m *MachineScope) InstanceSpec(log logr.Logger) *compute.Instance
InstanceSpec returns instance spec.
func (*MachineScope) IsControlPlane ¶
func (m *MachineScope) IsControlPlane() bool
IsControlPlane returns true if the machine is a control plane.
func (*MachineScope) Namespace ¶
func (m *MachineScope) Namespace() string
Namespace returns the namespace name.
func (*MachineScope) PatchObject ¶
func (m *MachineScope) PatchObject() error
PatchObject persists the cluster configuration and status.
func (*MachineScope) Project ¶ added in v1.1.0
func (m *MachineScope) Project() string
Project return the project for the GCPMachine's cluster.
func (*MachineScope) Role ¶
func (m *MachineScope) Role() string
Role returns the machine role from the labels.
func (*MachineScope) SetAddresses ¶
func (m *MachineScope) SetAddresses(addressList []corev1.NodeAddress)
SetAddresses sets the addresses field on the GCPMachine.
func (*MachineScope) SetAnnotation ¶
func (m *MachineScope) SetAnnotation(key, value string)
SetAnnotation sets a key value annotation on the GCPMachine.
func (*MachineScope) SetFailureMessage ¶
func (m *MachineScope) SetFailureMessage(v error)
SetFailureMessage sets the GCPMachine status failure message.
func (*MachineScope) SetFailureReason ¶
func (m *MachineScope) SetFailureReason(v capierrors.MachineStatusError)
SetFailureReason sets the GCPMachine status failure reason.
func (*MachineScope) SetInstanceStatus ¶
func (m *MachineScope) SetInstanceStatus(v infrav1.InstanceStatus)
SetInstanceStatus sets the GCPMachine instance status.
func (*MachineScope) SetProviderID ¶
func (m *MachineScope) SetProviderID()
SetProviderID sets the GCPMachine providerID in spec.
func (*MachineScope) SetReady ¶
func (m *MachineScope) SetReady()
SetReady sets the GCPMachine Ready Status.
func (*MachineScope) Zone ¶
func (m *MachineScope) Zone() string
Zone returns the FailureDomain for the GCPMachine.
type MachineScopeGetter ¶
type MachineScopeGetter interface {
MachineScope(params MachineScopeParams) (*MachineScope, error)
}
MachineScopeGetter ...
type MachineScopeGetterFunc ¶
type MachineScopeGetterFunc func(params MachineScopeParams) (*MachineScope, error)
MachineScopeGetterFunc ...
func (MachineScopeGetterFunc) MachineScope ¶
func (f MachineScopeGetterFunc) MachineScope(params MachineScopeParams) (*MachineScope, error)
MachineScope returns the machine scope.
type MachineScopeParams ¶
type MachineScopeParams struct { Client client.Client ClusterGetter cloud.ClusterGetter Machine *clusterv1.Machine GCPMachine *infrav1.GCPMachine }
MachineScopeParams defines the input parameters used to create a new MachineScope.
type ManagedClusterScope ¶ added in v1.3.0
type ManagedClusterScope struct { Cluster *clusterv1.Cluster GCPManagedCluster *infrav1exp.GCPManagedCluster GCPManagedControlPlane *infrav1exp.GCPManagedControlPlane GCPServices // contains filtered or unexported fields }
ManagedClusterScope defines the basic context for an actuator to operate upon.
func NewManagedClusterScope ¶ added in v1.3.0
func NewManagedClusterScope(ctx context.Context, params ManagedClusterScopeParams) (*ManagedClusterScope, error)
NewManagedClusterScope creates a new Scope from the supplied parameters. This is meant to be called for each reconcile iteration.
func (*ManagedClusterScope) AdditionalLabels ¶ added in v1.3.0
func (s *ManagedClusterScope) AdditionalLabels() infrav1.Labels
AdditionalLabels returns the cluster additional labels.
func (*ManagedClusterScope) Close ¶ added in v1.3.0
func (s *ManagedClusterScope) Close() error
Close closes the current scope persisting the cluster configuration and status.
func (*ManagedClusterScope) Cloud ¶ added in v1.3.0
func (s *ManagedClusterScope) Cloud() cloud.Cloud
Cloud returns initialized cloud.
func (*ManagedClusterScope) ControlPlaneEndpoint ¶ added in v1.3.0
func (s *ManagedClusterScope) ControlPlaneEndpoint() clusterv1.APIEndpoint
ControlPlaneEndpoint returns the cluster control-plane endpoint.
func (*ManagedClusterScope) FailureDomains ¶ added in v1.3.0
func (s *ManagedClusterScope) FailureDomains() clusterv1.FailureDomains
FailureDomains returns the cluster failure domains.
func (*ManagedClusterScope) FirewallRulesSpec ¶ added in v1.3.0
func (s *ManagedClusterScope) FirewallRulesSpec() []*compute.Firewall
FirewallRulesSpec returns google compute firewall spec.
func (*ManagedClusterScope) Name ¶ added in v1.3.0
func (s *ManagedClusterScope) Name() string
Name returns the cluster name.
func (*ManagedClusterScope) Namespace ¶ added in v1.3.0
func (s *ManagedClusterScope) Namespace() string
Namespace returns the cluster namespace.
func (*ManagedClusterScope) NatRouterSpec ¶ added in v1.3.0
func (s *ManagedClusterScope) NatRouterSpec() *compute.Router
NatRouterSpec returns google compute nat router spec.
func (*ManagedClusterScope) Network ¶ added in v1.3.0
func (s *ManagedClusterScope) Network() *infrav1.Network
Network returns the cluster network object.
func (*ManagedClusterScope) NetworkLink ¶ added in v1.3.0
func (s *ManagedClusterScope) NetworkLink() string
NetworkLink returns the partial URL for the network.
func (*ManagedClusterScope) NetworkName ¶ added in v1.3.0
func (s *ManagedClusterScope) NetworkName() string
NetworkName returns the cluster network unique identifier.
func (*ManagedClusterScope) NetworkSpec ¶ added in v1.3.0
func (s *ManagedClusterScope) NetworkSpec() *compute.Network
NetworkSpec returns google compute network spec.
func (*ManagedClusterScope) PatchObject ¶ added in v1.3.0
func (s *ManagedClusterScope) PatchObject() error
PatchObject persists the cluster configuration and status.
func (*ManagedClusterScope) Project ¶ added in v1.3.0
func (s *ManagedClusterScope) Project() string
Project returns the current project name.
func (*ManagedClusterScope) Region ¶ added in v1.3.0
func (s *ManagedClusterScope) Region() string
Region returns the cluster region.
func (*ManagedClusterScope) SetControlPlaneEndpoint ¶ added in v1.3.0
func (s *ManagedClusterScope) SetControlPlaneEndpoint(endpoint clusterv1.APIEndpoint)
SetControlPlaneEndpoint sets cluster control-plane endpoint.
func (*ManagedClusterScope) SetFailureDomains ¶ added in v1.3.0
func (s *ManagedClusterScope) SetFailureDomains(fd clusterv1.FailureDomains)
SetFailureDomains sets cluster failure domains.
func (*ManagedClusterScope) SetReady ¶ added in v1.3.0
func (s *ManagedClusterScope) SetReady()
SetReady sets cluster ready status.
func (*ManagedClusterScope) SubnetSpecs ¶ added in v1.3.0
func (s *ManagedClusterScope) SubnetSpecs() []*compute.Subnetwork
SubnetSpecs returns google compute subnets spec.
type ManagedClusterScopeParams ¶ added in v1.3.0
type ManagedClusterScopeParams struct { GCPServices Client client.Client Cluster *clusterv1.Cluster GCPManagedCluster *infrav1exp.GCPManagedCluster GCPManagedControlPlane *infrav1exp.GCPManagedControlPlane }
ManagedClusterScopeParams defines the input parameters used to create a new Scope.
type ManagedControlPlaneScope ¶ added in v1.3.0
type ManagedControlPlaneScope struct { Cluster *clusterv1.Cluster GCPManagedCluster *infrav1exp.GCPManagedCluster GCPManagedControlPlane *infrav1exp.GCPManagedControlPlane AllMachinePools []clusterv1exp.MachinePool AllManagedMachinePools []infrav1exp.GCPManagedMachinePool // contains filtered or unexported fields }
ManagedControlPlaneScope defines the basic context for an actuator to operate upon.
func NewManagedControlPlaneScope ¶ added in v1.3.0
func NewManagedControlPlaneScope(ctx context.Context, params ManagedControlPlaneScopeParams) (*ManagedControlPlaneScope, error)
NewManagedControlPlaneScope creates a new Scope from the supplied parameters. This is meant to be called for each reconcile iteration.
func (*ManagedControlPlaneScope) Client ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) Client() client.Client
Client returns a k8s client.
func (*ManagedControlPlaneScope) Close ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) Close() error
Close closes the current scope persisting the managed control plane configuration and status.
func (*ManagedControlPlaneScope) ClusterFullName ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) ClusterFullName() string
ClusterFullName returns the full name of the cluster.
func (*ManagedControlPlaneScope) ClusterLocation ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) ClusterLocation() string
ClusterLocation returns the location of the cluster.
func (*ManagedControlPlaneScope) ClusterName ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) ClusterName() string
ClusterName returns the name of the cluster.
func (*ManagedControlPlaneScope) ConditionSetter ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) ConditionSetter() conditions.Setter
ConditionSetter return a condition setter (which is GCPManagedControlPlane itself).
func (*ManagedControlPlaneScope) CredentialsClient ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) CredentialsClient() *credentials.IamCredentialsClient
CredentialsClient returns a client used to interact with IAM.
func (*ManagedControlPlaneScope) GetAllNodePools ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) GetAllNodePools(ctx context.Context) ([]infrav1exp.GCPManagedMachinePool, []clusterv1exp.MachinePool, error)
GetAllNodePools gets all node pools for the control plane.
func (*ManagedControlPlaneScope) GetCredential ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) GetCredential() *Credential
GetCredential returns the credential data.
func (*ManagedControlPlaneScope) IsAutopilotCluster ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) IsAutopilotCluster() bool
IsAutopilotCluster returns true if this is an autopilot cluster.
func (*ManagedControlPlaneScope) ManagedControlPlaneClient ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) ManagedControlPlaneClient() *container.ClusterManagerClient
ManagedControlPlaneClient returns a client used to interact with GKE.
func (*ManagedControlPlaneScope) PatchObject ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) PatchObject() error
PatchObject persists the managed control plane configuration and status.
func (*ManagedControlPlaneScope) Region ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) Region() string
Region returns the region of the GKE cluster.
func (*ManagedControlPlaneScope) SetEndpoint ¶ added in v1.3.0
func (s *ManagedControlPlaneScope) SetEndpoint(host string)
SetEndpoint sets the Endpoint of GCPManagedControlPlane.
type ManagedControlPlaneScopeParams ¶ added in v1.3.0
type ManagedControlPlaneScopeParams struct { CredentialsClient *credentials.IamCredentialsClient ManagedClusterClient *container.ClusterManagerClient Client client.Client Cluster *clusterv1.Cluster GCPManagedCluster *infrav1exp.GCPManagedCluster GCPManagedControlPlane *infrav1exp.GCPManagedControlPlane }
ManagedControlPlaneScopeParams defines the input parameters used to create a new Scope.
type ManagedMachinePoolScope ¶ added in v1.3.0
type ManagedMachinePoolScope struct { Cluster *clusterv1.Cluster MachinePool *clusterv1exp.MachinePool GCPManagedCluster *infrav1exp.GCPManagedCluster GCPManagedControlPlane *infrav1exp.GCPManagedControlPlane GCPManagedMachinePool *infrav1exp.GCPManagedMachinePool // contains filtered or unexported fields }
ManagedMachinePoolScope defines the basic context for an actuator to operate upon.
func NewManagedMachinePoolScope ¶ added in v1.3.0
func NewManagedMachinePoolScope(ctx context.Context, params ManagedMachinePoolScopeParams) (*ManagedMachinePoolScope, error)
NewManagedMachinePoolScope creates a new Scope from the supplied parameters. This is meant to be called for each reconcile iteration.
func (*ManagedMachinePoolScope) Close ¶ added in v1.3.0
func (s *ManagedMachinePoolScope) Close() error
Close closes the current scope persisting the managed control plane configuration and status.
func (*ManagedMachinePoolScope) ConditionSetter ¶ added in v1.3.0
func (s *ManagedMachinePoolScope) ConditionSetter() conditions.Setter
ConditionSetter return a condition setter (which is GCPManagedMachinePool itself).
func (*ManagedMachinePoolScope) InstanceGroupManagersClient ¶ added in v1.3.0
func (s *ManagedMachinePoolScope) InstanceGroupManagersClient() *compute.InstanceGroupManagersClient
InstanceGroupManagersClient returns a client used to interact with GCP MIG.
func (*ManagedMachinePoolScope) ManagedMachinePoolClient ¶ added in v1.3.0
func (s *ManagedMachinePoolScope) ManagedMachinePoolClient() *container.ClusterManagerClient
ManagedMachinePoolClient returns a client used to interact with GKE.
func (*ManagedMachinePoolScope) NodePoolFullName ¶ added in v1.3.0
func (s *ManagedMachinePoolScope) NodePoolFullName() string
NodePoolFullName returns the full name of the node pool.
func (*ManagedMachinePoolScope) NodePoolLocation ¶ added in v1.3.0
func (s *ManagedMachinePoolScope) NodePoolLocation() string
NodePoolLocation returns the location of the node pool.
func (*ManagedMachinePoolScope) NodePoolName ¶ added in v1.3.0
func (s *ManagedMachinePoolScope) NodePoolName() string
NodePoolName returns the node pool name.
func (*ManagedMachinePoolScope) NodePoolVersion ¶ added in v1.3.0
func (s *ManagedMachinePoolScope) NodePoolVersion() *string
NodePoolVersion returns the k8s version of the node pool.
func (*ManagedMachinePoolScope) PatchObject ¶ added in v1.3.0
func (s *ManagedMachinePoolScope) PatchObject() error
PatchObject persists the managed control plane configuration and status.
func (*ManagedMachinePoolScope) Region ¶ added in v1.3.0
func (s *ManagedMachinePoolScope) Region() string
Region returns the region of the GKE node pool.
func (*ManagedMachinePoolScope) SetReplicas ¶ added in v1.3.0
func (s *ManagedMachinePoolScope) SetReplicas(replicas int32)
SetReplicas sets the replicas count in status.
type ManagedMachinePoolScopeParams ¶ added in v1.3.0
type ManagedMachinePoolScopeParams struct { ManagedClusterClient *container.ClusterManagerClient InstanceGroupManagersClient *compute.InstanceGroupManagersClient Client client.Client Cluster *clusterv1.Cluster MachinePool *clusterv1exp.MachinePool GCPManagedCluster *infrav1exp.GCPManagedCluster GCPManagedControlPlane *infrav1exp.GCPManagedControlPlane GCPManagedMachinePool *infrav1exp.GCPManagedMachinePool }
ManagedMachinePoolScopeParams defines the input parameters used to create a new Scope.