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

Add insecure-bind-address option for npm run start:prod #3969

Merged
merged 1 commit into from
Jun 28, 2019

Conversation

shu-mutou
Copy link
Contributor

To run npm run start:prod in container for development
and to check it from browser, add option for insecure-bind-add
into .npmrc and pass it start:prod.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 25, 2019
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 25, 2019
@codecov
Copy link

codecov bot commented Jun 25, 2019

Codecov Report

Merging #3969 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3969   +/-   ##
=======================================
  Coverage   47.29%   47.29%           
=======================================
  Files         182      182           
  Lines        8404     8404           
  Branches       72       72           
=======================================
  Hits         3975     3975           
  Misses       4184     4184           
  Partials      245      245

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ded6df2...bd63c09. Read the comment docs.

.npmrc Outdated

kubernetes-dashboard:kubeconfig_dir = ${HOME}/.kube
kubernetes-dashboard:kubeconfig = ${HOME}/.kube/config
kubernetes-dashboard:frontend_build_dir = dist/frontend/en
kubernetes-dashboard:dashboard_binary_path = dist/amd64/dashboard
kubernetes-dashboard:dashboard_locale_config = dist/amd64/locale_conf.json
kubernetes-dashboard:insecure_bind_address = 0.0.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use localhost as default bind address here. Binding to all interfaces by default is not secure.

package.json Outdated
@@ -13,7 +13,7 @@
"start:frontend:https": "node aio/scripts/version.js && ng serve --progress=false --aot --proxy-config aio/https-proxy.conf.json --ssl --host=0.0.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also change --host parameter here and above to use this new variable?

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 28, 2019
package.json Outdated
"start:https": "concurrently \"npm run start:backend:https\" \"npm run start:frontend:https\"",
"start:frontend": "npm run postversion && ng serve --aot --progress=false --proxy-config aio/proxy.conf.json --host=0.0.0.0",
"start:frontend:https": "node aio/scripts/version.js && ng serve --progress=false --aot --proxy-config aio/https-proxy.conf.json --ssl --host=0.0.0.0",
"start:frontend": "echo $npm_package_config_bind_address && npm run postversion && ng serve --aot --progress=false --proxy-config aio/proxy.conf.json --host=$npm_package_config_bind_address",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this echo a debug leftover?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's my mistake. Sorry. I'll remove it soon.

To run `npm run start:prod` and `start:frontend` in container for development
and to check it from browser outside container, add option for `bind-address`
into `.npmrc` and pass it `start:prod` and `start:frontend`.
Copy link
Member

@floreks floreks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 28, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: floreks, shu-mutou

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 28, 2019
@k8s-ci-robot k8s-ci-robot merged commit f7418f2 into kubernetes:master Jun 28, 2019
@shu-mutou shu-mutou deleted the dev-container branch July 1, 2019 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants