Skip to content

Commit

Permalink
default port 8080
Browse files Browse the repository at this point in the history
  • Loading branch information
takumakume committed Aug 25, 2023
1 parent 01c49bc commit b3d556b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ two ways to use:
2. http server that receives JSON of SBOM Report from Trivy Operator webhook
$ sbomreport-to-dependencytrack server --port 80
$ sbomreport-to-dependencytrack server --port 8080
Templates with the SBOM Report as a variable can be used for the following items to be registered in the Dependency-Track.
Expand Down Expand Up @@ -97,7 +97,7 @@ $ docker run -p 80:80 \
-e DT_PROJECT_TAGS="tag1,kube_namespace:[[.sbomReport.metadata.namespace]]" \
-it docker.io/takumakume/sbomreport-to-dependencytrack:latest server
2023/08/25 13:05:41 Listening on :80
2023/08/25 13:05:41 Listening on :8080
# Run `curl localhost -X POST -d @testdata/v1alpha1.json`
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ two ways to use:
2. http server that receives JSON of SBOM Report from Trivy Operator webhook
$ sbomreport-to-dependencytrack server --port 80
$ sbomreport-to-dependencytrack server --port 8080
Templates with the SBOM Report as a variable can be used for the following items to be registered in the Dependency-Track.
Expand Down
4 changes: 2 additions & 2 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var serverCmd = &cobra.Command{
Short: "http server that receives JSON of SBOM Report from Trivy Operator webhook",
Long: `http server that receives JSON of SBOM Report from Trivy Operator webhook
$ sbomreport-to-dependencytrack server --port 80`,
$ sbomreport-to-dependencytrack server --port 8080`,
RunE: func(cmd *cobra.Command, args []string) error {
c := config.New(
viper.GetString("base-url"),
Expand Down Expand Up @@ -43,7 +43,7 @@ func init() {
viper.AutomaticEnv()
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
flags := serverCmd.Flags()
flags.IntP("port", "p", 80, "Port number to listen http to receive webhook from trivy-operator (env: DT_PORT)")
flags.IntP("port", "p", 8080, "Port number to listen http to receive webhook from trivy-operator (env: DT_PORT)")
viper.BindPFlag("port", flags.Lookup("port"))

rootCmd.AddCommand(serverCmd)
Expand Down
2 changes: 1 addition & 1 deletion helm/sbomreport-to-dependencytrack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ securityContext: {}

service:
type: ClusterIP
port: 80
port: 8080

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down

0 comments on commit b3d556b

Please sign in to comment.