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 feature flag reconcileExternalGateway to control gateway reconciliation #4718

Merged
merged 5 commits into from
Jul 16, 2019

Conversation

ZhiminXiang
Copy link

@ZhiminXiang ZhiminXiang commented Jul 11, 2019

This is a part of work related to #4631 about manual TLS configuration.

Proposed Changes

  • Add feature flag reconcileExternalGateway to control gateway reconciliation

@ZhiminXiang ZhiminXiang requested a review from tcnghia July 11, 2019 18:40
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 11, 2019
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/API API objects and controllers area/networking labels Jul 11, 2019
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@ZhiminXiang: 0 warnings.

In response to this:

Fixes #

Proposed Changes

  • Add feature flag reconcileExternalGateway to control gateway reconciliation

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.

@ZhiminXiang
Copy link
Author

/cc @Joon-L

@knative-prow-robot
Copy link
Contributor

@ZhiminXiang: GitHub didn't allow me to request PR reviews from the following users: Joon-L.

Note that only knative members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @Joon-L

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.

@@ -112,9 +119,11 @@ func NewIstioFromConfigMap(configMap *corev1.ConfigMap) (*Istio, error) {
if err != nil {
return nil, err
}
reconcileGateway := strings.ToLower(configMap.Data[ReconcileExternalGatewayKey]) == "enabled"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just go with strings.EqualFold

Copy link
Author

Choose a reason for hiding this comment

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

Done

@@ -270,7 +270,7 @@ func (r *BaseIngressReconciler) reconcileIngress(ctx context.Context, ra Reconci
ia.GetStatus().MarkLoadBalancerReady(lbs, publicLbs, privateLbs)
ia.GetStatus().ObservedGeneration = ia.GetGeneration()

if enablesAutoTLS(ctx) {
if enableReconcileGateway(ctx) {
Copy link

Choose a reason for hiding this comment

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

Would it be a future PR to have a way to make use of this flag without AutoTLS enabled? As far as I understand, even with this flag, Gateway will be reconciled using tls information on Route which will only get populated when the AutoTLS flag is set.

Copy link

Choose a reason for hiding this comment

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

Is it also correct to assume that there will be some step in between to reference an existing cert instead of calling the MakeCertificates() function in future PRs?
Also allow to choose mode of TLS as MakeServers() only allow simple TLS for now?

Copy link
Author

Choose a reason for hiding this comment

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

Yes. This PR is just a first step of the manual TLS feature request. There will be a future PR in the Route controller to consume manual provisioned Certificates.

# When auto TLS feature is turned on, reconcileExternalGateway will be automatically enforced.
# 1. Enabled: enabling reconciling external gateways.
# 2. Disabled: disabling reconciling external gateways.
reconcileExternalGateway: "Disabled"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just in case: perhaps true/false toggle? Then the parsing can be delegated to strconv?

Copy link
Author

Choose a reason for hiding this comment

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

Done

pkg/reconciler/ingress/config/istio.go Outdated Show resolved Hide resolved
pkg/reconciler/ingress/config/istio.go Outdated Show resolved Hide resolved
@ZhiminXiang
Copy link
Author

@vagababov I addressed your comments. PTAL.

@knative-metrics-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-knative-serving-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/ingress/config/istio.go 96.9% 94.4% -2.4

Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 12, 2019
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 12, 2019
@vagababov
Copy link
Contributor

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 12, 2019
Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattmoor, vagababov, ZhiminXiang

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 16, 2019
@knative-prow-robot knative-prow-robot merged commit bdde80f into knative:master Jul 16, 2019
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. area/API API objects and controllers area/networking cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants