Skip to content

Commit

Permalink
Merge pull request #1534 from luthermonson/jwt
Browse files Browse the repository at this point in the history
update to golang v1.17 + go mod fixes for CVE
  • Loading branch information
manuelbuil authored Jan 28, 2022
2 parents c7f9a39 + cacd0e6 commit aba86a5
Show file tree
Hide file tree
Showing 416 changed files with 77,407 additions and 4,618 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build flannel
on: [push, pull_request]

env:
GO_VERSION: "1.15.15"
GO_VERSION: "1.17.2"
LINUX_ARCHES: "amd64 arm arm64 s390x ppc64le mips64le"

jobs:
Expand Down Expand Up @@ -77,4 +77,4 @@ jobs:
with:
context: .
file: Dockerfile.mips64le
push: false
push: false
2 changes: 1 addition & 1 deletion .github/workflows/e2eTests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.15
go-version: ^1.17
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
types: [published]

env:
GO_VERSION: "1.15.15"
GO_VERSION: "1.17.2"
LINUX_ARCHES: "amd64 arm arm64 s390x ppc64le mips64le"
REPOSITORY: flannelcni/flannel

Expand Down
2 changes: 1 addition & 1 deletion Documentation/alicloud-vpc-backend-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ sudo -E ./flanneld --etcd-endpoints=http://127.0.0.1:2379
### 限制


阿里云每个路由表[限制](https://vpc.console.aliyun.com/#/vpc/cn-hangzhou/detail/vpc-bp11xpfe5ev6wvhfb14b6/router)最多只能创建48个自定义路由条目。如果你需要更多的路由规则,可以发工单请求更多的配合或者切换到 VXLAN 后台模式。
阿里云每个路由表[限制](https://vpc.console.aliyun.com/#/vpc/cn-hangzhou/detail/vpc-bp11xpfe5ev6wvhfb14b6/router)最多只能创建48个自定义路由条目。如果你需要更多的路由规则,可以发工单请求更多的配合或者切换到 VXLAN 后台模式。
2 changes: 1 addition & 1 deletion Documentation/extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ An example
"SubnetAddCommand": "export SUBNET_IP=`echo $SUBNET | cut -d'/' -f 1`; export IF_NAME=flannel-vxlan; read VTEP; ip route add $SUBNET nexthop via $SUBNET_IP dev $IF_NAME onlink && arp -s $SUBNET_IP $VTEP dev $IF_NAME && bridge fdb add $VTEP dev $IF_NAME self dst $PUBLIC_IP"
}
}
```
```
Binary file modified Documentation/img/ali-create-instance-cn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/ali-create-instance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/ali-create-ram-user-cn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/ali-create-ram-user-grant-permissions-cn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/ali-create-ram-user-grant-permissions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/ali-create-ram-user-save-key-cn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/ali-create-ram-user-save-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/ali-create-ram-user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/ali-create-switch-cn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/ali-create-switch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/ali-create-vpc-cn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/ali-create-vpc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/ali-vpc-confirm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/aws-instance-configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/aws-routes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/aws-src-dst-check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/aws-vpc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/gce-instance-and-security.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/gce-instance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/img/gce-routes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ else
endif

# Go version to use for builds
GO_VERSION=1.15.5
GO_VERSION=1.17.2

# K8s version used for Makefile helpers
K8S_VERSION=v1.6.6
K8S_VERSION=v1.22.3

GOARM=7

Expand Down Expand Up @@ -73,7 +73,11 @@ test: header-check gofmt verify-modules
# Run the unit tests
# NET_ADMIN capacity is required to do some network operation
# SYS_ADMIN capacity is required to create network namespace
docker run --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --rm -v $(shell pwd):/go/src/github.com/flannel-io/flannel golang:$(GO_VERSION) go test -v -cover $(TEST_PACKAGES_EXPANDED)
docker run --cap-add=NET_ADMIN \
--cap-add=SYS_ADMIN --rm \
-v $(shell pwd):/go/src/github.com/flannel-io/flannel \
golang:$(GO_VERSION) \
/bin/bash -c 'cd /go/src/github.com/flannel-io/flannel && go test -v -cover $(TEST_PACKAGES_EXPANDED)'

# Test the docker-opts script
cd dist; ./mk-docker-opts_tests.sh
Expand Down
1 change: 1 addition & 0 deletions backend/alivpc/alivpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package alivpc
Expand Down
3 changes: 2 additions & 1 deletion backend/alloc/alloc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ package alloc

import (
"fmt"
"sync"

"github.com/flannel-io/flannel/backend"
"github.com/flannel-io/flannel/pkg/ip"
"github.com/flannel-io/flannel/subnet"
"golang.org/x/net/context"
"sync"
)

