Skip to content

Commit

Permalink
Trying to move todo-backend to helm
Browse files Browse the repository at this point in the history
Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
  • Loading branch information
ehsavoie committed Aug 30, 2022
1 parent 324130d commit b9e77f4
Show file tree
Hide file tree
Showing 16 changed files with 228 additions and 18 deletions.
2 changes: 1 addition & 1 deletion cmt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<version.server.bom>27.0.0.Alpha4</version.server.bom>
<version.server.bom>27.0.0.Alpha4</version.server.bom>
<version.server>27.0.0.Alpha4</version.server>
<version.wildfly.maven.plugin>3.0.0.Final</version.wildfly.maven.plugin>
<version.wildfly.maven.plugin>3.0.2.Final</version.wildfly.maven.plugin>
<version.cloud.fp>1.0.1.Final</version.cloud.fp>
</properties>

Expand Down
8 changes: 2 additions & 6 deletions helloworld-mdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,9 @@

<properties>
<!-- The versions for BOMs, Dependencies and Plugins -->
<<<<<<< HEAD
<version.server.bom>27.0.0.Alpha4</version.server.bom>
=======
<version.server.bom>26.0.0.Final</version.server.bom>
<version.server>26.1.0.Final</version.server>
<version.wildfly.maven.plugin>3.0.0.Final</version.wildfly.maven.plugin>
>>>>>>> bbbdbf553 (Adding Helm charts support for QuickStarts)
<version.server>27.0.0.Alpha4</version.server>
<version.wildfly.maven.plugin>3.0.2.Final</version.wildfly.maven.plugin>
</properties>

<repositories>
Expand Down
2 changes: 1 addition & 1 deletion helloworld-ws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<!-- The versions for BOMs, Dependencies and Plugins -->
<version.server.bom>27.0.0.Alpha4</version.server.bom>
<version.server>27.0.0.Alpha4</version.server>
<version.wildfly.maven.plugin>3.0.0.Final</version.wildfly.maven.plugin>
<version.wildfly.maven.plugin>3.0.2.Final</version.wildfly.maven.plugin>
<version.cloud.fp>1.0.1.Final</version.cloud.fp>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion helloworld/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<!-- The versions for BOMs, Dependencies and Plugins -->
<version.server.bom>27.0.0.Alpha4</version.server.bom>
<version.server>27.0.0.Alpha4</version.server>
<version.wildfly.maven.plugin>3.0.0.Final</version.wildfly.maven.plugin>
<version.wildfly.maven.plugin>3.0.2.Final</version.wildfly.maven.plugin>
<version.cloud.fp>1.0.1.Final</version.cloud.fp>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion kitchensink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<!-- The versions for BOMs, Dependencies and Plugins -->
<version.server.bom>27.0.0.Alpha4</version.server.bom>
<version.server>27.0.0.Alpha4</version.server>
<version.wildfly.maven.plugin>3.0.0.Final</version.wildfly.maven.plugin>
<version.wildfly.maven.plugin>3.0.2.Final</version.wildfly.maven.plugin>
<version.cloud.fp>1.0.1.Final</version.cloud.fp>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion numberguess/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<!-- The versions for BOMs, Dependencies and Plugins -->
<version.server.bom>27.0.0.Alpha4</version.server.bom>
<version.server>27.0.0.Alpha4</version.server>
<version.wildfly.maven.plugin>3.0.0.Final</version.wildfly.maven.plugin>
<version.wildfly.maven.plugin>3.0.2.Final</version.wildfly.maven.plugin>
<version.cloud.fp>1.0.1.Final</version.cloud.fp>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<product.name>WildFly</product.name>
<!-- A base list of dependency and plug-in version used in the various quick starts. -->
<version.org.asciidoctor.asciidoctor-maven-plugin>2.1.0</version.org.asciidoctor.asciidoctor-maven-plugin>
<version.wildfly.maven.plugin>3.0.0.Final</version.wildfly.maven.plugin>
<version.wildfly.maven.plugin>3.0.2.Final</version.wildfly.maven.plugin>
<version.org.wildfly.checkstyle-config>1.0.7.Final</version.org.wildfly.checkstyle-config>
<version.org.wildfly.quickstarts.documentation.plugin>2.3.0.Final</version.org.wildfly.quickstarts.documentation.plugin>
<!-- other plug-in versions -->
Expand Down
2 changes: 1 addition & 1 deletion temperature-converter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<!-- The versions for BOMs, Dependencies and Plugins -->
<version.server.bom>27.0.0.Alpha4</version.server.bom>
<version.server>27.0.0.Alpha4</version.server>
<version.wildfly.maven.plugin>3.0.0.Final</version.wildfly.maven.plugin>
<version.wildfly.maven.plugin>3.0.2.Final</version.wildfly.maven.plugin>
<version.cloud.fp>1.0.1.Final</version.cloud.fp>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion thread-racing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<!-- The versions for BOMs, Dependencies and Plugins -->
<version.server.bom>27.0.0.Alpha4</version.server.bom>
<version.server>27.0.0.Alpha4</version.server>
<version.wildfly.maven.plugin>3.0.0.Final</version.wildfly.maven.plugin>
<version.wildfly.maven.plugin>3.0.2.Final</version.wildfly.maven.plugin>
<version.cloud.fp>1.0.1.Final</version.cloud.fp>
</properties>

