From d2318708297cd379719c4f44bc73911cc3b25163 Mon Sep 17 00:00:00 2001 From: Alex Masi Date: Wed, 14 Sep 2022 14:58:28 -0700 Subject: [PATCH] Move to internally hosted public container deps (#210) * Move to internally hosted public container deps * Fix typo * linter * Upgrade metallb to v0.13.5 --- examples/cisco/e8000/2node-e8000.pb.txt | 8 +++----- examples/cisco/xrd/2node-xrd.pb.txt | 8 ++------ examples/multivendor/multivendor.pbtxt | 4 +--- manifests/meshnet/base/daemonset.yaml | 2 +- manifests/metallb/metallb-native.yaml | 4 ++-- topo/node/cisco/cisco.go | 4 ++++ topo/node/cptx/cptx.go | 4 +--- topo/node/node.go | 4 ++-- 8 files changed, 16 insertions(+), 22 deletions(-) diff --git a/examples/cisco/e8000/2node-e8000.pb.txt b/examples/cisco/e8000/2node-e8000.pb.txt index 49ef05b0..3f682d1e 100644 --- a/examples/cisco/e8000/2node-e8000.pb.txt +++ b/examples/cisco/e8000/2node-e8000.pb.txt @@ -3,12 +3,11 @@ nodes: { name: "vxr1" type: CISCO_E8000 vendor: CISCO - model:"8201" + model: "8201" os: "ios-xr" config: { file: "r1.config" image: "c8201:latest" - init_image: "networkop/init-wait:latest" } services:{ key: 22 @@ -18,7 +17,7 @@ nodes: { } } services:{ - key: 57400 + key: 57400 value: { name: "gnmi" inside: 57400 @@ -40,7 +39,6 @@ nodes: { config: { file: "r2.config" image: "c8201:latest" - init_image: "networkop/init-wait:latest" } services:{ key: 22 @@ -50,7 +48,7 @@ nodes: { } } services:{ - key: 57400 + key: 57400 value: { name: "gnmi" inside: 57400 diff --git a/examples/cisco/xrd/2node-xrd.pb.txt b/examples/cisco/xrd/2node-xrd.pb.txt index f962eec0..703e7b2a 100644 --- a/examples/cisco/xrd/2node-xrd.pb.txt +++ b/examples/cisco/xrd/2node-xrd.pb.txt @@ -7,8 +7,6 @@ nodes: { os: "ios-xr" config: { file: "r1.config" - image: "localhost/ios-xr:7.6.1.16I" - init_image: "networkop/init-wait:latest" cert: { self_signed: { cert_name: "r1.pem", @@ -25,7 +23,7 @@ nodes: { } } services:{ - key: 57400 + key: 57400 value: { name: "gnmi" inside: 57400 @@ -46,8 +44,6 @@ nodes: { os: "ios-xr" config: { file: "r2.config" - image: "localhost/ios-xr:7.6.1.16I" - init_image: "networkop/init-wait:latest" cert: { self_signed: { cert_name: "r2.pem", @@ -64,7 +60,7 @@ nodes: { } } services:{ - key: 57400 + key: 57400 value: { name: "gnmi" inside: 57400 diff --git a/examples/multivendor/multivendor.pbtxt b/examples/multivendor/multivendor.pbtxt index 0305ea79..e28e5d7c 100644 --- a/examples/multivendor/multivendor.pbtxt +++ b/examples/multivendor/multivendor.pbtxt @@ -26,7 +26,6 @@ nodes: { os: "ios-xr" config: { file: "r2.iosxr.cfg" - init_image: "networkop/init-wait:latest" image: "xrd:latest" } interfaces: { @@ -75,10 +74,9 @@ nodes: { model: "cptx" os: "evo" config: { - image: "cevo:latest" config_path: "/home/evo/configdisk" config_file: "juniper.conf" - file: "r4.evo.cfg" + file: "r4.evo.cfg" } interfaces: { key: "eth4" diff --git a/manifests/meshnet/base/daemonset.yaml b/manifests/meshnet/base/daemonset.yaml index 194e1524..2123ddba 100644 --- a/manifests/meshnet/base/daemonset.yaml +++ b/manifests/meshnet/base/daemonset.yaml @@ -26,7 +26,7 @@ spec: - name: meshnet securityContext: privileged: true - image: hfam/meshnet:latest + image: us-west1-docker.pkg.dev/kne-external/kne/networkop/meshnet:v0.3.0 imagePullPolicy: IfNotPresent resources: limits: diff --git a/manifests/metallb/metallb-native.yaml b/manifests/metallb/metallb-native.yaml index 1deb4f07..0f41d0c1 100644 --- a/manifests/metallb/metallb-native.yaml +++ b/manifests/metallb/metallb-native.yaml @@ -1504,7 +1504,7 @@ spec: value: memberlist - name: METALLB_DEPLOYMENT value: controller - image: quay.io/metallb/controller:v0.13.5 + image: us-west1-docker.pkg.dev/kne-external/kne/metallb/controller:v0.13.5 livenessProbe: failureThreshold: 3 httpGet: @@ -1600,7 +1600,7 @@ spec: secretKeyRef: key: secretkey name: memberlist - image: quay.io/metallb/speaker:v0.13.5 + image: us-west1-docker.pkg.dev/kne-external/kne/metallb/speaker:v0.13.5 livenessProbe: failureThreshold: 3 httpGet: diff --git a/topo/node/cisco/cisco.go b/topo/node/cisco/cisco.go index 5f6edb29..674d604a 100644 --- a/topo/node/cisco/cisco.go +++ b/topo/node/cisco/cisco.go @@ -64,6 +64,10 @@ func (n *Node) Create(ctx context.Context) error { } log.Infof("Created Cisco %s node %s configmap", n.Proto.Model, n.Name()) pb := n.Proto + initContainerImage := pb.Config.InitImage + if initContainerImage == "" { + initContainerImage = node.DefaultInitContainerImage + } secContext := &corev1.SecurityContext{ Privileged: pointer.Bool(true), } diff --git a/topo/node/cptx/cptx.go b/topo/node/cptx/cptx.go index 13285b4c..9f0d7d98 100644 --- a/topo/node/cptx/cptx.go +++ b/topo/node/cptx/cptx.go @@ -32,8 +32,6 @@ var ( ) const ( - defaultInitContainerImage = "networkop/init-wait:latest" - scrapliPlatformName = "juniper_junos" ) @@ -193,7 +191,7 @@ func (n *Node) Create(ctx context.Context) error { pb := n.Proto initContainerImage := pb.Config.InitImage if initContainerImage == "" { - initContainerImage = defaultInitContainerImage + initContainerImage = node.DefaultInitContainerImage } // downward api - pass some useful values to container diff --git a/topo/node/node.go b/topo/node/node.go index 91bed61a..d365b613 100644 --- a/topo/node/node.go +++ b/topo/node/node.go @@ -181,7 +181,7 @@ func (n *Impl) TopologySpecs(context.Context) ([]*topologyv1.Topology, error) { } const ( - defaultInitContainerImage = "networkop/init-wait:latest" + DefaultInitContainerImage = "us-west1-docker.pkg.dev/kne-external/kne/networkop/init-wait:ga" ) func ToEnvVar(kv map[string]string) []corev1.EnvVar { @@ -261,7 +261,7 @@ func (n *Impl) CreatePod(ctx context.Context) error { log.Infof("Creating Pod:\n %+v", pb) initContainerImage := pb.Config.InitImage if initContainerImage == "" { - initContainerImage = defaultInitContainerImage + initContainerImage = DefaultInitContainerImage } pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{