Skip to content
New issue

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

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

Already on GitHub? # to your account

jkube: replaces DeploymentConfig with Deployment CR #153

Merged
merged 1 commit into from
Mar 31, 2025
Merged
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
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@
<properties>
<camel-version>4.11.0-SNAPSHOT</camel-version>
<skip.starting.camel.context>false</skip.starting.camel.context>
<jkube-maven-plugin-version>1.17.0</jkube-maven-plugin-version>
<jkube-maven-plugin-version>1.18.1</jkube-maven-plugin-version>
<jkube.generator.from>registry.access.redhat.com/ubi9/openjdk-17:latest</jkube.generator.from>
<jkube.build.switchToDeployment>true</jkube.build.switchToDeployment>
<kafka-avro-serializer-version>7.1.1</kafka-avro-serializer-version>
<reactor-version>3.7.0</reactor-version>
<testcontainers-version>1.20.4</testcontainers-version>
Expand Down
23 changes: 7 additions & 16 deletions saga/ocp-resources/amq-broker-ephemeral.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ items:
targetPort: 61616
selector:
app: amq-broker
deploymentconfig: amq-broker
deployment: amq-broker
type: ClusterIP
- apiVersion: image.openshift.io/v1
kind: ImageStream
Expand All @@ -41,8 +41,8 @@ items:
name: "latest"
referencePolicy:
type: Source
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
- apiVersion: apps/v1
kind: Deployment
metadata:
generation: 1
labels:
Expand All @@ -52,16 +52,17 @@ items:
spec:
replicas: 1
selector:
app: amq-broker
deploymentconfig: amq-broker
matchLabels:
app: amq-broker
deployment: amq-broker
strategy:
type: Recreate
template:
metadata:
labels:
app: amq-broker
csbexample: saga
deploymentconfig: amq-broker
deployment: amq-broker
spec:
containers:
- imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -91,16 +92,6 @@ items:
port: 8161
scheme: HTTP
initialDelaySeconds: 10
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- amq-broker
from:
kind: ImageStreamTag
name: "amq-broker:latest"
type: ImageChange
- kind: Route
apiVersion: route.openshift.io/v1
metadata:
Expand Down
25 changes: 8 additions & 17 deletions saga/ocp-resources/amq-broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ items:
targetPort: 61616
selector:
app: amq-broker
deploymentconfig: amq-broker
deployment: amq-broker
type: ClusterIP
- apiVersion: v1
kind: PersistentVolumeClaim
Expand Down Expand Up @@ -48,14 +48,14 @@ items:
tags:
- from:
kind: DockerImage
name: registry.redhat.io/amq7/amq-broker-rhel8:7.11.0
name: registry.redhat.io/amq7/amq-broker-rhel8:7.12
generation: 0
importPolicy: {}
name: "latest"
referencePolicy:
type: Source
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
- apiVersion: apps/v1
kind: Deployment
metadata:
generation: 1
labels:
Expand All @@ -65,16 +65,17 @@ items:
spec:
replicas: 1
selector:
app: amq-broker
deploymentconfig: amq-broker
matchLabels:
app: amq-broker
deployment: amq-broker
strategy:
type: Recreate
template:
metadata:
labels:
app: amq-broker
csbexample: saga
deploymentconfig: amq-broker
deployment: amq-broker
spec:
containers:
- imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -113,16 +114,6 @@ items:
- name: amq-broker-data
persistentVolumeClaim:
claimName: amq-broker
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- amq-broker
from:
kind: ImageStreamTag
name: "amq-broker:latest"
type: ImageChange
- kind: Route
apiVersion: route.openshift.io/v1
metadata:
Expand Down
24 changes: 8 additions & 16 deletions saga/ocp-resources/lra-coordinator-ephemeral.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ items:
targetPort: 8080
selector:
app: lra-coordinator
deploymentconfig: lra-coordinator
deployment: lra-coordinator
type: ClusterIP
- apiVersion: image.openshift.io/v1
kind: ImageStream
Expand All @@ -37,8 +37,8 @@ items:
name: "latest"
referencePolicy:
type: Source
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
- apiVersion: apps/v1
kind: Deployment
metadata:
generation: 1
labels:
Expand All @@ -48,19 +48,21 @@ items:
spec:
replicas: 1
selector:
app: lra-coordinator
deploymentconfig: lra-coordinator
matchLabels:
app: lra-coordinator
deployment: lra-coordinator
strategy:
type: Recreate
template:
metadata:
labels:
app: lra-coordinator
csbexample: saga
deploymentconfig: lra-coordinator
deployment: lra-coordinator
spec:
containers:
- imagePullPolicy: IfNotPresent
image: "lra-coordinator:latest"
env:
- name: AB_JOLOKIA_OFF
value: "true"
Expand All @@ -86,13 +88,3 @@ items:
volumes:
- name: lra-coordinator-data
emptyDir: {}
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- lra-coordinator
from:
kind: ImageStreamTag
name: "lra-coordinator:latest"
type: ImageChange
24 changes: 8 additions & 16 deletions saga/ocp-resources/lra-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ items:
targetPort: 8080
selector:
app: lra-coordinator
deploymentconfig: lra-coordinator
deployment: lra-coordinator
type: ClusterIP
- apiVersion: v1
kind: PersistentVolumeClaim
Expand Down Expand Up @@ -50,8 +50,8 @@ items:
name: "latest"
referencePolicy:
type: Source
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
- apiVersion: apps/v1
kind: Deployment
metadata:
generation: 1
labels:
Expand All @@ -61,19 +61,21 @@ items:
spec:
replicas: 1
selector:
app: lra-coordinator
deploymentconfig: lra-coordinator
matchLabels:
app: lra-coordinator
deployment: lra-coordinator
strategy:
type: Recreate
template:
metadata:
labels:
app: lra-coordinator
csbexample: saga
deploymentconfig: lra-coordinator
deployment: lra-coordinator
spec:
containers:
- imagePullPolicy: IfNotPresent
image: "lra-coordinator:latest"
env:
- name: AB_JOLOKIA_OFF
value: "true"
Expand All @@ -100,13 +102,3 @@ items:
- name: lra-coordinator-data
persistentVolumeClaim:
claimName: lra-coordinator
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- lra-coordinator
from:
kind: ImageStreamTag
name: "lra-coordinator:latest"
type: ImageChange
11 changes: 0 additions & 11 deletions saga/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>openshift-maven-plugin</artifactId>
<groupId>org.eclipse.jkube</groupId>
<version>${jkube-maven-plugin-version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
2 changes: 1 addition & 1 deletion saga/readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ tail logs of the application:

[source,shell]
----
oc logs -f deploymentconfig/camel-example-spring-boot-saga-payment
oc logs -f deployment/camel-example-spring-boot-saga-payment
----

=== Running on local environment
Expand Down