streamnativecloud

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package streamnativecloud implements the function of SN Cloud resource reconcile

Index

Constants

View Source
const (
	// Finalizers for resources
	FlinkDeploymentFinalizer = "resource.streamnative.io/flinkdeployment-finalizer"
	// WorkspaceFinalizer is the finalizer added to Workspace resources
	WorkspaceFinalizer = "resource.streamnative.io/workspace-finalizer"
	// SecretFinalizer is the finalizer added to Secret resources
	SecretFinalizer = "resource.streamnative.io/secret-finalizer"
)

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(slice []string, s string) bool

ContainsString checks if a string is present in a slice

func FlinkDeploymentStatusHasChanged

func FlinkDeploymentStatusHasChanged(oldStatus, newStatus *resourcev1alpha1.ComputeFlinkDeploymentStatus) bool

FlinkDeploymentStatusHasChanged compares two FlinkDeployment statuses to determine if there's a meaningful change

func RemoveString

func RemoveString(slice []string, s string) []string

RemoveString removes a string from a slice

func StatusHasChanged

func StatusHasChanged(oldConditions, newConditions []metav1.Condition) bool

StatusHasChanged compares two slices of conditions to determine if there's a meaningful change

Types

type APIConnection

type APIConnection struct {
	// contains filtered or unexported fields
}

APIConnection represents a connection to the API server

func NewAPIConnection

NewAPIConnection creates a new API connection

func (*APIConnection) Close

func (c *APIConnection) Close() error

Close closes the connection and cleans up any resources

func (*APIConnection) IsInitialized

func (c *APIConnection) IsInitialized() bool

IsInitialized returns whether the connection has been fully initialized

func (*APIConnection) NeedsUpdate

NeedsUpdate checks if the connection needs to be updated

func (*APIConnection) Test

func (c *APIConnection) Test(ctx context.Context) error

Test tests the connection

func (*APIConnection) Update

Update updates the connection configuration

type APIKeyClient added in v0.10.0

type APIKeyClient struct {
	// contains filtered or unexported fields
}

APIKeyClient handles APIKey operations with the API server

func NewAPIKeyClient added in v0.10.0

func NewAPIKeyClient(apiConn *APIConnection, organization string) (*APIKeyClient, error)

NewAPIKeyClient creates a new APIKey client

func (*APIKeyClient) CreateAPIKey added in v0.10.0

func (c *APIKeyClient) CreateAPIKey(ctx context.Context, apiKey *resourcev1alpha1.APIKey) (*cloudapi.APIKey, error)

CreateAPIKey creates a new APIKey

func (*APIKeyClient) DeleteAPIKey added in v0.10.0

func (c *APIKeyClient) DeleteAPIKey(ctx context.Context, apiKey *resourcev1alpha1.APIKey) error

DeleteAPIKey deletes an APIKey by name

func (*APIKeyClient) GetAPIKey added in v0.10.0

func (c *APIKeyClient) GetAPIKey(ctx context.Context, name string) (*cloudapi.APIKey, error)

GetAPIKey gets an APIKey by name

func (*APIKeyClient) UpdateAPIKey added in v0.10.0

func (c *APIKeyClient) UpdateAPIKey(ctx context.Context, apiKey *resourcev1alpha1.APIKey) (*cloudapi.APIKey, error)

UpdateAPIKey updates an existing APIKey

func (*APIKeyClient) WatchAPIKey added in v0.10.0

func (c *APIKeyClient) WatchAPIKey(ctx context.Context, name string) (watch.Interface, error)

WatchAPIKey watches an APIKey by name

type FlinkDeploymentClient

type FlinkDeploymentClient struct {
	// contains filtered or unexported fields
}

FlinkDeploymentClient handles FlinkDeployment operations with the API server

func NewFlinkDeploymentClient

func NewFlinkDeploymentClient(apiConn *APIConnection, organization string) (*FlinkDeploymentClient, error)

NewFlinkDeploymentClient creates a new FlinkDeployment client

func (*FlinkDeploymentClient) CreateFlinkDeployment

CreateFlinkDeployment creates a new FlinkDeployment

func (*FlinkDeploymentClient) DeleteFlinkDeployment

func (c *FlinkDeploymentClient) DeleteFlinkDeployment(ctx context.Context, deployment *resourcev1alpha1.ComputeFlinkDeployment) error

DeleteFlinkDeployment deletes a FlinkDeployment by name

func (*FlinkDeploymentClient) GetFlinkDeployment

func (c *FlinkDeploymentClient) GetFlinkDeployment(ctx context.Context, name string) (*computeapi.FlinkDeployment, error)

GetFlinkDeployment gets a FlinkDeployment by name

