Skip to content
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(webhook): check for hostname instead of nodename for bd validations #94

Merged
merged 1 commit into from
Jun 11, 2020

Conversation

shubham14bajpai
Copy link
Contributor

Signed-off-by: shubham shubham.bajpai@mayadata.io

This PR fixes the validateBlockdevice check for block devices in the webhook. This case occurs in clusters like EKS where the nodename and hostname label are different.

mayadata:setup$ kubectl get nodes --show-labels 
NAME                                           STATUS   ROLES    AGE   VERSION   LABELS
ip-192-168-14-68.us-east-2.compute.internal    Ready    <none>   36m   v1.15.9   alpha.eksctl.io/cluster-name=shubham-bajpai-eks,alpha.eksctl.io/instance-id=i-07d31cc59d39279e4,alpha.eksctl.io/nodegroup-name=standard-workers,beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=t3.large,beta.kubernetes.io/os=linux,failure-domain.beta.kubernetes.io/region=us-east-2,failure-domain.beta.kubernetes.io/zone=us-east-2c,kubernetes.io/arch=amd64,kubernetes.io/hostname=ip-192-168-14-68,kubernetes.io/os=linux,topology.cstor.openebs.io/nodeName=ip-192-168-14-68.us-east-2.compute.internal
ip-192-168-36-162.us-east-2.compute.internal   Ready    <none>   36m   v1.15.9   alpha.eksctl.io/cluster-name=shubham-bajpai-eks,alpha.eksctl.io/instance-id=i-024eef20b23cf5336,alpha.eksctl.io/nodegroup-name=standard-workers,beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=t3.large,beta.kubernetes.io/os=linux,failure-domain.beta.kubernetes.io/region=us-east-2,failure-domain.beta.kubernetes.io/zone=us-east-2a,kubernetes.io/arch=amd64,kubernetes.io/hostname=ip-192-168-36-162,kubernetes.io/os=linux,topology.cstor.openebs.io/nodeName=ip-192-168-36-162.us-east-2.compute.internal
ip-192-168-80-245.us-east-2.compute.internal   Ready    <none>   35m   v1.15.9   alpha.eksctl.io/cluster-name=shubham-bajpai-eks,alpha.eksctl.io/instance-id=i-0a0e43bcba501126d,alpha.eksctl.io/nodegroup-name=standard-workers,beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=t3.large,beta.kubernetes.io/os=linux,failure-domain.beta.kubernetes.io/region=us-east-2,failure-domain.beta.kubernetes.io/zone=us-east-2b,kubernetes.io/arch=amd64,kubernetes.io/hostname=ip-192-168-80-245,kubernetes.io/os=linux,topology.cstor.openebs.io/nodeName=ip-192-168-80-245.us-east-2.compute.internal

Signed-off-by: shubham <shubham.bajpai@mayadata.io>
Copy link
Contributor

@mittachaitu mittachaitu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes are good

Copy link
Contributor

@prateekpandey14 prateekpandey14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@prateekpandey14 prateekpandey14 merged commit 5f0be52 into openebs-archive:master Jun 11, 2020
shubham14bajpai added a commit to shubham14bajpai/cstor-operators that referenced this pull request Jun 11, 2020
…ns (openebs-archive#94)

Signed-off-by: shubham <shubham.bajpai@mayadata.io>
kmova pushed a commit that referenced this pull request Jun 11, 2020
…ns (#94)

Signed-off-by: shubham <shubham.bajpai@mayadata.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants