Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
99fddec
WIP
akashrv Apr 5, 2019
c08546a
Merge branch 'noistio2' of github.com:akashrv/eventing into noistio2
akashrv Apr 5, 2019
c642cea
WIP - In-memory working with E2E tests
akashrv Apr 6, 2019
2a4faae
WIP - remove istio dependency from in-memroy channel
akashrv Apr 9, 2019
bd7ae68
UTs pass, E2E tests pass with in-memory as well as kafka
akashrv Apr 10, 2019
df4487f
fixed uts that failed due to last K8s service change
akashrv Apr 10, 2019
824efe6
Merge branch 'master' of github.com:knative/eventing into noistiokafka
akashrv Apr 10, 2019
23ae8b4
Removed unnecessary space from a line
akashrv Apr 10, 2019
a04d6d9
Merge branch 'noistio2' of github.com:akashrv/eventing into noistio2
akashrv Apr 10, 2019
bb7ab3e
dding istio annotation to test POD. This will ve needed when running E2E
akashrv Apr 10, 2019
83e519d
Merge branch 'noistio2' of github.com:akashrv/eventing into noistiokafka
akashrv Apr 10, 2019
c646dcd
Bug fix to set clusterIp of K8s service only when it is not of type E…
akashrv Apr 11, 2019
485f6b3
WIP kafka channel
akashrv Apr 11, 2019
6fd3378
Merge branch 'noistio2' of github.com:akashrv/eventing into noistiokafka
akashrv Apr 11, 2019
37bae81
WIP kafka - UTs and E2E pass
akashrv Apr 12, 2019
feb5e64
Updated code based on PR comments
akashrv Apr 12, 2019
3414ba3
Merge branch 'noistio2' of github.com:akashrv/eventing into noistiokafka
akashrv Apr 12, 2019
c1b8581
WIP
akashrv Apr 15, 2019
d2c831f
Updates based on PR comments
akashrv Apr 15, 2019
d61cd1a
Merge branch 'master' of github.com:knative/eventing into noistio2
akashrv Apr 15, 2019
16a6ffc
Updates based on PR comments
akashrv Apr 15, 2019
67611dc
Fixed UTs
akashrv Apr 15, 2019
2cc8525
Updated VENDOR_LICENSE
akashrv Apr 15, 2019
5b68a3f
Merge branch 'noistio2' of github.com:akashrv/eventing into noistiokafka
akashrv Apr 15, 2019
3b3f16f
WIP. Update fanout sidecar
akashrv Apr 15, 2019
f1904fe
Merge branch 'master' of github.com:knative/eventing into noistiokafka
akashrv Apr 15, 2019
f065d22
Merge from upstream master
akashrv Apr 15, 2019
a645dce
UTs pass, ITs passed. COde ready for PR
akashrv Apr 16, 2019
fdc4b57
Update natss to not use ISTIO. UTs and E2E tests pass.
akashrv Apr 16, 2019
09e4dfa
Updates based on PR comments
akashrv Apr 16, 2019
2f83359
Merge branch 'noistiokafka' of github.com:akashrv/eventing into noist…
akashrv Apr 16, 2019
a0d247a
Merge branch 'master' of github.com:knative/eventing into noistionatss
akashrv Apr 16, 2019
eb76bcd
REmoved permission to istio virtual service from controller
akashrv Apr 16, 2019
1de9e38
WIP
akashrv Apr 17, 2019
d1a1bd5
Changes based on PR comments
akashrv Apr 18, 2019
2d52ee9
Merge branch 'master' of github.com:knative/eventing into noistiokafka
akashrv Apr 18, 2019
d71fecf
Added back permission that was removed by mistake
akashrv Apr 18, 2019
d41ecad
Merge branch 'noistiogcp' of github.com:akashrv/eventing into noistiogcp
akashrv Apr 18, 2019
e3e175c
WIP
akashrv Apr 18, 2019
9adebd7
Merge branch 'noistiokafka' of github.com:akashrv/eventing into noist…
akashrv Apr 18, 2019
6f5d4f8
Remove istio references
akashrv Apr 18, 2019
10eeec5
Merge branch 'noistionatss' of github.com:akashrv/eventing into noist…
akashrv Apr 18, 2019
0f66d68
WIP
akashrv Apr 19, 2019
9f53403
Removed one more reference of istio
akashrv Apr 19, 2019
5425625
Merge branch 'noistiokafka' of github.com:akashrv/eventing into noist…
akashrv Apr 19, 2019
6ce84ee
Merge branch 'noistionatss' of github.com:akashrv/eventing into noist…
akashrv Apr 19, 2019
85d51ca
Merge branch 'noistionatss' of github.com:akashrv/eventing into noist…
akashrv Apr 19, 2019
98f6ff9
Revert kafka.yaml local change
akashrv Apr 19, 2019
07995dd
WIP
akashrv Apr 19, 2019
dfd9dd6
Merge branch 'master' of github.com:knative/eventing into noistionatss
akashrv Apr 19, 2019
794d92d
Merge branch 'noistionatss' of github.com:akashrv/eventing into noist…
akashrv Apr 19, 2019
338045e
Revert kafka dispatcher change
akashrv Apr 19, 2019
cd26f6f
Removing Mutex. No need to use Mutex when using atomic value for host…
akashrv Apr 19, 2019
d0514ca
Merge branch 'master' of github.com:knative/eventing into noistiogcp
akashrv Apr 19, 2019
cdf44a0
Merge branch 'noistionatss' of github.com:akashrv/eventing into noist…
akashrv Apr 19, 2019
9372a11
Merge branch 'master' of github.com:knative/eventing into noistiogcp
akashrv Apr 22, 2019
d98920a
Removed named port from GCP dispatcher K8s service
akashrv Apr 22, 2019
4b1513c
Merge branch 'master' of github.com:knative/eventing into noistiogcp
akashrv Apr 23, 2019
34e8fd5
Merge branch 'master' of github.com:knative/eventing into noistiogcp
akashrv Apr 24, 2019
dae0877
Merge branch 'master' of github.com:knative/eventing into noistiogcp
akashrv Apr 25, 2019
7a45499
Merge branch 'master' of github.com:knative/eventing into noistiogcp
akashrv Apr 25, 2019
8c47946
WIP
akashrv Apr 25, 2019
34aa1ba
FInal changes before validating E2E tests
akashrv Apr 25, 2019
d799c3a
Merge branch 'master' of github.com:knative/eventing into noistiogcp
akashrv Apr 25, 2019
49ace28
Removed istio sidecars from all dispatchers and from broker.
akashrv Apr 26, 2019
9724578
Updates based on PR comments
akashrv Apr 26, 2019
4d58944
Merge branch 'master' of github.com:knative/eventing into noistiogcp
akashrv Apr 26, 2019
18a5609
Merge branch 'noistiogcp' of github.com:akashrv/eventing into noistio…
akashrv Apr 26, 2019
2c7c168
gcppubsub istio/serviceentry removed
akashrv Apr 26, 2019
cce6c86
cronjob source tested with an without sidecar
akashrv Apr 26, 2019
9781a9e
Container source
akashrv Apr 26, 2019
6b00b02
Removed sidecars from tests
akashrv Apr 26, 2019
cb523e3
hack/update-dep.sh
akashrv Apr 26, 2019
32ec678
Merge branch 'master' of github.com:knative/eventing into noistiofinal
akashrv Apr 29, 2019
5c2ab94
Fixed build error
akashrv Apr 29, 2019
5aeea00
Updates based on PR comments
akashrv Apr 30, 2019
5325aa4
Merge branch 'master' of github.com:knative/eventing into noistiofinal
akashrv May 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions config/100-namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ apiVersion: v1
kind: Namespace
metadata:
name: knative-eventing
labels:
istio-injection: enabled
2 changes: 0 additions & 2 deletions config/provisioners/in-memory-channel/in-memory-channel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ spec:
role: dispatcher
template:
metadata:
annotations:
sidecar.istio.io/inject: "true"
labels: *labels
spec:
serviceAccountName: in-memory-channel-dispatcher
Expand Down
35 changes: 17 additions & 18 deletions contrib/gcppubsub/config/gcppubsub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ spec:
role: dispatcher
template:
metadata:
annotations:
sidecar.istio.io/inject: "true"
labels: *labels
spec:
serviceAccountName: gcp-pubsub-channel-dispatcher
Expand Down Expand Up @@ -233,20 +231,21 @@ spec:
- protocol: TCP
port: 80
targetPort: 8080

