Skip to content

Commit

Permalink
Change to alpha/beta for bandwidth annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
thockin committed Oct 14, 2015
1 parent 0bf5bff commit 2f4c303
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pkg/kubelet/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -2851,7 +2851,7 @@ func validateBandwidthIsReasonable(rsrc *resource.Quantity) error {
}

func extractBandwidthResources(pod *api.Pod) (ingress, egress *resource.Quantity, err error) {
str, found := pod.Annotations["kubernetes.io/ingress-bandwidth"]
str, found := pod.Annotations["net.alpha.kubernetes.io/ingress-bandwidth"]
if found {
if ingress, err = resource.ParseQuantity(str); err != nil {
return nil, nil, err
Expand All @@ -2860,7 +2860,7 @@ func extractBandwidthResources(pod *api.Pod) (ingress, egress *resource.Quantity
return nil, nil, err
}
}
str, found = pod.Annotations["kubernetes.io/egress-bandwidth"]
str, found = pod.Annotations["net.alpha.kubernetes.io/egress-bandwidth"]
if found {
if egress, err = resource.ParseQuantity(str); err != nil {
return nil, nil, err
Expand Down
18 changes: 9 additions & 9 deletions pkg/kubelet/kubelet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3442,7 +3442,7 @@ func TestCleanupBandwidthLimits(t *testing.T) {
ObjectMeta: api.ObjectMeta{
Name: "foo",
Annotations: map[string]string{
"kubernetes.io/ingress-bandwidth": "10M",
"net.alpha.kubernetes.io/ingress-bandwidth": "10M",
},
},
},
Expand All @@ -3467,7 +3467,7 @@ func TestCleanupBandwidthLimits(t *testing.T) {
ObjectMeta: api.ObjectMeta{
Name: "foo",
Annotations: map[string]string{
"kubernetes.io/ingress-bandwidth": "10M",
"net.alpha.kubernetes.io/ingress-bandwidth": "10M",
},
},
},
Expand All @@ -3493,7 +3493,7 @@ func TestCleanupBandwidthLimits(t *testing.T) {
ObjectMeta: api.ObjectMeta{
Name: "foo",
Annotations: map[string]string{
"kubernetes.io/ingress-bandwidth": "10M",
"net.alpha.kubernetes.io/ingress-bandwidth": "10M",
},
},
},
Expand All @@ -3518,7 +3518,7 @@ func TestCleanupBandwidthLimits(t *testing.T) {
ObjectMeta: api.ObjectMeta{
Name: "foo",
Annotations: map[string]string{
"kubernetes.io/ingress-bandwidth": "10M",
"net.alpha.kubernetes.io/ingress-bandwidth": "10M",
},
},
},
Expand Down Expand Up @@ -3606,7 +3606,7 @@ func TestExtractBandwidthResources(t *testing.T) {
pod: &api.Pod{
ObjectMeta: api.ObjectMeta{
Annotations: map[string]string{
"kubernetes.io/ingress-bandwidth": "10M",
"net.alpha.kubernetes.io/ingress-bandwidth": "10M",
},
},
},
Expand All @@ -3616,7 +3616,7 @@ func TestExtractBandwidthResources(t *testing.T) {
pod: &api.Pod{
ObjectMeta: api.ObjectMeta{
Annotations: map[string]string{
"kubernetes.io/egress-bandwidth": "10M",
"net.alpha.kubernetes.io/egress-bandwidth": "10M",
},
},
},
Expand All @@ -3626,8 +3626,8 @@ func TestExtractBandwidthResources(t *testing.T) {
pod: &api.Pod{
ObjectMeta: api.ObjectMeta{
Annotations: map[string]string{
"kubernetes.io/ingress-bandwidth": "4M",
"kubernetes.io/egress-bandwidth": "20M",
"net.alpha.kubernetes.io/ingress-bandwidth": "4M",
"net.alpha.kubernetes.io/egress-bandwidth": "20M",
},
},
},
Expand All @@ -3638,7 +3638,7 @@ func TestExtractBandwidthResources(t *testing.T) {
pod: &api.Pod{
ObjectMeta: api.ObjectMeta{
Annotations: map[string]string{
"kubernetes.io/ingress-bandwidth": "foo",
"net.alpha.kubernetes.io/ingress-bandwidth": "foo",
},
},
},
Expand Down

0 comments on commit 2f4c303

Please sign in to comment.