Skip to content

Commit

Permalink
fix (extensions/camel-k) : Update Camel-K model to v1.9.2 (fabric8io#…
Browse files Browse the repository at this point in the history
…4327)

+ Bump Camel-K model to v1.9.2
+ Force gogo/protobuf and gopkg.in/yaml.v2 dependencies to not use
  vulnerable versions

Signed-off-by: Rohan Kumar <[email protected]>
  • Loading branch information
rohanKanojia committed Aug 26, 2022
1 parent 0308e29 commit 6898336
Show file tree
Hide file tree
Showing 14 changed files with 595 additions and 3,917 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#### Dependency Upgrade
* Bump Knative model to v0.34.0
* Bump Apache Camel-K to v1.9.2

#### New Features
* Fix #2271: Support periodic refresh of access tokens before they expire
Expand Down
22 changes: 12 additions & 10 deletions extensions/camel-k/generator-v1/go.mod
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
module github.com/fabric8io/kubernetes-client/extensions/camel-k/generator

require (
contrib.go.opencensus.io/exporter/stackdriver v0.13.2 // indirect
github.com/apache/camel-k v1.8.2 // indirect
github.com/apache/camel-k/pkg/apis/camel v1.8.2
github.com/apache/camel-k/pkg/apis/camel v1.9.2
github.com/fabric8io/kubernetes-client/generator v0.0.0
github.com/tektoncd/pipeline v0.13.1-0.20200625065359-44f22a067b75 // indirect
k8s.io/apimachinery v0.21.4
knative.dev/pkg v0.0.0-20211206113427-18589ac7627e
knative.dev/test-infra v0.0.0-20200921012245-37f1a12adbd3 // indirect
github.com/google/go-cmp v0.5.7 // indirect
github.com/stretchr/testify v1.7.1 // indirect
golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
k8s.io/apimachinery v0.23.8
knative.dev/pkg v0.0.0-20220705130606-e60d250dc637
)

replace (
github.com/fabric8io/kubernetes-client/generator v0.0.0 => ./../../../generator
github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2
github.com/openshift/api => github.com/openshift/api v3.9.1-0.20190927182313-d4a64ec2cbd8+incompatible
k8s.io/api => k8s.io/api v0.21.4
k8s.io/apimachinery => k8s.io/apimachinery v0.21.4
k8s.io/client-go => k8s.io/client-go v0.21.4
k8s.io/api => k8s.io/api v0.23.8
k8s.io/apimachinery => k8s.io/apimachinery v0.23.8
k8s.io/client-go => k8s.io/client-go v0.23.8
)

exclude github.com/mikefarah/yaml/v2 v2.4.0
Expand Down
2,042 changes: 115 additions & 1,927 deletions extensions/camel-k/generator-v1/go.sum

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func main() {
reflect.TypeOf(apis.URL{}): "java.lang.String",
reflect.TypeOf(apis.VolatileTime{}): "java.lang.String",
reflect.TypeOf(runtime.RawExtension{}): "java.util.Map<String, Object>",
reflect.TypeOf(v1.Template{}): "java.util.Map<String, Object>",
reflect.TypeOf(v1alpha1.Template{}): "java.util.Map<String, Object>",
reflect.TypeOf(v1alpha1.JSON{}): "com.fasterxml.jackson.databind.JsonNode",
reflect.TypeOf(v1alpha1.EndpointProperties{}): "java.util.Map<String, Object>",
}
Expand Down
20 changes: 13 additions & 7 deletions extensions/camel-k/generator-v1alpha1/go.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
module github.com/fabric8io/kubernetes-client/extensions/camel-k/generator

require (
github.com/apache/camel-k v1.8.2 // indirect
github.com/apache/camel-k/pkg/apis/camel v1.8.2
github.com/apache/camel-k/pkg/apis/camel v1.9.2
github.com/fabric8io/kubernetes-client/generator v0.0.0
k8s.io/apimachinery v0.21.4
knative.dev/pkg v0.0.0-20211206113427-18589ac7627e
github.com/google/go-cmp v0.5.7 // indirect
github.com/stretchr/testify v1.7.1 // indirect
golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
k8s.io/apimachinery v0.23.8
knative.dev/pkg v0.0.0-20220705130606-e60d250dc637
)

replace (
github.com/fabric8io/kubernetes-client/generator v0.0.0 => ./../../../generator
github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2
github.com/openshift/api => github.com/openshift/api v3.9.1-0.20190927182313-d4a64ec2cbd8+incompatible
k8s.io/api => k8s.io/api v0.21.4
k8s.io/apimachinery => k8s.io/apimachinery v0.21.4
k8s.io/client-go => k8s.io/client-go v0.21.4
gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.4.0
k8s.io/api => k8s.io/api v0.23.8
k8s.io/apimachinery => k8s.io/apimachinery v0.23.8
k8s.io/client-go => k8s.io/client-go v0.23.8
)

exclude github.com/mikefarah/yaml/v2 v2.4.0
Expand Down
1,967 changes: 115 additions & 1,852 deletions extensions/camel-k/generator-v1alpha1/go.sum

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
Expand Down Expand Up @@ -71,19 +72,22 @@ public class CamelLoader implements KubernetesResource
{

@JsonProperty("artifactId")
private String artifactId;
private java.lang.String artifactId;
@JsonProperty("dependencies")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<MavenArtifact> dependencies = new ArrayList<MavenArtifact>();
@JsonProperty("groupId")
private String groupId;
private java.lang.String groupId;
@JsonProperty("languages")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<String> languages = new ArrayList<String>();
private List<java.lang.String> languages = new ArrayList<java.lang.String>();
@JsonProperty("metadata")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private Map<String, String> metadata = new LinkedHashMap<String, String>();
@JsonProperty("version")
private String version;
private java.lang.String version;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
private Map<java.lang.String, Object> additionalProperties = new HashMap<java.lang.String, Object>();

/**
* No args constructor for use in serialization
Expand All @@ -94,28 +98,30 @@ public CamelLoader() {

/**
*
* @param metadata
* @param languages
* @param groupId
* @param artifactId
* @param version
* @param dependencies
*/
public CamelLoader(String artifactId, List<MavenArtifact> dependencies, String groupId, List<String> languages, String version) {
public CamelLoader(java.lang.String artifactId, List<MavenArtifact> dependencies, java.lang.String groupId, List<java.lang.String> languages, Map<String, String> metadata, java.lang.String version) {
super();
this.artifactId = artifactId;
this.dependencies = dependencies;
this.groupId = groupId;
this.languages = languages;
this.metadata = metadata;
this.version = version;
}

@JsonProperty("artifactId")
public String getArtifactId() {
public java.lang.String getArtifactId() {
return artifactId;
}

@JsonProperty("artifactId")
public void setArtifactId(String artifactId) {
public void setArtifactId(java.lang.String artifactId) {
this.artifactId = artifactId;
}

Expand All @@ -130,42 +136,52 @@ public void setDependencies(List<MavenArtifact> dependencies) {
}

@JsonProperty("groupId")
public String getGroupId() {
public java.lang.String getGroupId() {
return groupId;
}

@JsonProperty("groupId")
public void setGroupId(String groupId) {
public void setGroupId(java.lang.String groupId) {
this.groupId = groupId;
}

@JsonProperty("languages")
public List<String> getLanguages() {
public List<java.lang.String> getLanguages() {
return languages;
}

@JsonProperty("languages")
public void setLanguages(List<String> languages) {
public void setLanguages(List<java.lang.String> languages) {
this.languages = languages;
}

@JsonProperty("metadata")
public Map<String, String> getMetadata() {
return metadata;
}

@JsonProperty("metadata")
public void setMetadata(Map<String, String> metadata) {
this.metadata = metadata;
}

@JsonProperty("version")
public String getVersion() {
public java.lang.String getVersion() {
return version;
}

@JsonProperty("version")
public void setVersion(String version) {
public void setVersion(java.lang.String version) {
this.version = version;
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
public Map<java.lang.String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
public void setAdditionalProperty(java.lang.String name, Object value) {
this.additionalProperties.put(name, value);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package io.fabric8.camelk.v1;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
Expand Down Expand Up @@ -38,6 +39,7 @@
"apiVersion",
"kind",
"metadata",
"PublishStrategyOptions",
"baseImage",
"buildStrategy",
"kanikoBuildCache",
Expand Down Expand Up @@ -74,28 +76,31 @@
public class IntegrationPlatformBuildSpec implements KubernetesResource
{

@JsonProperty("PublishStrategyOptions")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private Map<String, String> publishStrategyOptions = new LinkedHashMap<String, String>();
@JsonProperty("baseImage")
private String baseImage;
private java.lang.String baseImage;
@JsonProperty("buildStrategy")
private String buildStrategy;
private java.lang.String buildStrategy;
@JsonProperty("kanikoBuildCache")
private Boolean kanikoBuildCache;
@JsonProperty("maven")
private MavenSpec maven;
@JsonProperty("persistentVolumeClaim")
private String persistentVolumeClaim;
private java.lang.String persistentVolumeClaim;
@JsonProperty("publishStrategy")
private String publishStrategy;
private java.lang.String publishStrategy;
@JsonProperty("registry")
private RegistrySpec registry;
@JsonProperty("runtimeProvider")
private String runtimeProvider;
private java.lang.String runtimeProvider;
@JsonProperty("runtimeVersion")
private String runtimeVersion;
private java.lang.String runtimeVersion;
@JsonProperty("timeout")
private Duration timeout;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
private Map<java.lang.String, Object> additionalProperties = new HashMap<java.lang.String, Object>();

/**
* No args constructor for use in serialization
Expand All @@ -115,10 +120,12 @@ public IntegrationPlatformBuildSpec() {
* @param kanikoBuildCache
* @param publishStrategy
* @param persistentVolumeClaim
* @param publishStrategyOptions
* @param timeout
*/
public IntegrationPlatformBuildSpec(String baseImage, String buildStrategy, Boolean kanikoBuildCache, MavenSpec maven, String persistentVolumeClaim, String publishStrategy, RegistrySpec registry, String runtimeProvider, String runtimeVersion, Duration timeout) {
public IntegrationPlatformBuildSpec(Map<String, String> publishStrategyOptions, java.lang.String baseImage, java.lang.String buildStrategy, Boolean kanikoBuildCache, MavenSpec maven, java.lang.String persistentVolumeClaim, java.lang.String publishStrategy, RegistrySpec registry, java.lang.String runtimeProvider, java.lang.String runtimeVersion, Duration timeout) {
super();
this.publishStrategyOptions = publishStrategyOptions;
this.baseImage = baseImage;
this.buildStrategy = buildStrategy;
this.kanikoBuildCache = kanikoBuildCache;
Expand All @@ -131,23 +138,33 @@ public IntegrationPlatformBuildSpec(String baseImage, String buildStrategy, Bool
this.timeout = timeout;
}

@JsonProperty("PublishStrategyOptions")
public Map<String, String> getPublishStrategyOptions() {
return publishStrategyOptions;
}

@JsonProperty("PublishStrategyOptions")
public void setPublishStrategyOptions(Map<String, String> publishStrategyOptions) {
this.publishStrategyOptions = publishStrategyOptions;
}

@JsonProperty("baseImage")
public String getBaseImage() {
public java.lang.String getBaseImage() {
return baseImage;
}

@JsonProperty("baseImage")
public void setBaseImage(String baseImage) {
public void setBaseImage(java.lang.String baseImage) {
this.baseImage = baseImage;
}

@JsonProperty("buildStrategy")
public String getBuildStrategy() {
public java.lang.String getBuildStrategy() {
return buildStrategy;
}

@JsonProperty("buildStrategy")
public void setBuildStrategy(String buildStrategy) {
public void setBuildStrategy(java.lang.String buildStrategy) {
this.buildStrategy = buildStrategy;
}

Expand All @@ -172,22 +189,22 @@ public void setMaven(MavenSpec maven) {
}

@JsonProperty("persistentVolumeClaim")
public String getPersistentVolumeClaim() {
public java.lang.String getPersistentVolumeClaim() {
return persistentVolumeClaim;
}

@JsonProperty("persistentVolumeClaim")
public void setPersistentVolumeClaim(String persistentVolumeClaim) {
public void setPersistentVolumeClaim(java.lang.String persistentVolumeClaim) {
this.persistentVolumeClaim = persistentVolumeClaim;
}

@JsonProperty("publishStrategy")
public String getPublishStrategy() {
public java.lang.String getPublishStrategy() {
return publishStrategy;
}

@JsonProperty("publishStrategy")
public void setPublishStrategy(String publishStrategy) {
public void setPublishStrategy(java.lang.String publishStrategy) {
this.publishStrategy = publishStrategy;
}

Expand All @@ -202,22 +219,22 @@ public void setRegistry(RegistrySpec registry) {
}

@JsonProperty("runtimeProvider")
public String getRuntimeProvider() {
public java.lang.String getRuntimeProvider() {
return runtimeProvider;
}

@JsonProperty("runtimeProvider")
public void setRuntimeProvider(String runtimeProvider) {
public void setRuntimeProvider(java.lang.String runtimeProvider) {
this.runtimeProvider = runtimeProvider;
}

@JsonProperty("runtimeVersion")
public String getRuntimeVersion() {
public java.lang.String getRuntimeVersion() {
return runtimeVersion;
}

@JsonProperty("runtimeVersion")
public void setRuntimeVersion(String runtimeVersion) {
public void setRuntimeVersion(java.lang.String runtimeVersion) {
this.runtimeVersion = runtimeVersion;
}

Expand All @@ -232,12 +249,12 @@ public void setTimeout(Duration timeout) {
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
public Map<java.lang.String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
public void setAdditionalProperty(java.lang.String name, Object value) {
this.additionalProperties.put(name, value);
}

Expand Down
Loading

0 comments on commit 6898336

Please sign in to comment.