func init() {
Expand Down
1 change: 1 addition & 0 deletions backend/awsvpc/awsvpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package awsvpc
Expand Down
1 change: 1 addition & 0 deletions backend/awsvpc/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package awsvpc
Expand Down
1 change: 1 addition & 0 deletions backend/gce/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package gce
Expand Down
1 change: 1 addition & 0 deletions backend/gce/gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//go:build !windows
// +build !windows

package gce
Expand Down
1 change: 1 addition & 0 deletions backend/gce/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package gce
Expand Down
4 changes: 2 additions & 2 deletions backend/hostgw/hostgw.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build !windows
//go:build !windows && !windows
// +build !windows,!windows

// Copyright 2015 flannel authors
//
Expand All @@ -13,7 +14,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// +build !windows

package hostgw

Expand Down
1 change: 1 addition & 0 deletions backend/ipip/ipip.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

// Copyright 2017 flannel authors
Expand Down
1 change: 1 addition & 0 deletions backend/ipip/ipip_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build windows
// +build windows

package ipip
1 change: 1 addition & 0 deletions backend/ipsec/handle_charon.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package ipsec
Expand Down
1 change: 1 addition & 0 deletions backend/ipsec/handle_xfrm.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package ipsec
Expand Down
1 change: 1 addition & 0 deletions backend/ipsec/ipsec.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package ipsec
Expand Down
1 change: 1 addition & 0 deletions backend/ipsec/ipsec_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package ipsec
Expand Down
1 change: 1 addition & 0 deletions backend/route_network.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

// Copyright 2017 flannel authors
Expand Down
1 change: 1 addition & 0 deletions backend/route_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package backend
Expand Down
10 changes: 6 additions & 4 deletions backend/tencentvpc/tencentvpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,27 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package tencentvpc

import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"sync"

"github.com/flannel-io/flannel/backend"
"github.com/flannel-io/flannel/pkg/ip"
"github.com/flannel-io/flannel/subnet"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
vpc "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312"
"golang.org/x/net/context"
"io/ioutil"
log "k8s.io/klog"
"net/http"
"os"
"sync"
)

func init() {
Expand Down
1 change: 1 addition & 0 deletions backend/udp/cproxy_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package udp
Expand Down
4 changes: 2 additions & 2 deletions backend/udp/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// +build !amd64
// +build !windows
//go:build !amd64 && !windows
// +build !amd64,!windows

package udp

Expand Down
1 change: 1 addition & 0 deletions backend/udp/udp_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package udp
Expand Down
1 change: 1 addition & 0 deletions backend/udp/udp_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !amd64 && !windows
// +build !amd64,!windows

package udp
Expand Down
4 changes: 2 additions & 2 deletions backend/udp/udp_network_amd64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build !windows
//go:build !windows && !windows
// +build !windows,!windows

// Copyright 2015 flannel authors
//
Expand All @@ -13,7 +14,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// +build !windows

package udp

Expand Down
1 change: 1 addition & 0 deletions backend/vxlan/device.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

// Copyright 2015 flannel authors
Expand Down
1 change: 1 addition & 0 deletions backend/vxlan/device_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build windows
// +build windows

package vxlan
Expand Down
1 change: 1 addition & 0 deletions backend/vxlan/vxlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package vxlan
Expand Down
1 change: 1 addition & 0 deletions backend/vxlan/vxlan_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !windows
// +build !windows

package vxlan
Expand Down
1 change: 1 addition & 0 deletions backend/wireguard/wireguard.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

// Copyright 2021 flannel authors
Expand Down
1 change: 1 addition & 0 deletions backend/wireguard/wireguard_network.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

// Copyright 2021 flannel authors
Expand Down
1 change: 1 addition & 0 deletions backend/wireguard/wireguard_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

// Copyright 2021 flannel authors
Expand Down
2 changes: 1 addition & 1 deletion dist/extension-hostgw
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"SubnetAddCommand": "ip route add $SUBNET via $PUBLIC_IP",
"SubnetRemoveCommand": "ip route del $SUBNET via $PUBLIC_IP"
}
}
}
2 changes: 1 addition & 1 deletion dist/extension-vxlan
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
"ShutdownCommand": "export IF_NAME=flannel-vxlan; ip link del $IF_NAME",
"SubnetAddCommand": "export SUBNET_IP=`echo $SUBNET | cut -d'/' -f 1`; export IF_NAME=flannel-vxlan; read VTEP; ip route add $SUBNET nexthop via $SUBNET_IP dev $IF_NAME onlink && arp -s $SUBNET_IP $VTEP dev $IF_NAME && bridge fdb add $VTEP dev $IF_NAME self dst $PUBLIC_IP"
}
}
}
2 changes: 1 addition & 1 deletion dist/iptables-wrapper-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,4 @@ case "${altstyle}" in
esac

# Cleanup
rm -f "$0"
rm -f "$0"
2 changes: 1 addition & 1 deletion dist/license-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ licRes=$(for file in $(find . -type f -iname '*.go' ! -path './vendor/*'); do
if [ -n "${licRes}" ]; then
echo -e "license header checking failed:\n${licRes}"
exit 255
fi
fi
Loading

0 comments on commit aba86a5

Please sign in to comment.