cortexops

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CortexOps_GetDefaultConfiguration_FullMethodName   = "/cortexops.CortexOps/GetDefaultConfiguration"
	CortexOps_SetDefaultConfiguration_FullMethodName   = "/cortexops.CortexOps/SetDefaultConfiguration"
	CortexOps_ResetDefaultConfiguration_FullMethodName = "/cortexops.CortexOps/ResetDefaultConfiguration"
	CortexOps_GetConfiguration_FullMethodName          = "/cortexops.CortexOps/GetConfiguration"
	CortexOps_SetConfiguration_FullMethodName          = "/cortexops.CortexOps/SetConfiguration"
	CortexOps_ResetConfiguration_FullMethodName        = "/cortexops.CortexOps/ResetConfiguration"
	CortexOps_Status_FullMethodName                    = "/cortexops.CortexOps/Status"
	CortexOps_Install_FullMethodName                   = "/cortexops.CortexOps/Install"
	CortexOps_Uninstall_FullMethodName                 = "/cortexops.CortexOps/Uninstall"
	CortexOps_ListPresets_FullMethodName               = "/cortexops.CortexOps/ListPresets"
	CortexOps_DryRun_FullMethodName                    = "/cortexops.CortexOps/DryRun"
	CortexOps_ConfigurationHistory_FullMethodName      = "/cortexops.CortexOps/ConfigurationHistory"
)

Variables

View Source
var CortexOps_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cortexops.CortexOps",
	HandlerType: (*CortexOpsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDefaultConfiguration",
			Handler:    _CortexOps_GetDefaultConfiguration_Handler,
		},
		{
			MethodName: "SetDefaultConfiguration",
			Handler:    _CortexOps_SetDefaultConfiguration_Handler,
		},
		{
			MethodName: "ResetDefaultConfiguration",
			Handler:    _CortexOps_ResetDefaultConfiguration_Handler,
		},
		{
			MethodName: "GetConfiguration",
			Handler:    _CortexOps_GetConfiguration_Handler,
		},
		{
			MethodName: "SetConfiguration",
			Handler:    _CortexOps_SetConfiguration_Handler,
		},
		{
			MethodName: "ResetConfiguration",
			Handler:    _CortexOps_ResetConfiguration_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _CortexOps_Status_Handler,
		},
		{
			MethodName: "Install",
			Handler:    _CortexOps_Install_Handler,
		},
		{
			MethodName: "Uninstall",
			Handler:    _CortexOps_Uninstall_Handler,
		},
		{
			MethodName: "ListPresets",
			Handler:    _CortexOps_ListPresets_Handler,
		},
		{
			MethodName: "DryRun",
			Handler:    _CortexOps_DryRun_Handler,
		},
		{
			MethodName: "ConfigurationHistory",
			Handler:    _CortexOps_ConfigurationHistory_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/plugins/metrics/apis/cortexops/cortexops.proto",
}

CortexOps_ServiceDesc is the grpc.ServiceDesc for CortexOps service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_github_com_rancher_opni_plugins_metrics_apis_cortexops_cortexops_proto protoreflect.FileDescriptor

Functions

func BuildCortexOpsCmd

func BuildCortexOpsCmd() *cobra.Command

func BuildCortexOpsConfigurationHistoryCmd added in v0.12.0

func BuildCortexOpsConfigurationHistoryCmd() *cobra.Command

func BuildCortexOpsGetConfigurationCmd added in v0.12.0

func BuildCortexOpsGetConfigurationCmd() *cobra.Command

func BuildCortexOpsGetDefaultConfigurationCmd added in v0.12.0

func BuildCortexOpsGetDefaultConfigurationCmd() *cobra.Command

func BuildCortexOpsInstallCmd added in v0.12.0

func BuildCortexOpsInstallCmd() *cobra.Command

func BuildCortexOpsListPresetsCmd added in v0.12.0

func BuildCortexOpsListPresetsCmd() *cobra.Command

func BuildCortexOpsResetConfigurationCmd added in v0.12.0

func BuildCortexOpsResetConfigurationCmd() *cobra.Command

func BuildCortexOpsResetDefaultConfigurationCmd added in v0.12.0

func BuildCortexOpsResetDefaultConfigurationCmd() *cobra.Command

func BuildCortexOpsSetConfigurationCmd added in v0.12.0

func BuildCortexOpsSetConfigurationCmd() *cobra.Command

func BuildCortexOpsSetDefaultConfigurationCmd added in v0.12.0

func BuildCortexOpsSetDefaultConfigurationCmd() *cobra.Command

func BuildCortexOpsStatusCmd added in v0.12.0

func BuildCortexOpsStatusCmd() *cobra.Command

func BuildCortexOpsUninstallCmd added in v0.12.0

func BuildCortexOpsUninstallCmd() *cobra.Command

func BuildDryRunCmd added in v0.12.0

func BuildDryRunCmd() *cobra.Command

func ContextWithCortexOpsClient

func ContextWithCortexOpsClient(ctx context.Context, client CortexOpsClient) context.Context

func InstallWithPreset added in v0.12.0

func InstallWithPreset(ctx context.Context, client CortexOpsClient, presetId ...string) error

func RegisterCortexOpsServer

func RegisterCortexOpsServer(s grpc.ServiceRegistrar, srv CortexOpsServer)

func WaitForReady added in v0.12.0

func WaitForReady(ctx context.Context, client CortexOpsClient) error

Types

