Documentation ¶
Index ¶
- func DeleteLicenseConfigMap(client *kubernetes.Clientset) error
- func DeleteLicenseSecret(client *kubernetes.Clientset) error
- func GetClusterEndpoints(client *kubernetes.Clientset) (storage.Endpoints, error)
- func GetLicenseFromConfigMap(client *kubernetes.Clientset) (string, error)
- func GetLicenseFromSecret(client *kubernetes.Clientset) (string, error)
- func InstallLicenseConfigMap(client *kubernetes.Clientset, licenseData string) error
- func InstallLicenseSecret(client *kubernetes.Clientset, licenseData string) error
- type Operator
- func (o *Operator) AcceptRemoteCluster(req ops.AcceptRemoteClusterRequest) (*ops.AcceptRemoteClusterResponse, error)
- func (o *Operator) CheckForUpdate(key ossops.SiteKey) (*loc.Locator, error)
- func (o *Operator) CheckSiteLicense(ctx context.Context, key ossops.SiteKey) error
- func (o *Operator) DeleteOIDCConnector(ctx context.Context, key ops.SiteKey, name string) error
- func (o *Operator) DeleteRole(ctx context.Context, key ops.SiteKey, name string) error
- func (o *Operator) DeleteSAMLConnector(ctx context.Context, key ops.SiteKey, name string) error
- func (o *Operator) DeleteTrustedCluster(ctx context.Context, req ops.DeleteTrustedClusterRequest) error
- func (o *Operator) DisablePeriodicUpdates(ctx context.Context, key ossops.SiteKey) error
- func (o *Operator) DownloadUpdate(ctx context.Context, req ops.DownloadUpdateRequest) error
- func (o *Operator) EnablePeriodicUpdates(ctx context.Context, req ops.EnablePeriodicUpdatesRequest) error
- func (o *Operator) GetClusterEndpoints(key ossops.SiteKey) (storage.Endpoints, error)
- func (o *Operator) GetLicenseCA() ([]byte, error)
- func (o *Operator) GetOIDCConnector(key ops.SiteKey, name string, withSecrets bool) (services.OIDCConnector, error)
- func (o *Operator) GetOIDCConnectors(key ops.SiteKey, withSecrets bool) ([]services.OIDCConnector, error)
- func (o *Operator) GetRole(key ops.SiteKey, name string) (services.Role, error)
- func (o *Operator) GetRoles(key ops.SiteKey) ([]services.Role, error)
- func (o *Operator) GetSAMLConnector(key ops.SiteKey, name string, withSecrets bool) (services.SAMLConnector, error)
- func (o *Operator) GetSAMLConnectors(key ops.SiteKey, withSecrets bool) ([]services.SAMLConnector, error)
- func (o *Operator) GetTrustedCluster(key ossops.SiteKey, name string) (storage.TrustedCluster, error)
- func (o *Operator) GetTrustedClusters(key ossops.SiteKey) ([]storage.TrustedCluster, error)
- func (o *Operator) NewLicense(ctx context.Context, req ops.NewLicenseRequest) (string, error)
- func (o *Operator) PeriodicUpdatesStatus(key ossops.SiteKey) (*ops.PeriodicUpdatesStatusResponse, error)
- func (o *Operator) RegisterAgent(req ops.RegisterAgentRequest) (*ops.RegisterAgentResponse, error)
- func (o *Operator) RemoveRemoteCluster(req ops.RemoveRemoteClusterRequest) error
- func (o *Operator) RequestClusterCopy(req ops.ClusterCopyRequest) error
- func (o *Operator) StartPeriodicUpdates(key ossops.SiteKey) error
- func (o *Operator) StopPeriodicUpdates(key ossops.SiteKey) error
- func (o *Operator) UpdateClusterEndpoints(ctx context.Context, key ossops.SiteKey, endpoints storage.Endpoints) error
- func (o *Operator) UpdateLicense(ctx context.Context, req ops.UpdateLicenseRequest) error
- func (o *Operator) UpsertOIDCConnector(ctx context.Context, key ops.SiteKey, connector services.OIDCConnector) error
- func (o *Operator) UpsertRole(ctx context.Context, key ops.SiteKey, role services.Role) error
- func (o *Operator) UpsertSAMLConnector(ctx context.Context, key ops.SiteKey, connector services.SAMLConnector) error
- func (o *Operator) UpsertTrustedCluster(ctx context.Context, key ossops.SiteKey, cluster storage.TrustedCluster) error
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 ¶
func (o *Operator) AcceptRemoteCluster(req ops.AcceptRemoteClusterRequest) (*ops.AcceptRemoteClusterResponse, error)
AcceptRemoteCluster defines the handshake between a remote cluster and this Ops Center
func (*Operator) CheckForUpdate ¶
CheckForUpdate checks with remote Ops Center if there is a newer version of the installed application
func (*Operator) CheckSiteLicense ¶
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 ¶
DeleteOIDCConnector deletes an OIDC connector by name
func (*Operator) DeleteRole ¶
DeleteRole deletes a role by name
func (*Operator) DeleteSAMLConnector ¶
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 ¶
DisablePeriodicUpdates turns periodic updates for the cluster off and stops the update fetch loop if it's running
func (*Operator) DownloadUpdate ¶
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 ¶
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 ¶
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) 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 ¶
GetTrustedClusters returns a list of configured trusted clusters
func (*Operator) NewLicense ¶
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 ¶
StartPeriodicUpdates starts periodic updates check
func (*Operator) StopPeriodicUpdates ¶
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 ¶
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 ¶
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