Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
/coder-xrayPublic archive

Commit4045858

Browse files
authored
fix: add root cert support (#12)
1 parentf765ad4 commit4045858

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

‎go.mod‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ require (
5959
github.com/aymanbagabas/go-osc52/v2v2.0.1// indirect
6060
github.com/benbjohnson/clockv1.3.5// indirect
6161
github.com/beorn7/perksv1.0.1// indirect
62+
github.com/breml/rootcertsv0.2.16// indirect
6263
github.com/cenkalti/backoff/v4v4.2.1// indirect
6364
github.com/cespare/xxhash/v2v2.2.0// indirect
6465
github.com/charmbracelet/lipglossv0.8.0// indirect

‎go.sum‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E=
121121
github.com/bool64/sharedv0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs=
122122
github.com/bradleyjkemp/cupaloy/v2v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oMMlVBbn9M=
123123
github.com/bradleyjkemp/cupaloy/v2v2.8.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0=
124+
github.com/breml/rootcertsv0.2.16 h1:yN1TGvicfHx8dKz3OQRIrx/5nE/iN3XT1ibqGbd6urc=
125+
github.com/breml/rootcertsv0.2.16/go.mod h1:S/PKh+4d1HUn4HQovEB8hPJZO6pUZYrIhmXBhsegfXw=
124126
github.com/bwesterb/go-ristrettov1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
125127
github.com/bytedance/sonicv1.10.0 h1:qtNZduETEIWJVIyDl01BeNxur2rW9OwTQ/yBqFRkKEk=
126128
github.com/bytedance/sonicv1.10.0/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4=

‎root.go‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ import (
1616

1717
"github.com/coder/coder-xray/jfrog"
1818
"github.com/coder/coder-xray/reporter"
19+
20+
// *Never* remove this. Certificates are not bundled as part
21+
// of the container, so this is necessary for all connections
22+
// to not be insecure.
23+
_"github.com/breml/rootcerts"
1924
)
2025

2126
funcroot()*cobra.Command {
@@ -108,7 +113,7 @@ func root() *cobra.Command {
108113
cmd.Flags().StringVarP(&artifactoryURL,"artifactory-url","",os.Getenv("CODER_ARTIFACTORY_URL"),"URL of the JFrog Artifactory instance")
109114
cmd.Flags().StringVarP(&artifactoryToken,"artifactory-token","",os.Getenv("CODER_ARTIFACTORY_TOKEN"),"Access Token for JFrog Artifactory instance")
110115
cmd.Flags().StringVarP(&artifactoryUser,"artifactory-user","",os.Getenv("CODER_ARTIFACTORY_USER"),"User to interface with JFrog Artifactory instance")
111-
cmd.Flags().StringVarP(&kubeConfig,"kubeconfig","k","/home/coder/.kube/config","Path to the kubeconfig file")
116+
cmd.Flags().StringVarP(&kubeConfig,"kubeconfig","k","~/.kube/config","Path to the kubeconfig file")
112117
cmd.Flags().StringVarP(&namespace,"namespace","n",os.Getenv("CODER_NAMESPACE"),"Namespace to use when listing pods")
113118
cmd.Flags().StringVarP(&fieldSelector,"field-selector","f","","Field selector to use when listing pods")
114119
cmd.Flags().StringVarP(&labelSelector,"label-selector","l","","Label selector to use when listing pods")

‎scripts/Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROMubuntu:22.04
1+
FROMscratch
22

33
COPY ./coder-xray /coder-xray
44

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp