Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/redeploy on launcher #159

Merged
merged 6 commits into from
Jun 16, 2024
Merged
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: 3 additions & 3 deletions build/launcher.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ FROM --platform=linux/amd64 debian:bookworm-slim

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG DOCKER_VERSION="5:25.*"
ARG CONTAINERLAB_VERSION="0.51.*"
ARG NERDCTL_VERSION="1.7.4"
ARG DOCKER_VERSION="5:26.*"
ARG CONTAINERLAB_VERSION="0.55.*"
ARG NERDCTL_VERSION="1.7.6"

RUN apt-get update && \
apt-get install -yq --no-install-recommends \
Expand Down
18 changes: 9 additions & 9 deletions clabverter/clabverter.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type StatuslessTopology struct {
// MustNewClabverter returns an instance of Clabverter or panics.
func MustNewClabverter(
topologyFile,
topoSpecFile,
topologySpecFile,
outputDirectory,
destinationNamespace,
naming,
Expand Down Expand Up @@ -103,7 +103,7 @@ func MustNewClabverter(
return &Clabverter{
logger: clabverterLogger,
topologyFile: topologyFile,
topoSpecFile: topoSpecFile,
topologySpecFile: topologySpecFile,
githubToken: githubToken,
outputDirectory: outputDirectory,
stdout: stdout,
Expand Down Expand Up @@ -141,8 +141,8 @@ type Clabverter struct {
topologyPathParent string
isRemotePath bool

topoSpecFile string
topoSpecFilePath string
topologySpecFile string
topologySpecFilePath string

githubGroup string
githubRepo string
Expand Down Expand Up @@ -323,8 +323,8 @@ func (c *Clabverter) load() error {
c.topologyPathParent = filepath.Dir(c.topologyPath)
}

if c.topoSpecFile != "" {
c.topoSpecFilePath, err = filepath.Abs(c.topoSpecFile)
if c.topologySpecFile != "" {
c.topologySpecFilePath, err = filepath.Abs(c.topologySpecFile)
if err != nil {
c.logger.Criticalf("failed determining absolute path of values file, error: %s", err)

Expand All @@ -333,7 +333,7 @@ func (c *Clabverter) load() error {
}

c.logger.Debugf(
"determined fully qualified topology spec values file path as: %s", c.topoSpecFilePath,
"determined fully qualified topology spec values file path as: %s", c.topologySpecFilePath,
)

c.logger.Debug("attempting to load containerlab topology....")
Expand Down Expand Up @@ -530,11 +530,11 @@ func (c *Clabverter) handleManifest() error {
func (c *Clabverter) mergeConfigSpecWithRenderedTopology(
renderedTopologySpecBytes []byte,
) ([]byte, error) {
if c.topoSpecFilePath == "" {
if c.topologySpecFilePath == "" {
return renderedTopologySpecBytes, nil
}

content, err := os.ReadFile(c.topoSpecFilePath)
content, err := os.ReadFile(c.topologySpecFilePath)
if err != nil {
return nil, err
}
Expand Down
8 changes: 4 additions & 4 deletions clabverter/clabverter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestClabvert(t *testing.T) {
cases := []struct {
name string
topologyFile string
topoSpecsFile string
topologySpecFile string
destinationNamespace string
insecureRegistries string
imagePullSecrets string
Expand All @@ -32,7 +32,7 @@ func TestClabvert(t *testing.T) {
{
name: "simple",
topologyFile: "test-fixtures/clabversiontest/clab.yaml",
topoSpecsFile: "",
topologySpecFile: "",
destinationNamespace: "notclabernetes",
insecureRegistries: "1.2.3.4",
imagePullSecrets: "regcred",
Expand All @@ -42,7 +42,7 @@ func TestClabvert(t *testing.T) {
{
name: "simple-no-explicit-namespace",
topologyFile: "test-fixtures/clabversiontest/clab.yaml",
topoSpecsFile: "test-fixtures/clabversiontest/specs.yaml",
topologySpecFile: "test-fixtures/clabversiontest/specs.yaml",
insecureRegistries: "1.2.3.4",
imagePullSecrets: "",
disableExpose: true,
Expand Down Expand Up @@ -89,7 +89,7 @@ func TestClabvert(t *testing.T) {

clabverter := clabernetesclabverter.MustNewClabverter(
testCase.topologyFile,
testCase.topoSpecsFile,
testCase.topologySpecFile,
actualDir,
testCase.destinationNamespace,
testCase.naming,
Expand Down
54 changes: 48 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ require (
github.com/carlmontanari/slurpeeth v0.0.0-20240209224827-246fa87e31f3
github.com/openconfig/kne v0.1.18
github.com/urfave/cli/v2 v2.27.2
google.golang.org/protobuf v1.34.1
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.30.1
k8s.io/apiextensions-apiserver v0.30.1
k8s.io/apimachinery v0.30.1
k8s.io/api v0.30.2
k8s.io/apiextensions-apiserver v0.30.2
k8s.io/apimachinery v0.30.2
// pin back to help controller-runtime out
// https://github.com/kubernetes-sigs/controller-runtime/issues/2788
k8s.io/client-go v0.30.1
k8s.io/klog/v2 v2.120.1
k8s.io/client-go v0.30.2
k8s.io/klog/v2 v2.130.0
k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a
sigs.k8s.io/controller-runtime v0.18.4
sigs.k8s.io/yaml v1.4.0
Expand All @@ -24,53 +24,95 @@ require (
require golang.org/x/crypto v0.24.0

require (
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/cel-go v0.17.8 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stoewer/go-strcase v1.2.0 // indirect
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
go.etcd.io/etcd/api/v3 v3.5.10 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect
go.etcd.io/etcd/client/v3 v3.5.10 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/sdk v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/grpc v1.60.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/apiserver v0.30.2 // indirect
k8s.io/component-base v0.30.2 // indirect
k8s.io/kms v0.30.2 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)
Loading