Skip to content

Conversation

costinm
Copy link
Contributor

@costinm costinm commented Apr 12, 2018

As long as secret name matches the cluster name (which I think is reasonable default) - it will work with no custom annotations.

The pilot address would confuse users, we're not supporting that mode yet.

@istio-merge-robot
Copy link

@costinm PR needs rebase

@istio-merge-robot istio-merge-robot added the needs-rebase Indicates a PR needs to be rebased before being merged label Apr 13, 2018
@john-a-joyce
Copy link
Contributor

After looking closer at this PR and the previous one #4706. I notice the
kubeconfig for the cluster pilot is running in never comes from the cluster registry. These were changes introduced in 4706 more that changes in the PR. The original intent was that this file based approach could be converted to reading an actual clusterregistry via API calls. If we ever want to support this we would need to either add back the logic to ensure we get the local kubeconfig from the registry or ensure that when we add clusters from the registry we skip the local cluster.

@sbezverk
Copy link
Contributor

sbezverk commented Apr 13, 2018

@john-a-joyce before cluster registry gets init, we need to get a client to read configmap and secrtet, that is why initial kube client is from local server, once cluster registry is populated, local client should not be used and all subsequent calls should use one from registry.
One solution I could see is once cluster registry gets initialized, replace Server's kubeClient kubernetes.Interface with the one from the cluster registry for the corresponding server. Having local server on the cluster registry probably is not an issue, since request for client is based on a cluster name, so if you do not want to use registry for local cluster, do not call for getting a client with local cluster name.

@codecov
Copy link

codecov bot commented Apr 13, 2018

Codecov Report

Merging #4923 into master will increase coverage by 1%.
The diff coverage is 32%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #4923    +/-   ##
=======================================
+ Coverage      74%     74%    +1%     
=======================================
  Files         307     307            
  Lines       25770   25861    +91     
=======================================
+ Hits        18879   19024   +145     
+ Misses       6128    6088    -40     
+ Partials      763     749    -14
Impacted Files Coverage Δ
pilot/pkg/config/clusterregistry/conversion.go 38% <32%> (-1%) ⬇️
mixer/adapter/rbac/controller.go 39% <0%> (-15%) ⬇️
mixer/adapter/solarwinds/log_handler.go 58% <0%> (-6%) ⬇️
mixer/adapter/circonus/circonus.go 72% <0%> (-4%) ⬇️
pilot/pkg/serviceregistry/kube/controller.go 64% <0%> (-3%) ⬇️
mixer/adapter/servicecontrol/quotaprocessor.go 80% <0%> (-2%) ⬇️
mixer/adapter/fluentd/fluentd.go 75% <0%> (-1%) ⬇️
mixer/adapter/denier/denier.go 100% <0%> (ø) ⬆️
mixer/adapter/stdio/stdio.go 100% <0%> (ø) ⬆️
pilot/pkg/model/controller.go 100% <0%> (ø) ⬆️
... and 9 more

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 2a3acc7...d2311ca. Read the comment docs.

@googlebot
Copy link
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 the commit author(s) and merge this pull request when appropriate.

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

@sdake sdake left a comment

Choose a reason for hiding this comment

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

/lgtm

@sdake
Copy link
Member

sdake commented Apr 14, 2018

from linting gate:

+ bin/fmt.sh -c
File ./pilot/pkg/config/clusterregistry/conversion.go needs formatting. Please run bin/fmt.sh
20a21
> 	"github.com/hashicorp/go-multierror"

@baodongli
Copy link

retest ci/circleci:lint

@istio-testing
Copy link
Collaborator

New changes are detected. LGTM label has been removed.

@chxchx chxchx removed the cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. label Apr 16, 2018
@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 Apr 16, 2018
@istio-testing
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

Assign the PR to them by writing /assign @vadimeisenbergibm 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

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

@costinm costinm removed the cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. label Apr 16, 2018
@@ -182,13 +133,15 @@ func getClustersConfigs(k8s kubernetes.Interface, configMapName, configMapNamesp
secretName, secretNamespace, key, err)
return &ClusterStore{}, nil
}
cs.clusters = append(cs.clusters, &cluster)

Choose a reason for hiding this comment

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

remove this line which is a duplicate of line 138

"strings"

multierror "github.com/hashicorp/go-multierror"
"go.uber.org/multierr"
"github.com/hashicorp/go-multierror"

Choose a reason for hiding this comment

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

lint doesn't like it, but the following seems to make it happy

multierror "github.com/hashicorp/go-multierror"

Copy link

@baodongli baodongli left a comment

Choose a reason for hiding this comment

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

@costinm I actually rebased and fixed those two comments before you pushed up this commit.

@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 Apr 16, 2018
@costinm costinm removed the cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. label Apr 16, 2018
cluster.ObjectMeta.Annotations[ClusterAccessConfigSecretNamespace] = "istio-system"
}
// by default, expect a secret with the same name as the cluster
cluster.ObjectMeta.Annotations[ClusterAccessConfigSecretNamespace] = cluster.Name
Copy link
Contributor

Choose a reason for hiding this comment

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

I think using just secret name is dangerous as it could cause unpleasant collisions. I would still suggest to use labels as an idnicator that secret carries cluster config. It does not have to be done in this PR, once it is merged I will push a change to address it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's going away with the config changes.

Copy link
Contributor

@sbezverk sbezverk left a comment

Choose a reason for hiding this comment

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

Other than duplicate line, looks good.

@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 Apr 16, 2018
@costinm costinm merged commit 55a1397 into master Apr 16, 2018
@costinm costinm deleted the costin-mc1 branch April 16, 2018 21:31
@sdake
Copy link
Member

sdake commented Apr 17, 2018

Thanks @costinm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants