Documentation ¶
Index ¶
- Constants
- Variables
- func IsDeploymentReady(deployment *v12.Deployment) (bool, error)
- func IsIngressReady(ingress *v13.Ingress) bool
- func IsRouteReady(route *v1.Route) bool
- type ActionRunner
- type Background
- type ClusterAction
- type ClusterActionRunner
- type ClusterState
- type ControllerState
- type DataSourcesState
- type DeploymentReadyAction
- type DesiredClusterState
- type ExposeConfigMapEnvVarAction
- type ExposeSecretEnvVarAction
- type GenericCreateAction
- type GenericDeleteAction
- type GenericUpdateAction
- type IngressReadyAction
- type LogAction
- type RouteReadyAction
- type WaitForRouteAction
Constants ¶
const (
ConditionStatusSuccess = "True"
)
const (
RouteKind = "Route"
)
Route kind is not provided by the openshift api
Variables ¶
var ControllerEvents = make(chan ControllerState, 1)
Functions ¶
func IsDeploymentReady ¶
func IsDeploymentReady(deployment *v12.Deployment) (bool, error)
func IsIngressReady ¶
func IsRouteReady ¶
Types ¶
type ActionRunner ¶
type ActionRunner interface { RunAll(desiredState DesiredClusterState) error // contains filtered or unexported methods }
type Background ¶
type Background struct { SubscriptionChannel chan schema.GroupVersionKind // contains filtered or unexported fields }
Background represents a procedure that runs in the background, periodically auto-detecting features
func NewAutoDetect ¶
func NewAutoDetect(mgr manager.Manager) (*Background, error)
New creates a new auto-detect runner
func (*Background) Start ¶
func (b *Background) Start()
Start initializes the auto-detection process that runs in the background
func (*Background) Stop ¶
func (b *Background) Stop()
Stop causes the background process to stop auto detecting capabilities
type ClusterAction ¶
type ClusterAction interface {
Run(runner ActionRunner) (string, error)
}
type ClusterActionRunner ¶
type ClusterActionRunner struct {
// contains filtered or unexported fields
}
func (*ClusterActionRunner) RunAll ¶
func (i *ClusterActionRunner) RunAll(desiredState DesiredClusterState) error
type ClusterState ¶
type ClusterState struct { GrafanaService *v1.Service GrafanaDataPersistentVolumeClaim *v1.PersistentVolumeClaim GrafanaServiceAccount *v1.ServiceAccount GrafanaConfig *v1.ConfigMap GrafanaRoute *v12.Route GrafanaIngress *v14.Ingress GrafanaDeployment *v13.Deployment GrafanaDataSourceConfig *v1.ConfigMap AdminSecret *v1.Secret }
func NewClusterState ¶
func NewClusterState() *ClusterState
type ControllerState ¶
type ControllerState struct { DashboardSelectors []*v1.LabelSelector DashboardNamespaceSelector *v1.LabelSelector AdminUrl string GrafanaReady bool ClientTimeout int }
type DataSourcesState ¶
type DataSourcesState struct { ClusterDataSources *v1alpha1.GrafanaDataSourceList KnownDataSources *v1.ConfigMap }
func NewDataSourcesState ¶
func NewDataSourcesState() *DataSourcesState
type DeploymentReadyAction ¶
func (DeploymentReadyAction) Run ¶
func (i DeploymentReadyAction) Run(runner ActionRunner) (string, error)
type DesiredClusterState ¶
type DesiredClusterState []ClusterAction
The desired cluster state is defined by a list of actions that have to be run to get from the current state to the desired state
func (*DesiredClusterState) AddAction ¶
func (d *DesiredClusterState) AddAction(action ClusterAction) DesiredClusterState
func (*DesiredClusterState) AddActions ¶
func (d *DesiredClusterState) AddActions(actions []ClusterAction) DesiredClusterState
type ExposeConfigMapEnvVarAction ¶ added in v3.6.0
type ExposeConfigMapEnvVarAction struct { Ref *v14.ConfigMapEnvSource Msg string Namespace string }
Expose credentials from a secret as an env var to the operator container
func (ExposeConfigMapEnvVarAction) Run ¶ added in v3.6.0
func (i ExposeConfigMapEnvVarAction) Run(runner ActionRunner) (string, error)
type ExposeSecretEnvVarAction ¶ added in v3.6.0
type ExposeSecretEnvVarAction struct { Ref *v14.SecretEnvSource Msg string Namespace string }
Expose credentials from a secret as an env var to the operator container
func (ExposeSecretEnvVarAction) Run ¶ added in v3.6.0
func (i ExposeSecretEnvVarAction) Run(runner ActionRunner) (string, error)
type GenericCreateAction ¶
An action to create generic kubernetes resources (resources that don't require special treatment)
func (GenericCreateAction) Run ¶
func (i GenericCreateAction) Run(runner ActionRunner) (string, error)
type GenericDeleteAction ¶
An action to delete generic kubernetes resources (resources that don't require special treatment)
func (GenericDeleteAction) Run ¶
func (i GenericDeleteAction) Run(runner ActionRunner) (string, error)
type GenericUpdateAction ¶
An action to update generic kubernetes resources (resources that don't require special treatment)
func (GenericUpdateAction) Run ¶
func (i GenericUpdateAction) Run(runner ActionRunner) (string, error)
type IngressReadyAction ¶
func (IngressReadyAction) Run ¶
func (i IngressReadyAction) Run(runner ActionRunner) (string, error)
type RouteReadyAction ¶
func (RouteReadyAction) Run ¶
func (i RouteReadyAction) Run(runner ActionRunner) (string, error)