Skip to content

Introduce a config file model for Galley#10834

Closed
ozevren wants to merge 10 commits intoistio:release-1.1from
ozevren:gl-6-configfile
Closed

Introduce a config file model for Galley#10834
ozevren wants to merge 10 commits intoistio:release-1.1from
ozevren:gl-6-configfile

Conversation

@ozevren
Copy link
Copy Markdown
Contributor

@ozevren ozevren commented Jan 9, 2019

Galley is starting to accummulate too many command-line flags. It is going to get worse with future improvements, such as reverse-MCP. This adds a settings file model, and plumbs it through.

  • Add a single file-format with sub-sections, that closely map to the existing command-line flags.
  • Add a mostly-empty settings file, that is contains examples and documentation of various setting values.
  • Plumb it through the command-line.

@ozevren ozevren requested a review from ayj January 9, 2019 17:54
@istio-testing istio-testing added the do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. label Jan 9, 2019
@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label Jan 9, 2019
@ozevren ozevren requested review from jeffmendoza and removed request for JimmyCYJ, costinm, liamawhite, linsun, mandarjog, ostromart and ymesika January 9, 2019 17:55
@ozevren ozevren changed the base branch from master to release-1.1 January 9, 2019 17:55
@googlebot
Copy link
Copy Markdown
Collaborator

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@googlebot googlebot added the cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. label Jan 9, 2019
@googlebot
Copy link
Copy Markdown
Collaborator

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. labels Jan 9, 2019
@istio-testing istio-testing removed the needs-rebase Indicates a PR needs to be rebased before being merged label Jan 9, 2019
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: s/metadata/annotations :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want gRPC stream metadata and resource annotations?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

TLS is a form of authentication. Should it be configured as part of the auth plugin?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This needs to be strongly typed, at least for the validation case. For MCP case, we can model it as an "auth provider".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just pushed another change that incorporates an "Auth Provider" model. I am not going to check this in though. I'd like to get the config model using current settings in first, then change both the settings & the code to be Auth Provider based.

@istio-testing
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ozevren
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: hklai

If they are not already assigned, you can assign the PR to them by writing /assign @hklai in a comment when ready.

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

The pull request process is described here

Details 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

@ozevren ozevren changed the title WIP: Introduce a config file model for Galley Introduce a config file model for Galley Jan 13, 2019
@istio-testing istio-testing removed the do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. label Jan 13, 2019
@ozevren
Copy link
Copy Markdown
Contributor Author

ozevren commented Jan 13, 2019

/test istio_auth_sds_e2e

@istio-testing
Copy link
Copy Markdown
Collaborator

@ozevren: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/e2e-simpleTests-minProfile.sh c51478d link /test e2e-simpleTestsMinProfile
prow/istio-integ-k8s-tests.sh c51478d link /test istio-integ-k8s-tests
prow/istio-pilot-multicluster-e2e.sh c51478d link /test istio-pilot-multicluster-e2e
prow/e2e_pilotv2_auth_sds.sh c51478d link /test istio_auth_sds_e2e
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

serverArgs.IntrospectionOptions.AttachCobraFlags(rootCmd)

// validation config
rootCmd.PersistentFlags().StringVar(&validationArgs.WebhookConfigFile,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For compat, I think we need to keep the flags that existed in 1.0. You can mark them as deprecated, but they should still work in the same way as before until 1.3

}

// Introspection (CtrlZ) related settings
message Introspection {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

WOuld it make sense to leave this on the command-line, like the log flags?


k := s.Processing.Source.GetKubernetes()
if k != nil && k.ResyncPeriod != nil {
if resyncPeriod, err = ptypes.Duration(k.ResyncPeriod); err != nil {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't this use the types.DurationFromProto from github.com/gogo/protobuf/types if settings.proto is compiled with gogo proto?

@@ -0,0 +1,254 @@
{{ define "settings.yaml.tpl" }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this autogenerated from the default settings, or written by hand? Are we relying on PR reviews to maintain consistency between the two?

@istio-testing
Copy link
Copy Markdown
Collaborator

@ozevren: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label Jan 24, 2019
@stale
Copy link
Copy Markdown

stale bot commented Feb 7, 2019

This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale label Feb 7, 2019
@ozevren ozevren removed the stale label Feb 27, 2019
@ozevren ozevren mentioned this pull request Mar 1, 2019
@stale
Copy link
Copy Markdown

stale bot commented Mar 13, 2019

This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale label Mar 13, 2019
@ozevren
Copy link
Copy Markdown
Contributor Author

ozevren commented Mar 20, 2019

Will move this to master.

@ozevren ozevren closed this Mar 20, 2019
@ozevren ozevren deleted the gl-6-configfile branch August 23, 2019 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Indicates a PR needs to be rebased before being merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants