Skip to content

Commit

Permalink
fix (extensions/knative) : Bump Knative model to v0.34.0
Browse files Browse the repository at this point in the history
Related to #4327

+ Update Knative Model to v0.34.0
+ Force indirect dependency github.com/gogo/protobuf v1.3.2 in go.mod
+ Force indirect dependency gopkg.in/yaml.v2 to v2.4.0
+ Force indirect dependency github.com/containerd/containerd to v1.6.0
+ Force indirect dependency github.com/docker/distribution to v2.8.0+incompatible
+ Force indirect dependency github.com/opencontainers/image-spec to v1.0.3-0.20220114050600-8b9d41f48198

Signed-off-by: Rohan Kumar <[email protected]>
  • Loading branch information
rohanKanojia authored and manusa committed Aug 26, 2022
1 parent aad03e2 commit 0308e29
Show file tree
Hide file tree
Showing 34 changed files with 3,434 additions and 1,858 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* Fix #4318: implemented LeaderElection releaseOnCancel

#### Dependency Upgrade
* Bump Knative model to v0.34.0

#### New Features
* Fix #2271: Support periodic refresh of access tokens before they expire
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
import io.fabric8.knative.serving.v1.RouteList;
import io.fabric8.knative.serving.v1.Service;
import io.fabric8.knative.serving.v1.ServiceList;
import io.fabric8.knative.serving.v1beta1.DomainMapping;
import io.fabric8.knative.serving.v1beta1.DomainMappingList;
import io.fabric8.knative.sources.v1.ApiServerSource;
import io.fabric8.knative.sources.v1.ApiServerSourceList;
import io.fabric8.knative.sources.v1.ContainerSource;
Expand Down Expand Up @@ -122,6 +124,11 @@ public MixedOperation<Configuration, ConfigurationList, Resource<Configuration>>
return resources(Configuration.class, ConfigurationList.class);
}

@Override
public MixedOperation<DomainMapping, DomainMappingList, Resource<DomainMapping>> domainMappings() {
return resources(DomainMapping.class, DomainMappingList.class);
}

