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

Add IntegrationSink CRD #8304

Merged
merged 20 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Copy link
Member Author

Choose a reason for hiding this comment

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

we are actually not using this.

In a follow up PR, we will generate these Certificate manifest for each IntegrationSource instance (their Service).

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
Loading