Skip to content

Commit

Permalink
send certFile to autopilot + git api calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ATGardner committed Nov 17, 2022
1 parent 4d4fd34 commit 8850a37
Show file tree
Hide file tree
Showing 6 changed files with 175 additions and 152 deletions.
2 changes: 1 addition & 1 deletion cmd/commands/git-source.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func NewGitSourceCreateCommand() *cobra.Command {
insCloneOpts.Parse()
gsCloneOpts.Parse()

gitProvider, err = cfgit.GetProvider(cfgit.ProviderType(gsCloneOpts.Provider), gsCloneOpts.Repo, gsCloneOpts.Auth.Insecure)
gitProvider, err = cfgit.GetProvider(cfgit.ProviderType(gsCloneOpts.Provider), gsCloneOpts.Repo, gsCloneOpts.Auth.CertFile)
if err != nil {
log.G(ctx).Fatal("failed to infer git provider for git-source")
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/commands/runtime_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func ensureGitData(cmd *cobra.Command, opts *RuntimeInstallOptions) error {
}

baseURL, _, _, _, _, _, _ := aputil.ParseGitUrl(opts.InsCloneOpts.Repo)
opts.gitProvider, err = cfgit.GetProvider(cfgit.ProviderType(opts.InsCloneOpts.Provider), baseURL, opts.InsCloneOpts.Auth.Insecure)
opts.gitProvider, err = cfgit.GetProvider(cfgit.ProviderType(opts.InsCloneOpts.Provider), baseURL, opts.InsCloneOpts.Auth.CertFile)
if err != nil {
return err
}
Expand Down
96 changes: 51 additions & 45 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/Masterminds/semver/v3 v3.1.1
github.com/argoproj-labs/argocd-autopilot v0.4.7
github.com/argoproj/applicationset v0.4.1
github.com/argoproj/argo-cd/v2 v2.4.6
github.com/argoproj/argo-cd/v2 v2.5.2
github.com/argoproj/argo-events v0.17.1-0.20220327045437-70eaafe9afec
github.com/argoproj/argo-workflows/v3 v3.3.1
github.com/briandowns/spinner v1.18.1
Expand Down Expand Up @@ -64,8 +64,8 @@ require (
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect
github.com/alicebob/miniredis/v2 v2.14.2 // indirect
github.com/antonmedv/expr v1.9.0 // indirect
github.com/argoproj/gitops-engine v0.7.0 // indirect
github.com/argoproj/notifications-engine v0.3.1-0.20220430155844-567361917320 // indirect
github.com/argoproj/gitops-engine v0.7.3 // indirect
github.com/argoproj/notifications-engine v0.3.1-0.20220812180936-4d8552b0775f // indirect
github.com/argoproj/pkg v0.11.1-0.20211203175135-36c59d8fafe0 // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand All @@ -79,9 +79,9 @@ require (
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/docker/distribution v2.8.0+incompatible // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/emicklei/go-restful v2.15.0+incompatible // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
Expand Down Expand Up @@ -116,14 +116,14 @@ require (
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/go-github/v41 v41.0.0 // indirect
github.com/google/go-github/v43 v43.0.0 // indirect
github.com/google/go-jsonnet v0.18.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/gregdel/pushover v1.1.0 // indirect
Expand Down Expand Up @@ -165,10 +165,11 @@ require (
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opsgenie/opsgenie-go-sdk-v2 v1.0.5 // indirect
Expand Down Expand Up @@ -199,6 +200,8 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
github.com/vmihailenco/go-tinylfu v0.2.1 // indirect
github.com/vmihailenco/msgpack/v5 v5.3.4 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
Expand Down Expand Up @@ -237,15 +240,15 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.24.2 // indirect
k8s.io/apiserver v0.23.1 // indirect
k8s.io/cli-runtime v0.23.1 // indirect
k8s.io/component-base v0.24.0 // indirect
k8s.io/component-helpers v0.23.1 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/kube-aggregator v0.23.1 // indirect
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
k8s.io/kubectl v0.23.1 // indirect
k8s.io/kubernetes v1.23.1 // indirect
k8s.io/apiserver v0.24.2 // indirect
k8s.io/cli-runtime v0.24.2 // indirect
k8s.io/component-base v0.24.2 // indirect
k8s.io/component-helpers v0.24.2 // indirect
k8s.io/klog/v2 v2.70.1 // indirect
k8s.io/kube-aggregator v0.24.2 // indirect
k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8 // indirect
k8s.io/kubectl v0.24.2 // indirect
k8s.io/kubernetes v1.24.2 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
layeh.com/gopher-json v0.0.0-20190114024228-97fed8db8427 // indirect
sigs.k8s.io/controller-runtime v0.12.1 // indirect
Expand All @@ -255,42 +258,45 @@ require (
)

replace (
github.com/argoproj-labs/argocd-autopilot => ../argocd-autopilot

github.com/argoproj/gitops-engine => github.com/argoproj/gitops-engine v0.7.1-0.20221004132320-98ccd3d43fd9

// https://github.com/golang/go/issues/33546#issuecomment-519656923
github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127

github.com/golang/protobuf => github.com/golang/protobuf v1.4.2
github.com/gorilla/websocket => github.com/gorilla/websocket v1.4.2
github.com/grpc-ecosystem/grpc-gateway => github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/improbable-eng/grpc-web => github.com/improbable-eng/grpc-web v0.0.0-20181111100011-16092bd1d58a

// Security fixes
github.com/rs/cors => github.com/rs/cors v1.8.2
// Avoid CVE-2022-28948
gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1

// https://github.com/kubernetes/kubernetes/issues/79384#issuecomment-505627280
k8s.io/api => k8s.io/api v0.23.1
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.23.1
k8s.io/apimachinery => k8s.io/apimachinery v0.23.1
k8s.io/apiserver => k8s.io/apiserver v0.23.1
k8s.io/cli-runtime => k8s.io/cli-runtime v0.23.1
k8s.io/client-go => k8s.io/client-go v0.23.1
k8s.io/cloud-provider => k8s.io/cloud-provider v0.23.1
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.23.1
k8s.io/code-generator => k8s.io/code-generator v0.23.1
k8s.io/component-base => k8s.io/component-base v0.23.1
k8s.io/component-helpers => k8s.io/component-helpers v0.23.1
k8s.io/controller-manager => k8s.io/controller-manager v0.23.1
k8s.io/cri-api => k8s.io/cri-api v0.23.1
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.23.1
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.23.1
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.23.1

k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65
k8s.io/kube-proxy => k8s.io/kube-proxy v0.23.1
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.23.1
k8s.io/kubectl => k8s.io/kubectl v0.23.1
k8s.io/kubelet => k8s.io/kubelet v0.23.1
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.23.1
k8s.io/metrics => k8s.io/metrics v0.23.1
k8s.io/mount-utils => k8s.io/mount-utils v0.23.1
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.23.1
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.23.1
k8s.io/api => k8s.io/api v0.24.2
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.24.2
k8s.io/apimachinery => k8s.io/apimachinery v0.24.2
k8s.io/apiserver => k8s.io/apiserver v0.24.2
k8s.io/cli-runtime => k8s.io/cli-runtime v0.24.2
k8s.io/client-go => k8s.io/client-go v0.24.2
k8s.io/cloud-provider => k8s.io/cloud-provider v0.24.2
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.24.2
k8s.io/code-generator => k8s.io/code-generator v0.24.2
k8s.io/component-base => k8s.io/component-base v0.24.2
k8s.io/component-helpers => k8s.io/component-helpers v0.24.2
k8s.io/controller-manager => k8s.io/controller-manager v0.24.2
k8s.io/cri-api => k8s.io/cri-api v0.24.2
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.24.2
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.24.2
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.24.2
k8s.io/kube-proxy => k8s.io/kube-proxy v0.24.2
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.24.2
k8s.io/kubectl => k8s.io/kubectl v0.24.2
k8s.io/kubelet => k8s.io/kubelet v0.24.2
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.24.2
k8s.io/metrics => k8s.io/metrics v0.24.2
k8s.io/mount-utils => k8s.io/mount-utils v0.24.2
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.24.2
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.2
)
Loading

0 comments on commit 8850a37

Please sign in to comment.