Documentation ¶
Index ¶
- Constants
- Variables
- func BuildDefaultConfigMap(name, namespace string) *v1.ConfigMap
- func GetProjectFromStrategyOrDefault(ctx context.Context, c client.Client, strategy *StrategyConfig) (string, error)
- func GetRegionFromStrategyOrDefault(ctx context.Context, c client.Client, strategy *StrategyConfig) (string, error)
- type BlobStorageProvider
- func (bsp BlobStorageProvider) CreateStorage(ctx context.Context, bs *v1alpha1.BlobStorage) (*providers.BlobStorageInstance, types.StatusMessage, error)
- func (bsp BlobStorageProvider) DeleteStorage(ctx context.Context, bs *v1alpha1.BlobStorage) (types.StatusMessage, error)
- func (bsp BlobStorageProvider) GetName() string
- func (bsp BlobStorageProvider) GetReconcileTime(bs *v1alpha1.BlobStorage) time.Duration
- func (bsp BlobStorageProvider) SupportsStrategy(deploymentStrategy string) bool
- type ConfigManager
- type ConfigManagerMock
- type ConfigMapConfigManager
- type CreateInstanceRequest
- type CreateVpcInput
- type CredentialManager
- type CredentialManagerMock
- func (mock *CredentialManagerMock) ReconcileCredentials(ctx context.Context, name string, ns string, roles []string) (*v1.CredentialsRequest, *Credentials, error)
- func (mock *CredentialManagerMock) ReconcileCredentialsCalls() []struct{ ... }
- func (mock *CredentialManagerMock) ReconcileProviderCredentials(ctx context.Context, ns string) (*Credentials, error)
- func (mock *CredentialManagerMock) ReconcileProviderCredentialsCalls() []struct{ ... }
- type CredentialMinterCredentialManager
- type Credentials
- type NetworkManager
- type NetworkManagerMock
- func (mock *NetworkManagerMock) ComponentsExist(contextMoqParam context.Context) (bool, error)
- func (mock *NetworkManagerMock) ComponentsExistCalls() []struct{ ... }
- func (mock *NetworkManagerMock) CreateNetworkIpRange(contextMoqParam context.Context, iPNet *net.IPNet) (*computepb.Address, croType.StatusMessage, error)
- func (mock *NetworkManagerMock) CreateNetworkIpRangeCalls() []struct{ ... }
- func (mock *NetworkManagerMock) CreateNetworkService(contextMoqParam context.Context) (*servicenetworking.Connection, croType.StatusMessage, error)
- func (mock *NetworkManagerMock) CreateNetworkServiceCalls() []struct{ ... }
- func (mock *NetworkManagerMock) DeleteNetworkIpRange(contextMoqParam context.Context) error
- func (mock *NetworkManagerMock) DeleteNetworkIpRangeCalls() []struct{ ... }
- func (mock *NetworkManagerMock) DeleteNetworkPeering(contextMoqParam context.Context) error
- func (mock *NetworkManagerMock) DeleteNetworkPeeringCalls() []struct{ ... }
- func (mock *NetworkManagerMock) DeleteNetworkService(contextMoqParam context.Context) error
- func (mock *NetworkManagerMock) DeleteNetworkServiceCalls() []struct{ ... }
- func (mock *NetworkManagerMock) ReconcileNetworkProviderConfig(ctx context.Context, configManager ConfigManager, tier string) (*net.IPNet, error)
- func (mock *NetworkManagerMock) ReconcileNetworkProviderConfigCalls() []struct{ ... }
- type NetworkProvider
- func (n *NetworkProvider) ComponentsExist(ctx context.Context) (bool, error)
- func (n *NetworkProvider) CreateNetworkIpRange(ctx context.Context, cidrRange *net.IPNet) (*computepb.Address, croType.StatusMessage, error)
- func (n *NetworkProvider) CreateNetworkService(ctx context.Context) (*servicenetworking.Connection, croType.StatusMessage, error)
- func (n *NetworkProvider) DeleteNetworkIpRange(ctx context.Context) error
- func (n *NetworkProvider) DeleteNetworkPeering(ctx context.Context) error
- func (n *NetworkProvider) DeleteNetworkService(ctx context.Context) error
- func (n *NetworkProvider) ReconcileNetworkProviderConfig(ctx context.Context, configManager ConfigManager, tier string) (*net.IPNet, error)
- type PostgresMetricsProvider
- type PostgresProvider
- func (p *PostgresProvider) DeletePostgres(ctx context.Context, pg *v1alpha1.Postgres) (croType.StatusMessage, error)
- func (p *PostgresProvider) GetName() string
- func (p *PostgresProvider) GetReconcileTime(pg *v1alpha1.Postgres) time.Duration
- func (p *PostgresProvider) ReconcilePostgres(ctx context.Context, pg *v1alpha1.Postgres) (*providers.PostgresInstance, croType.StatusMessage, error)
- func (p *PostgresProvider) SupportsStrategy(deploymentStrategy string) bool
- type RedisMetricsProvider
- type RedisProvider
- func (p *RedisProvider) CreateRedis(ctx context.Context, r *v1alpha1.Redis) (*providers.RedisCluster, croType.StatusMessage, error)
- func (p *RedisProvider) DeleteRedis(ctx context.Context, r *v1alpha1.Redis) (croType.StatusMessage, error)
- func (p *RedisProvider) GetName() string
- func (p *RedisProvider) GetReconcileTime(r *v1alpha1.Redis) time.Duration
- func (p *RedisProvider) SupportsStrategy(deploymentStrategy string) bool
- type StrategyConfig
Constants ¶
const ( DefaultConfigMapName = "cloud-resources-gcp-strategies" DefaultFinalizer = "cloud-resources-operator.integreatly.org/finalizers" )
const (
ResourceIdentifierAnnotation = "resourceIdentifier"
)
Variables ¶
var DefaultConfigMapNamespace, _ = k8sutil.GetWatchNamespace()
DefaultConfigMapNamespace is the default namespace that Configmaps will be created in
Functions ¶
func BuildDefaultConfigMap ¶
Types ¶
type BlobStorageProvider ¶
type BlobStorageProvider struct { Client client.Client CredentialManager CredentialManager ConfigManager ConfigManager }
func NewGCPBlobStorageProvider ¶
func NewGCPBlobStorageProvider(client client.Client) *BlobStorageProvider
func (BlobStorageProvider) CreateStorage ¶
func (bsp BlobStorageProvider) CreateStorage(ctx context.Context, bs *v1alpha1.BlobStorage) (*providers.BlobStorageInstance, types.StatusMessage, error)
func (BlobStorageProvider) DeleteStorage ¶
func (bsp BlobStorageProvider) DeleteStorage(ctx context.Context, bs *v1alpha1.BlobStorage) (types.StatusMessage, error)
func (BlobStorageProvider) GetName ¶
func (bsp BlobStorageProvider) GetName() string
func (BlobStorageProvider) GetReconcileTime ¶
func (bsp BlobStorageProvider) GetReconcileTime(bs *v1alpha1.BlobStorage) time.Duration
func (BlobStorageProvider) SupportsStrategy ¶
func (bsp BlobStorageProvider) SupportsStrategy(deploymentStrategy string) bool
type ConfigManager ¶
type ConfigManager interface {
ReadStorageStrategy(ctx context.Context, rt providers.ResourceType, tier string) (*StrategyConfig, error)
}
type ConfigManagerMock ¶
type ConfigManagerMock struct { // ReadStorageStrategyFunc mocks the ReadStorageStrategy method. ReadStorageStrategyFunc func(ctx context.Context, rt providers.ResourceType, tier string) (*StrategyConfig, error) // contains filtered or unexported fields }
ConfigManagerMock is a mock implementation of ConfigManager.
func TestSomethingThatUsesConfigManager(t *testing.T) { // make and configure a mocked ConfigManager mockedConfigManager := &ConfigManagerMock{ ReadStorageStrategyFunc: func(ctx context.Context, rt providers.ResourceType, tier string) (*StrategyConfig, error) { panic("mock out the ReadStorageStrategy method") }, } // use mockedConfigManager in code that requires ConfigManager // and then make assertions. }
func (*ConfigManagerMock) ReadStorageStrategy ¶
func (mock *ConfigManagerMock) ReadStorageStrategy(ctx context.Context, rt providers.ResourceType, tier string) (*StrategyConfig, error)
ReadStorageStrategy calls ReadStorageStrategyFunc.
func (*ConfigManagerMock) ReadStorageStrategyCalls ¶
func (mock *ConfigManagerMock) ReadStorageStrategyCalls() []struct { Ctx context.Context Rt providers.ResourceType Tier string }
ReadStorageStrategyCalls gets all the calls that were made to ReadStorageStrategy. Check the length with:
len(mockedConfigManager.ReadStorageStrategyCalls())
type ConfigMapConfigManager ¶
type ConfigMapConfigManager struct {
// contains filtered or unexported fields
}
func NewConfigMapConfigManager ¶
func NewConfigMapConfigManager(cm string, namespace string, client client.Client) *ConfigMapConfigManager
func NewDefaultConfigManager ¶
func NewDefaultConfigManager(client client.Client) *ConfigMapConfigManager
func (*ConfigMapConfigManager) ReadStorageStrategy ¶
func (cmm *ConfigMapConfigManager) ReadStorageStrategy(ctx context.Context, rt providers.ResourceType, tier string) (*StrategyConfig, error)
type CreateInstanceRequest ¶
type CreateInstanceRequest struct {
Instance *gcpiface.DatabaseInstance `json:"instance,omitempty"`
}
type CreateVpcInput ¶
type CreateVpcInput struct {
CidrBlock string
}
type CredentialManager ¶
type CredentialManager interface { ReconcileProviderCredentials(ctx context.Context, ns string) (*Credentials, error) ReconcileCredentials(ctx context.Context, name string, ns string, roles []string) (*v1.CredentialsRequest, *Credentials, error) }
type CredentialManagerMock ¶
type CredentialManagerMock struct { // ReconcileCredentialsFunc mocks the ReconcileCredentials method. ReconcileCredentialsFunc func(ctx context.Context, name string, ns string, roles []string) (*v1.CredentialsRequest, *Credentials, error) // ReconcileProviderCredentialsFunc mocks the ReconcileProviderCredentials method. ReconcileProviderCredentialsFunc func(ctx context.Context, ns string) (*Credentials, error) // contains filtered or unexported fields }
CredentialManagerMock is a mock implementation of CredentialManager.
func TestSomethingThatUsesCredentialManager(t *testing.T) { // make and configure a mocked CredentialManager mockedCredentialManager := &CredentialManagerMock{ ReconcileCredentialsFunc: func(ctx context.Context, name string, ns string, roles []string) (*v1.CredentialsRequest, *Credentials, error) { panic("mock out the ReconcileCredentials method") }, ReconcileProviderCredentialsFunc: func(ctx context.Context, ns string) (*Credentials, error) { panic("mock out the ReconcileProviderCredentials method") }, } // use mockedCredentialManager in code that requires CredentialManager // and then make assertions. }
func (*CredentialManagerMock) ReconcileCredentials ¶
func (mock *CredentialManagerMock) ReconcileCredentials(ctx context.Context, name string, ns string, roles []string) (*v1.CredentialsRequest, *Credentials, error)
ReconcileCredentials calls ReconcileCredentialsFunc.
func (*CredentialManagerMock) ReconcileCredentialsCalls ¶
func (mock *CredentialManagerMock) ReconcileCredentialsCalls() []struct { Ctx context.Context Name string Ns string Roles []string }
ReconcileCredentialsCalls gets all the calls that were made to ReconcileCredentials. Check the length with:
len(mockedCredentialManager.ReconcileCredentialsCalls())
func (*CredentialManagerMock) ReconcileProviderCredentials ¶
func (mock *CredentialManagerMock) ReconcileProviderCredentials(ctx context.Context, ns string) (*Credentials, error)
ReconcileProviderCredentials calls ReconcileProviderCredentialsFunc.
func (*CredentialManagerMock) ReconcileProviderCredentialsCalls ¶
func (mock *CredentialManagerMock) ReconcileProviderCredentialsCalls() []struct { Ctx context.Context Ns string }
ReconcileProviderCredentialsCalls gets all the calls that were made to ReconcileProviderCredentials. Check the length with:
len(mockedCredentialManager.ReconcileProviderCredentialsCalls())
type CredentialMinterCredentialManager ¶
type CredentialMinterCredentialManager struct { ProviderCredentialName string Client client.Client }
func NewCredentialMinterCredentialManager ¶
func NewCredentialMinterCredentialManager(client client.Client) *CredentialMinterCredentialManager
func (*CredentialMinterCredentialManager) ReconcileCredentials ¶
func (m *CredentialMinterCredentialManager) ReconcileCredentials(ctx context.Context, name string, ns string, roles []string) (*v1.CredentialsRequest, *Credentials, error)
func (*CredentialMinterCredentialManager) ReconcileProviderCredentials ¶
func (m *CredentialMinterCredentialManager) ReconcileProviderCredentials(ctx context.Context, ns string) (*Credentials, error)
type Credentials ¶
type NetworkManager ¶
type NetworkManager interface { CreateNetworkIpRange(context.Context, *net.IPNet) (*computepb.Address, croType.StatusMessage, error) CreateNetworkService(context.Context) (*servicenetworking.Connection, croType.StatusMessage, error) DeleteNetworkPeering(context.Context) error DeleteNetworkService(context.Context) error DeleteNetworkIpRange(context.Context) error ComponentsExist(context.Context) (bool, error) ReconcileNetworkProviderConfig(ctx context.Context, configManager ConfigManager, tier string) (*net.IPNet, error) }
type NetworkManagerMock ¶
type NetworkManagerMock struct { // ComponentsExistFunc mocks the ComponentsExist method. ComponentsExistFunc func(contextMoqParam context.Context) (bool, error) // CreateNetworkIpRangeFunc mocks the CreateNetworkIpRange method. CreateNetworkIpRangeFunc func(contextMoqParam context.Context, iPNet *net.IPNet) (*computepb.Address, croType.StatusMessage, error) // CreateNetworkServiceFunc mocks the CreateNetworkService method. CreateNetworkServiceFunc func(contextMoqParam context.Context) (*servicenetworking.Connection, croType.StatusMessage, error) // DeleteNetworkIpRangeFunc mocks the DeleteNetworkIpRange method. DeleteNetworkIpRangeFunc func(contextMoqParam context.Context) error // DeleteNetworkPeeringFunc mocks the DeleteNetworkPeering method. DeleteNetworkPeeringFunc func(contextMoqParam context.Context) error // DeleteNetworkServiceFunc mocks the DeleteNetworkService method. DeleteNetworkServiceFunc func(contextMoqParam context.Context) error // ReconcileNetworkProviderConfigFunc mocks the ReconcileNetworkProviderConfig method. ReconcileNetworkProviderConfigFunc func(ctx context.Context, configManager ConfigManager, tier string) (*net.IPNet, error) // contains filtered or unexported fields }
NetworkManagerMock is a mock implementation of NetworkManager.
func TestSomethingThatUsesNetworkManager(t *testing.T) { // make and configure a mocked NetworkManager mockedNetworkManager := &NetworkManagerMock{ ComponentsExistFunc: func(contextMoqParam context.Context) (bool, error) { panic("mock out the ComponentsExist method") }, CreateNetworkIpRangeFunc: func(contextMoqParam context.Context, iPNet *net.IPNet) (*computepb.Address, croType.StatusMessage, error) { panic("mock out the CreateNetworkIpRange method") }, CreateNetworkServiceFunc: func(contextMoqParam context.Context) (*servicenetworking.Connection, croType.StatusMessage, error) { panic("mock out the CreateNetworkService method") }, DeleteNetworkIpRangeFunc: func(contextMoqParam context.Context) error { panic("mock out the DeleteNetworkIpRange method") }, DeleteNetworkPeeringFunc: func(contextMoqParam context.Context) error { panic("mock out the DeleteNetworkPeering method") }, DeleteNetworkServiceFunc: func(contextMoqParam context.Context) error { panic("mock out the DeleteNetworkService method") }, ReconcileNetworkProviderConfigFunc: func(ctx context.Context, configManager ConfigManager, tier string) (*net.IPNet, error) { panic("mock out the ReconcileNetworkProviderConfig method") }, } // use mockedNetworkManager in code that requires NetworkManager // and then make assertions. }
func (*NetworkManagerMock) ComponentsExist ¶
func (mock *NetworkManagerMock) ComponentsExist(contextMoqParam context.Context) (bool, error)
ComponentsExist calls ComponentsExistFunc.
func (*NetworkManagerMock) ComponentsExistCalls ¶
func (mock *NetworkManagerMock) ComponentsExistCalls() []struct { ContextMoqParam context.Context }
ComponentsExistCalls gets all the calls that were made to ComponentsExist. Check the length with:
len(mockedNetworkManager.ComponentsExistCalls())
func (*NetworkManagerMock) CreateNetworkIpRange ¶
func (mock *NetworkManagerMock) CreateNetworkIpRange(contextMoqParam context.Context, iPNet *net.IPNet) (*computepb.Address, croType.StatusMessage, error)
CreateNetworkIpRange calls CreateNetworkIpRangeFunc.
func (*NetworkManagerMock) CreateNetworkIpRangeCalls ¶
func (mock *NetworkManagerMock) CreateNetworkIpRangeCalls() []struct { ContextMoqParam context.Context IPNet *net.IPNet }
CreateNetworkIpRangeCalls gets all the calls that were made to CreateNetworkIpRange. Check the length with:
len(mockedNetworkManager.CreateNetworkIpRangeCalls())
func (*NetworkManagerMock) CreateNetworkService ¶
func (mock *NetworkManagerMock) CreateNetworkService(contextMoqParam context.Context) (*servicenetworking.Connection, croType.StatusMessage, error)
CreateNetworkService calls CreateNetworkServiceFunc.
func (*NetworkManagerMock) CreateNetworkServiceCalls ¶
func (mock *NetworkManagerMock) CreateNetworkServiceCalls() []struct { ContextMoqParam context.Context }
CreateNetworkServiceCalls gets all the calls that were made to CreateNetworkService. Check the length with:
len(mockedNetworkManager.CreateNetworkServiceCalls())
func (*NetworkManagerMock) DeleteNetworkIpRange ¶
func (mock *NetworkManagerMock) DeleteNetworkIpRange(contextMoqParam context.Context) error
DeleteNetworkIpRange calls DeleteNetworkIpRangeFunc.
func (*NetworkManagerMock) DeleteNetworkIpRangeCalls ¶
func (mock *NetworkManagerMock) DeleteNetworkIpRangeCalls() []struct { ContextMoqParam context.Context }
DeleteNetworkIpRangeCalls gets all the calls that were made to DeleteNetworkIpRange. Check the length with:
len(mockedNetworkManager.DeleteNetworkIpRangeCalls())
func (*NetworkManagerMock) DeleteNetworkPeering ¶
func (mock *NetworkManagerMock) DeleteNetworkPeering(contextMoqParam context.Context) error
DeleteNetworkPeering calls DeleteNetworkPeeringFunc.
func (*NetworkManagerMock) DeleteNetworkPeeringCalls ¶
func (mock *NetworkManagerMock) DeleteNetworkPeeringCalls() []struct { ContextMoqParam context.Context }
DeleteNetworkPeeringCalls gets all the calls that were made to DeleteNetworkPeering. Check the length with:
len(mockedNetworkManager.DeleteNetworkPeeringCalls())
func (*NetworkManagerMock) DeleteNetworkService ¶
func (mock *NetworkManagerMock) DeleteNetworkService(contextMoqParam context.Context) error
DeleteNetworkService calls DeleteNetworkServiceFunc.
func (*NetworkManagerMock) DeleteNetworkServiceCalls ¶
func (mock *NetworkManagerMock) DeleteNetworkServiceCalls() []struct { ContextMoqParam context.Context }
DeleteNetworkServiceCalls gets all the calls that were made to DeleteNetworkService. Check the length with:
len(mockedNetworkManager.DeleteNetworkServiceCalls())
func (*NetworkManagerMock) ReconcileNetworkProviderConfig ¶
func (mock *NetworkManagerMock) ReconcileNetworkProviderConfig(ctx context.Context, configManager ConfigManager, tier string) (*net.IPNet, error)
ReconcileNetworkProviderConfig calls ReconcileNetworkProviderConfigFunc.
func (*NetworkManagerMock) ReconcileNetworkProviderConfigCalls ¶
func (mock *NetworkManagerMock) ReconcileNetworkProviderConfigCalls() []struct { Ctx context.Context ConfigManager ConfigManager Tier string }
ReconcileNetworkProviderConfigCalls gets all the calls that were made to ReconcileNetworkProviderConfig. Check the length with:
len(mockedNetworkManager.ReconcileNetworkProviderConfigCalls())
type NetworkProvider ¶
type NetworkProvider struct { Client client.Client NetworkApi gcpiface.NetworksAPI SubnetApi gcpiface.SubnetsApi ServicesApi gcpiface.ServicesAPI AddressApi gcpiface.AddressAPI Logger *logrus.Entry ProjectID string }
func NewNetworkManager ¶
func NewNetworkManager(ctx context.Context, projectID string, opt option.ClientOption, client client.Client, logger *logrus.Entry) (*NetworkProvider, error)
NewNetworkManager initialises all required clients
func (*NetworkProvider) ComponentsExist ¶
func (n *NetworkProvider) ComponentsExist(ctx context.Context) (bool, error)
func (*NetworkProvider) CreateNetworkIpRange ¶
func (n *NetworkProvider) CreateNetworkIpRange(ctx context.Context, cidrRange *net.IPNet) (*computepb.Address, croType.StatusMessage, error)
func (*NetworkProvider) CreateNetworkService ¶
func (n *NetworkProvider) CreateNetworkService(ctx context.Context) (*servicenetworking.Connection, croType.StatusMessage, error)
CreateNetworkService Creates the network service connection and will return the service if it has been created successfully This automatically creates a peering connection to the clusterVpc named after the service connection
func (*NetworkProvider) DeleteNetworkIpRange ¶
func (n *NetworkProvider) DeleteNetworkIpRange(ctx context.Context) error
func (*NetworkProvider) DeleteNetworkPeering ¶
func (n *NetworkProvider) DeleteNetworkPeering(ctx context.Context) error
DeleteNetworkPeering Removes the peering connection from the cluster vpc The service connection removal can get stuck if this is not performed first
func (*NetworkProvider) DeleteNetworkService ¶
func (n *NetworkProvider) DeleteNetworkService(ctx context.Context) error
DeleteNetworkService This deletes the network service connection, but can get stuck if peering has not been removed
func (*NetworkProvider) ReconcileNetworkProviderConfig ¶
func (n *NetworkProvider) ReconcileNetworkProviderConfig(ctx context.Context, configManager ConfigManager, tier string) (*net.IPNet, error)
type PostgresMetricsProvider ¶
type PostgresMetricsProvider struct { Client client.Client Logger *logrus.Entry CredentialManager CredentialManager ConfigManager ConfigManager }
func (*PostgresMetricsProvider) ScrapePostgresMetrics ¶
func (p *PostgresMetricsProvider) ScrapePostgresMetrics(ctx context.Context, pg *v1alpha1.Postgres, metricTypes []providers.CloudProviderMetricType) (*providers.ScrapeMetricsData, error)
func (*PostgresMetricsProvider) SupportsStrategy ¶
func (p *PostgresMetricsProvider) SupportsStrategy(strategy string) bool
type PostgresProvider ¶
type PostgresProvider struct { Client client.Client Logger *logrus.Entry CredentialManager CredentialManager ConfigManager ConfigManager TCPPinger resources.ConnectionTester }
func NewGCPPostgresProvider ¶
func NewGCPPostgresProvider(client client.Client, logger *logrus.Entry) *PostgresProvider
func (*PostgresProvider) DeletePostgres ¶
func (p *PostgresProvider) DeletePostgres(ctx context.Context, pg *v1alpha1.Postgres) (croType.StatusMessage, error)
DeletePostgres will set the postgres deletion timestamp, reconcile provider credentials so that the postgres instance can be accessed, build the cloudSQL service using these credentials and call the deleteCloudSQLInstance function to perform the delete action.
func (*PostgresProvider) GetName ¶
func (p *PostgresProvider) GetName() string
func (*PostgresProvider) GetReconcileTime ¶
func (p *PostgresProvider) GetReconcileTime(pg *v1alpha1.Postgres) time.Duration
func (*PostgresProvider) ReconcilePostgres ¶
func (p *PostgresProvider) ReconcilePostgres(ctx context.Context, pg *v1alpha1.Postgres) (*providers.PostgresInstance, croType.StatusMessage, error)
func (*PostgresProvider) SupportsStrategy ¶
func (p *PostgresProvider) SupportsStrategy(deploymentStrategy string) bool
type RedisMetricsProvider ¶
type RedisMetricsProvider struct { Client client.Client Logger *logrus.Entry CredentialManager CredentialManager ConfigManager ConfigManager }
func (*RedisMetricsProvider) ScrapeRedisMetrics ¶
func (p *RedisMetricsProvider) ScrapeRedisMetrics(ctx context.Context, r *v1alpha1.Redis, metricTypes []providers.CloudProviderMetricType) (*providers.ScrapeMetricsData, error)
func (*RedisMetricsProvider) SupportsStrategy ¶
func (p *RedisMetricsProvider) SupportsStrategy(strategy string) bool
type RedisProvider ¶
type RedisProvider struct { Client client.Client Logger *logrus.Entry CredentialManager CredentialManager ConfigManager ConfigManager TCPPinger resources.ConnectionTester }
func NewGCPRedisProvider ¶
func NewGCPRedisProvider(client client.Client, logger *logrus.Entry) *RedisProvider
func (*RedisProvider) CreateRedis ¶
func (p *RedisProvider) CreateRedis(ctx context.Context, r *v1alpha1.Redis) (*providers.RedisCluster, croType.StatusMessage, error)
func (*RedisProvider) DeleteRedis ¶
func (p *RedisProvider) DeleteRedis(ctx context.Context, r *v1alpha1.Redis) (croType.StatusMessage, error)
func (*RedisProvider) GetName ¶
func (p *RedisProvider) GetName() string
func (*RedisProvider) GetReconcileTime ¶
func (p *RedisProvider) GetReconcileTime(r *v1alpha1.Redis) time.Duration
func (*RedisProvider) SupportsStrategy ¶
func (p *RedisProvider) SupportsStrategy(deploymentStrategy string) bool
type StrategyConfig ¶
type StrategyConfig struct { Region string `json:"region"` ProjectID string `json:"projectID"` CreateStrategy json.RawMessage `json:"createStrategy"` DeleteStrategy json.RawMessage `json:"deleteStrategy"` }