Expand Down
73 changes: 70 additions & 3 deletions todo-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@
<!-- The versions for BOMs, Dependencies and Plugins -->
<version.server.bootable-jar>27.0.0.Alpha4</version.server.bootable-jar>
<version.wildfly-jar.maven.plugin>7.0.0.Final</version.wildfly-jar.maven.plugin>
<version.wildfly-datasources-galleon-pack>2.0.2.Final</version.wildfly-datasources-galleon-pack>
<version.wildfly-datasources-galleon-pack>2.2.1.Final</version.wildfly-datasources-galleon-pack>
<version.server.bom>27.0.0.Alpha4</version.server.bom>
<version.server>27.0.0.Alpha4</version.server>
<version.wildfly.maven.plugin>3.0.2.Final</version.wildfly.maven.plugin>
<version.cloud.fp>1.0.1.Final</version.cloud.fp>
</properties>

<repositories>
Expand Down Expand Up @@ -173,14 +176,43 @@
</dependencies>

<build>
<!-- Set the name of the WAR, used as the context root when the app is deployed -->
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<configuration>
<feature-packs>
<feature-pack>
<location>org.wildfly:wildfly-galleon-pack:${version.server}</location>
</feature-pack>
<feature-pack>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-datasources-galleon-pack</artifactId>
<version>${version.wildfly-datasources-galleon-pack}</version>
</feature-pack>
</feature-packs>
<layers>
<layer>cloud-server</layer>
<layer>postgresql-datasource</layer>
</layers>
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>bootable-jar-openshift</id>
<build>
<!-- Set the name of the WAR, used as the context root when the app is deployed -->
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
Expand Down Expand Up @@ -227,6 +259,41 @@
</plugins>
</build>
</profile>
<profile>
<id>openshift</id>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<configuration>
<feature-packs>
<feature-pack>
<location>org.wildfly:wildfly-galleon-pack:${version.server}</location>
</feature-pack>
<feature-pack>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-datasources-galleon-pack</artifactId>
<version>${version.wildfly-datasources-galleon-pack}</version>
</feature-pack>
</feature-packs>
<layers>
<layer>cloud-server</layer>
<layer>postgresql-datasource</layer>
</layers>
<filename>ROOT.war</filename>
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- An optional Arquillian testing profile that executes tests in your JBoss EAP instance.
This profile will start a new JBoss EAP instance, and execute the test, shutting it down when done.
Expand Down
23 changes: 23 additions & 0 deletions todo-backend/todo-backend-chart/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
31 changes: 31 additions & 0 deletions todo-backend/todo-backend-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: v2
name: todo-backend-chart
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.0.1"
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 11.2.6
- name: wildfly
repository: http://docs.wildfly.org/wildfly-charts/
version: 2.0.1
Binary file not shown.
Binary file not shown.
93 changes: 93 additions & 0 deletions todo-backend/todo-backend-chart/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Default values for todo-backend-chart.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

