Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1864 from deepsm007/add-chunksize-var
Expose chunksize variable for S3 storage driver
- Loading branch information
Showing
29 changed files
with
19,152 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
imageregistry/v1/tests/configs.imageregistry.operator.openshift.io/ChunkSizeMiB.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this | ||
name: "Config" | ||
crdName: configs.imageregistry.operator.openshift.io | ||
featureGate: ChunkSizeMiB | ||
tests: | ||
onCreate: | ||
- name: Should be able to create a minimal Config | ||
initial: | | ||
apiVersion: imageregistry.operator.openshift.io/v1 | ||
kind: Config | ||
spec: | ||
replicas: 1 | ||
expected: | | ||
apiVersion: imageregistry.operator.openshift.io/v1 | ||
kind: Config | ||
spec: | ||
logLevel: Normal | ||
operatorLogLevel: Normal | ||
replicas: 1 | ||
- name: Should be able to configure chunksizemib for storage s3 | ||
initial: | | ||
apiVersion: imageregistry.operator.openshift.io/v1 | ||
kind: Config | ||
spec: | ||
replicas: 1 | ||
storage: | ||
s3: | ||
bucket: bucket-1 | ||
region: region-1 | ||
chunkSizeMiB: 10 | ||
expected: | | ||
apiVersion: imageregistry.operator.openshift.io/v1 | ||
kind: Config | ||
spec: | ||
logLevel: Normal | ||
operatorLogLevel: Normal | ||
replicas: 1 | ||
storage: | ||
s3: | ||
bucket: bucket-1 | ||
region: region-1 | ||
chunkSizeMiB: 10 | ||
- name: Should be able to configure storage s3 without chunkSizeMiB | ||
initial: | | ||
apiVersion: imageregistry.operator.openshift.io/v1 | ||
kind: Config | ||
spec: | ||
replicas: 1 | ||
storage: | ||
s3: | ||
bucket: bucket-2 | ||
region: region-2 | ||
expected: | | ||
apiVersion: imageregistry.operator.openshift.io/v1 | ||
kind: Config | ||
spec: | ||
logLevel: Normal | ||
operatorLogLevel: Normal | ||
replicas: 1 | ||
storage: | ||
s3: | ||
bucket: bucket-2 | ||
region: region-2 | ||
- name: Should reject configuration with value less than 5 in chunkSizeMiB for storage s3 | ||
initial: | | ||
apiVersion: imageregistry.operator.openshift.io/v1 | ||
kind: Config | ||
spec: | ||
replicas: 1 | ||
storage: | ||
s3: | ||
bucket: bucket-2 | ||
region: region-2 | ||
chunkSizeMiB: 2 | ||
expectedError: "Invalid value: 2: spec.storage.s3.chunkSizeMiB in body should be greater than or equal to 5" | ||
- name: Should reject configuration with value more than 5120 in chunkSizeMiB for storage s3 | ||
initial: | | ||
apiVersion: imageregistry.operator.openshift.io/v1 | ||
kind: Config | ||
spec: | ||
replicas: 1 | ||
storage: | ||
s3: | ||
bucket: bucket-3 | ||
region: region-3 | ||
chunkSizeMiB: 6000 | ||
expectedError: "Invalid value: 6000: spec.storage.s3.chunkSizeMiB in body should be less than or equal to 5120" | ||
- name: Should reject configuration with decimal value in chunkSizeMiB for storage s3 | ||
initial: | | ||
apiVersion: imageregistry.operator.openshift.io/v1 | ||
kind: Config | ||
spec: | ||
replicas: 1 | ||
storage: | ||
s3: | ||
bucket: bucket-4 | ||
region: region-4 | ||
chunkSizeMiB: 19.5 | ||
expectedError: "Invalid value: \"number\": spec.storage.s3.chunkSizeMiB in body must be of type integer: \"number\"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.