type CapabilityBackendConfigSpec added in v0.12.0

type CapabilityBackendConfigSpec struct {
	Enabled         *bool                    `protobuf:"varint,1,opt,name=enabled,proto3,oneof" json:"enabled,omitempty"`
	Revision        *v1.Revision             `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
	CortexWorkloads *CortexWorkloadsConfig   `protobuf:"bytes,4,opt,name=cortexWorkloads,proto3" json:"cortexWorkloads,omitempty"`
	CortexConfig    *CortexApplicationConfig `protobuf:"bytes,5,opt,name=cortexConfig,proto3" json:"cortexConfig,omitempty"`
	Grafana         *GrafanaConfig           `protobuf:"bytes,9,opt,name=grafana,proto3" json:"grafana,omitempty"`
	// contains filtered or unexported fields
}

func (*CapabilityBackendConfigSpec) DeepCopy added in v0.12.0

func (*CapabilityBackendConfigSpec) DeepCopyInto added in v0.12.0

func (*CapabilityBackendConfigSpec) Descriptor deprecated added in v0.12.0

func (*CapabilityBackendConfigSpec) Descriptor() ([]byte, []int)

Deprecated: Use CapabilityBackendConfigSpec.ProtoReflect.Descriptor instead.

func (*CapabilityBackendConfigSpec) FlagSet added in v0.12.0

func (in *CapabilityBackendConfigSpec) FlagSet(prefix ...string) *pflag.FlagSet

func (*CapabilityBackendConfigSpec) GetCortexConfig added in v0.12.0

func (*CapabilityBackendConfigSpec) GetCortexWorkloads added in v0.12.0

func (x *CapabilityBackendConfigSpec) GetCortexWorkloads() *CortexWorkloadsConfig

func (*CapabilityBackendConfigSpec) GetEnabled added in v0.12.0

func (x *CapabilityBackendConfigSpec) GetEnabled() bool

func (*CapabilityBackendConfigSpec) GetGrafana added in v0.12.0

func (x *CapabilityBackendConfigSpec) GetGrafana() *GrafanaConfig

func (*CapabilityBackendConfigSpec) GetRevision added in v0.12.0

func (x *CapabilityBackendConfigSpec) GetRevision() *v1.Revision

func (*CapabilityBackendConfigSpec) ProtoMessage added in v0.12.0

func (*CapabilityBackendConfigSpec) ProtoMessage()

func (*CapabilityBackendConfigSpec) ProtoReflect added in v0.12.0

func (*CapabilityBackendConfigSpec) RedactSecrets added in v0.12.0

func (in *CapabilityBackendConfigSpec) RedactSecrets()

func (*CapabilityBackendConfigSpec) Reset added in v0.12.0

func (x *CapabilityBackendConfigSpec) Reset()

func (*CapabilityBackendConfigSpec) String added in v0.12.0

func (x *CapabilityBackendConfigSpec) String() string

func (*CapabilityBackendConfigSpec) UnredactSecrets added in v0.12.0

func (in *CapabilityBackendConfigSpec) UnredactSecrets(unredacted *CapabilityBackendConfigSpec) error

type ConfigurationHistoryResponse added in v0.12.0

type ConfigurationHistoryResponse struct {
	Entries []*CapabilityBackendConfigSpec `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigurationHistoryResponse) DeepCopy added in v0.12.0

func (*ConfigurationHistoryResponse) DeepCopyInto added in v0.12.0

func (*ConfigurationHistoryResponse) Descriptor deprecated added in v0.12.0

func (*ConfigurationHistoryResponse) Descriptor() ([]byte, []int)

Deprecated: Use ConfigurationHistoryResponse.ProtoReflect.Descriptor instead.

func (*ConfigurationHistoryResponse) GetEntries added in v0.12.0

func (*ConfigurationHistoryResponse) ProtoMessage added in v0.12.0

func (*ConfigurationHistoryResponse) ProtoMessage()

func (*ConfigurationHistoryResponse) ProtoReflect added in v0.12.0

func (*ConfigurationHistoryResponse) RenderText added in v0.12.0

func (h *ConfigurationHistoryResponse) RenderText(out cli.Writer)

func (*ConfigurationHistoryResponse) Reset added in v0.12.0

func (x *ConfigurationHistoryResponse) Reset()

func (*ConfigurationHistoryResponse) String added in v0.12.0

type CortexApplicationConfig added in v0.12.0

type CortexApplicationConfig struct {
	Limits        *validation.Limits                 `protobuf:"bytes,1,opt,name=limits,proto3" json:"limits,omitempty"`
	RuntimeConfig *runtimeconfig.RuntimeConfigValues `protobuf:"bytes,2,opt,name=runtime_config,json=runtimeConfig,proto3" json:"runtime_config,omitempty"`
	Compactor     *compactor.Config                  `protobuf:"bytes,3,opt,name=compactor,proto3" json:"compactor,omitempty"`
	Querier       *querier.Config                    `protobuf:"bytes,4,opt,name=querier,proto3" json:"querier,omitempty"`
	Storage       *storage.Config                    `protobuf:"bytes,5,opt,name=storage,proto3" json:"storage,omitempty"`
	LogLevel      *string                            `protobuf:"bytes,6,opt,name=log_level,json=logLevel,proto3,oneof" json:"log_level,omitempty"`
	// contains filtered or unexported fields
}

func (*CortexApplicationConfig) DeepCopy added in v0.12.0

