-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose chunkzie variable for S3 storage driver
- Loading branch information
Showing
17 changed files
with
9,707 additions
and
1 deletion.
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: "spec.storage.s3.chunkSizeMiB in body should match '^(5\\d{0,2}|[1-9]\\d{0,2}|[0-4]\\d{0,4}|5000|50[0-9]{2}|51[0-1][0-9]|5120)$'" | ||
- 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: 2 | ||
expectedError: "spec.storage.s3.chunkSizeMiB in body should match '^(5\\d{0,2}|[1-9]\\d{0,2}|[0-4]\\d{0,4}|5000|50[0-9]{2}|51[0-1][0-9]|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: "spec.storage.s3.chunkSizeMiB in body should match '^(5\\d{0,2}|[1-9]\\d{0,2}|[0-4]\\d{0,4}|5000|50[0-9]{2}|51[0-1][0-9]|5120)$'" |
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.