Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/linters/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ linters-settings:
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: true
govet:
# report about shadowed variables
check-shadowing: false
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
gocritic:
disabled-checks:
- singleCaseSwitch
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
go:
uses: openconfig/common-ci/.github/workflows/go.yml@66c8f8f6a58d5f9c9e84efe89f542b08cb6a0a33
uses: openconfig/common-ci/.github/workflows/go.yml@v0.2.0
with:
coverage-excludes-regex: /cloudbuild
tests-excludes-regex: /cloudbuild
Expand All @@ -18,4 +18,4 @@ jobs:
go-versions: "['1.21']"

linter:
uses: openconfig/common-ci/.github/workflows/linter.yml@66c8f8f6a58d5f9c9e84efe89f542b08cb6a0a33
uses: openconfig/common-ci/.github/workflows/linter.yml@v0.2.0
15 changes: 10 additions & 5 deletions cloudbuild/external.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
packer {
required_plugins {
googlecompute = {
version = ">= 1.1.1"
version = "= 1.1.6"
source = "github.com/hashicorp/googlecompute"
}
}
Expand Down Expand Up @@ -52,9 +52,9 @@ build {
provisioner "shell" {
inline = [
"echo Installing golang...",
"curl -O https://dl.google.com/go/go1.21.3.linux-amd64.tar.gz",
"sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.3.linux-amd64.tar.gz",
"rm go1.21.3.linux-amd64.tar.gz",
"curl -O https://dl.google.com/go/go1.22.11.linux-amd64.tar.gz",
"sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.11.linux-amd64.tar.gz",
"rm go1.22.11.linux-amd64.tar.gz",
"echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc",
"echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc",
"/usr/local/go/bin/go version",
Expand All @@ -77,6 +77,11 @@ build {
"echo \"fs.inotify.max_user_watches=25600000\" | sudo tee -a /etc/sysctl.conf", # configure inotify for cisco xrd containers
"echo \"fs.inotify.max_queued_events=13107200\" | sudo tee -a /etc/sysctl.conf", # configure inotify for cisco xrd containers
"echo \"kernel.pid_max=1048575\" | sudo tee -a /etc/sysctl.conf", # configure pid_max for cisco 8000e containers
"echo \"br_netfilter\" | sudo tee -a /etc/modules-load.d/br_netfilter.conf", # ensure br_netfilter module is loaded instead of relying on docker-ce (https://github.com/moby/moby/issues/48948)
"sudo modprobe br_netfilter",
"echo \"1\" > sudo tee /proc/sys/net/bridge/bridge-nf-call-iptables",
"echo \"1\" > sudo tee /proc/sys/net/ipv4/ip_forward",
"sudo sysctl --system",
"sudo sysctl -p",
]
}
Expand Down Expand Up @@ -134,7 +139,7 @@ build {
provisioner "shell" {
inline = [
"echo Installing kind...",
"/usr/local/go/bin/go install sigs.k8s.io/kind@v0.22.0",
"/usr/local/go/bin/go install sigs.k8s.io/kind@v0.24.0",
"curl --create-dirs -o third_party/licenses/kind/LICENSE https://raw.githubusercontent.com/kubernetes-sigs/kind/main/LICENSE",
"sudo cp /home/$USER/go/bin/kind /usr/local/bin/",
"/home/$USER/go/bin/kind version",
Expand Down
16 changes: 11 additions & 5 deletions cloudbuild/internal.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
packer {
required_plugins {
googlecompute = {
version = ">= 1.1.1"
version = "= 1.1.6"
source = "github.com/hashicorp/googlecompute"
}
}
Expand Down Expand Up @@ -52,9 +52,9 @@ build {
provisioner "shell" {
inline = [
"echo Installing golang...",
"curl -O https://dl.google.com/go/go1.21.3.linux-amd64.tar.gz",
"sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.3.linux-amd64.tar.gz",
"rm go1.21.3.linux-amd64.tar.gz",
"curl -O https://dl.google.com/go/go1.22.11.linux-amd64.tar.gz",
"sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.11.linux-amd64.tar.gz",
"rm go1.22.11.linux-amd64.tar.gz",
"echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc",
"echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc",
"/usr/local/go/bin/go version",
Expand All @@ -77,6 +77,7 @@ build {
"echo \"fs.inotify.max_user_watches=25600000\" | sudo tee -a /etc/sysctl.conf", # configure inotify for cisco xrd containers
"echo \"fs.inotify.max_queued_events=13107200\" | sudo tee -a /etc/sysctl.conf", # configure inotify for cisco xrd containers
"echo \"kernel.pid_max=1048575\" | sudo tee -a /etc/sysctl.conf", # configure pid_max for cisco 8000e containers
"echo \"br_netfilter\" | sudo tee -a /etc/modules-load.d/br_netfilter.conf", # ensure br_netfilter module is loaded instead of relying on docker-ce (https://github.com/moby/moby/issues/48948)
"sudo sysctl -p",
"echo Pulling containers...",
"gcloud auth configure-docker us-west1-docker.pkg.dev -q", # configure sudoless docker
Expand Down Expand Up @@ -114,6 +115,11 @@ build {
"sudo install -o root -g root -m 0755 cri-dockerd /usr/local/bin/cri-dockerd",
"sudo install packaging/systemd/* /etc/systemd/system",
"sudo sed -i -e 's,/usr/bin/cri-dockerd,/usr/local/bin/cri-dockerd,' /etc/systemd/system/cri-docker.service",
"sudo modprobe br_netfilter",
"echo \"1\" > sudo tee /proc/sys/net/bridge/bridge-nf-call-iptables",
"echo \"1\" > sudo tee /proc/sys/net/ipv4/ip_forward",
"sudo sysctl --system",
"sudo sysctl -p",
"sudo systemctl daemon-reload",
"sudo systemctl enable cri-docker.socket",
"sudo systemctl enable cri-docker.service",
Expand All @@ -130,7 +136,7 @@ build {
provisioner "shell" {
inline = [
"echo Installing kind...",
"/usr/local/go/bin/go install sigs.k8s.io/kind@v0.22.0",
"/usr/local/go/bin/go install sigs.k8s.io/kind@v0.24.0",
"sudo cp /home/$USER/go/bin/kind /usr/local/bin/",
"/home/$USER/go/bin/kind version",
]
Expand Down
4 changes: 2 additions & 2 deletions cloudbuild/vendors/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ cluster:
spec:
name: kne
recycle: True
version: v0.17.0
image: kindest/node:v1.26.0
version: v0.24.0
image: kindest/node:v1.31.0
googleArtifactRegistries:
- us-west1-docker.pkg.dev
config: ../../manifests/kind/config.yaml
Expand Down
2 changes: 0 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"k8s.io/client-go/util/homedir"
log "k8s.io/klog/v2"
)

func New() *cobra.Command {
Expand Down Expand Up @@ -141,7 +140,6 @@ func createFn(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
log.Infof(bp)
topopb, err := topo.Load(args[0])
if err != nil {
return fmt.Errorf("%s: %w", cmd.Use, err)
Expand Down
4 changes: 2 additions & 2 deletions deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ func (k *KindSpec) Deploy(ctx context.Context) error {
if len(k.AdditionalManifests) > 0 {
log.Infof("Waiting for potential manifest-issued deployments to complete")
if err := run.LogCommand("kubectl", "rollout", "status", "deployment", "-w"); err != nil {
log.Warningf("Unable to wait for deployments to complete: %w", err)
log.Warningf("Unable to wait for deployments to complete: %v", err)
}
}
return nil
Expand Down Expand Up @@ -783,7 +783,7 @@ func (k *KindSpec) loadContainerImages() error {
err = fmt.Errorf("container not found: %w", err)
break
}
log.Warningf("Failed to pull %q: %w (will retry %d times)", s, err, retries)
log.Warningf("Failed to pull %q: %v (will retry %d times)", s, err, retries)
time.Sleep(pullRetryDelay)
}
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions deploy/kne/kind-bridge-cdnos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ cluster:
spec:
name: kne
recycle: True
version: v0.17.0
image: kindest/node:v1.26.0
version: v0.24.0
image: kindest/node:v1.31.0
config: ../../manifests/kind/config.yaml
additionalManifests:
- ../../manifests/kind/bridge.yaml
Expand Down
4 changes: 2 additions & 2 deletions deploy/kne/kind-bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ cluster:
spec:
name: kne
recycle: True
version: v0.17.0
image: kindest/node:v1.26.0
version: v0.24.0
image: kindest/node:v1.31.0
config: ../../manifests/kind/config.yaml
additionalManifests:
- ../../manifests/kind/bridge.yaml
Expand Down
6 changes: 3 additions & 3 deletions docs/create_topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ kubectl apply -f manifests/keysight/ixiatg-operator.yaml
kubectl apply -f manifests/keysight/ixiatg-configmap.yaml
```

With the steps above the Ixia-c nodes will operate in the [Community Edition](https://github.com/open-traffic-generator/ixia-c/blob/mkdocs/docs/licensing.md#license-editions) mode. To enable full capabilities of Ixia-c, a valid Keysight Elastic Network Generator license is required. Use the following additional step to provide the address of the Keysight Licensing Server with the license to the `ixiatg` controller:
With the steps above the Ixia-c nodes will operate in the [Community Edition](https://github.com/open-traffic-generator/ixia-c/blob/main/docs/licensing.md#license-editions) mode. To enable full capabilities of Ixia-c, a valid Keysight Elastic Network Generator license is required. Use the following additional step to provide the address of the Keysight Licensing Server with the license to the `ixiatg` controller:

```bash
kubectl create secret -n ixiatg-op-system generic license-server --from-literal=addresses="<license_server_IP_addresses>"
Expand Down Expand Up @@ -248,7 +248,7 @@ Container images can be hosted in multiple locations. For example
[DockerHub](https://hub.docker.com/) hosts open sourced containers. [Google
Artifact Registries](https://cloud.google.com/artifact-registry) can be used to
host images with access control. The [KNE topology
proto](https://github.com/openconfig/kne/blob/df91c62eb7e2a1abbf0a803f5151dc365b6f61da/proto/topo.proto#L117),
proto](https://github.com/openconfig/kne/blob/main/proto/topo.proto#L117),
the manifests, and controllers can all specify containers that get pulled from
their source locations and get used in the cluster.

Expand Down Expand Up @@ -308,7 +308,7 @@ Global Flags:
```

A topology file is a textproto of the `Topology`
[message](https://github.com/openconfig/kne/blob/df91c62eb7e2a1abbf0a803f5151dc365b6f61da/proto/topo.proto#L26).
[message](https://github.com/openconfig/kne/blob/main/proto/topo.proto#L26).
This file specifies all of the nodes and links of your desired topology. In the
node definitions interfaces, services, and initial configs can be specified.

Expand Down
4 changes: 2 additions & 2 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

## Install Kind

> NOTE: This will install version `0.19.0` which was known to work with KNE at
> NOTE: This will install version `0.24.0` which was known to work with KNE at
> some point in time. You can instead install a newer version if you need new
> features or are having problems.

```bash
go install sigs.k8s.io/kind@v0.19.0
go install sigs.k8s.io/kind@v0.24.0
```

## Clone openconfig/kne GitHub repo
Expand Down
Loading