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

Revert "remove feature flags for se selecting pods (#37374)" #40716

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

GregHanson
Copy link
Member

@GregHanson GregHanson commented Aug 30, 2022

This reverts commit 2ffbf67.

Please provide a description of this PR:

feature flags PILOT_ENABLE_SERVICEENTRY_SELECT_PODS and PILOT_ENABLE_K8S_SELECT_WORKLOAD_ENTRIES were removed in #37374. PILOT_ENABLE_SERVICEENTRY_SELECT_PODS was re-added in #37407. This PR re-adds PILOT_ENABLE_K8S_SELECT_WORKLOAD_ENTRIES

To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

  • Configuration Infrastructure
  • Docs
  • Installation
  • [ X ] Networking
  • Performance and Scalability
  • Policies and Telemetry
  • Security
  • Test and Release
  • User Experience
  • Developer Infrastructure

@GregHanson GregHanson requested review from a team as code owners August 30, 2022 18:13
@istio-testing istio-testing added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 30, 2022
@GregHanson
Copy link
Member Author

/hold for discussion from #37374 (comment)

@GregHanson GregHanson added the do-not-merge Block automatic merging of a PR. label Aug 30, 2022
@GregHanson
Copy link
Member Author

/cherry-pick release-1.15

@istio-testing
Copy link
Collaborator

@GregHanson: once the present PR merges, I will cherry-pick it on top of release-1.15 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.15

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.

@GregHanson
Copy link
Member Author

/cherry-pick release-1.14

@istio-testing
Copy link
Collaborator

@GregHanson: once the present PR merges, I will cherry-pick it on top of release-1.14 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.14

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.

Copy link
Member

@linsun linsun left a comment

Choose a reason for hiding this comment

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

based on today's WG mtg, okay to restore this for now before we come up with a plan to support this officially. Notes:

OK to restore this function for now
Need a design doc to capture user case and have further discussion

@ramaraochavali can you approve?

@linsun
Copy link
Member

linsun commented Aug 31, 2022

should we add a small release note for this? @GregHanson

@howardjohn
Copy link
Member

howardjohn commented Aug 31, 2022 via email

@GregHanson GregHanson requested review from a team as code owners August 31, 2022 22:13
@GregHanson
Copy link
Member Author

GregHanson commented Aug 31, 2022

test for verifying the fix:

cat <<\EOF > ./my-config.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  hub: $HUB
  tag: $TAG
  components:
    pilot:
      k8s:
        env:
        - name: PILOT_ENABLE_K8S_SELECT_WORKLOAD_ENTRIES
          value: "false"
EOF
istioctl install -f my-config.yaml

# deploy helloworld-v1 inside of mesh and helloworld-v2 outside mesh
kubectl label namespace default istio-injection=enabled
kubectl apply -f samples/sleep/sleep.yaml
kubectl apply -f samples/helloworld/helloworld.yaml
kubectl create ns external
kubectl apply -f samples/helloworld/helloworld.yaml -n external
kubectl delete deploy helloworld-v2
kubectl delete deploy helloworld-v1 -n external

# add the v2 version
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3
kind: WorkloadEntry
metadata:
  name: hello-svc
spec:
  address: 10.244.1.6 # pod IP of helloworld-v2 in external ns
  labels:
    app: helloworld
    instance-id: vm1
---
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: hello-svc
spec:
  hosts:
  - gihanson.hello.com
  location: MESH_INTERNAL
  ports:
  - number: 5000
    name: http
    protocol: HTTP
  resolution: STATIC
  workloadSelector:
    labels:
      app: helloworld
EOF

Performing curls from the sleep pod to gihanson.hello.com:5000/hello loadbalances between v1 and v2 versions of the service. Calling helloworld.default.svc.cluster.local:5000/hello goes to only v1 when PILOT_ENABLE_K8S_SELECT_WORKLOAD_ENTRIES=false and both versions when PILOT_ENABLE_K8S_SELECT_WORKLOAD_ENTRIES=true

@GregHanson GregHanson removed the do-not-merge Block automatic merging of a PR. label Sep 1, 2022
@ericvn
Copy link
Contributor

