This repository was archived by the owner on Sep 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5959 image : " {{ .Values.image.repo }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
6060 imagePullPolicy : {{ .Values.image.pullPolicy }}
6161 command :
62- - /coder-xray scan
62+ - /coder-xray
63+ - scan
6364 env :
6465 - name : CODER_URL
6566 value : {{ .Values.coder.url }}
Original file line number Diff line number Diff line change 88 "github.com/spf13/cobra"
99 "golang.org/x/xerrors"
1010 "k8s.io/client-go/kubernetes"
11+ restclient "k8s.io/client-go/rest"
1112 "k8s.io/client-go/tools/clientcmd"
1213
1314 "cdr.dev/slog"
@@ -59,7 +60,10 @@ func root() *cobra.Command {
5960 return xerrors .New ("--artifactory-token is required" )
6061 }
6162
62- config , err := clientcmd .BuildConfigFromFlags ("" , kubeConfig )
63+ config , err := restclient .InClusterConfig ()
64+ if xerrors .Is (err , restclient .ErrNotInCluster ) {
65+ config , err = clientcmd .BuildConfigFromFlags ("" , kubeConfig )
66+ }
6367 if err != nil {
6468 return xerrors .Errorf ("build kubeconfig: %w" , err )
6569 }
You can’t perform that action at this time.
0 commit comments