Skip to content

Commit

Permalink
Support for storage class name in kubectl plugin
Browse files Browse the repository at this point in the history
Added an option to specify the storage class name in 'create' command.
This is useful in environments without a default storage class.
  • Loading branch information
Zerpet committed Sep 24, 2020
1 parent 56e2f09 commit e8bdfe6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/kubectl-rabbitmq
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ usage() {
echo
echo " Create a RabbitMQ custom resource - INSTANCE name required, all other flags optional"
echo " kubectl rabbitmq create INSTANCE --replicas 1 --service ClusterIP --image rabbitmq:3.8.8 --image-pull-secret mysecret"
echo " --tls-secret secret-name --storage-class mystorageclass"
echo
echo " Get a RabbitMQ custom resource and dependant objects"
echo " kubectl rabbitmq get INSTANCE"
Expand Down Expand Up @@ -150,6 +151,12 @@ create() {
echo " secretName: $1" >>"$rabbitmq_manifest_file"
shift 1
;;
"--storage-class")
shift 1
echo " persistence:" >>"$rabbitmq_manifest_file"
echo " storageClassName: $1" >>"$rabbitmq_manifest_file"
shift 1
;;
*)
# Unrecognised or unsupported option
echo "Option '$1' not recongnised"
Expand Down

0 comments on commit e8bdfe6

Please sign in to comment.