Skip to content

Commit

Permalink
to-squash
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Jan 3, 2023
1 parent 6a31efa commit 3d00c9d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 52 deletions.
48 changes: 31 additions & 17 deletions quickstarts/maven/tomee/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,32 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jkube.quickstarts.maven</groupId>
<artifactId>tomee</artifactId>
<version>10.0.1</version>
<version>1.10.1</version>
<name>Eclipse JKube :: Quickstarts :: Maven :: Tomee</name>
<packaging>war</packaging>

<description>
Tomee deployment template for JKube
</description>

<properties>
<k8sgroupId>com-example-container</k8sgroupId>
<jkube.enricher.jkube-project-label.app>${k8sgroupId}-${project.artifactId}</jkube.enricher.jkube-project-label.app>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<jkube.version>${project.version}</jkube.version>
<tomee.version>8.0.13</tomee.version>
<tomee.port>8080</tomee.port>
<failOnMissingWebXml>false</failOnMissingWebXml>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<k8sgroupId>com-example-container</k8sgroupId>
<jkube.enricher.jkube-project-label.app>${k8sgroupId}-${project.artifactId}</jkube.enricher.jkube-project-label.app>
<jkube.image.name>${docker.registry}/${project.groupId}.${project.artifactId}:latest</jkube.image.name>
<docker.registry>docker.io</docker.registry>
<proj.hostname>container.example.com</proj.hostname>
<docker.host>hub.docker.com</docker.host>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd_HH-mm</maven.build.timestamp.format>
<work.version>${project.version}</work.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<profiles>
<profile>
Expand All @@ -53,12 +58,12 @@
<finalName>tomee</finalName>
<plugins>
<plugin>
<version>3.10.1</version>
<version>${maven-compiler-plugin.version}</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>11</source>
<target>11</target>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -91,7 +96,7 @@
<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<version>1.10.1</version>
<version>${jkube.version}</version>
<executions>
<execution>
<id>k8s-build</id>
Expand Down Expand Up @@ -120,12 +125,22 @@
</property>
</all>
</labels>
<annotations>
<ingress>
<property>
<name>ingress.kubernetes.io/rewrite-target</name>
<value>/</value>
</property>
<property>
<name>cert-manager.io/cluster-issuer</name>
<value>letsencrypt-prod</value>
</property>
</ingress>
</annotations>
</resources>
<images>
<image>
<registry>${docker.host}</registry>

<name>${project.groupId}.${project.artifactId}:latest</name>
<name>${jkube.image.name}</name>
<build>
<from>adoptopenjdk:11-jre-hotspot</from>
<assembly>
Expand All @@ -150,7 +165,6 @@
</run>
</image>
</images>
<pushRegistry>${docker.host}}</pushRegistry>
</configuration>
</plugin>
</plugins>
Expand All @@ -163,4 +177,4 @@
<scope>provided</scope>
</dependency>
</dependencies>
</project>
</project>
27 changes: 6 additions & 21 deletions quickstarts/maven/tomee/src/main/jkube/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,16 @@
# Red Hat, Inc. - initial API and implementation
#

apiVersion: apps/v1
metadata:
name: ${k8sgroupId}-${project.artifactId}
spec:
strategy:
type: Recreate
template:
spec:
containers:
- env:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: HOSTNAME
valueFrom:
fieldRef:
fieldPath: metadata.name
image: ${docker.host}/${project.groupId}.${project.artifactId}:latest
imagePullPolicy: Always
ports:
- containerPort: ${tomee.port}
name: http
protocol: TCP
securityContext:
privileged: false
- imagePullPolicy: Always
ports:
- containerPort: ${tomee.port}
name: http
protocol: TCP
imagePullSecrets:
- name: netagehub
- name: netagehub
12 changes: 3 additions & 9 deletions quickstarts/maven/tomee/src/main/jkube/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@
#

apiVersion: networking.k8s.io/v1
metadata:
name: ${k8sgroupId}-${project.artifactId}-ingress
annotations:
ingress.kubernetes.io/rewrite-target: /
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
ingressClassName: public
tls:
- hosts:
- ${proj.hostname}
Expand All @@ -32,6 +26,6 @@ spec:
pathType: Prefix
backend:
service:
name: ${k8sgroupId}-${project.artifactId}-service
port:
number: ${tomee.port}
name: ${project.artifactId}
port:
number: ${tomee.port}
5 changes: 0 additions & 5 deletions quickstarts/maven/tomee/src/main/jkube/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
# Red Hat, Inc. - initial API and implementation
#

apiVersion: v1
metadata:
name: ${k8sgroupId}-${project.artifactId}-service
spec:
selector:
app: ${k8sgroupId}-${project.artifactId}
ports:
- port: ${tomee.port}

0 comments on commit 3d00c9d

Please sign in to comment.