Skip to content

Commit 1e770ef

Browse files
matzewpierDipicreydr
authored
[release-v1.16] Backport: Move all integration bits to OCP (#1077)
* IntegrationSource CRD (knative#8238) * Add initial raw API types and controller/reconciler. Levering internally the container source for the handling of the kamelet workloads. the logic for applying the env-vars is a bit verbose, but can be improved. Tests/lifeccyle and some other improvements are still missing. but this works. Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * adding reflection to make the mapping less verbose, and more flexible to extend... Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Add DDB Streams Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * polish and add minimal tests Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Update pkg/apis/sources/v1alpha1/integration_lifecycle.go Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com> * Update pkg/apis/sources/v1alpha1/integration_lifecycle.go Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com> * Fix compiler warnings Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * use other image coordinates Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * first test for source Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Adding initial rekt test Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Adding SSL support and test for IntegrationSource Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Formatting fixes Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Disable OIDC tests for now Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * use knative nightly images Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Fixing linters Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * addressing comments, Part1 Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> --------- Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com> * Add missing copyright boilerplate (knative#8305) :lipstick: add missing copyright boilerplate Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * [chore] Use a generic access/secret key in the secret for AWS connections (knative#8312) :key: Use a generic access/secret key in the secret for AWS connections Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * [chore] Do not generate SSL env vars for each struct entry, just once per containersource/image (knative#8315) :lipstick: Do not generate SSL env vars for each struct entry, just once per containersource/image Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Update Integration API and use custom tags on structs for better readability (knative#8321) Update API and use custom tags on structs Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Integration Api moved to versioned common (knative#8325) Moving API to a versioned common/integration folder Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Introducing common integration helper and change package name (knative#8327) * create new integration/source folder and factor common code into helper.go Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * 💄 improve formatting... Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * fixing import Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> --------- Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * chore: correct comments (knative#8336) :lipstick: correct comments ... Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Add IntegrationSink CRD (knative#8304) * create new integration/source folder and factor common code into helper.go Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * 💄 improve formatting... Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * fixing import Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * First Sink Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Updates on sink Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * starting common types for source Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * starting common types for sink Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * some code share and refactorings * use other image coordinates Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Add missing api and tests for sink and run codegen Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Fixes Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Adding cert Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Adding test Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Rekt test for sink Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Rekt test for sink Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * correct status code Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * More... Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * re-add service Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * delete unversioned common api Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Updates, latest conflicts and formatting Clean ups Adding tests for reconciler Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> --------- Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> conflict Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * IntegrationSink: rek-test templating support for bool annotations (knative#8342) bool annotations for represented as string, to avoid parsing errors Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Update integrationsink crd (knative#8347) * Align IntegrationSink CRD w/ IntegrationSource CRD Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * 💄 Remove old job-sink references Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Docs change Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> --------- Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Avoid using twice hardcoded strings for the names of the Kube Secret keys, for AWS access/secret key vals (knative#8345) :lipstick: Avoid using twice hardcoded strings for the names of the Kubescret keys, for AWS access/secret key vals Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Add integrationsinks-addressable-resolver cluster role (knative#8356) :passport_control: Add integrationsinks-addressable-resolver cluster role Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Align label generation and apply on container-source as well (knative#8355) Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * We changed the event type on the images (knative#8364) :fire: We changed the event type on the images Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Move image to map (knative#8362) Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Adding sns sink to Integration Sink (knative#8365) adding sns sink Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Clean up remove session token (knative#8369) Remove session token and profile credential name Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Chore: field semantic correction (knative#8370) :lipstick: We renamed those fields to , and we reflect that now in validation Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Remove unused filter function (knative#8375) :broom: Remove unused filter function Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * add new integration CRDs to storage version migrator tool (knative#8386) Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Going OIDC for Integration Source (knative#8383) Going OIDC for Integration Source: - Generating OIDC specific evn_vars for Knative client of camel - Adding rekt-test for OIDC feature of the source Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Adding reconciler test for OIDC of the Integration Source (knative#8404) Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Not just render oidc env-vars when cfg is on, we need also a present audience to ensure the camel containers work correct (knative#8448) Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * run `make generate-release` --------- Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com> Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
1 parent 8ddd84c commit 1e770ef

File tree

117 files changed

+12213
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+12213
-85
lines changed

cmd/controller/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ import (
3535
"knative.dev/eventing/pkg/reconciler/channel"
3636
"knative.dev/eventing/pkg/reconciler/containersource"
3737
"knative.dev/eventing/pkg/reconciler/eventtype"
38+
integrationsink "knative.dev/eventing/pkg/reconciler/integration/sink"
39+
integrationsource "knative.dev/eventing/pkg/reconciler/integration/source"
3840
"knative.dev/eventing/pkg/reconciler/parallel"
3941
"knative.dev/eventing/pkg/reconciler/pingsource"
4042
"knative.dev/eventing/pkg/reconciler/sequence"
@@ -70,11 +72,14 @@ func main() {
7072
apiserversource.NewController,
7173
pingsource.NewController,
7274
containersource.NewController,
75+
integrationsource.NewController,
76+
7377
// Sources CRD
7478
sourcecrd.NewController,
7579

7680
// Sinks
7781
jobsink.NewController,
82+
integrationsink.NewController,
7883

7984
// Sugar
8085
sugarnamespace.NewController,

cmd/webhook/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import (
2020
"context"
2121
"os"
2222

23+
sourcesv1alpha1 "knative.dev/eventing/pkg/apis/sources/v1alpha1"
24+
2325
"k8s.io/apimachinery/pkg/runtime/schema"
2426
"k8s.io/apimachinery/pkg/types"
2527
"k8s.io/client-go/kubernetes/scheme"
@@ -92,6 +94,8 @@ var ourTypes = map[schema.GroupVersionKind]resourcesemantics.GenericCRD{
9294
messagingv1.SchemeGroupVersion.WithKind("Subscription"): &messagingv1.Subscription{},
9395

9496
// For group sources.knative.dev.
97+
// v1alpha1
98+
sourcesv1alpha1.SchemeGroupVersion.WithKind("IntegrationSource"): &sourcesv1alpha1.IntegrationSource{},
9599
// v1beta2
96100
sourcesv1beta2.SchemeGroupVersion.WithKind("PingSource"): &sourcesv1beta2.PingSource{},
97101
// v1
@@ -102,7 +106,8 @@ var ourTypes = map[schema.GroupVersionKind]resourcesemantics.GenericCRD{
102106

103107
// For group sinks.knative.dev.
104108
// v1alpha1
105-
sinksv1alpha1.SchemeGroupVersion.WithKind("JobSink"): &sinksv1alpha1.JobSink{},
109+
sinksv1alpha1.SchemeGroupVersion.WithKind("JobSink"): &sinksv1alpha1.JobSink{},
110+
sinksv1alpha1.SchemeGroupVersion.WithKind("IntegrationSink"): &sinksv1alpha1.IntegrationSink{},
106111

107112
// For group flows.knative.dev
108113
// v1

config/300-integrationsink.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
core/resources/integrationsink.yaml

config/300-integrationsource.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
core/resources/integrationsource.yaml
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright 2023 The Knative Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
apiVersion: cert-manager.io/v1
16+
kind: Certificate
17+
metadata:
18+
name: integration-sink-server-tls
19+
namespace: knative-eventing
20+
spec:
21+
# Secret names are always required.
22+
secretName: integration-sink-server-tls
23+
24+
secretTemplate:
25+
labels:
26+
app.kubernetes.io/component: integration-sink
27+
app.kubernetes.io/name: knative-eventing
28+
29+
# Use 0m0s so that we don't run into https://github.com/cert-manager/cert-manager/issues/6408 on the operator
30+
duration: 2160h0m0s # 90d
31+
renewBefore: 360h0m0s # 15d
32+
subject:
33+
organizations:
34+
- local
35+
privateKey:
36+
algorithm: RSA
37+
encoding: PKCS1
38+
size: 2048
39+
rotationPolicy: Always
40+
41+
dnsNames:
42+
- integration-sink.knative-eventing.svc.cluster.local
43+
- integration-sink.knative-eventing.svc
44+
45+
issuerRef:
46+
name: knative-eventing-ca-issuer
47+
kind: ClusterIssuer
48+
group: cert-manager.io

0 commit comments

Comments
 (0)