func (*CortexApplicationConfig) DeepCopyInto added in v0.12.0

func (in *CortexApplicationConfig) DeepCopyInto(out *CortexApplicationConfig)

func (*CortexApplicationConfig) Descriptor deprecated added in v0.12.0

func (*CortexApplicationConfig) Descriptor() ([]byte, []int)

Deprecated: Use CortexApplicationConfig.ProtoReflect.Descriptor instead.

func (*CortexApplicationConfig) FlagSet added in v0.12.0

func (in *CortexApplicationConfig) FlagSet(prefix ...string) *pflag.FlagSet

func (*CortexApplicationConfig) GetCompactor added in v0.12.0

func (x *CortexApplicationConfig) GetCompactor() *compactor.Config

func (*CortexApplicationConfig) GetLimits added in v0.12.0

func (x *CortexApplicationConfig) GetLimits() *validation.Limits

func (*CortexApplicationConfig) GetLogLevel added in v0.12.0

func (x *CortexApplicationConfig) GetLogLevel() string

func (*CortexApplicationConfig) GetQuerier added in v0.12.0

func (x *CortexApplicationConfig) GetQuerier() *querier.Config

func (*CortexApplicationConfig) GetRuntimeConfig added in v0.12.0

func (*CortexApplicationConfig) GetStorage added in v0.12.0

func (x *CortexApplicationConfig) GetStorage() *storage.Config

func (*CortexApplicationConfig) ProtoMessage added in v0.12.0

func (*CortexApplicationConfig) ProtoMessage()

func (*CortexApplicationConfig) ProtoReflect added in v0.12.0

func (x *CortexApplicationConfig) ProtoReflect() protoreflect.Message

func (*CortexApplicationConfig) RedactSecrets added in v0.12.0

func (in *CortexApplicationConfig) RedactSecrets()

func (*CortexApplicationConfig) Reset added in v0.12.0

func (x *CortexApplicationConfig) Reset()

func (*CortexApplicationConfig) String added in v0.12.0

func (x *CortexApplicationConfig) String() string

func (*CortexApplicationConfig) UnredactSecrets added in v0.12.0

func (in *CortexApplicationConfig) UnredactSecrets(unredacted *CortexApplicationConfig) error

type CortexOpsClient

