Skip to content

Set the serviceCluster namespace based on env var, to also support sp…#11521

Closed
objectiser wants to merge 1 commit intoistio:masterfrom
objectiser:nsbug
Closed

Set the serviceCluster namespace based on env var, to also support sp…#11521
objectiser wants to merge 1 commit intoistio:masterfrom
objectiser:nsbug

Conversation

@objectiser
Copy link
Copy Markdown
Contributor

…ecifying namespace on cli after kube-inject

If the user deploys the app by specifying the namespace on the command line,

kubectl apply -n test -f <(istioctl kube-inject -f samples/bookinfo/platform/kube/bookinfo.yaml)

then currently this is after the sidecar injection config has been added, so the serviceCluster parameter has the wrong value (e.g. associated with default namespace).

By using the ${POD_NAMESPACE} env var it resolves the serviceCluster name (and namespace) at a later stage, taking into account namespace specified on the command line.

@istio-testing
Copy link
Copy Markdown
Collaborator

@objectiser: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/istio-pilot-multicluster-e2e.sh ba539c2 link /test istio-pilot-multicluster-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.

@objectiser
Copy link
Copy Markdown
Contributor Author

Tested against bookinfo example, in a test namespace, both with manual and automatic sidecar injection.

@douglas-reid Should this be moved to 1.1 branch?

@douglas-reid
Copy link
Copy Markdown
Contributor

@objectiser good question. I don't have an answer, unfortunately. My guess is that this will have to wait until 1.1.1 or 1.2, but the details on the upcoming release cycle changes haven't been announced.

@wenchenglu any insight?

@wenchenglu
Copy link
Copy Markdown
Contributor

this sounds a nice enhancement. Will that env var set to "default" namespace by default?

@douglas-reid is there any particular concern this PR might break anything? otherwise I am fine to merge it into 1.1.

@aljesusg
Copy link
Copy Markdown
Contributor

aljesusg commented Feb 6, 2019

Can we merge this into Istio 1.1 branch too?

@douglas-reid
Copy link
Copy Markdown
Contributor

I don't believe this will break anything.

@wenchenglu
Copy link
Copy Markdown
Contributor

per chat with @douglas-reid, yes, we think that is a good change to go in 1.1
/lgtm
/approve

@istio-testing
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

If they are not already assigned, you can assign the PR to them by writing /assign @greghanson 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

@objectiser
Copy link
Copy Markdown
Contributor Author

objectiser commented Feb 7, 2019

@wenchenglu @douglas-reid PR created on 1.1 branch #11587 - which has now been merged.

@douglas-reid
Copy link
Copy Markdown
Contributor

@objectiser should we wait until the 1.1 changes are merged back and then close this?

@objectiser
Copy link
Copy Markdown
Contributor Author

objectiser commented Feb 17, 2019 via email

@stale
Copy link
Copy Markdown

stale bot commented Mar 3, 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 3, 2019
@istio-testing
Copy link
Copy Markdown
Collaborator

@objectiser: 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 Mar 3, 2019
@stale stale bot removed the stale label Mar 3, 2019
@objectiser objectiser closed this Mar 6, 2019
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.

6 participants