service

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteLicenseConfigMap

func DeleteLicenseConfigMap(client *kubernetes.Clientset) error

DeleteLicenseConfigMap deletes the Kubernetes config map with cluster license

func DeleteLicenseSecret

func DeleteLicenseSecret(client *kubernetes.Clientset) error

DeleteLicenseSecret deletes the Kubernetes secret with cluster license

func GetClusterEndpoints

func GetClusterEndpoints(client *kubernetes.Clientset) (storage.Endpoints, error)

GetClusterEndpoints retrieves the Ops Center endpoints from its config map using the provided Kubernetes client

func GetLicenseFromConfigMap

func GetLicenseFromConfigMap(client *kubernetes.Clientset) (string, error)

GetLicenseFromConfigMap returns license data from Kubernetes config map, used for migration purposes

func GetLicenseFromSecret

func GetLicenseFromSecret(client *kubernetes.Clientset) (string, error)

GetLicenseFromSecret returns license string from Kubernetes secret

func InstallLicenseConfigMap

func InstallLicenseConfigMap(client *kubernetes.Clientset, licenseData string) error

InstallLicenseConfigMap installs the provided license on a running site as a config map, used for migration purposes

func InstallLicenseSecret

func InstallLicenseSecret(client *kubernetes.Clientset, licenseData string) error

InstallLicenseSecret installs the provided license on a running site as a secret in the system namespace

Types

type Operator

type Operator struct {
	// Operator is the open-source operator
	*opsservice.Operator
	// contains filtered or unexported fields
}

Operator extends the open-source operator service

func New

func New(ossOperator *opsservice.Operator) *Operator

New returns an new enterprise operator

func (*Operator) AcceptRemoteCluster

AcceptRemoteCluster defines the handshake between a remote cluster and this Ops Center

func (*Operator) CheckForUpdate

func (o *Operator) CheckForUpdate(key ossops.SiteKey) (*loc.Locator, error)

CheckForUpdate checks with remote Ops Center if there is a newer version of the installed application

func (*Operator) CheckSiteLicense

func (o *Operator) CheckSiteLicense(ctx context.Context, key ossops.SiteKey) error

CheckSiteLicense makes sure the license installed on site is correct.

If a license is invalid and the site is active, it moves the site to the degraded state.

If the site is degraded because of invalid license and the next check succeeds, then the site is moved back to the active state.

func (*Operator) DeleteOIDCConnector

func (o *Operator) DeleteOIDCConnector(ctx context.Context, key ops.SiteKey, name string) error

DeleteOIDCConnector deletes an OIDC connector by name

func (*Operator) DeleteRole

func (o *Operator) DeleteRole(ctx context.Context, key ops.SiteKey, name string) error

DeleteRole deletes a role by name

func (*Operator) DeleteSAMLConnector

func (o *Operator) DeleteSAMLConnector(ctx context.Context, key ops.SiteKey, name string) error

DeleteSAMLConnector deletes a SAML connector by name

func (*Operator) DeleteTrustedCluster

func (o *Operator) DeleteTrustedCluster(ctx context.Context, req ops.DeleteTrustedClusterRequest) error

DeleteTrustedCluster deletes a trusted cluster specified with req

func (*Operator) DisablePeriodicUpdates

func (o *Operator) DisablePeriodicUpdates(ctx context.Context, key ossops.SiteKey) error

DisablePeriodicUpdates turns periodic updates for the cluster off and stops the update fetch loop if it's running

func (*Operator) DownloadUpdate

func (o *Operator) DownloadUpdate(ctx context.Context, req ops.DownloadUpdateRequest) error

DownloadUpdate downloads the provided application version from remote Ops Center

func (*Operator) EnablePeriodicUpdates

func (o *Operator) EnablePeriodicUpdates(ctx context.Context, req ops.EnablePeriodicUpdatesRequest) error

EnablePeriodicUpdates turns periodic updates for the cluster on or updates the interval

func (*Operator) GetClusterEndpoints

func (o *Operator) GetClusterEndpoints(key ossops.SiteKey) (storage.Endpoints, error)

GetClusterEndpoints returns the cluster management endpoints such as control panel advertise address and agents advertise address

Only supported in Ops Center mode.

func (*Operator) GetLicenseCA

func (o *Operator) GetLicenseCA() ([]byte, error)

GetLicenseCA returns CA certificate Ops Center uses to sign licenses

func (*Operator) GetOIDCConnector

func (o *Operator) GetOIDCConnector(key ops.SiteKey, name string, withSecrets bool) (services.OIDCConnector, error)

GetOIDCConnector returns an OIDC connector by name

Returned connector exclude client secret unless withSecrets is true.

func (*Operator) GetOIDCConnectors

func (o *Operator) GetOIDCConnectors(key ops.SiteKey, withSecrets bool) ([]services.OIDCConnector, error)

GetOIDCConnectors returns all OIDC connectors

Returned connectors exclude client secret unless withSecrets is true.

func (*Operator) GetRole

func (o *Operator) GetRole(key ops.SiteKey, name string) (services.Role, error)

GetRole returns a role by name

func (*Operator) GetRoles

func (o *Operator) GetRoles(key ops.SiteKey) ([]services.Role, error)

GetRoles returns all roles

func (*Operator) GetSAMLConnector

func (o *Operator) GetSAMLConnector(key ops.SiteKey, name string, withSecrets bool) (services.SAMLConnector, error)

GetSAMLConnector returns a SAML connector by name

Returned connector excludes private signing key unless withSecrets is true.

func (*Operator) GetSAMLConnectors

func (o *Operator) GetSAMLConnectors(key ops.SiteKey, withSecrets bool) ([]services.SAMLConnector, error)

GetSAMLConnectors returns all SAML connectors

Returned connectors exclude private signing keys unless withSecrets is true.

func (*Operator) GetTrustedCluster

func (o *Operator) GetTrustedCluster(key ossops.SiteKey, name string) (storage.TrustedCluster, error)

GetTrustedCluster returns trusted cluster by name

func (*Operator) GetTrustedClusters

func (o *Operator) GetTrustedClusters(key ossops.SiteKey) ([]storage.TrustedCluster, error)

GetTrustedClusters returns a list of configured trusted clusters

func (*Operator) NewLicense

func (o *Operator) NewLicense(ctx context.Context, req ops.NewLicenseRequest) (string, error)

NewLicense generates a new license signed by this Ops Center CA

func (*Operator) PeriodicUpdatesStatus

func (o *Operator) PeriodicUpdatesStatus(key ossops.SiteKey) (*ops.PeriodicUpdatesStatusResponse, error)

PeriodicUpdatesStatus returns the status of periodic updates for the cluster

func (*Operator) RegisterAgent

func (o *Operator) RegisterAgent(req ops.RegisterAgentRequest) (*ops.RegisterAgentResponse, error)

RegisterAgent is called by install agents to determine who's installer and who's joining agent when installing via Ops Center

func (*Operator) RemoveRemoteCluster

func (o *Operator) RemoveRemoteCluster(req ops.RemoveRemoteClusterRequest) error

RemoveRemoteCluster removes the cluster entry specified in the request

func (*Operator) RequestClusterCopy

func (o *Operator) RequestClusterCopy(req ops.ClusterCopyRequest) error

RequestClusterCopy replicates the cluster specified in the provided request and its data from the remote Ops Center

It is used in Ops Center initiated installs when installer process does not have the cluster and operation state locally (because the operation was created in the Ops Center along with the cluster and all other data).

The following things are replicated: cluster, install operation and its progress entry, both admin and regular cluster agents, expand token.

func (*Operator) StartPeriodicUpdates

func (o *Operator) StartPeriodicUpdates(key ossops.SiteKey) error

StartPeriodicUpdates starts periodic updates check

func (*Operator) StopPeriodicUpdates

func (o *Operator) StopPeriodicUpdates(key ossops.SiteKey) error

StopPeriodicUpdates stops periodic updates check without disabling it (so they will be resumed when the process restarts for example)

func (*Operator) UpdateClusterEndpoints

func (o *Operator) UpdateClusterEndpoints(ctx context.Context, key ossops.SiteKey, endpoints storage.Endpoints) error

UpdateClusterEndpoints updates the Ops Center config map with endpoints from the provided resource

func (*Operator) UpdateLicense

func (o *Operator) UpdateLicense(ctx context.Context, req ops.UpdateLicenseRequest) error

UpdateLicense updates license installed on site and runs a respective app hook.

func (*Operator) UpsertOIDCConnector

func (o *Operator) UpsertOIDCConnector(ctx context.Context, key ops.SiteKey, connector services.OIDCConnector) error

UpsertOIDCConnector creates or updates an OIDC connector

func (*Operator) UpsertRole

func (o *Operator) UpsertRole(ctx context.Context, key ops.SiteKey, role services.Role) error

UpsertRole creates a new role

func (*Operator) UpsertSAMLConnector

func (o *Operator) UpsertSAMLConnector(ctx context.Context, key ops.SiteKey, connector services.SAMLConnector) error

UpsertSAMLConnector creates or updates a SAML connector

func (*Operator) UpsertTrustedCluster

func (o *Operator) UpsertTrustedCluster(ctx context.Context, key ossops.SiteKey, cluster storage.TrustedCluster) error

UpsertTrustedCluster creates or updates a trusted cluster

Jump to

Keyboard shortcuts

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