-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix one pod to multiple PVC connection #3553
Fix one pod to multiple PVC connection #3553
Conversation
probe/kubernetes/pod.go
Outdated
if p.VolumeClaimName() != "" { | ||
latests[VolumeClaim] = p.VolumeClaimName() | ||
if len(p.VolumeClaimNames()) > 0 { | ||
latests[VolumeClaim] = strings.Join(p.VolumeClaimNames(), "~p$") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"~p$"
should be a constant.
And is that necessary and/or sufficient? What are the rules on volume claim names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PVC name must consist of lower case alphanumeric characters, -
or .
, and must start and end with an alphanumeric character.
We can use a single space or any special character to join them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, can you please add a comment about the rules and put the separator in a const
.
I would probably just use ,
as the separator, if that works, but don't really mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure @bboreham, ,
will work or we can use the ;
i.e. ScopeDelim.
Read all the PVC source from a pod spec and add adjacency between the pod and its PVCs. Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
b3212dc
to
60a1c66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Scope Delimiter
makes sense. Rest looks good to me!
Thanks @Akash4927
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Read all the PVC source from a pod spec
and add adjacency between the pod and its PVCs.
Signed-off-by: Akash Srivastava akashsrivastava4927@gmail.com
fixes: #3550