Skip to content

Commit

Permalink
Fix apache#1670: upgrade to Knative 0.16 and support from 0.15 to 0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro committed Sep 2, 2020
1 parent 1012c72 commit a4f59ad
Show file tree
Hide file tree
Showing 17 changed files with 212 additions and 99 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/knative.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ jobs:
# Prerequisites
sudo pip install yq
export SERVING_VERSION=v0.14.0
export EVENTING_VERSION=v0.14.1
export SOURCES_VERSION=v0.14.1
export SERVING_VERSION=v0.16.0
export EVENTING_VERSION=v0.16.2
export SOURCES_VERSION=v0.16.0
# Serving
kubectl apply --filename https://github.com/knative/serving/releases/download/$SERVING_VERSION/serving-crds.yaml
Expand All @@ -125,7 +125,7 @@ jobs:
curl -L -s https://github.com/knative/eventing/releases/download/$EVENTING_VERSION/in-memory-channel.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' -y | kubectl apply -f -
# Eventing broker
curl -L -s https://github.com/knative/eventing/releases/download/$EVENTING_VERSION/channel-broker.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' -y | kubectl apply -f -
curl -L -s https://github.com/knative/eventing/releases/download/$EVENTING_VERSION/mt-channel-broker.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' -y | kubectl apply -f -
# Camel Sources
kubectl apply --filename https://github.com/knative/eventing-contrib/releases/download/$SOURCES_VERSION/camel.yaml
Expand Down Expand Up @@ -251,9 +251,9 @@ jobs:
# Prerequisites
sudo pip install yq
export SERVING_VERSION=v0.14.0
export EVENTING_VERSION=v0.14.1
export SOURCES_VERSION=v0.14.1
export SERVING_VERSION=v0.16.0
export EVENTING_VERSION=v0.16.2
export SOURCES_VERSION=v0.16.0
# Serving
kubectl apply --filename https://github.com/knative/serving/releases/download/$SERVING_VERSION/serving-crds.yaml
Expand All @@ -274,7 +274,7 @@ jobs:
curl -L -s https://github.com/knative/eventing/releases/download/$EVENTING_VERSION/in-memory-channel.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' -y | kubectl apply -f -
# Eventing broker
curl -L -s https://github.com/knative/eventing/releases/download/$EVENTING_VERSION/channel-broker.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' -y | kubectl apply -f -
curl -L -s https://github.com/knative/eventing/releases/download/$EVENTING_VERSION/mt-channel-broker.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' -y | kubectl apply -f -
# Camel Sources
kubectl apply --filename https://github.com/knative/eventing-contrib/releases/download/$SOURCES_VERSION/camel.yaml
Expand Down
82 changes: 77 additions & 5 deletions deploy/camel-catalog-1.5.1-SNAPSHOT-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ metadata:
name: camel-catalog-1.5.1-snapshot-main
labels:
app: camel-k
camel.apache.org/catalog.version: 3.4.0
camel.apache.org/catalog.loader.version: 3.4.0
camel.apache.org/catalog.version: 3.5.0-SNAPSHOT
camel.apache.org/catalog.loader.version: 3.5.0-SNAPSHOT
camel.apache.org/runtime.version: 1.5.1-SNAPSHOT
camel.apache.org/runtime.provider: main
spec:
Expand All @@ -31,9 +31,9 @@ spec:
provider: main
applicationClass: org.apache.camel.k.main.Application
metadata:
camel.version: 3.4.0
quarkus.version: 1.6.0.Final
camel-quarkus.version: 1.0.0-CR3
camel.version: 3.5.0-SNAPSHOT
quarkus.version: 1.7.0.Final
camel-quarkus.version: 1.0.0
dependencies:
- groupId: org.apache.camel.k
artifactId: camel-k-runtime-main
Expand Down Expand Up @@ -94,6 +94,15 @@ spec:
javaTypes:
- org.apache.camel.component.azure.blob.BlobServiceComponent
- org.apache.camel.component.azure.queue.QueueServiceComponent
camel-vertx-websocket:
groupId: org.apache.camel
artifactId: camel-vertx-websocket
schemes:
- id: vertx-websocket
http: false
passive: false
javaTypes:
- org.apache.camel.component.vertx.websocket.VertxWebsocketComponent
camel-seda:
groupId: org.apache.camel
artifactId: camel-seda
Expand Down Expand Up @@ -193,6 +202,15 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.sjms2.Sjms2Component
camel-vertx-http:
groupId: org.apache.camel
artifactId: camel-vertx-http
schemes:
- id: vertx-http
http: false
passive: false
javaTypes:
- org.apache.camel.component.vertx.http.VertxHttpComponent
camel-facebook:
groupId: org.apache.camel
artifactId: camel-facebook
Expand Down Expand Up @@ -299,6 +317,15 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.aws2.iam.IAM2Component
camel-jsonata:
groupId: org.apache.camel
artifactId: camel-jsonata
schemes:
- id: jsonata
http: false
passive: false
javaTypes:
- org.apache.camel.component.jsonata.JsonataComponent
camel-aws-eks:
groupId: org.apache.camel
artifactId: camel-aws-eks
Expand Down Expand Up @@ -595,6 +622,15 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.weka.WekaComponent
camel-azure-eventhubs:
groupId: org.apache.camel
artifactId: camel-azure-eventhubs
schemes:
- id: azure-eventhubs
http: false
passive: false
javaTypes:
- org.apache.camel.component.azure.eventhubs.EventHubsComponent
camel-jacksonxml:
groupId: org.apache.camel
artifactId: camel-jacksonxml
Expand Down Expand Up @@ -780,6 +816,15 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.salesforce.SalesforceComponent
camel-minio:
groupId: org.apache.camel
artifactId: camel-minio
schemes:
- id: minio
http: false
passive: false
javaTypes:
- org.apache.camel.component.minio.MinioComponent
camel-xj:
groupId: org.apache.camel
artifactId: camel-xj
Expand Down Expand Up @@ -1288,6 +1333,15 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.guava.eventbus.GuavaEventBusComponent
camel-aws2-sts:
groupId: org.apache.camel
artifactId: camel-aws2-sts
schemes:
- id: aws2-sts
http: false
passive: false
javaTypes:
- org.apache.camel.component.aws2.sts.STS2Component
camel-msv:
groupId: org.apache.camel
artifactId: camel-msv
Expand Down Expand Up @@ -2200,6 +2254,15 @@ spec:
- groovy
javaTypes:
- org.apache.camel.language.groovy.GroovyLanguage
camel-arangodb:
groupId: org.apache.camel
artifactId: camel-arangodb
schemes:
- id: arangodb
http: false
passive: false
javaTypes:
- org.apache.camel.component.arangodb.ArangoDbComponent
camel-saga:
groupId: org.apache.camel
artifactId: camel-saga
Expand Down Expand Up @@ -2794,6 +2857,15 @@ spec:
- grok
javaTypes:
- org.apache.camel.component.grok.GrokDataFormat
camel-oaipmh:
groupId: org.apache.camel
artifactId: camel-oaipmh
schemes:
- id: oaipmh
http: false
passive: false
javaTypes:
- org.apache.camel.oaipmh.component.OAIPMHComponent
camel-mvel:
groupId: org.apache.camel
artifactId: camel-mvel
Expand Down
26 changes: 21 additions & 5 deletions deploy/camel-catalog-1.5.1-SNAPSHOT-quarkus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ metadata:
name: camel-catalog-1.5.1-snapshot-quarkus
labels:
app: camel-k
camel.apache.org/catalog.version: 3.4.0
camel.apache.org/catalog.loader.version: 3.4.0
camel.apache.org/catalog.version: 3.5.0-SNAPSHOT
camel.apache.org/catalog.loader.version: 3.5.0-SNAPSHOT
camel.apache.org/runtime.version: 1.5.1-SNAPSHOT
camel.apache.org/runtime.provider: quarkus
spec:
Expand All @@ -31,9 +31,9 @@ spec:
provider: quarkus
applicationClass: io.quarkus.runner.GeneratedMain
metadata:
camel.version: 3.4.0
quarkus.version: 1.6.0.Final
camel-quarkus.version: 1.0.0-CR3
camel.version: 3.5.0-SNAPSHOT
quarkus.version: 1.7.0.Final
camel-quarkus.version: 1.0.0
dependencies:
- groupId: org.apache.camel.k
artifactId: camel-k-runtime-quarkus
Expand Down Expand Up @@ -1045,6 +1045,13 @@ spec:
- zipfile
javaTypes:
- org.apache.camel.dataformat.zipfile.ZipFileDataFormat
camel-quarkus-grok:
groupId: org.apache.camel.quarkus
artifactId: camel-quarkus-grok
dataformats:
- grok
javaTypes:
- org.apache.camel.component.grok.GrokDataFormat
camel-quarkus-servlet:
groupId: org.apache.camel.quarkus
artifactId: camel-quarkus-servlet
Expand Down Expand Up @@ -1128,6 +1135,15 @@ spec:
- org.apache.camel.component.openstack.neutron.NeutronComponent
- org.apache.camel.component.openstack.nova.NovaComponent
- org.apache.camel.component.openstack.swift.SwiftComponent
camel-quarkus-jpa:
groupId: org.apache.camel.quarkus
artifactId: camel-quarkus-jpa
schemes:
- id: jpa
http: false
passive: false
javaTypes:
- org.apache.camel.component.jpa.JpaComponent
camel-quarkus-consul:
groupId: org.apache.camel.quarkus
artifactId: camel-quarkus-consul
Expand Down
8 changes: 4 additions & 4 deletions deploy/resources.go

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions e2e/support/test_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ import (
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
eventing "knative.dev/eventing/pkg/apis/eventing/v1alpha1"
messagingv1alpha1 "knative.dev/eventing/pkg/apis/messaging/v1alpha1"
messagingv1beta1 "knative.dev/eventing/pkg/apis/messaging/v1beta1"
eventing "knative.dev/eventing/pkg/apis/eventing/v1beta1"
messaging "knative.dev/eventing/pkg/apis/messaging/v1beta1"
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"

// let's enable addons in all tests
Expand Down Expand Up @@ -881,10 +880,10 @@ func CreateKamelPod(ns string, name string, command ...string) error {

func CreateKnativeChannelv1Alpha1(ns string, name string) func() error {
return func() error {
channel := messagingv1alpha1.InMemoryChannel{
channel := messaging.InMemoryChannel{
TypeMeta: metav1.TypeMeta{
Kind: "InMemoryChannel",
APIVersion: messagingv1alpha1.SchemeGroupVersion.String(),
APIVersion: messaging.SchemeGroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Namespace: ns,
Expand All @@ -897,10 +896,10 @@ func CreateKnativeChannelv1Alpha1(ns string, name string) func() error {

func CreateKnativeChannelv1Beta1(ns string, name string) func() error {
return func() error {
channel := messagingv1beta1.InMemoryChannel{
channel := messaging.InMemoryChannel{
TypeMeta: metav1.TypeMeta{
Kind: "InMemoryChannel",
APIVersion: messagingv1beta1.SchemeGroupVersion.String(),
APIVersion: messaging.SchemeGroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Namespace: ns,
Expand Down
2 changes: 1 addition & 1 deletion e2e/yaks/knative/source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------

apiVersion: sources.knative.dev/v1alpha1
apiVersion: sources.knative.dev/v1alpha2
kind: CamelSource
metadata:
name: camel-timer-source
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ require (
k8s.io/apimachinery v0.18.2
k8s.io/client-go v12.0.0+incompatible
k8s.io/gengo v0.0.0-20200205140755-e0e292d8aa12
knative.dev/eventing v0.15.0
knative.dev/pkg v0.0.0-20200519155757-14eb3ae3a5a7
knative.dev/serving v0.15.0
knative.dev/eventing v0.16.2
knative.dev/pkg v0.0.0-20200702222342-ea4d6e985ba0
knative.dev/serving v0.16.0
sigs.k8s.io/controller-runtime v0.5.2
)

// Pinned to Kubernetes 1.17.6:
// - Knative 0.15.0 requires 1.16.4
// Pinned to Kubernetes 0.17.6:
// - Knative 0.16.0 requires 0.17.6
// - Operator SDK 0.17.1 requires 1.17.4
replace (
github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.2+incompatible // Required by OLM
Expand Down
Loading

0 comments on commit a4f59ad

Please sign in to comment.