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 fabric8io#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 committed Aug 25, 2022
1 parent 16f4521 commit c36ff10
Show file tree
Hide file tree
Showing 34 changed files with 3,402 additions and 1,857 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Fix #4259: Java Generator's CR should have Lombok's `@EqualsAndHashCode` with `callSuper = true`

#### 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,11 @@ 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 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
32 changes: 19 additions & 13 deletions extensions/knative/generator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,30 @@ module github.com/fabric8io/kubernetes-client/extensions/knative/generator

require (
github.com/fabric8io/kubernetes-client/generator v0.0.0
github.com/robfig/cron v1.2.0 // indirect
k8s.io/apimachinery v0.19.7
knative.dev/eventing v0.23.0
knative.dev/eventing-contrib v0.17.8
knative.dev/pkg v0.0.0-20210526081028-980a33719a10
knative.dev/serving v0.23.0
k8s.io/apimachinery v0.23.9
knative.dev/eventing v0.34.1
knative.dev/eventing-awssqs v0.28.0
knative.dev/eventing-couchdb v0.28.0
knative.dev/eventing-github v0.34.0
knative.dev/eventing-gitlab v0.34.0
knative.dev/eventing-kafka v0.34.0
knative.dev/eventing-prometheus v0.28.0
knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15
knative.dev/serving v0.34.0
)

replace (
github.com/fabric8io/kubernetes-client/generator v0.0.0 => ./../../../generator
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.3
k8s.io/apimachinery => k8s.io/apimachinery v0.19.7
k8s.io/client-go => k8s.io/client-go v0.19.7
)

exclude (
github.com/apache/camel-k v0.0.0-20200430164844-778ae8a2bd63
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.5.5
k8s.io/apimachinery => k8s.io/apimachinery v0.23.9
k8s.io/client-go => k8s.io/client-go v0.23.9
github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2
gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.4.0
github.com/containerd/containerd => github.com/containerd/containerd v1.6.0
github.com/docker/distribution => github.com/docker/distribution v2.8.0+incompatible
github.com/opencontainers/image-spec => github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198
)

exclude github.com/apache/camel-k v0.0.0-20200430164844-778ae8a2bd63

go 1.13
Loading

0 comments on commit c36ff10

Please sign in to comment.