Skip to content

Commit

Permalink
Add IntegrationSink CRD (#8304)
Browse files Browse the repository at this point in the history
* create new integration/source folder and factor common code into helper.go

Signed-off-by: Matthias Wessendorf <[email protected]>

* 💄 improve formatting...

Signed-off-by: Matthias Wessendorf <[email protected]>

* fixing import

Signed-off-by: Matthias Wessendorf <[email protected]>

* First Sink

Signed-off-by: Matthias Wessendorf <[email protected]>

* Updates on sink

Signed-off-by: Matthias Wessendorf <[email protected]>

* starting common types for source

Signed-off-by: Matthias Wessendorf <[email protected]>

* starting common types for sink

Signed-off-by: Matthias Wessendorf <[email protected]>

* some code share and refactorings

* use other image coordinates

Signed-off-by: Matthias Wessendorf <[email protected]>

* Add missing api and tests for sink and run codegen

Signed-off-by: Matthias Wessendorf <[email protected]>

* Fixes

Signed-off-by: Matthias Wessendorf <[email protected]>

* Adding cert

Signed-off-by: Matthias Wessendorf <[email protected]>

* Adding test

Signed-off-by: Matthias Wessendorf <[email protected]>

* Rekt test for sink

Signed-off-by: Matthias Wessendorf <[email protected]>

* Rekt test for sink

Signed-off-by: Matthias Wessendorf <[email protected]>

* correct status code

Signed-off-by: Matthias Wessendorf <[email protected]>

* More...

Signed-off-by: Matthias Wessendorf <[email protected]>

* re-add service

Signed-off-by: Matthias Wessendorf <[email protected]>

* delete unversioned common api

Signed-off-by: Matthias Wessendorf <[email protected]>

* Updates, latest conflicts and formatting
Clean ups
Adding tests for reconciler

Signed-off-by: Matthias Wessendorf <[email protected]>

---------

Signed-off-by: Matthias Wessendorf <[email protected]>
  • Loading branch information
matzew authored Nov 22, 2024
1 parent 5ad7dab commit 7176ce6
Show file tree
Hide file tree
Showing 51 changed files with 4,631 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (
"knative.dev/eventing/pkg/reconciler/channel"
"knative.dev/eventing/pkg/reconciler/containersource"
"knative.dev/eventing/pkg/reconciler/eventtype"
integrationsink "knative.dev/eventing/pkg/reconciler/integration/sink"
integrationsource "knative.dev/eventing/pkg/reconciler/integration/source"
"knative.dev/eventing/pkg/reconciler/parallel"
"knative.dev/eventing/pkg/reconciler/pingsource"
Expand Down Expand Up @@ -112,6 +113,7 @@ func main() {

// Sinks
jobsink.NewController,
integrationsink.NewController,

// Sugar
sugarnamespace.NewController,
Expand Down
3 changes: 2 additions & 1 deletion cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ var ourTypes = map[schema.GroupVersionKind]resourcesemantics.GenericCRD{

// For group sinks.knative.dev.
// v1alpha1
sinksv1alpha1.SchemeGroupVersion.WithKind("JobSink"): &sinksv1alpha1.JobSink{},
sinksv1alpha1.SchemeGroupVersion.WithKind("JobSink"): &sinksv1alpha1.JobSink{},
sinksv1alpha1.SchemeGroupVersion.WithKind("IntegrationSink"): &sinksv1alpha1.IntegrationSink{},

// For group flows.knative.dev
// v1
Expand Down
1 change: 1 addition & 0 deletions config/300-integrationsink.yaml
48 changes: 48 additions & 0 deletions config/core-tls/integration-sink-tls-certificate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright 2023 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: integration-sink-server-tls
namespace: knative-eventing
spec:
# Secret names are always required.
secretName: integration-sink-server-tls

secretTemplate:
labels:
app.kubernetes.io/component: integration-sink
app.kubernetes.io/name: knative-eventing

# Use 0m0s so that we don't run into https://github.com/cert-manager/cert-manager/issues/6408 on the operator
duration: 2160h0m0s # 90d
renewBefore: 360h0m0s # 15d
subject:
organizations:
- local
privateKey:
algorithm: RSA
encoding: PKCS1
size: 2048
rotationPolicy: Always

dnsNames:
- integration-sink.knative-eventing.svc.cluster.local
- integration-sink.knative-eventing.svc

issuerRef:
name: knative-eventing-ca-issuer
kind: ClusterIssuer
group: cert-manager.io
423 changes: 423 additions & 0 deletions config/core/resources/integrationsink.yaml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions config/core/roles/controller-clusterroles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ rules:
resources:
- "jobsinks"
- "jobsinks/status"
- "integrationsinks"
- "integrationsinks/status"
verbs:
- "get"
- "list"
Expand All @@ -135,6 +137,7 @@ rules:
- "sinks.knative.dev"
resources:
- "jobsinks/finalizers"
- "integrationsinks/finalizers"
verbs:
- "update"

Expand Down
Loading

0 comments on commit 7176ce6

Please sign in to comment.