ericvn commented Sep 1, 2022

Does this PR need to be cherry-picked to 1.15? I see there is a version of this for 1.14.

@GregHanson
Copy link
Member Author

Should be set to cherry-pick to 1.15 due to comments above. A 1.14 cherry-pick exists already here, but I will delete that one if the auto cherrypick created from this PR merges OK

@istio-testing istio-testing merged commit dd0d5e4 into istio:master Sep 1, 2022
@istio-testing
Copy link
Collaborator

In response to a cherrypick label: #40716 failed to apply on top of branch "release-1.15":

Applying: Revert "remove feature flags for se selecting pods (#37374)"
Using index info to reconstruct a base tree...
M	pilot/pkg/features/pilot.go
M	pilot/pkg/serviceregistry/kube/controller/controller.go
M	pilot/pkg/serviceregistry/kube/controller/controller_test.go
M	pilot/pkg/serviceregistry/kube/controller/multicluster.go
Falling back to patching base and 3-way merge...
Auto-merging pilot/pkg/serviceregistry/kube/controller/multicluster.go
Auto-merging pilot/pkg/serviceregistry/kube/controller/controller_test.go
Auto-merging pilot/pkg/serviceregistry/kube/controller/controller.go
Auto-merging pilot/pkg/features/pilot.go
CONFLICT (content): Merge conflict in pilot/pkg/features/pilot.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Revert "remove feature flags for se selecting pods (#37374)"
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

@istio-testing
Copy link
Collaborator

In response to a cherrypick label: new issue created for failed cherrypick: #40761

@istio-testing
Copy link
Collaborator

@GregHanson: #40716 failed to apply on top of branch "release-1.14":

Applying: Revert "remove feature flags for se selecting pods (#37374)"
Using index info to reconstruct a base tree...
M	pilot/pkg/features/pilot.go
M	pilot/pkg/serviceregistry/kube/controller/controller.go
M	pilot/pkg/serviceregistry/kube/controller/controller_test.go
M	pilot/pkg/serviceregistry/kube/controller/endpointcontroller.go
M	pilot/pkg/serviceregistry/kube/controller/multicluster.go
Falling back to patching base and 3-way merge...
Auto-merging pilot/pkg/serviceregistry/kube/controller/multicluster.go
CONFLICT (content): Merge conflict in pilot/pkg/serviceregistry/kube/controller/multicluster.go
Auto-merging pilot/pkg/serviceregistry/kube/controller/endpointcontroller.go
Auto-merging pilot/pkg/serviceregistry/kube/controller/controller_test.go
Auto-merging pilot/pkg/serviceregistry/kube/controller/controller.go
Auto-merging pilot/pkg/features/pilot.go
CONFLICT (content): Merge conflict in pilot/pkg/features/pilot.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Revert "remove feature flags for se selecting pods (#37374)"
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.14

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
Copy link
Collaborator

@GregHanson: new issue created for failed cherrypick: #40762

In response to this:

/cherry-pick release-1.14

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.

@GregHanson GregHanson deleted the revert_37374 branch September 1, 2022 14:38
GregHanson added a commit to GregHanson/istio that referenced this pull request Sep 1, 2022
…tio#40716)

* Revert "remove feature flags for se selecting pods (istio#37374)"

This reverts commit 2ffbf67.

* add release note for re-added feature flag
GregHanson added a commit to GregHanson/istio that referenced this pull request Sep 1, 2022
…tio#40716)

* Revert "remove feature flags for se selecting pods (istio#37374)"

This reverts commit 2ffbf67.

* add release note for re-added feature flag
istio-testing pushed a commit that referenced this pull request Sep 1, 2022
…#40766)

* Revert "remove feature flags for se selecting pods (#37374)"

This reverts commit 2ffbf67.

* add release note for re-added feature flag
istio-testing pushed a commit that referenced this pull request Sep 1, 2022
…#40764)

* Revert "remove feature flags for se selecting pods (#37374)"

This reverts commit 2ffbf67.

* add release note for re-added feature flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking 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.

None yet

8 participants