type CortexOpsClient interface {
	// Returns the default implementation-specific configuration, or one previously set.
	// If a default configuration was previously set using SetDefaultConfiguration, it
	// returns that configuration. Otherwise, returns implementation-specific defaults.
	// An optional revision argument can be provided to get a specific historical
	// version of the configuration instead of the current configuration.
	GetDefaultConfiguration(ctx context.Context, in *driverutil.GetRequest, opts ...grpc.CallOption) (*CapabilityBackendConfigSpec, error)
	// Sets the default configuration that will be used as the base for future configuration changes.
	// If no custom default configuration is set using this method,
	// implementation-specific defaults may be chosen.
	// If all fields are unset, this will clear any previously-set default configuration
	// and revert back to the implementation-specific defaults.
	//
	// This API is different from the SetConfiguration API, and should not be necessary
	// for most use cases. It can be used in situations where an additional persistence
	// layer that is not driver-specific is desired.
	SetDefaultConfiguration(ctx context.Context, in *CapabilityBackendConfigSpec, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Resets the default configuration to the implementation-specific defaults.
	// If a custom default configuration was previously set using SetDefaultConfiguration,
	// this will clear it and revert back to the implementation-specific defaults.
	// Otherwise, this will have no effect.
	ResetDefaultConfiguration(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Gets the current configuration of the managed Cortex cluster.
	// An optional revision argument can be provided to get a specific historical
	// version of the configuration instead of the current configuration.
	GetConfiguration(ctx context.Context, in *driverutil.GetRequest, opts ...grpc.CallOption) (*CapabilityBackendConfigSpec, error)
	// Updates the configuration of the managed Cortex cluster to match the provided configuration.
	// If the cluster is not installed, it will be configured, but remain disabled.
	// Otherwise, the already-installed cluster will be reconfigured.
	// The provided configuration will be merged with the default configuration
	// by directly overwriting fields. Slices and maps are overwritten and not combined.
	// Subsequent calls to this API will merge inputs with the current configuration,
	// not the default configuration.
	// When updating an existing configuration, the revision number in the updated configuration
	// must match the revision number of the existing configuration, otherwise a conflict
	// error will be returned. The timestamp field of the revision is ignored.
	//
	// Note: some fields may contain secrets. The placeholder value "***" can be used to
	// keep an existing secret when updating the cluster configuration.
	SetConfiguration(ctx context.Context, in *CapabilityBackendConfigSpec, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Resets the configuration of the managed Cortex cluster to the current default configuration.
	//
	// The request may optionally contain a field mask to specify which fields should
	// be preserved. Furthermore, if a mask is set, the request may also contain a patch
	// object used to apply additional changes to the masked fields. These changes are
	// applied atomically at the time of reset. Fields present in the patch object, but
	// not in the mask, are ignored.
	//
	// For example, with the following message:
	//
	//	message Example {
	//	  optional int32 a = 1;
	//	  optional int32 b = 2;
	//	  optional int32 c = 3;
	//	}
	//
	// and current state:
	//
	//	active:  { a: 1, b: 2, c: 3 }
	//	default: { a: 4, b: 5, c: 6 }
	//
	// and reset request parameters:
	//
	//	{
	//	  mask:    { paths: [ "a", "b" ] }
	//	  patch:   { a: 100 }
	//	}
	//
	// The resulting active configuration will be:
	//
	//	active:  {
	//	  a: 100, // masked, set to 100 via patch
	//	  b: 2,   // masked, but not set in patch, so left unchanged
	//	  c: 6,   // not masked, reset to default
	//	}
	ResetConfiguration(ctx context.Context, in *ResetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Gets the current status of the managed Cortex cluster.
	// The status includes the current install state, version, and metadata. If
	// the cluster is in the process of being reconfigured or uninstalled, it will
	// be reflected in the install state.
	// No guarantees are made about the contents of the metadata field; its
	// contents are strictly informational.
	Status(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*driverutil.InstallStatus, error)
	// Installs the managed Cortex cluster.
	// The cluster will be installed using the current configuration, or the
	// default configuration if none is explicitly set.
	Install(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Uninstalls the managed Cortex cluster.
	// Implementation details including error handling and system state requirements
	// are left to the cluster driver, and this API makes no guarantees about
	// the state of the cluster after the call completes (regardless of success).
	Uninstall(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Returns a static list of presets that can be used as a base for configuring the managed Cortex cluster.
	// There are several ways to use the presets, depending
	// on the desired behavior:
	//  1. Set the default configuration to a preset spec, then use SetConfiguration
	//     to fill in any additional required fields (credentials, etc)
	//  2. Add the required fields to the default configuration, then use
	//     SetConfiguration with a preset spec.
	//  3. Leave the default configuration as-is, and use SetConfiguration with a
	//     preset spec plus the required fields.
	ListPresets(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PresetList, error)
	// Show what changes would be made to a configuration without saving them.
	// The request expects an action, target, and spec to be provided. These
	// correspond roughly to the other APIs in this service.
	//
	// Configuring DryRunRequest:
	//   - Use the Active target for the SetConfiguration API, and the Default target
	//     for the SetDefaultConfiguration API. Install and Uninstall actions do not
	//     require a target.
	//   - Only the Set action requires a spec to be provided.
	//
	// Notes:
	//   - When DryRun is used on Install or Uninstall requests, the response will
	//     contain modifications to the 'enabled' field only. This field is read-only
	//     in the Set* APIs.
	//   - To validate the current configuration but keep it unchanged, use the
	//     Set action with an empty spec.
	//   - Configurations returned by DryRun will always have an empty revision field.
	DryRun(ctx context.Context, in *DryRunRequest, opts ...grpc.CallOption) (*DryRunResponse, error)
	// Get a list of all past revisions of the configuration.
	// Will return the history for either the active or default configuration
	// depending on the specified target.
	// The entries are ordered from oldest to newest, where the last entry is
	// the current configuration.
	ConfigurationHistory(ctx context.Context, in *driverutil.ConfigurationHistoryRequest, opts ...grpc.CallOption) (*ConfigurationHistoryResponse, error)
}

CortexOpsClient is the client API for CortexOps service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func CortexOpsClientFromContext

func CortexOpsClientFromContext(ctx context.Context) (CortexOpsClient, bool)

func NewCortexOpsClient

func NewCortexOpsClient(cc grpc.ClientConnInterface) CortexOpsClient

type CortexOpsServer

type CortexOpsServer interface {
	// Returns the default implementation-specific configuration, or one previously set.
	// If a default configuration was previously set using SetDefaultConfiguration, it
	// returns that configuration. Otherwise, returns implementation-specific defaults.
	// An optional revision argument can be provided to get a specific historical
	// version of the configuration instead of the current configuration.
	GetDefaultConfiguration(context.Context, *driverutil.GetRequest) (*CapabilityBackendConfigSpec, error)
	// Sets the default configuration that will be used as the base for future configuration changes.
	// If no custom default configuration is set using this method,
	// implementation-specific defaults may be chosen.
	// If all fields are unset, this will clear any previously-set default configuration
	// and revert back to the implementation-specific defaults.
	//
	// This API is different from the SetConfiguration API, and should not be necessary
	// for most use cases. It can be used in situations where an additional persistence
	// layer that is not driver-specific is desired.
	SetDefaultConfiguration(context.Context, *CapabilityBackendConfigSpec) (*emptypb.Empty, error)
	// Resets the default configuration to the implementation-specific defaults.
	// If a custom default configuration was previously set using SetDefaultConfiguration,
	// this will clear it and revert back to the implementation-specific defaults.
	// Otherwise, this will have no effect.
	ResetDefaultConfiguration(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// Gets the current configuration of the managed Cortex cluster.
	// An optional revision argument can be provided to get a specific historical
	// version of the configuration instead of the current configuration.
	GetConfiguration(context.Context, *driverutil.GetRequest) (*CapabilityBackendConfigSpec, error)
	// Updates the configuration of the managed Cortex cluster to match the provided configuration.
	// If the cluster is not installed, it will be configured, but remain disabled.
	// Otherwise, the already-installed cluster will be reconfigured.
	// The provided configuration will be merged with the default configuration
	// by directly overwriting fields. Slices and maps are overwritten and not combined.
	// Subsequent calls to this API will merge inputs with the current configuration,
	// not the default configuration.
	// When updating an existing configuration, the revision number in the updated configuration
	// must match the revision number of the existing configuration, otherwise a conflict
	// error will be returned. The timestamp field of the revision is ignored.
	//
	// Note: some fields may contain secrets. The placeholder value "***" can be used to
	// keep an existing secret when updating the cluster configuration.
	SetConfiguration(context.Context, *CapabilityBackendConfigSpec) (*emptypb.Empty, error)
	// Resets the configuration of the managed Cortex cluster to the current default configuration.
	//
	// The request may optionally contain a field mask to specify which fields should
	// be preserved. Furthermore, if a mask is set, the request may also contain a patch
	// object used to apply additional changes to the masked fields. These changes are
	// applied atomically at the time of reset. Fields present in the patch object, but
	// not in the mask, are ignored.
	//
	// For example, with the following message:
	//
	//	message Example {
	//	  optional int32 a = 1;
	//	  optional int32 b = 2;
	//	  optional int32 c = 3;
	//	}
	//
	// and current state:
	//
	//	active:  { a: 1, b: 2, c: 3 }
	//	default: { a: 4, b: 5, c: 6 }
	//
	// and reset request parameters:
	//
	//	{
	//	  mask:    { paths: [ "a", "b" ] }
	//	  patch:   { a: 100 }
	//	}
	//
	// The resulting active configuration will be:
	//
	//	active:  {
	//	  a: 100, // masked, set to 100 via patch
	//	  b: 2,   // masked, but not set in patch, so left unchanged
	//	  c: 6,   // not masked, reset to default
	//	}
	ResetConfiguration(context.Context, *ResetRequest) (*emptypb.Empty, error)
	// Gets the current status of the managed Cortex cluster.
	// The status includes the current install state, version, and metadata. If
	// the cluster is in the process of being reconfigured or uninstalled, it will
	// be reflected in the install state.
	// No guarantees are made about the contents of the metadata field; its
	// contents are strictly informational.
	Status(context.Context, *emptypb.Empty) (*driverutil.InstallStatus, error)
	// Installs the managed Cortex cluster.
	// The cluster will be installed using the current configuration, or the
	// default configuration if none is explicitly set.
	Install(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// Uninstalls the managed Cortex cluster.
	// Implementation details including error handling and system state requirements
	// are left to the cluster driver, and this API makes no guarantees about
	// the state of the cluster after the call completes (regardless of success).
	Uninstall(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// Returns a static list of presets that can be used as a base for configuring the managed Cortex cluster.
	// There are several ways to use the presets, depending
	// on the desired behavior:
	//  1. Set the default configuration to a preset spec, then use SetConfiguration
	//     to fill in any additional required fields (credentials, etc)
	//  2. Add the required fields to the default configuration, then use
	//     SetConfiguration with a preset spec.
	//  3. Leave the default configuration as-is, and use SetConfiguration with a
	//     preset spec plus the required fields.
	ListPresets(context.Context, *emptypb.Empty) (*PresetList, error)
	// Show what changes would be made to a configuration without saving them.
	// The request expects an action, target, and spec to be provided. These
	// correspond roughly to the other APIs in this service.
	//
	// Configuring DryRunRequest:
	//   - Use the Active target for the SetConfiguration API, and the Default target
	//     for the SetDefaultConfiguration API. Install and Uninstall actions do not
	//     require a target.
	//   - Only the Set action requires a spec to be provided.
	//
	// Notes:
	//   - When DryRun is used on Install or Uninstall requests, the response will
	//     contain modifications to the 'enabled' field only. This field is read-only
	//     in the Set* APIs.
	//   - To validate the current configuration but keep it unchanged, use the
	//     Set action with an empty spec.
	//   - Configurations returned by DryRun will always have an empty revision field.
	DryRun(context.Context, *DryRunRequest) (*DryRunResponse, error)
	// Get a list of all past revisions of the configuration.
	// Will return the history for either the active or default configuration
	// depending on the specified target.
	// The entries are ordered from oldest to newest, where the last entry is
	// the current configuration.
	ConfigurationHistory(context.Context, *driverutil.ConfigurationHistoryRequest) (*ConfigurationHistoryResponse, error)
	// contains filtered or unexported methods
}

CortexOpsServer is the server API for CortexOps service. All implementations must embed UnimplementedCortexOpsServer for forward compatibility

type CortexWorkloadSpec

type CortexWorkloadSpec struct {
	Replicas  *int32   `protobuf:"varint,1,opt,name=replicas,proto3,oneof" json:"replicas,omitempty"`
	ExtraArgs []string `protobuf:"bytes,2,rep,name=extraArgs,proto3" json:"extraArgs,omitempty"`
	// contains filtered or unexported fields
}

func (*CortexWorkloadSpec) DeepCopy added in v0.12.0

func (in *CortexWorkloadSpec) DeepCopy() *CortexWorkloadSpec

func (*CortexWorkloadSpec) DeepCopyInto added in v0.12.0

func (in *CortexWorkloadSpec) DeepCopyInto(out *CortexWorkloadSpec)

func (*CortexWorkloadSpec) Descriptor deprecated

func (*CortexWorkloadSpec) Descriptor() ([]byte, []int)

Deprecated: Use CortexWorkloadSpec.ProtoReflect.Descriptor instead.

func (*CortexWorkloadSpec) GetExtraArgs

func (x *CortexWorkloadSpec) GetExtraArgs() []string

func (*CortexWorkloadSpec) GetReplicas

func (x *CortexWorkloadSpec) GetReplicas() int32

func (*CortexWorkloadSpec) ProtoMessage

func (*CortexWorkloadSpec) ProtoMessage()

func (*CortexWorkloadSpec) ProtoReflect

func (x *CortexWorkloadSpec) ProtoReflect() protoreflect.Message

func (*CortexWorkloadSpec) Reset

func (x *CortexWorkloadSpec) Reset()

func (*CortexWorkloadSpec) String

func (x *CortexWorkloadSpec) String() string

type CortexWorkloadsConfig added in v0.12.0

type CortexWorkloadsConfig struct {
	Targets map[string]*CortexWorkloadSpec `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CortexWorkloadsConfig) DeepCopy added in v0.12.0

func (*CortexWorkloadsConfig) DeepCopyInto added in v0.12.0

func (in *CortexWorkloadsConfig) DeepCopyInto(out *CortexWorkloadsConfig)

func (*CortexWorkloadsConfig) Descriptor deprecated added in v0.12.0

func (*CortexWorkloadsConfig) Descriptor() ([]byte, []int)

Deprecated: Use CortexWorkloadsConfig.ProtoReflect.Descriptor instead.

func (*CortexWorkloadsConfig) GetTargets added in v0.12.0

func (x *CortexWorkloadsConfig) GetTargets() map[string]*CortexWorkloadSpec

func (*CortexWorkloadsConfig) ProtoMessage added in v0.12.0

func (*CortexWorkloadsConfig) ProtoMessage()

func (*CortexWorkloadsConfig) ProtoReflect added in v0.12.0

func (x *CortexWorkloadsConfig) ProtoReflect() protoreflect.Message

func (*CortexWorkloadsConfig) Reset added in v0.12.0

func (x *CortexWorkloadsConfig) Reset()

func (*CortexWorkloadsConfig) String added in v0.12.0

func (x *CortexWorkloadsConfig) String() string

type DryRunClient added in v0.12.0

type DryRunClient struct {
	Client   CortexOpsClient
	Request  *DryRunRequest
	Response *DryRunResponse
}

func (*DryRunClient) ConfigurationHistory added in v0.12.0

func (*DryRunClient) DryRun added in v0.12.0

DryRun implements CortexOpsClient.

func (*DryRunClient) GetConfiguration added in v0.12.0

GetConfiguration implements CortexOpsClient.

func (*DryRunClient) GetDefaultConfiguration added in v0.12.0

func (dc *DryRunClient) GetDefaultConfiguration(ctx context.Context, in *driverutil.GetRequest, opts ...grpc.CallOption) (*CapabilityBackendConfigSpec, error)

GetDefaultConfiguration implements CortexOpsClient.

func (*DryRunClient) Install added in v0.12.0

func (dc *DryRunClient) Install(ctx context.Context, _ *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)

Install implements CortexOpsClient.

func (*DryRunClient) ListPresets added in v0.12.0

func (dc *DryRunClient) ListPresets(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PresetList, error)

ListPresets implements CortexOpsClient.

func (*DryRunClient) ResetConfiguration added in v0.12.0

func (dc *DryRunClient) ResetConfiguration(ctx context.Context, req *ResetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)

ResetConfiguration implements CortexOpsClient.

func (*DryRunClient) ResetDefaultConfiguration added in v0.12.0

func (dc *DryRunClient) ResetDefaultConfiguration(ctx context.Context, _ *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)

ResetDefaultConfiguration implements CortexOpsClient.

func (*DryRunClient) SetConfiguration added in v0.12.0

func (dc *DryRunClient) SetConfiguration(ctx context.Context, in *CapabilityBackendConfigSpec, opts ...grpc.CallOption) (*emptypb.Empty, error)

SetConfiguration implements CortexOpsClient.

func (*DryRunClient) SetDefaultConfiguration added in v0.12.0

func (dc *DryRunClient) SetDefaultConfiguration(ctx context.Context, in *CapabilityBackendConfigSpec, opts ...grpc.CallOption) (*emptypb.Empty, error)

SetDefaultConfiguration implements CortexOpsClient.

func (*DryRunClient) Status added in v0.12.0

Status implements CortexOpsClient.

func (*DryRunClient) Uninstall added in v0.12.0

func (dc *DryRunClient) Uninstall(ctx context.Context, _ *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)

Uninstall implements CortexOpsClient.

type DryRunRequest added in v0.12.0

type DryRunRequest struct {
	Target   driverutil.Target            `protobuf:"varint,1,opt,name=target,proto3,enum=driverutil.Target" json:"target,omitempty"`
	Action   driverutil.Action            `protobuf:"varint,2,opt,name=action,proto3,enum=driverutil.Action" json:"action,omitempty"`
	Spec     *CapabilityBackendConfigSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"`         // Set
	Revision *v1.Revision                 `protobuf:"bytes,4,opt,name=revision,proto3" json:"revision,omitempty"` // Reset
	Patch    *CapabilityBackendConfigSpec `protobuf:"bytes,5,opt,name=patch,proto3" json:"patch,omitempty"`       // Reset
	Mask     *fieldmaskpb.FieldMask       `protobuf:"bytes,6,opt,name=mask,proto3" json:"mask,omitempty"`         // Reset
	// contains filtered or unexported fields
}

func (*DryRunRequest) DeepCopy added in v0.12.0

func (in *DryRunRequest) DeepCopy() *DryRunRequest

func (*DryRunRequest) DeepCopyInto added in v0.12.0

func (in *DryRunRequest) DeepCopyInto(out *DryRunRequest)

func (*DryRunRequest) Descriptor deprecated added in v0.12.0

func (*DryRunRequest) Descriptor() ([]byte, []int)

Deprecated: Use DryRunRequest.ProtoReflect.Descriptor instead.

func (*DryRunRequest) GetAction added in v0.12.0

func (x *DryRunRequest) GetAction() driverutil.Action

func (*DryRunRequest) GetMask added in v0.12.0

func (x *DryRunRequest) GetMask() *fieldmaskpb.FieldMask

func (*DryRunRequest) GetPatch added in v0.12.0

func (*DryRunRequest) GetRevision added in v0.12.0

func (x *DryRunRequest) GetRevision() *v1.Revision

func (*DryRunRequest) GetSpec added in v0.12.0

func (*DryRunRequest) GetTarget added in v0.12.0

func (x *DryRunRequest) GetTarget() driverutil.Target

func (*DryRunRequest) ProtoMessage added in v0.12.0

func (*DryRunRequest) ProtoMessage()

func (*DryRunRequest) ProtoReflect added in v0.12.0

func (x *DryRunRequest) ProtoReflect() protoreflect.Message

func (*DryRunRequest) Reset added in v0.12.0

func (x *DryRunRequest) Reset()

func (*DryRunRequest) String added in v0.12.0

func (x *DryRunRequest) String() string

type DryRunResponse added in v0.12.0

type DryRunResponse struct {
	Current          *CapabilityBackendConfigSpec  `protobuf:"bytes,1,opt,name=current,proto3" json:"current,omitempty"`
	Modified         *CapabilityBackendConfigSpec  `protobuf:"bytes,2,opt,name=modified,proto3" json:"modified,omitempty"`
	ValidationErrors []*driverutil.ValidationError `protobuf:"bytes,3,rep,name=validationErrors,proto3" json:"validationErrors,omitempty"`
	// contains filtered or unexported fields
}

func (*DryRunResponse) DeepCopy added in v0.12.0

func (in *DryRunResponse) DeepCopy() *DryRunResponse

func (*DryRunResponse) DeepCopyInto added in v0.12.0

func (in *DryRunResponse) DeepCopyInto(out *DryRunResponse)

func (*DryRunResponse) Descriptor deprecated added in v0.12.0

func (*DryRunResponse) Descriptor() ([]byte, []int)

Deprecated: Use DryRunResponse.ProtoReflect.Descriptor instead.

func (*DryRunResponse) GetCurrent added in v0.12.0

func (*DryRunResponse) GetModified added in v0.12.0

func (x *DryRunResponse) GetModified() *CapabilityBackendConfigSpec

func (*DryRunResponse) GetValidationErrors added in v0.12.0

func (x *DryRunResponse) GetValidationErrors() []*driverutil.ValidationError

func (*DryRunResponse) ProtoMessage added in v0.12.0

func (*DryRunResponse) ProtoMessage()

func (*DryRunResponse) ProtoReflect added in v0.12.0

func (x *DryRunResponse) ProtoReflect() protoreflect.Message

func (*DryRunResponse) Reset added in v0.12.0

func (x *DryRunResponse) Reset()

func (*DryRunResponse) String added in v0.12.0

func (x *DryRunResponse) String() string

type GrafanaConfig

type GrafanaConfig struct {

	// Whether to deploy a managed Grafana instance.
	Enabled *bool `protobuf:"varint,1,opt,name=enabled,proto3,oneof" json:"enabled,omitempty"`
	// The version of Grafana to deploy.
	Version  *string `protobuf:"bytes,2,opt,name=version,proto3,oneof" json:"version,omitempty"`
	Hostname *string `protobuf:"bytes,3,opt,name=hostname,proto3,oneof" json:"hostname,omitempty"`
	// contains filtered or unexported fields
}

func (*GrafanaConfig) DeepCopy added in v0.12.0

func (in *GrafanaConfig) DeepCopy() *GrafanaConfig

func (*GrafanaConfig) DeepCopyInto added in v0.12.0

func (in *GrafanaConfig) DeepCopyInto(out *GrafanaConfig)

func (*GrafanaConfig) Descriptor deprecated

func (*GrafanaConfig) Descriptor() ([]byte, []int)

Deprecated: Use GrafanaConfig.ProtoReflect.Descriptor instead.

func (*GrafanaConfig) FlagSet

func (in *GrafanaConfig) FlagSet(prefix ...string) *pflag.FlagSet

func (*GrafanaConfig) GetEnabled

func (x *GrafanaConfig) GetEnabled() bool

func (*GrafanaConfig) GetHostname

func (x *GrafanaConfig) GetHostname() string

func (*GrafanaConfig) GetVersion added in v0.12.0

func (x *GrafanaConfig) GetVersion() string

func (*GrafanaConfig) ProtoMessage

func (*GrafanaConfig) ProtoMessage()

func (*GrafanaConfig) ProtoReflect

func (x *GrafanaConfig) ProtoReflect() protoreflect.Message

func (*GrafanaConfig) Reset

func (x *GrafanaConfig) Reset()

func (*GrafanaConfig) String

func (x *GrafanaConfig) String() string

type Preset added in v0.12.0

type Preset struct {
	Id       *v1.Reference                `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Metadata *driverutil.PresetMetadata   `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Spec     *CapabilityBackendConfigSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"`
	// contains filtered or unexported fields
}

func (*Preset) DeepCopy added in v0.12.0

func (in *Preset) DeepCopy() *Preset

func (*Preset) DeepCopyInto added in v0.12.0

func (in *Preset) DeepCopyInto(out *Preset)

func (*Preset) Descriptor deprecated added in v0.12.0

func (*Preset) Descriptor() ([]byte, []int)

Deprecated: Use Preset.ProtoReflect.Descriptor instead.

func (*Preset) GetId added in v0.12.0

func (x *Preset) GetId() *v1.Reference

func (*Preset) GetMetadata added in v0.12.0

func (x *Preset) GetMetadata() *driverutil.PresetMetadata

func (*Preset) GetSpec added in v0.12.0

func (x *Preset) GetSpec() *CapabilityBackendConfigSpec

func (*Preset) ProtoMessage added in v0.12.0

func (*Preset) ProtoMessage()

func (*Preset) ProtoReflect added in v0.12.0

func (x *Preset) ProtoReflect() protoreflect.Message

func (*Preset) Reset added in v0.12.0

func (x *Preset) Reset()

func (*Preset) String added in v0.12.0

func (x *Preset) String() string

type PresetList added in v0.12.0

type PresetList struct {
	Items []*Preset `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*PresetList) DeepCopy added in v0.12.0

func (in *PresetList) DeepCopy() *PresetList

func (*PresetList) DeepCopyInto added in v0.12.0

func (in *PresetList) DeepCopyInto(out *PresetList)

func (*PresetList) Descriptor deprecated added in v0.12.0

func (*PresetList) Descriptor() ([]byte, []int)

Deprecated: Use PresetList.ProtoReflect.Descriptor instead.

func (*PresetList) GetItems added in v0.12.0

func (x *PresetList) GetItems() []*Preset

func (*PresetList) ProtoMessage added in v0.12.0

func (*PresetList) ProtoMessage()

func (*PresetList) ProtoReflect added in v0.12.0

func (x *PresetList) ProtoReflect() protoreflect.Message

func (*PresetList) Reset added in v0.12.0

func (x *PresetList) Reset()

func (*PresetList) String added in v0.12.0

func (x *PresetList) String() string

type ResetRequest added in v0.12.0

type ResetRequest struct {
	Revision *v1.Revision                 `protobuf:"bytes,1,opt,name=revision,proto3" json:"revision,omitempty"`
	Mask     *fieldmaskpb.FieldMask       `protobuf:"bytes,2,opt,name=mask,proto3" json:"mask,omitempty"`
	Patch    *CapabilityBackendConfigSpec `protobuf:"bytes,3,opt,name=patch,proto3" json:"patch,omitempty"`
	// contains filtered or unexported fields
}

func (*ResetRequest) DeepCopy added in v0.12.0

func (in *ResetRequest) DeepCopy() *ResetRequest

func (*ResetRequest) DeepCopyInto added in v0.12.0

func (in *ResetRequest) DeepCopyInto(out *ResetRequest)

func (*ResetRequest) Descriptor deprecated added in v0.12.0

func (*ResetRequest) Descriptor() ([]byte, []int)

Deprecated: Use ResetRequest.ProtoReflect.Descriptor instead.

func (*ResetRequest) FlagSet added in v0.12.0

func (in *ResetRequest) FlagSet(prefix ...string) *pflag.FlagSet

func (*ResetRequest) GetMask added in v0.12.0

func (x *ResetRequest) GetMask() *fieldmaskpb.FieldMask

func (*ResetRequest) GetPatch added in v0.12.0

func (*ResetRequest) GetRevision added in v0.12.0

func (x *ResetRequest) GetRevision() *v1.Revision

func (*ResetRequest) ProtoMessage added in v0.12.0

func (*ResetRequest) ProtoMessage()

func (*ResetRequest) ProtoReflect added in v0.12.0

func (x *ResetRequest) ProtoReflect() protoreflect.Message

func (*ResetRequest) Reset added in v0.12.0

func (x *ResetRequest) Reset()

func (*ResetRequest) String added in v0.12.0

func (x *ResetRequest) String() string

type SpecializedDryRunServer added in v0.12.0

type UnimplementedCortexOpsServer

type UnimplementedCortexOpsServer struct {
}

UnimplementedCortexOpsServer must be embedded to have forward compatible implementations.

func (UnimplementedCortexOpsServer) ConfigurationHistory added in v0.12.0

func (UnimplementedCortexOpsServer) DryRun added in v0.12.0

func (UnimplementedCortexOpsServer) GetConfiguration added in v0.12.0

func (UnimplementedCortexOpsServer) GetDefaultConfiguration added in v0.12.0

func (UnimplementedCortexOpsServer) Install added in v0.12.0

func (UnimplementedCortexOpsServer) ListPresets added in v0.12.0

func (UnimplementedCortexOpsServer) ResetConfiguration added in v0.12.0

func (UnimplementedCortexOpsServer) ResetDefaultConfiguration added in v0.12.0

func (UnimplementedCortexOpsServer) ResetDefaultConfiguration(context.Context, *emptypb.Empty) (*emptypb.Empty, error)

func (UnimplementedCortexOpsServer) SetConfiguration added in v0.12.0

func (UnimplementedCortexOpsServer) SetDefaultConfiguration added in v0.12.0

func (UnimplementedCortexOpsServer) Status added in v0.12.0

func (UnimplementedCortexOpsServer) Uninstall added in v0.12.0

type UnsafeCortexOpsServer

type UnsafeCortexOpsServer interface {
	// contains filtered or unexported methods
}

UnsafeCortexOpsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CortexOpsServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL