Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Fabric8 kubernetes client to 7.0.1 #69

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion api/pom.xml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fabric8 7 switched the default HTTP client. So I think you need to update the exclude for the OkHttp client to VErt.x client?

Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,14 @@
<!-- Required to generate CRD file -->
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>crd-generator-apt</artifactId>
<artifactId>crd-generator-api-v2</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.sundr</groupId>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this dependency? From the fabric8 release notes it seemed like the old api was based on Sundrio, but not the new one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using sundrio annotations in the kafka-access code (to create builder classes e.g. for KafkaAccess).
We didn't need to add the dependency previously as it was coming in from crd-generator-apt, however as the new crd-generator-api-v2 does not include it, we must now add it to continue using those annotations in the kafka-access code

<artifactId>builder-annotations</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.strimzi</groupId>
<artifactId>api</artifactId>
Expand All @@ -79,4 +84,35 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>crd-generator-maven-plugin</artifactId>
<version>${fabric8.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>crd-generator-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<customResourceClasses>
<customResourceClass>io.strimzi.kafka.access.model.KafkaAccess</customResourceClass>
</customResourceClasses>
<implicitPreserveUnknownFields>true</implicitPreserveUnknownFields>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
2 changes: 1 addition & 1 deletion operator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<!-- Required to generate CRD file -->
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>crd-generator-apt</artifactId>
<artifactId>crd-generator-api-v2</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can get rid of the quotes in some way? Doesn't Fabric8 have some option for it?

Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# Generated by Fabric8 CRDGenerator, manual edits might get overwritten!
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
apiVersion: "apiextensions.k8s.io/v1"
kind: "CustomResourceDefinition"
metadata:
name: kafkaaccesses.access.strimzi.io
name: "kafkaaccesses.access.strimzi.io"
labels:
servicebinding.io/provisioned-service: "true"
spec:
group: access.strimzi.io
group: "access.strimzi.io"
names:
kind: KafkaAccess
plural: kafkaaccesses
kind: "KafkaAccess"
plural: "kafkaaccesses"
shortNames:
- ka
singular: kafkaaccess
scope: Namespaced
- "ka"
singular: "kafkaaccess"
scope: "Namespaced"
versions:
- additionalPrinterColumns:
- jsonPath: .spec.kafka.listener
name: Listener
- jsonPath: ".spec.kafka.listener"
name: "Listener"
priority: 0
type: string
- jsonPath: .spec.kafka.name
name: Cluster
type: "string"
- jsonPath: ".spec.kafka.name"
name: "Cluster"
priority: 0
type: string
- jsonPath: .spec.user.name
name: User
type: "string"
- jsonPath: ".spec.user.name"
name: "User"
priority: 0
type: string
name: v1alpha1
type: "string"
name: "v1alpha1"
schema:
openAPIV3Schema:
properties:
Expand All @@ -37,62 +37,59 @@ spec:
kafka:
properties:
listener:
type: string
type: "string"
name:
type: string
type: "string"
namespace:
type: string
type: "string"
required:
- name
type: object
- "name"
type: "object"
user:
properties:
apiGroup:
type: string
type: "string"
kind:
type: string
type: "string"
name:
type: string
type: "string"
namespace:
type: string
type: "string"
required:
- apiGroup
- kind
- name
type: object
- "apiGroup"
- "kind"
- "name"
type: "object"
required:
- kafka
type: object
- "kafka"
type: "object"
status:
properties:
binding:
properties:
name:
type: string
type: object
type: "string"
type: "object"
conditions:
items:
properties:
additionalProperties:
additionalProperties:
type: object
type: object
lastTransitionTime:
type: string
type: "string"
message:
type: string
type: "string"
reason:
type: string
type: "string"
status:
type: string
type: "string"
type:
type: string
type: object
type: array
type: "string"
type: "object"
x-kubernetes-preserve-unknown-fields: true
type: "array"
observedGeneration:
type: integer
type: object
type: object
type: "integer"
type: "object"
type: "object"
served: true
storage: true
subresources:
Expand Down
97 changes: 47 additions & 50 deletions packaging/install/040-Crd-kafkaaccess.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# Generated by Fabric8 CRDGenerator, manual edits might get overwritten!
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
apiVersion: "apiextensions.k8s.io/v1"
kind: "CustomResourceDefinition"
metadata:
name: kafkaaccesses.access.strimzi.io
name: "kafkaaccesses.access.strimzi.io"
labels:
servicebinding.io/provisioned-service: "true"
spec:
group: access.strimzi.io
group: "access.strimzi.io"
names:
kind: KafkaAccess
plural: kafkaaccesses
kind: "KafkaAccess"
plural: "kafkaaccesses"
shortNames:
- ka
singular: kafkaaccess
scope: Namespaced
- "ka"
singular: "kafkaaccess"
scope: "Namespaced"
versions:
- additionalPrinterColumns:
- jsonPath: .spec.kafka.listener
name: Listener
- jsonPath: ".spec.kafka.listener"
name: "Listener"
priority: 0
type: string
- jsonPath: .spec.kafka.name
name: Cluster
type: "string"
- jsonPath: ".spec.kafka.name"
name: "Cluster"
priority: 0
type: string
- jsonPath: .spec.user.name
name: User
type: "string"
- jsonPath: ".spec.user.name"
name: "User"
priority: 0
type: string
name: v1alpha1
type: "string"
name: "v1alpha1"
schema:
openAPIV3Schema:
properties:
Expand All @@ -37,62 +37,59 @@ spec:
kafka:
properties:
listener:
type: string
type: "string"
name:
type: string
type: "string"
namespace:
type: string
type: "string"
required:
- name
type: object
- "name"
type: "object"
user:
properties:
apiGroup:
type: string
type: "string"
kind:
type: string
type: "string"
name:
type: string
type: "string"
namespace:
type: string
type: "string"
required:
- apiGroup
- kind
- name
type: object
- "apiGroup"
- "kind"
- "name"
type: "object"
required:
- kafka
type: object
- "kafka"
type: "object"
status:
properties:
binding:
properties:
name:
type: string
type: object
type: "string"
type: "object"
conditions:
items:
properties:
additionalProperties:
additionalProperties:
type: object
type: object
lastTransitionTime:
type: string
type: "string"
message:
type: string
type: "string"
reason:
type: string
type: "string"
status:
type: string
type: "string"
type:
type: string
type: object
type: array
type: "string"
type: "object"
x-kubernetes-preserve-unknown-fields: true
type: "array"
observedGeneration:
type: integer
type: object
type: object
type: "integer"
type: "object"
type: "object"
served: true
storage: true
subresources:
Expand Down
18 changes: 16 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@

<!-- Runtime dependencies -->
<javaoperatorsdk.version>4.4.2</javaoperatorsdk.version>
<fabric8.version>6.13.4</fabric8.version>
<fabric8.version>7.0.1</fabric8.version>
<sundrio.version>0.200.0</sundrio.version>
<strimzi.version>0.43.0</strimzi.version>
<kafka.clients.version>3.8.0</kafka.clients.version>
<javax-validation.version>2.0.1.Final</javax-validation.version>
Expand Down Expand Up @@ -204,6 +205,18 @@
<version>${fabric8.version}</version>
</dependency>
<!-- Required to generate CRD file -->
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>crd-generator-api-v2</artifactId>
<version>${fabric8.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.sundr</groupId>
<artifactId>builder-annotations</artifactId>
<scope>compile</scope>
<version>${sundrio.version}</version>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>crd-generator-apt</artifactId>
Expand Down Expand Up @@ -422,10 +435,11 @@
<failOnWarning>true</failOnWarning>
<ignoredDependencies>
<!-- Required to generate CRD file -->
<ignoredDependency>io.fabric8:crd-generator-apt:jar:${fabric8.version}</ignoredDependency>
<ignoredDependency>io.fabric8:crd-generator-api-v2:jar:${fabric8.version}</ignoredDependency>
<ignoredDependency>io.fabric8:generator-annotations:jar:${fabric8.version}</ignoredDependency>
<ignoredDependency>io.fabric8:kubernetes-httpclient-jdk:jar:${fabric8.version}</ignoredDependency>
<ignoredDependency>org.apache.logging.log4j:log4j-slf4j-impl</ignoredDependency>
<ignoredDependency>io.sundr:builder-annotations:jar:${sundrio.version}</ignoredDependency>
</ignoredDependencies>
</configuration>
</execution>
Expand Down
Loading