-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathannotations.go
More file actions
73 lines (56 loc) · 3.38 KB
/
Copy pathannotations.go
File metadata and controls
73 lines (56 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
Copyright 2025.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import "fmt"
const (
// Domain will be used for all annotations.
Domain = "s3.bedag.ch"
AnnotationPrefixTenant = "tenant" // will be forwarded from the s3tenant to the account
AnnotationPrefixAdmin = "admin" // will not be passed through from tenant to the account
AnnotationPrefixBucket = "bucket"
AnnotationPrefixAccess = "access"
AnnotationPrefixGrid = "grid"
)
var (
// recreate credentials.
AnnotationRecreateAccessKeypairs = fmt.Sprintf("%s.%s/recreate-s3-access-keys", AnnotationPrefixAccess, Domain)
AnnotationRecreateBucketKeypairs = fmt.Sprintf("%s.%s/recreate-s3-access-keys", AnnotationPrefixBucket, Domain)
AnnotationRecreateTenantKeypairs = fmt.Sprintf("%s.%s/recreate-s3-access-keys", AnnotationPrefixTenant, Domain)
AnnotationResetTenantAdminPassword = fmt.Sprintf("%s.%s/reset-admin-password", AnnotationPrefixTenant, Domain)
// import existing s3 tenant into state.
AnnotationImportTenant = fmt.Sprintf("%s.%s/import-tenant-id", AnnotationPrefixAdmin, Domain)
// import existing s3 bucket into state.
AnnotationImportBucket = fmt.Sprintf("%s.%s/import-bucket-name", AnnotationPrefixBucket, Domain)
// force ownership even if ownership tags do not match.
AnnotationForceBucketOwnership = fmt.Sprintf("%s.%s/force-bucket-ownership", AnnotationPrefixBucket, Domain)
// force a recreation of the tenant.
AnnotationRecreateTenant = fmt.Sprintf("%s.%s/recreate-tenant", AnnotationPrefixTenant, Domain)
// allow the changing of the S3TenantClassName in a tenant since this can change the api endpoints.
AnnotationAllowTenantClassNameChange = fmt.Sprintf("%s.%s/allow-tenant-class-name-change", AnnotationPrefixTenant, Domain)
// allow shrinking of the tenant quota.
// TODO: implement this.
AnnotationAllowTenantQuotaShrinking = fmt.Sprintf("%s.%s/allow-tenant-quota-shrink", AnnotationPrefixTenant, Domain)
// Opt-in deletion protection. When set to "true" on any operator-managed resource,
// the validating webhook will block deletion until the annotation is removed.
AnnotationDeletionProtection = fmt.Sprintf("%s/deletion-protection", Domain)
// Annotation to drain a bucket, deleting all objects stored in it before deleting the bucket itself.
AnnotationDrainBucket = fmt.Sprintf("%s.%s/force-drain-bucket", AnnotationPrefixBucket, Domain)
// Tenant annotation to ignore buckets on deletion
// this annotation only applied to buckets that are not managed by the operator itself.
// eg buckets created manually or by another operator.
// buckets will be orphaned and the account is left intact.
AnnotationIgnoreUnmanagedBuckets = fmt.Sprintf("%s.%s/ignore-unmanaged-buckets", AnnotationPrefixTenant, Domain)
// TenantAnnotationsToKeep defines annotations that should remain on S3Tenant
// and NOT be automatically removed after propagation to S3TenantAccount.
TenantAnnotationsToKeep = []string{}
)