---
# Needed by the GCP PubSub Channel to communicate with GCP PubSub.
Comment thread
akashrv marked this conversation as resolved.
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: gcppubsub-bus-ext
namespace: knative-eventing
spec:
hosts:
- "*.googleapis.com"
- "accounts.google.com"
ports:
- number: 443
name: https
protocol: HTTPS
location: MESH_EXTERNAL
# Needed by the GCP PubSub Channel to communicate with GCP PubSub.
# Please uncomment if ISTIO automatic sidecar injector is enabled on the cluster, and
# the GCP dispatcher pod in knative-eventing namespace runs with a ISTIO sidecar.
# apiVersion: networking.istio.io/v1alpha3
# kind: ServiceEntry
# metadata:
# name: gcppubsub-bus-ext
# namespace: knative-eventing
# spec:
# hosts:
# - "*.googleapis.com"
# - "accounts.google.com"
# ports:
# - number: 443
# name: https
# protocol: HTTPS
# location: MESH_EXTERNAL
2 changes: 0 additions & 2 deletions contrib/kafka/config/kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ spec:
role: dispatcher
template:
metadata:
annotations:
sidecar.istio.io/inject: "true"
labels: *labels
spec:
serviceAccountName: kafka-channel-dispatcher
Expand Down
1 change: 0 additions & 1 deletion contrib/natss/config/broker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

