Skip to content

Commit dd2ec3a

Browse files
authored
Enable s3-provider support (#40)
* remove duplicate constant Signed-off-by: Ashima-Ashima1 <[email protected]> * remove duplicate constant Signed-off-by: Ashima-Ashima1 <[email protected]> * update cr to provide s3provider support Signed-off-by: Ashima-Ashima1 <[email protected]> * fetch s3provider from cr Signed-off-by: Ashima-Ashima1 <[email protected]> * minor changes Signed-off-by: Ashima-Ashima1 <[email protected]> * simply code Signed-off-by: Ashima-Ashima1 <[email protected]> * update crd to support s3provider region Signed-off-by: Ashima-Ashima1 <[email protected]> * s3 provider support Signed-off-by: Ashima-Ashima1 <[email protected]> * s3 provider support Signed-off-by: Ashima-Ashima1 <[email protected]> * s3 provider support Signed-off-by: Ashima-Ashima1 <[email protected]> * s3 provider support Signed-off-by: Ashima-Ashima1 <[email protected]> * s3 provider support Signed-off-by: Ashima-Ashima1 <[email protected]> * minor fix Signed-off-by: Ashima-Ashima1 <[email protected]> * minor fix Signed-off-by: Ashima-Ashima1 <[email protected]> * minor fix Signed-off-by: Ashima-Ashima1 <[email protected]> * revert image Signed-off-by: Ashima-Ashima1 <[email protected]> * fix region check Signed-off-by: Ashima-Ashima1 <[email protected]> * fix region check Signed-off-by: Ashima-Ashima1 <[email protected]> * fix uts Signed-off-by: Ashima-Ashima1 <[email protected]> * address review comments Signed-off-by: Ashima-Ashima1 <[email protected]> --------- Signed-off-by: Ashima-Ashima1 <[email protected]>
1 parent 718e0a0 commit dd2ec3a

File tree

11 files changed

+1496
-143
lines changed

11 files changed

+1496
-143
lines changed

api/v1alpha1/ibmobjectcsi_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ type IBMObjectCSISpec struct {
3737
ImagePullSecrets []string `json:"imagePullSecrets,omitempty"`
3838

3939
HealthPort uint16 `json:"healthPort,omitempty"`
40+
41+
S3Provider string `json:"s3Provider,omitempty"`
42+
S3ProviderRegion string `json:"s3ProviderRegion,omitempty"`
4043
}
4144

4245
// ResourcesSpec ...

config/crd/bases/objectdriver.csi.ibm.com_ibmobjectcsis.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,6 +2064,10 @@ spec:
20642064
- repository
20652065
- tag
20662066
type: object
2067+
s3Provider:
2068+
type: string
2069+
s3ProviderRegion:
2070+
type: string
20672071
sidecars:
20682072
items:
20692073
description: CSISidecar ...

controllers/constants/constants.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@ const (
8484
S3fsRetainStorageClass = StorageClassPrefix + "-s3fs-retain"
8585
S3fsStorageClass = StorageClassPrefix + "-s3fs"
8686

87+
S3ProviderIBM = "ibm-cos"
88+
S3ProviderAWS = "aws"
89+
S3ProviderWasabi = "wasabi"
90+
IaasIBMClassic = "ibm-classic"
91+
IaasIBMVPC = "ibm-vpc"
92+
93+
IBMEP = "https://s3.%s.%s.cloud-object-storage.appdomain.cloud"
94+
AWSEP = "https://s3.%s.amazonaws.com"
95+
WasabiEP = "https://s3.%s.wasabisys.com"
96+
8797
DefaultLogTailLines = 300
8898
DefaultNamespace = "default"
8999
ReconcilationTime = 5 * time.Minute

0 commit comments

Comments
 (0)