Skip to content

Commit

Permalink
Allow user to specify the storage class for the Redis PVC
Browse files Browse the repository at this point in the history
* Add field to custom resource definition
* Add display information to csv
* Update pvc template

fixes #8877
https://pulp.plan.io/issues/8877
  • Loading branch information
chambridge committed Jun 10, 2021
1 parent e31304c commit ee975d0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/8877.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow user to specify the storage class for the Redis PVC
6 changes: 6 additions & 0 deletions deploy/crds/pulpproject_v1beta1_pulp_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ spec:
description: The image name (repo name) for the pulp webserver image.
type: string
default: pulp-web
redis_image:
description: The image name for the redis image.
type: string
redis_storage_class:
description: Storage class to use for the Redis PVC
type: string
tag:
description: The image tag for the pulp image.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: Reids storage class
path: redis_storage_class
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:hidden
- displayName: API server configuration
path: api
x-descriptors:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ spec:
redis_image:
description: The image name for the redis image.
type: string
redis_storage_class:
description: Storage class to use for the Redis PVC
type: string
tag:
description: The image tag for the pulp image.
type: string
Expand Down
3 changes: 3 additions & 0 deletions roles/redis/templates/redis.pvc.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ spec:
storage: 1Gi
accessModes:
- ReadWriteOnce
{% if redis_storage_class is defined %}
storageClassName: '{{ redis_storage_class }}'
{% endif %}

0 comments on commit ee975d0

Please sign in to comment.