func (*FlinkDeploymentClient) UpdateFlinkDeployment

UpdateFlinkDeployment updates an existing FlinkDeployment

func (*FlinkDeploymentClient) WatchFlinkDeployment

func (c *FlinkDeploymentClient) WatchFlinkDeployment(ctx context.Context, name string) (watch.Interface, error)

WatchFlinkDeployment watches a FlinkDeployment by name

type RoleBindingClient added in v0.12.0

type RoleBindingClient struct {
	// contains filtered or unexported fields
}

RoleBindingClient handles RoleBinding operations with the API server

func NewRoleBindingClient added in v0.12.0

func NewRoleBindingClient(apiConn *APIConnection, organization string) (*RoleBindingClient, error)

NewRoleBindingClient creates a new RoleBinding client

func (*RoleBindingClient) CreateRoleBinding added in v0.12.0

func (c *RoleBindingClient) CreateRoleBinding(ctx context.Context, roleBinding *resourcev1alpha1.RoleBinding) (*cloudapi.RoleBinding, error)

CreateRoleBinding creates a new RoleBinding

func (*RoleBindingClient) DeleteRoleBinding added in v0.12.0

func (c *RoleBindingClient) DeleteRoleBinding(ctx context.Context, roleBinding *resourcev1alpha1.RoleBinding) error

DeleteRoleBinding deletes a RoleBinding by name

func (*RoleBindingClient) GetRoleBinding added in v0.12.0

func (c *RoleBindingClient) GetRoleBinding(ctx context.Context, name string) (*cloudapi.RoleBinding, error)

GetRoleBinding gets a RoleBinding by name

func (*RoleBindingClient) UpdateRoleBinding added in v0.12.0

func (c *RoleBindingClient) UpdateRoleBinding(ctx context.Context, roleBinding *resourcev1alpha1.RoleBinding) (*cloudapi.RoleBinding, error)

UpdateRoleBinding updates an existing RoleBinding

func (*RoleBindingClient) WatchRoleBinding added in v0.12.0

func (c *RoleBindingClient) WatchRoleBinding(ctx context.Context, name string) (watch.Interface, error)

WatchRoleBinding watches a RoleBinding by name

type SecretClient added in v0.9.0

type SecretClient struct {
	// contains filtered or unexported fields
}

SecretClient handles Secret operations with the API server

func NewSecretClient added in v0.9.0

func NewSecretClient(apiConn *APIConnection, organization string) (*SecretClient, error)

NewSecretClient creates a new Secret client

func (*SecretClient) CreateSecret added in v0.9.0

func (c *SecretClient) CreateSecret(ctx context.Context, secret *resourcev1alpha1.Secret) (*cloudapi.Secret, error)

CreateSecret creates a new Secret

func (*SecretClient) DeleteSecret added in v0.9.0

func (c *SecretClient) DeleteSecret(ctx context.Context, secret *resourcev1alpha1.Secret) error

DeleteSecret deletes a Secret by name

func (*SecretClient) GetSecret added in v0.9.0

func (c *SecretClient) GetSecret(ctx context.Context, name string) (*cloudapi.Secret, error)

GetSecret gets a Secret by name

func (*SecretClient) UpdateSecret added in v0.9.0

func (c *SecretClient) UpdateSecret(ctx context.Context, secret *resourcev1alpha1.Secret) (*cloudapi.Secret, error)

UpdateSecret updates an existing Secret

func (*SecretClient) WatchSecret added in v0.9.0

func (c *SecretClient) WatchSecret(ctx context.Context, name string) (watch.Interface, error)

WatchSecret watches a Secret by name

type ServiceAccountBindingClient added in v0.10.0

type ServiceAccountBindingClient struct {
	// contains filtered or unexported fields
}

ServiceAccountBindingClient handles ServiceAccountBinding operations with the API server

func NewServiceAccountBindingClient added in v0.10.0

func NewServiceAccountBindingClient(apiConn *APIConnection, organization string) (*ServiceAccountBindingClient, error)

NewServiceAccountBindingClient creates a new ServiceAccountBinding client

func (*ServiceAccountBindingClient) CreateServiceAccountBinding added in v0.10.0

CreateServiceAccountBinding creates a new ServiceAccountBinding

func (*ServiceAccountBindingClient) DeleteServiceAccountBinding added in v0.10.0

func (c *ServiceAccountBindingClient) DeleteServiceAccountBinding(ctx context.Context, binding *resourcev1alpha1.ServiceAccountBinding) error

DeleteServiceAccountBinding deletes a ServiceAccountBinding by name

func (*ServiceAccountBindingClient) GetServiceAccountBinding added in v0.10.0