@Override
public MixedOperation<Broker, BrokerList, Resource<Broker>> brokers() {
return resources(Broker.class, BrokerList.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
import io.fabric8.knative.serving.v1.RouteList;
import io.fabric8.knative.serving.v1.Service;
import io.fabric8.knative.serving.v1.ServiceList;
import io.fabric8.knative.serving.v1beta1.DomainMapping;
import io.fabric8.knative.serving.v1beta1.DomainMappingList;
import io.fabric8.knative.sources.v1.ApiServerSource;
import io.fabric8.knative.sources.v1.ApiServerSourceList;
import io.fabric8.knative.sources.v1.ContainerSource;
Expand Down Expand Up @@ -105,6 +107,12 @@ public interface KnativeClient extends Client {
*/
MixedOperation<Configuration, ConfigurationList, Resource<Configuration>> configurations();

/**
* API entrypoint for DomainMapping (serving.knative.dev/v1beta1)
*
* @return MixedOperation for DomainMapping class
*/
MixedOperation<DomainMapping, DomainMappingList, Resource<DomainMapping>> domainMappings();

//Eventing
/**
Expand All @@ -113,12 +121,14 @@ public interface KnativeClient extends Client {
* @return MixedOperation for Broker class
*/
MixedOperation<Broker, BrokerList, Resource<Broker>> brokers();

/**
* API entrypoint for Trigger(eventing.knative.dev/v1)
*
* @return MixedOperation for Trigger class
*/
MixedOperation<Trigger, TriggerList, Resource<Trigger>> triggers();

/**
* API entrypoint for EventType(eventing.knative.dev/v1)
*
Expand All @@ -133,12 +143,14 @@ public interface KnativeClient extends Client {
* @return MixedOperation for Channel class
*/
MixedOperation<Channel, ChannelList, Resource<Channel>> channels();

/**
* API entrypoint for Subscription(messaging.knative.dev/v1)
*
* @return MixedOperation for Subscription class
*/
MixedOperation<Subscription, SubscriptionList, Resource<Subscription>> subscriptions();

/**
* API entrypoint for Sequence(flows.knative.dev/v1)
*
Expand All @@ -152,6 +164,7 @@ public interface KnativeClient extends Client {
* @return MixedOperation for Parallel class
*/
MixedOperation<Parallel, ParallelList, Resource<Parallel>> parallels();

/**
* API entrypoint for InMemoryChannel(messaging.knative.dev/v1)
*
Expand All @@ -163,76 +176,99 @@ public interface KnativeClient extends Client {

/**
* API entrypoint for PingSource(sources.knative.dev/v1beta1)
*
* @return MixedOperation for PingSource class
*/
MixedOperation<PingSource, PingSourceList, Resource<PingSource>> pingSources();

/**
* API entrypoint for SinkBinding(sources.knative.dev/v1beta1)
*
* @return MixedOperation for SinkBinding class
*/
MixedOperation<SinkBinding, SinkBindingList, Resource<SinkBinding>> sinkBindings();

/**
* API entrypoint for ContainerSource(sources.knative.dev/v1beta1)
*
* @return MixedOperation for ContainerSource class
*/
MixedOperation<ContainerSource, ContainerSourceList, Resource<ContainerSource>> containerSources();

/**
* API entrypoint for ApiServerSource(sources.knative.dev/v1beta1)
*
* @return MixedOperation for ApiServerSource class
*/
MixedOperation<ApiServerSource, ApiServerSourceList, Resource<ApiServerSource>> apiServerSources();


// Eventing Contrib
/**
* API entrypoint for AwsSqsSource(sources.knative.dev/v1alpha1)
*
* @return MixedOperation for AwsSqsSource class
*/
MixedOperation<AwsSqsSource, AwsSqsSourceList, Resource<AwsSqsSource>> awsSqsSources();

/**
* API entrypoint for CouchDbSource(sources.knative.dev/v1alpha1)
*
* @return MixedOperation for CouchDbSource class
*/
MixedOperation<CouchDbSource, CouchDbSourceList, Resource<CouchDbSource>> couchDbSources();

/**
* API entrypoint for GitHubSource(sources.knative.dev/v1alpha1)
*
* @return MixedOperation for GitHubSource class
*/
MixedOperation<GitHubSource, GitHubSourceList, Resource<GitHubSource>> gitHubSources();

/**
* API entrypoint for GitHubBinding(bindings.knative.dev/v1alpha1)
*
* @return MixedOperation for GitHubBinding class
*/
MixedOperation<GitHubBinding, GitHubBindingList, Resource<GitHubBinding>> gitHubBindings();

/**
* API entrypoint for GitLabSource(sources.knative.dev/v1alpha1)
*
* @return MixedOperation for GitLabSource class
*/
MixedOperation<GitLabSource, GitLabSourceList, Resource<GitLabSource>> gitLabSources();

/**
* API entrypoint for GitLabBinding(bindings.knative.dev/v1alpha1)
*
* @return MixedOperation for GitLabBinding class
*/
MixedOperation<GitLabBinding, GitLabBindingList, Resource<GitLabBinding>> gitLabBindings();

/**
* API entrypoint for PrometheusSource(sources.knative.dev/v1alpha1)
*
* @return MixedOperation for PrometheusSource class
*/
MixedOperation<PrometheusSource, PrometheusSourceList, Resource<PrometheusSource>> prometheusSources();

/**
* API entrypoint for KafkaChannel(messaging.knative.dev/v1beta)
*
* @return MixedOperation for KafkaChannel class
*/
MixedOperation<KafkaChannel, KafkaChannelList, Resource<KafkaChannel>> kafkaChannels();

/**
* API entrypoint for KafkaSource(sources.knative.dev/v1beta1)
*
* @return MixedOperation for KafkaSource class
*/
MixedOperation<KafkaSource, KafkaSourceList, Resource<KafkaSource>> kafkasSources();

/**
* API entrypoint for KafkaBinding(bindings.knative.dev/v1beta1)
*
* @return MixedOperation for KafkaBinding class
*/
MixedOperation<KafkaBinding, KafkaBindingList, Resource<KafkaBinding>> kafkaBindings();
Expand Down
93 changes: 48 additions & 45 deletions extensions/knative/generator/cmd/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,25 @@ package main
import (
"fmt"
"github.com/fabric8io/kubernetes-client/generator/pkg/schemagen"
"k8s.io/apimachinery/pkg/runtime"
awssqs_source "knative.dev/eventing-awssqs/pkg/apis/sources/v1alpha1"
couchdb_source "knative.dev/eventing-couchdb/source/pkg/apis/sources/v1alpha1"
github_binding "knative.dev/eventing-github/pkg/apis/bindings/v1alpha1"
github_source "knative.dev/eventing-github/pkg/apis/sources/v1alpha1"
gitlab_binding "knative.dev/eventing-gitlab/pkg/apis/bindings/v1alpha1"
gitlab_source "knative.dev/eventing-gitlab/pkg/apis/sources/v1alpha1"
kafka_binding "knative.dev/eventing-kafka/pkg/apis/bindings/v1beta1"
kafka_channel "knative.dev/eventing-kafka/pkg/apis/messaging/v1beta1"
kafka_source "knative.dev/eventing-kafka/pkg/apis/sources/v1beta1"
prometheus_source "knative.dev/eventing-prometheus/pkg/apis/sources/v1alpha1"
eventing_v1 "knative.dev/eventing/pkg/apis/eventing/v1"
eventing_v1beta1 "knative.dev/eventing/pkg/apis/eventing/v1beta1"
serving_v1 "knative.dev/serving/pkg/apis/serving/v1"
"k8s.io/apimachinery/pkg/runtime"
flows_v1 "knative.dev/eventing/pkg/apis/flows/v1"
messaging_v1 "knative.dev/eventing/pkg/apis/messaging/v1"
source_v1 "knative.dev/eventing/pkg/apis/sources/v1"
kafka_channel "knative.dev/eventing-contrib/kafka/channel/pkg/apis/messaging/v1beta1"
kafka_source "knative.dev/eventing-contrib/kafka/source/pkg/apis/sources/v1beta1"
kafka_binding "knative.dev/eventing-contrib/kafka/source/pkg/apis/bindings/v1beta1"
awssqs_source "knative.dev/eventing-contrib/awssqs/pkg/apis/sources/v1alpha1"
couchdb_source "knative.dev/eventing-contrib/couchdb/source/pkg/apis/sources/v1alpha1"
github_source "knative.dev/eventing-contrib/github/pkg/apis/sources/v1alpha1"
github_binding "knative.dev/eventing-contrib/github/pkg/apis/bindings/v1alpha1"
gitlab_source "knative.dev/eventing-contrib/gitlab/pkg/apis/sources/v1alpha1"
gitlab_binding "knative.dev/eventing-contrib/gitlab/pkg/apis/bindings/v1alpha1"
prometheus_source "knative.dev/eventing-contrib/prometheus/pkg/apis/sources/v1alpha1"
"knative.dev/pkg/apis"
serving_v1 "knative.dev/serving/pkg/apis/serving/v1"
serving_v1beta1 "knative.dev/serving/pkg/apis/serving/v1beta1"
"reflect"
)

Expand All @@ -45,34 +46,35 @@ func main() {
// no other types need to be defined as they are auto discovered
crdLists := map[reflect.Type]schemagen.CrdScope{
// serving v1
reflect.TypeOf(serving_v1.ServiceList{}): schemagen.Namespaced,
reflect.TypeOf(serving_v1.RouteList{}): schemagen.Namespaced,
reflect.TypeOf(serving_v1.RevisionList{}): schemagen.Namespaced,
reflect.TypeOf(serving_v1.ConfigurationList{}): schemagen.Namespaced,
reflect.TypeOf(serving_v1.ServiceList{}): schemagen.Namespaced,
reflect.TypeOf(serving_v1.RouteList{}): schemagen.Namespaced,
reflect.TypeOf(serving_v1.RevisionList{}): schemagen.Namespaced,
reflect.TypeOf(serving_v1.ConfigurationList{}): schemagen.Namespaced,
reflect.TypeOf(serving_v1beta1.DomainMappingList{}): schemagen.Namespaced,

// eventing v1
reflect.TypeOf(eventing_v1.BrokerList{}): schemagen.Namespaced,
reflect.TypeOf(eventing_v1.TriggerList{}): schemagen.Namespaced,
reflect.TypeOf(eventing_v1.BrokerList{}): schemagen.Namespaced,
reflect.TypeOf(eventing_v1.TriggerList{}): schemagen.Namespaced,

// eventing v1beta1
reflect.TypeOf(eventing_v1beta1.EventTypeList{}): schemagen.Namespaced,

// eventing source v1
reflect.TypeOf(source_v1.PingSourceList{}): schemagen.Namespaced,
reflect.TypeOf(source_v1.SinkBindingList{}): schemagen.Namespaced,
reflect.TypeOf(source_v1.PingSourceList{}): schemagen.Namespaced,
reflect.TypeOf(source_v1.SinkBindingList{}): schemagen.Namespaced,
reflect.TypeOf(source_v1.ContainerSourceList{}): schemagen.Namespaced,
reflect.TypeOf(source_v1.ApiServerSourceList{}): schemagen.Namespaced,

// eventing contrib v1alpha1
reflect.TypeOf(kafka_channel.KafkaChannelList{}): schemagen.Namespaced,
reflect.TypeOf(kafka_source.KafkaSourceList{}): schemagen.Namespaced,
reflect.TypeOf(kafka_binding.KafkaBindingList{}): schemagen.Namespaced,
reflect.TypeOf(awssqs_source.AwsSqsSourceList{}): schemagen.Namespaced,
reflect.TypeOf(couchdb_source.CouchDbSourceList{}): schemagen.Namespaced,
reflect.TypeOf(github_source.GitHubSourceList{}): schemagen.Namespaced,
reflect.TypeOf(github_binding.GitHubBindingList{}): schemagen.Namespaced,
reflect.TypeOf(gitlab_source.GitLabSourceList{}): schemagen.Namespaced,
reflect.TypeOf(gitlab_binding.GitLabBindingList{}): schemagen.Namespaced,
reflect.TypeOf(kafka_channel.KafkaChannelList{}): schemagen.Namespaced,
reflect.TypeOf(kafka_source.KafkaSourceList{}): schemagen.Namespaced,
reflect.TypeOf(kafka_binding.KafkaBindingList{}): schemagen.Namespaced,
reflect.TypeOf(awssqs_source.AwsSqsSourceList{}): schemagen.Namespaced,
reflect.TypeOf(couchdb_source.CouchDbSourceList{}): schemagen.Namespaced,
reflect.TypeOf(github_source.GitHubSourceList{}): schemagen.Namespaced,
reflect.TypeOf(github_binding.GitHubBindingList{}): schemagen.Namespaced,
reflect.TypeOf(gitlab_source.GitLabSourceList{}): schemagen.Namespaced,
reflect.TypeOf(gitlab_binding.GitLabBindingList{}): schemagen.Namespaced,
reflect.TypeOf(prometheus_source.PrometheusSourceList{}): schemagen.Namespaced,

// messaging v1
Expand Down Expand Up @@ -103,22 +105,23 @@ func main() {
// mapping of go packages of this module to the resulting java package
// optional ApiGroup and ApiVersion for the go package (which is added to the generated java class)
packageMapping := map[string]schemagen.PackageInformation{
"knative.dev/serving/pkg/apis/serving/v1": {JavaPackage: "io.fabric8.knative.serving.v1", ApiGroup: "serving.knative.dev", ApiVersion: "v1"},
"knative.dev/eventing/pkg/apis/eventing/v1": {JavaPackage: "io.fabric8.knative.eventing.v1", ApiGroup: "eventing.knative.dev", ApiVersion: "v1"},
"knative.dev/eventing/pkg/apis/eventing/v1beta1": {JavaPackage: "io.fabric8.knative.eventing.v1beta1", ApiGroup: "eventing.knative.dev", ApiVersion: "v1beta1"},
"knative.dev/eventing/pkg/apis/messaging/v1": {JavaPackage: "io.fabric8.knative.messaging.v1", ApiGroup: "messaging.knative.dev", ApiVersion: "v1"},
"knative.dev/eventing/pkg/apis/flows/v1": {JavaPackage: "io.fabric8.knative.flows.v1", ApiGroup: "flows.knative.dev", ApiVersion: "v1"},
"knative.dev/eventing/pkg/apis/sources/v1": {JavaPackage: "io.fabric8.knative.sources.v1", ApiGroup: "sources.knative.dev", ApiVersion: "v1"},
"knative.dev/eventing-contrib/kafka/channel/pkg/apis/messaging/v1beta1": {JavaPackage: "io.fabric8.knative.eventing.contrib.kafka.v1beta1", ApiGroup: "messaging.knative.dev", ApiVersion: "v1beta1"},
"knative.dev/eventing-contrib/kafka/source/pkg/apis/sources/v1beta1": {JavaPackage: "io.fabric8.knative.eventing.contrib.kafka.v1beta1", ApiGroup: "sources.knative.dev", ApiVersion: "v1beta1"},
"knative.dev/eventing-contrib/kafka/source/pkg/apis/bindings/v1beta1": {JavaPackage: "io.fabric8.knative.eventing.contrib.kafka.v1beta1", ApiGroup: "bindings.knative.dev", ApiVersion: "v1beta1"},
"knative.dev/eventing-contrib/awssqs/pkg/apis/sources/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.awssqs.v1alpha1", ApiGroup: "sources.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/eventing-contrib/couchdb/source/pkg/apis/sources/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.couchdb.v1alpha1", ApiGroup: "sources.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/eventing-contrib/github/pkg/apis/sources/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.github.v1alpha1", ApiGroup: "sources.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/eventing-contrib/github/pkg/apis/bindings/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.github.v1alpha1", ApiGroup: "bindings.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/eventing-contrib/gitlab/pkg/apis/sources/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.gitlab.v1alpha1", ApiGroup: "sources.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/eventing-contrib/gitlab/pkg/apis/bindings/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.gitlab.v1alpha1", ApiGroup: "bindings.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/eventing-contrib/prometheus/pkg/apis/sources/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.prometheus.v1alpha1", ApiGroup: "sources.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/serving/pkg/apis/serving/v1": {JavaPackage: "io.fabric8.knative.serving.v1", ApiGroup: "serving.knative.dev", ApiVersion: "v1"},
"knative.dev/serving/pkg/apis/serving/v1beta1": {JavaPackage: "io.fabric8.knative.serving.v1beta1", ApiGroup: "serving.knative.dev", ApiVersion: "v1beta1"},
"knative.dev/eventing/pkg/apis/eventing/v1": {JavaPackage: "io.fabric8.knative.eventing.v1", ApiGroup: "eventing.knative.dev", ApiVersion: "v1"},
"knative.dev/eventing/pkg/apis/eventing/v1beta1": {JavaPackage: "io.fabric8.knative.eventing.v1beta1", ApiGroup: "eventing.knative.dev", ApiVersion: "v1beta1"},
"knative.dev/eventing/pkg/apis/messaging/v1": {JavaPackage: "io.fabric8.knative.messaging.v1", ApiGroup: "messaging.knative.dev", ApiVersion: "v1"},
"knative.dev/eventing/pkg/apis/flows/v1": {JavaPackage: "io.fabric8.knative.flows.v1", ApiGroup: "flows.knative.dev", ApiVersion: "v1"},
"knative.dev/eventing/pkg/apis/sources/v1": {JavaPackage: "io.fabric8.knative.sources.v1", ApiGroup: "sources.knative.dev", ApiVersion: "v1"},
"knative.dev/eventing-kafka/pkg/apis/messaging/v1beta1": {JavaPackage: "io.fabric8.knative.eventing.contrib.kafka.v1beta1", ApiGroup: "messaging.knative.dev", ApiVersion: "v1beta1"},
"knative.dev/eventing-kafka/pkg/apis/sources/v1beta1": {JavaPackage: "io.fabric8.knative.eventing.contrib.kafka.v1beta1", ApiGroup: "sources.knative.dev", ApiVersion: "v1beta1"},
"knative.dev/eventing-kafka/pkg/apis/bindings/v1beta1": {JavaPackage: "io.fabric8.knative.eventing.contrib.kafka.v1beta1", ApiGroup: "bindings.knative.dev", ApiVersion: "v1beta1"},
"knative.dev/eventing-awssqs/pkg/apis/sources/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.awssqs.v1alpha1", ApiGroup: "sources.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/eventing-couchdb/source/pkg/apis/sources/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.couchdb.v1alpha1", ApiGroup: "sources.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/eventing-github/pkg/apis/sources/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.github.v1alpha1", ApiGroup: "sources.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/eventing-github/pkg/apis/bindings/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.github.v1alpha1", ApiGroup: "bindings.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/eventing-gitlab/pkg/apis/sources/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.gitlab.v1alpha1", ApiGroup: "sources.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/eventing-gitlab/pkg/apis/bindings/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.gitlab.v1alpha1", ApiGroup: "bindings.knative.dev", ApiVersion: "v1alpha1"},
"knative.dev/eventing-prometheus/pkg/apis/sources/v1alpha1": {JavaPackage: "io.fabric8.knative.eventing.contrib.prometheus.v1alpha1", ApiGroup: "sources.knative.dev", ApiVersion: "v1alpha1"},
}

// converts all packages starting with <key> to a java package using an automated scheme:
Expand Down
Loading

0 comments on commit 0308e29

Please sign in to comment.