Skip to content

Commit

Permalink
Add InterceptorType as a cluster scoped CRD for registering interceptors
Browse files Browse the repository at this point in the history
This commit adds a new CRD type called InterceptorType. In TEP-0026 this
type was called InterceptorConfig though InterceptorType sounds a bit
clearer.

The `spec` currently only contains a clientConfig field to locate where
the interceptor is running. Other fields will be added as they are
implemented in follow ups.

This commit also adds a simple reconciler for this type that resolves
the clientConfig to a URL and adds it to the `status.address.url` field.

Part of tektoncd#868

Signed-off-by: Dibyo Mukherjee <[email protected]>
  • Loading branch information
dibyom committed Feb 18, 2021
1 parent 742dbd0 commit cf988fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
rules:
# EventListeners need to be able to fetch all namespaced resources
- apiGroups: ["triggers.tekton.dev"]
resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers"]
resources: ["eventlisteners", "triggerbindings", "triggertemplates", "triggers"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
# configmaps is needed for updating logging config
Expand Down
6 changes: 3 additions & 3 deletions pkg/apis/triggers/v1alpha1/interceptor_type_defaults_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package v1alpha1_test

import (
"context"
"testing"

"github.com/google/go-cmp/cmp"
triggersv1 "github.com/tektoncd/triggers/pkg/apis/triggers/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"context"
"testing"
)

func TestInterceptorTypeSetDefaults(t *testing.T) {
Expand Down

0 comments on commit cf988fe

Please sign in to comment.