func (c *ServiceAccountBindingClient) GetServiceAccountBinding(ctx context.Context, name string) (*cloudapi.ServiceAccountBinding, error)

GetServiceAccountBinding gets a ServiceAccountBinding by name

func (*ServiceAccountBindingClient) UpdateServiceAccountBinding added in v0.10.0

UpdateServiceAccountBinding updates an existing ServiceAccountBinding

func (*ServiceAccountBindingClient) WatchServiceAccountBinding added in v0.10.0

func (c *ServiceAccountBindingClient) WatchServiceAccountBinding(ctx context.Context, name string) (watch.Interface, error)

WatchServiceAccountBinding watches a ServiceAccountBinding by name

type ServiceAccountClient added in v0.10.0

type ServiceAccountClient struct {
	// contains filtered or unexported fields
}

ServiceAccountClient handles ServiceAccount operations with the API server

func NewServiceAccountClient added in v0.10.0

func NewServiceAccountClient(apiConn *APIConnection, organization string) (*ServiceAccountClient, error)

NewServiceAccountClient creates a new ServiceAccount client

func (*ServiceAccountClient) CreateServiceAccount added in v0.10.0

CreateServiceAccount creates a new ServiceAccount

func (*ServiceAccountClient) DeleteServiceAccount added in v0.10.0

func (c *ServiceAccountClient) DeleteServiceAccount(ctx context.Context, sa *resourcev1alpha1.ServiceAccount) error

DeleteServiceAccount deletes a ServiceAccount by name

func (*ServiceAccountClient) GetServiceAccount added in v0.10.0

func (c *ServiceAccountClient) GetServiceAccount(ctx context.Context, name string) (*cloudapi.ServiceAccount, error)

GetServiceAccount gets a ServiceAccount by name

func (*ServiceAccountClient) UpdateServiceAccount added in v0.10.0

UpdateServiceAccount updates an existing ServiceAccount

func (*ServiceAccountClient) WatchServiceAccount added in v0.10.0

func (c *ServiceAccountClient) WatchServiceAccount(ctx context.Context, name string) (watch.Interface, error)

WatchServiceAccount watches a ServiceAccount by name

type WellKnownConfig

type WellKnownConfig struct {
	TokenEndpoint string `json:"token_endpoint"`
}

WellKnownConfig represents the OpenID Connect configuration

type WorkspaceClient

type WorkspaceClient struct {
	// contains filtered or unexported fields
}

WorkspaceClient handles workspace operations with the API server

func NewWorkspaceClient

func NewWorkspaceClient(apiConn *APIConnection, organization string) (*WorkspaceClient, error)

NewWorkspaceClient creates a new workspace client

func (*WorkspaceClient) CreateWorkspace

CreateWorkspace creates a new workspace

func (*WorkspaceClient) DeleteWorkspace

func (c *WorkspaceClient) DeleteWorkspace(ctx context.Context, workspace *resourcev1alpha1.ComputeWorkspace) error

DeleteWorkspace deletes a workspace

func (*WorkspaceClient) GetWorkspace

func (c *WorkspaceClient) GetWorkspace(ctx context.Context, id string) (*computeapi.Workspace, error)

GetWorkspace gets a workspace by ID

func (*WorkspaceClient) UpdateWorkspace

UpdateWorkspace updates a workspace

func (*WorkspaceClient) WatchWorkspace

func (c *WorkspaceClient) WatchWorkspace(ctx context.Context, name string) (watch.Interface, error)

WatchWorkspace watches a workspace by name

Directories

Path Synopsis
apis
cloud/v1alpha1
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/streamnative/pulsar-resources-operator/pkg/streamnativecloud/apis/cloud +k8s:defaulter-gen=TypeMeta +k8s:protobuf-gen=package +groupName=cloud.streamnative.io
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/streamnative/pulsar-resources-operator/pkg/streamnativecloud/apis/cloud +k8s:defaulter-gen=TypeMeta +k8s:protobuf-gen=package +groupName=cloud.streamnative.io
compute/v1alpha1
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/streamnative/pulsar-resources-operator/pkg/streamnativecloud/apis/compute +k8s:defaulter-gen=TypeMeta +k8s:protobuf-gen=package +groupName=compute.streamnative.io
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/streamnative/pulsar-resources-operator/pkg/streamnativecloud/apis/compute +k8s:defaulter-gen=TypeMeta +k8s:protobuf-gen=package +groupName=compute.streamnative.io
client
clientset_generated/clientset/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset_generated/clientset/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset_generated/clientset/typed/cloud/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset_generated/clientset/typed/cloud/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
clientset_generated/clientset/typed/compute/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset_generated/clientset/typed/compute/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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