postgresql:
auth:
username: todos-db
password: todos-db
database: todos-db
primary:
podSecurityContext:
enabled: false
fsGroup: ""
containerSecurityContext:
enabled: false
runAsUser: "auto"

readReplicas:
podSecurityContext:
enabled: false
fsGroup: ""
containerSecurityContext:
enabled: false
runAsUser: "auto"

volumePermissions:
enabled: false
securityContext:
runAsUser: "auto"

wildfly:
build:
uri: https://github.com/ehsavoie/quickstart.git
contextDir: todo-backend
ref: s2iv2
s2i:
version: latest
builderImage: quay.io/wildfly/wildfly-s2i-jdk17
runtimeImage: quay.io/wildfly/wildfly-runtime-jdk17
deploy:
replicas: 1
env:
# Env vars to connect to PostgreSQL DB
- name: POSTGRESQL_DATABASE
value: todos-db
- name: POSTGRESQL_USER
value: todos-db
- name: POSTGRESQL_PASSWORD
value: todos-db
- name: POSTGRESQL_DATASOURCE
value: ToDos
- name: POSTGRESQL_SERVICE_HOST
value: todo-postgresql
- name: POSTGRESQL_SERVICE_PORT
value: "5432"
# Env vars to configure CORS filter
- name: FILTERS
value: acao, acam, acah, acac, acma
- name: acao_FILTER_RESPONSE_HEADER_NAME
value: Access-Control-Allow-Origin
- name: acao_FILTER_RESPONSE_HEADER_VALUE
value: "*"
- name: acao_FILTER_REF_NAME
value: Access-Control-Allow-Origin
- name: acam_FILTER_RESPONSE_HEADER_NAME
value: Access-Control-Allow-Methods
- name: acam_FILTER_RESPONSE_HEADER_VALUE
value: GET, POST, OPTION, PUT, DELETE, PATCH
- name: acam_FILTER_REF_NAME
value: Access-Control-Allow-Methods
- name: acah_FILTER_RESPONSE_HEADER_NAME
value: Access-Control-Allow-Headers
- name: acah_FILTER_RESPONSE_HEADER_VALUE
value: accept, authorization, content-type, x-requested-with
- name: acah_FILTER_REF_NAME
value: Access-Control-Allow-Headers
- name: acac_FILTER_RESPONSE_HEADER_NAME
value: Access-Control-Allow-Credentials
- name: acac_FILTER_RESPONSE_HEADER_VALUE
value: "true"
- name: acac_FILTER_REF_NAME
value: Access-Control-Allow-Credentials
- name: acma_FILTER_RESPONSE_HEADER_NAME
value: Access-Control-Max-Age
- name: acma_FILTER_RESPONSE_HEADER_VALUE
value: "1"
- name: acma_FILTER_REF_NAME
value: Access-Control-Max-Age
# Env to avoid OOME
- name: GC_MAX_METASPACE_SIZE
value: "256"
- name: GC_METASPACE_SIZE
value: "96"
2 changes: 1 addition & 1 deletion websocket-hello/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<!-- The versions for BOMs, Dependencies and Plugins -->
<version.server.bom>27.0.0.Alpha4</version.server.bom>
<version.server>27.0.0.Alpha4</version.server>
<version.wildfly.maven.plugin>3.0.0.Final</version.wildfly.maven.plugin>
<version.wildfly.maven.plugin>3.0.2.Final</version.wildfly.maven.plugin>
<version.cloud.fp>1.0.1.Final</version.cloud.fp>
</properties>

Expand Down

0 comments on commit b9e77f4

Please sign in to comment.