Commit 094f7ce0 authored by LiHui's avatar LiHui
Browse files

Bump istio to v1.11.0

Showing with 55 additions and 157 deletions
+55 -157
......@@ -20,8 +20,8 @@ require (
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
istio.io/api v0.0.0-20200221025927-228308df3f1b
istio.io/client-go v0.0.0-20200221055756-736d3076b458
istio.io/api v0.0.0-20210809175348-eff556fb5d8a
istio.io/client-go v1.11.0
k8s.io/api v0.22.0
k8s.io/apimachinery v0.22.0
k8s.io/cli-runtime v0.22.0
......
This diff is collapsed.
package controllers
import (
context2 "context"
"fmt"
"net/http"
......@@ -30,7 +31,7 @@ func (c *IstioController) VirtualServices(context *gin.Context) {
return
}
vsList, err := ic.NetworkingV1alpha3().VirtualServices(namespace).List(metav1.ListOptions{})
vsList, err := ic.NetworkingV1alpha3().VirtualServices(namespace).List(context2.TODO(), metav1.ListOptions{})
if err != nil {
log.Error().Err(err).Msgf("Failed to get VirtualService in %s namespace", namespace)
}
......@@ -59,7 +60,7 @@ func (c *IstioController) VirtualService(context *gin.Context) {
return
}
vs, err := ic.NetworkingV1alpha3().VirtualServices(namespace).Get(name, metav1.GetOptions{})
vs, err := ic.NetworkingV1alpha3().VirtualServices(namespace).Get(context2.TODO(), name, metav1.GetOptions{})
if err != nil {
context.JSON(http.StatusInternalServerError, gin.H{
......@@ -83,7 +84,7 @@ func (c *IstioController) DestinationRules(context *gin.Context) {
return
}
destinationrules, err := ic.NetworkingV1alpha3().DestinationRules(namespace).List(metav1.ListOptions{})
destinationrules, err := ic.NetworkingV1alpha3().DestinationRules(namespace).List(context2.TODO(), metav1.ListOptions{})
if err != nil {
context.JSON(http.StatusInternalServerError, gin.H{
"message": "fail get destinationrules",
......@@ -107,7 +108,7 @@ func (c *IstioController) DestinationRule(context *gin.Context) {
return
}
destinationrule, err := ic.NetworkingV1alpha3().DestinationRules(namespace).Get(name, metav1.GetOptions{})
destinationrule, err := ic.NetworkingV1alpha3().DestinationRules(namespace).Get(context2.TODO(), name, metav1.GetOptions{})
if err != nil {
context.JSON(http.StatusInternalServerError, gin.H{
"message": fmt.Sprintf("fail get destinationrule %s", name),
......@@ -133,7 +134,7 @@ func (c *IstioController) AddVersionToDestinationRule(context *gin.Context) {
return
}
destinationrule, err := ic.NetworkingV1alpha3().DestinationRules(namespace).Get(name, metav1.GetOptions{})
destinationrule, err := ic.NetworkingV1alpha3().DestinationRules(namespace).Get(context2.TODO(), name, metav1.GetOptions{})
if err != nil {
context.JSON(http.StatusInternalServerError, gin.H{
"message": "fail get destinationrule",
......@@ -158,7 +159,7 @@ func (c *IstioController) AddVersionToDestinationRule(context *gin.Context) {
}
destinationrule.Spec.Subsets = append(destinationrule.Spec.Subsets, newSubset)
result, err := ic.NetworkingV1alpha3().DestinationRules(namespace).Update(destinationrule)
result, err := ic.NetworkingV1alpha3().DestinationRules(namespace).Update(context2.TODO(), destinationrule, metav1.UpdateOptions{})
if err != nil {
context.JSON(http.StatusInternalServerError, gin.H{
"message": err.Error(),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment