Documentation
¶
Index ¶
- Constants
- func ApplyDevelopmentManagementUICredentialsAt(ctx context.Context, runtime Runtime, ...) error
- func DestroySharedProvider(ctx context.Context, runtime Runtime) error
- func DestroySharedProviderAt(ctx context.Context, runtime Runtime, dataDir, namespace string) error
- func EnsureSharedProvider(ctx context.Context, runtime Runtime, issuer serviceaccess.Issuer) (ProviderFiles, AdminCredentials, string, error)
- func EnsureSharedProviderAt(ctx context.Context, runtime Runtime, issuer serviceaccess.Issuer, ...) (ProviderFiles, AdminCredentials, string, error)
- func ExistingReadySharedProvider(ctx context.Context) (ProviderFiles, AdminCredentials, string, error)
- func ExistingReadySharedProviderAt(ctx context.Context, dataDir, namespace string) (ProviderFiles, AdminCredentials, string, error)
- func ManagementUISurfaceAt(dataDir, namespace string) (application.ManagementUISurface, error)
- func PhysicalBucketName(m application.Manifest, logical string) string
- func RegisterManagementUIConsumerAt(dataDir, namespace string, app application.Manifest) error
- func RotatePlatformBucketCredentialsAt(ctx context.Context, runtime Runtime, issuer serviceaccess.Issuer, ...) error
- func RotateProviderPKIAt(ctx context.Context, runtime Runtime, issuer serviceaccess.Issuer, ...) error
- func ServiceContainerEndpoint(files ProviderFiles) (string, error)
- func ServiceTrustBundle(files ProviderFiles) (string, error)
- func UnregisterManagementUIConsumerAt(dataDir, namespace string, app application.Manifest) error
- func VerifyApplicationBuckets(ctx context.Context, runtime Runtime, app application.Manifest, ...) error
- func VerifyApplicationBucketsAt(ctx context.Context, runtime Runtime, app application.Manifest, ...) error
- func VerifyManagementUIAt(ctx context.Context, dataDir, namespace string) error
- type AdminCredentials
- type BackupObject
- type BucketBackup
- type Driver
- func NewDriver(runtime Runtime, app application.Manifest, files application.RuntimeFiles, ...) *Driver
- func NewDriverAt(runtime Runtime, app application.Manifest, files application.RuntimeFiles, ...) *Driver
- func NewDriverWithRealization(realization SeaweedFSRealization, app application.Manifest, ...) *Driver
- func (d *Driver) Bind(ctx context.Context, resource capability.Resource, _ capability.Binding) error
- func (d *Driver) Descriptor() capability.Provider
- func (d *Driver) DestroyBucket(ctx context.Context, logicalBucket string) error
- func (d *Driver) EnsureSharedProvider(ctx context.Context) (ProviderFiles, AdminCredentials, string, error)
- func (d *Driver) ExportBucket(ctx context.Context, logical string) (BucketBackup, error)
- func (d *Driver) Preflight(_ context.Context, resource capability.Resource, binding capability.Binding) error
- func (d *Driver) Provision(ctx context.Context, resource capability.Resource, _ capability.Binding) error
- func (d *Driver) RestoreBucket(ctx context.Context, backup BucketBackup) error
- func (d *Driver) Rollback(ctx context.Context)
- func (d *Driver) RotateBucketCredentials(ctx context.Context, logicalBucket string) error
- func (d *Driver) Verify(ctx context.Context, resource capability.Resource, _ capability.Binding) error
- type IAMAccessKey
- type IAMClient
- func (c *IAMClient) CreateAccessKey(ctx context.Context, user string) (IAMAccessKey, error)
- func (c *IAMClient) CreateUser(ctx context.Context, user string) error
- func (c *IAMClient) DeleteAccessKey(ctx context.Context, user, accessKeyID string) error
- func (c *IAMClient) DeleteUser(ctx context.Context, user string) error
- func (c *IAMClient) DeleteUserPolicy(ctx context.Context, user, policyName string) error
- func (c *IAMClient) ListAccessKeys(ctx context.Context, user string) ([]string, error)
- func (c *IAMClient) PutUserPolicy(ctx context.Context, user, policyName, policyDocument string) error
- type PlatformBucket
- type PlatformBucketRotationHooks
- type ProviderFiles
- func EnsureProviderFiles(ctx context.Context, issuer serviceaccess.Issuer) (ProviderFiles, error)
- func EnsureProviderFilesAt(ctx context.Context, issuer serviceaccess.Issuer, dataDir, namespace string) (ProviderFiles, error)
- func ExistingProviderFiles() (ProviderFiles, error)
- func ExistingProviderFilesAt(dataDir, namespace string) (ProviderFiles, error)
- type Runtime
- type RuntimeResourceBinding
- type RuntimeResourceManager
- func (m *RuntimeResourceManager) Check(ctx context.Context) error
- func (m *RuntimeResourceManager) Create(ctx context.Context, applicationName, environment, name string) (RuntimeResourceBinding, error)
- func (m *RuntimeResourceManager) Delete(ctx context.Context, applicationName, environment, name string) error
- func (m *RuntimeResourceManager) Get(ctx context.Context, applicationName, environment, name string) (RuntimeResourceBinding, error)
- type SeaweedFSInstance
- type SeaweedFSRealization
Constants ¶
const ( ProviderProject = "baseharbor-object-storage" ProviderService = "seaweedfs-node-1" ProviderNetwork = "baseharbor-object-storage" ProviderImage = "docker.io/chrislusf/seaweedfs:4.47" )
Variables ¶
This section is empty.
Functions ¶
func ApplyDevelopmentManagementUICredentialsAt ¶ added in v0.4.17
func DestroySharedProviderAt ¶ added in v0.4.15
func EnsureSharedProvider ¶ added in v0.4.8
func EnsureSharedProvider(ctx context.Context, runtime Runtime, issuer serviceaccess.Issuer) (ProviderFiles, AdminCredentials, string, error)
func EnsureSharedProviderAt ¶ added in v0.4.15
func EnsureSharedProviderAt(ctx context.Context, runtime Runtime, issuer serviceaccess.Issuer, dataDir, namespace string) (ProviderFiles, AdminCredentials, string, error)
func ExistingReadySharedProvider ¶ added in v0.4.15
func ExistingReadySharedProvider(ctx context.Context) (ProviderFiles, AdminCredentials, string, error)
func ExistingReadySharedProviderAt ¶ added in v0.4.15
func ExistingReadySharedProviderAt(ctx context.Context, dataDir, namespace string) (ProviderFiles, AdminCredentials, string, error)
func ManagementUISurfaceAt ¶ added in v0.4.17
func ManagementUISurfaceAt(dataDir, namespace string) (application.ManagementUISurface, error)
func PhysicalBucketName ¶
func PhysicalBucketName(m application.Manifest, logical string) string
func RegisterManagementUIConsumerAt ¶ added in v0.4.17
func RegisterManagementUIConsumerAt(dataDir, namespace string, app application.Manifest) error
func RotatePlatformBucketCredentialsAt ¶ added in v0.4.21
func RotatePlatformBucketCredentialsAt( ctx context.Context, runtime Runtime, issuer serviceaccess.Issuer, dataDir, namespace, logicalName string, hooks PlatformBucketRotationHooks, ) error
RotatePlatformBucketCredentialsAt rotates one provider-owned S3 identity with explicit overlap. The replacement identity is created first, consumers are reconciled and verified against it, and only then is the previous IAM user retired and negatively verified.
func RotateProviderPKIAt ¶ added in v0.4.21
func RotateProviderPKIAt(ctx context.Context, runtime Runtime, issuer serviceaccess.Issuer, dataDir, namespace string) error
RotateProviderPKIAt reconciles SeaweedFS service and management TLS material against a replacement issuer, verifies both stable endpoints while the old and new trust roots overlap, and retires the previous trust root only after the replacement path is proven healthy.
func ServiceContainerEndpoint ¶ added in v0.4.15
func ServiceContainerEndpoint(files ProviderFiles) (string, error)
func ServiceTrustBundle ¶ added in v0.4.15
func ServiceTrustBundle(files ProviderFiles) (string, error)
func UnregisterManagementUIConsumerAt ¶ added in v0.4.17
func UnregisterManagementUIConsumerAt(dataDir, namespace string, app application.Manifest) error
func VerifyApplicationBuckets ¶
func VerifyApplicationBuckets(ctx context.Context, runtime Runtime, app application.Manifest, files application.RuntimeFiles) error
func VerifyApplicationBucketsAt ¶ added in v0.4.15
func VerifyApplicationBucketsAt(ctx context.Context, runtime Runtime, app application.Manifest, files application.RuntimeFiles, dataDir, namespace string) error
Types ¶
type AdminCredentials ¶ added in v0.4.8
func EnsureAdminCredentials ¶ added in v0.4.8
func EnsureAdminCredentials(files ProviderFiles) (AdminCredentials, string, error)
func LoadAdminCredentials ¶ added in v0.4.8
func LoadAdminCredentials(path string) (AdminCredentials, error)
func LoadContainerAdminCredentials ¶ added in v0.4.8
func LoadContainerAdminCredentials(path string) (AdminCredentials, error)
type BackupObject ¶ added in v0.4.16
type BucketBackup ¶ added in v0.4.16
type BucketBackup struct {
LogicalBucket string `json:"logical_bucket"`
Objects []BackupObject `json:"objects"`
}
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func NewDriver ¶
func NewDriver(runtime Runtime, app application.Manifest, files application.RuntimeFiles, issuer serviceaccess.Issuer) *Driver
func NewDriverAt ¶ added in v0.4.15
func NewDriverAt(runtime Runtime, app application.Manifest, files application.RuntimeFiles, issuer serviceaccess.Issuer, dataDir, namespace string) *Driver
func NewDriverWithRealization ¶ added in v0.4.19
func NewDriverWithRealization(realization SeaweedFSRealization, app application.Manifest, files application.RuntimeFiles) *Driver
func (*Driver) Bind ¶
func (d *Driver) Bind(ctx context.Context, resource capability.Resource, _ capability.Binding) error
func (*Driver) Descriptor ¶
func (d *Driver) Descriptor() capability.Provider
func (*Driver) DestroyBucket ¶
func (*Driver) EnsureSharedProvider ¶ added in v0.4.8
func (d *Driver) EnsureSharedProvider(ctx context.Context) (ProviderFiles, AdminCredentials, string, error)
func (*Driver) ExportBucket ¶ added in v0.4.16
func (*Driver) Preflight ¶
func (d *Driver) Preflight(_ context.Context, resource capability.Resource, binding capability.Binding) error
func (*Driver) Provision ¶
func (d *Driver) Provision(ctx context.Context, resource capability.Resource, _ capability.Binding) error
func (*Driver) RestoreBucket ¶ added in v0.4.16
func (d *Driver) RestoreBucket(ctx context.Context, backup BucketBackup) error
func (*Driver) RotateBucketCredentials ¶ added in v0.4.21
RotateBucketCredentials performs overlap-safe S3 credential rotation for one logical bucket. The new IAM identity exists before the application binding is changed. The old identity is retired only after a real Put/Get verification succeeds with the replacement credential pair.
func (*Driver) Verify ¶
func (d *Driver) Verify(ctx context.Context, resource capability.Resource, _ capability.Binding) error
type IAMAccessKey ¶ added in v0.4.8
type IAMClient ¶ added in v0.4.8
type IAMClient struct {
// contains filtered or unexported fields
}
func NewIAMClient ¶ added in v0.4.8
func (*IAMClient) CreateAccessKey ¶ added in v0.4.8
func (*IAMClient) CreateUser ¶ added in v0.4.8
func (*IAMClient) DeleteAccessKey ¶ added in v0.4.8
func (*IAMClient) DeleteUser ¶ added in v0.4.8
func (*IAMClient) DeleteUserPolicy ¶ added in v0.4.8
func (*IAMClient) ListAccessKeys ¶ added in v0.4.8
type PlatformBucket ¶ added in v0.4.21
type PlatformBucket struct {
Name string
Endpoint string
Network string
TrustBundle string
AccessKeyID string
SecretAccessKey string
}
PlatformBucket is a provider-owned S3 bucket used by another managed BaseHarbor provider (for example Loki or Tempo). It is intentionally separate from application object-storage intent and receives a dedicated least- privilege IAM identity.
func EnsurePlatformBucketAt ¶ added in v0.4.21
func EnsurePlatformBucketAt(ctx context.Context, runtime Runtime, issuer serviceaccess.Issuer, dataDir, namespace, logicalName string) (PlatformBucket, error)
func ExistingPlatformBucketAt ¶ added in v0.4.21
func ExistingPlatformBucketAt(dataDir, namespace, logicalName string) (PlatformBucket, error)
type PlatformBucketRotationHooks ¶ added in v0.4.21
type PlatformBucketRotationHooks struct {
Reconcile func(context.Context, PlatformBucket) error
Verify func(context.Context, PlatformBucket) error
Rollback func(context.Context, PlatformBucket) error
}
type ProviderFiles ¶
func EnsureProviderFiles ¶
func EnsureProviderFiles(ctx context.Context, issuer serviceaccess.Issuer) (ProviderFiles, error)
func EnsureProviderFilesAt ¶ added in v0.4.15
func EnsureProviderFilesAt(ctx context.Context, issuer serviceaccess.Issuer, dataDir, namespace string) (ProviderFiles, error)
func ExistingProviderFiles ¶
func ExistingProviderFiles() (ProviderFiles, error)
func ExistingProviderFilesAt ¶ added in v0.4.15
func ExistingProviderFilesAt(dataDir, namespace string) (ProviderFiles, error)
type Runtime ¶
type Runtime interface {
ConfigProject(context.Context, string, string, string) error
UpProject(context.Context, string, string, string) error
ExecProject(context.Context, string, string, string, string, ...string) (string, error)
ExecProjectInput(context.Context, string, string, string, []byte, string, ...string) (string, error)
DestroyProject(context.Context, string, string, string) error
}
type RuntimeResourceBinding ¶ added in v0.4.8
type RuntimeResourceManager ¶ added in v0.4.8
type RuntimeResourceManager struct {
// contains filtered or unexported fields
}
func NewRuntimeResourceManager ¶ added in v0.4.8
func NewRuntimeResourceManager(dir, endpoint string, client *http.Client, admin AdminCredentials) (*RuntimeResourceManager, error)
func (*RuntimeResourceManager) Check ¶ added in v0.4.8
func (m *RuntimeResourceManager) Check(ctx context.Context) error
func (*RuntimeResourceManager) Create ¶ added in v0.4.8
func (m *RuntimeResourceManager) Create(ctx context.Context, applicationName, environment, name string) (RuntimeResourceBinding, error)
func (*RuntimeResourceManager) Delete ¶ added in v0.4.8
func (m *RuntimeResourceManager) Delete(ctx context.Context, applicationName, environment, name string) error
func (*RuntimeResourceManager) Get ¶ added in v0.4.8
func (m *RuntimeResourceManager) Get(ctx context.Context, applicationName, environment, name string) (RuntimeResourceBinding, error)
type SeaweedFSInstance ¶ added in v0.4.19
type SeaweedFSInstance struct {
Endpoint string
WorkloadEndpoint string
TrustBundle []byte
HTTPClient *http.Client
}
SeaweedFSInstance is the runtime-neutral result consumed by the S3 capability lifecycle. Runtime-native resource names remain private to the realization.
type SeaweedFSRealization ¶ added in v0.4.19
type SeaweedFSRealization interface {
Apply(context.Context) (SeaweedFSInstance, error)
Existing(context.Context) (SeaweedFSInstance, error)
Admin(context.Context, string) (string, error)
Destroy(context.Context) error
}
SeaweedFSRealization owns runtime-specific provider deployment and administrative execution. The capability Driver must not require Compose, container, Kubernetes, OpenShift or cloud resource vocabulary.