```sbtshell
kubectl create namespace natss
kubectl label namespace natss istio-injection=enabled
kubectl apply -n natss -f contrib/natss/config/broker/natss.yaml
```

Expand Down
2 changes: 0 additions & 2 deletions contrib/natss/config/provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ spec:
role: dispatcher
template:
metadata:
annotations:
sidecar.istio.io/inject: "true"
labels: *labels
spec:
serviceAccountName: natss-dispatcher
Expand Down
4 changes: 2 additions & 2 deletions docs/broker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ The `Broker`'s address is well known, it will always be
`<name>-broker.<namespace>.svc.<ending>`. In our case, it is
`default-broker.default.svc.cluster.local`.

While SSHed into a `Pod` with the Istio sidecar, run:
While SSHed into a `Pod` and run:

```shell
curl -v "http://default-broker.default.svc.cluster.local/" \
Expand Down Expand Up @@ -278,7 +278,7 @@ implmentation**.
### Namespace

Namespaces are reconciled by the
[Namespace Reconciler](../../pkg/reconciler/v1alpha1/namespace). The
[Namespace Reconciler](../../pkg/reconciler/namespace). The
`Namespace Reconciler` looks for all `namespace`s that have the label
`knative-eventing-injection: enabled`. If that label is present, then the
`Namespace Reconciler` reconciles:
Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/eventing/v1alpha1/subscription_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ type SubscriptionSpec struct {
// provide the resolved target of the action.
// Currently we inspect the objects Status and see if there's a predefined
// Status field that we will then use to dispatch events to be processed by
// the target. Currently must resolve to a k8s service or Istio virtual
// service.
// the target. Currently must resolve to a k8s service.
// Note that in the future we should try to utilize subresources (/resolve ?) to
// make this cleaner, but CRDs do not support subresources yet, so we need
// to rely on a specified Status field today. By relying on this behaviour
Expand Down
110 changes: 0 additions & 110 deletions pkg/provisioners/channel_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"k8s.io/apimachinery/pkg/labels"

istiov1alpha3 "github.com/knative/pkg/apis/istio/v1alpha3"
corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -157,61 +156,6 @@ func createK8sService(ctx context.Context, client runtimeClient.Client, getSvc g
return current, nil
}

func getVirtualService(ctx context.Context, client runtimeClient.Client, c *eventingv1alpha1.Channel) (*istiov1alpha3.VirtualService, error) {
list := &istiov1alpha3.VirtualServiceList{}
opts := &runtimeClient.ListOptions{
Namespace: c.Namespace,
// TODO After the full release start selecting on new set of labels by using virtualServiceLabels(c)
LabelSelector: labels.SelectorFromSet(virtualOldServiceLabels(c)),
// Set Raw because if we need to get more than one page, then we will put the continue token
// into opts.Raw.Continue.
Raw: &metav1.ListOptions{},
}

err := client.List(ctx, opts, list)
if err != nil {
return nil, err
}
for _, vs := range list.Items {
if metav1.IsControlledBy(&vs, c) {
return &vs, nil
}
}

return nil, k8serrors.NewNotFound(schema.GroupResource{}, "")
}

func CreateVirtualService(ctx context.Context, client runtimeClient.Client, channel *eventingv1alpha1.Channel, svc *corev1.Service) (*istiov1alpha3.VirtualService, error) {
virtualService, err := getVirtualService(ctx, client, channel)

// If the resource doesn't exist, we'll create it
if k8serrors.IsNotFound(err) {
virtualService = newVirtualService(channel, svc)
err = client.Create(ctx, virtualService)
if err != nil {
return nil, err
}
return virtualService, nil
} else if err != nil {
return nil, err
}

// Update VirtualService if it has changed. This is possible since in version 0.2.0, the destinationHost in
// spec.HTTP.Route for the dispatcher was changed from *-clusterbus to *-dispatcher. Even otherwise, this
// reconciliation is useful for the future mutations to the object.
expected := newVirtualService(channel, svc)
if !equality.Semantic.DeepDerivative(expected.Spec, virtualService.Spec) ||
!expectedLabelsPresent(virtualService.ObjectMeta.Labels, expected.ObjectMeta.Labels) {
virtualService.Spec = expected.Spec
virtualService.ObjectMeta.Labels = addExpectedLabels(virtualService.ObjectMeta.Labels, expected.ObjectMeta.Labels)
err := client.Update(ctx, virtualService)
if err != nil {
return nil, err
}
}
return virtualService, nil
}

// checkExpectedLabels checks the presence of expected labels and its values and return true
// if all labels are found.
func expectedLabelsPresent(actual, expected map[string]string) bool {
Expand Down Expand Up @@ -333,60 +277,6 @@ func k8sServiceLabels(c *eventingv1alpha1.Channel) map[string]string {
}
}

func virtualServiceLabels(c *eventingv1alpha1.Channel) map[string]string {
// Use the same labels as the K8s service.
return k8sServiceLabels(c)
}

func virtualOldServiceLabels(c *eventingv1alpha1.Channel) map[string]string {
// Use the same labels as the K8s service.
return k8sOldServiceLabels(c)
}

// newVirtualService creates a new VirtualService for a Channel resource. It also sets the
// appropriate OwnerReferences on the resource so handleObject can discover the Channel resource
// that 'owns' it. As well as being garbage collected when the Channel is deleted.
func newVirtualService(channel *eventingv1alpha1.Channel, svc *corev1.Service) *istiov1alpha3.VirtualService {
destinationHost := names.ServiceHostName(channelDispatcherServiceName(channel.Spec.Provisioner.Name), system.Namespace())
return &istiov1alpha3.VirtualService{
ObjectMeta: metav1.ObjectMeta{
GenerateName: channelVirtualServiceName(channel.Name),
Namespace: channel.Namespace,
Labels: virtualServiceLabels(channel),
OwnerReferences: []metav1.OwnerReference{
*metav1.NewControllerRef(channel, schema.GroupVersionKind{
Group: eventingv1alpha1.SchemeGroupVersion.Group,
Version: eventingv1alpha1.SchemeGroupVersion.Version,
Kind: "Channel",
}),
},
},
Spec: istiov1alpha3.VirtualServiceSpec{
Hosts: []string{
names.ServiceHostName(svc.Name, channel.Namespace),
channelHostName(channel.Name, channel.Namespace),
},
HTTP: []istiov1alpha3.HTTPRoute{{
Rewrite: &istiov1alpha3.HTTPRewrite{
Authority: channelHostName(channel.Name, channel.Namespace),
},
Route: []istiov1alpha3.HTTPRouteDestination{{
Destination: istiov1alpha3.Destination{
Host: destinationHost,
Port: istiov1alpha3.PortSelector{
Number: PortNumber,
},
}},
}},
},
},
}
}

func channelVirtualServiceName(channelName string) string {
return fmt.Sprintf("%s-channel-", channelName)
}

func channelServiceName(channelName string) string {
return fmt.Sprintf("%s-channel-", channelName)
}
Expand Down
Loading