Skip to content

feat: use dekorate to generate k8s resources #47

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

Merged
merged 5 commits into from
Dec 8, 2022
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
8 changes: 3 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,11 @@ jobs:
kubectl config set-context --current --namespace=test
# Generate manifests and image
cd samples/spring-boot
./mvnw jib:dockerBuild
kind load docker-image spring-boot-sample:latest
# ./mvnw ${MAVEN_ARGS} clean install -Ddekorate.jib.registry=$KIND_REGISTRY -Ddekorate.jib.group=tests -Ddekorate.jib.version=latest -Ddekorate.jib.autoPushEnabled=true -DskipTests
cd samples/spring-boot
./mvnw ${MAVEN_ARGS} clean install -Ddekorate.jib.registry=$KIND_REGISTRY -Ddekorate.jib.group=tests -Ddekorate.jib.version=latest -Ddekorate.jib.autoPushEnabled=true -DskipTests
# Install manifests
kubectl apply -f k8s/kubernetes.yml
kubectl apply -f target/classes/META-INF/dekorate/kubernetes.yml
# Wait until the service is started
kubectl wait --for=condition=available --timeout=600s deployment/spring-boot-sample
Expand Down
16 changes: 16 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<spring-boot-dependencies.version>2.7.3</spring-boot-dependencies.version>
<dekorate.version>3.1.2</dekorate.version>
</properties>

<modules>
Expand Down Expand Up @@ -123,6 +124,21 @@
<artifactId>json-patch</artifactId>
<version>${json-patch.version}</version>
</dependency>
<dependency>
<groupId>io.dekorate</groupId>
<artifactId>kubernetes-spring-starter</artifactId>
<version>${dekorate.version}</version>
</dependency>
<dependency>
<groupId>io.dekorate</groupId>
<artifactId>certmanager-annotations</artifactId>
<version>${dekorate.version}</version>
</dependency>
<dependency>
<groupId>io.dekorate</groupId>
<artifactId>jib-annotations</artifactId>
<version>${dekorate.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
131 changes: 0 additions & 131 deletions samples/spring-boot/k8s/kubernetes.yml

This file was deleted.

14 changes: 13 additions & 1 deletion samples/spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<properties>
<java.version>11</java.version>
<jib-maven-plugin.version>3.3.0</jib-maven-plugin.version>
<jib-maven-plugin.version>3.3.1</jib-maven-plugin.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -49,6 +49,18 @@
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.dekorate</groupId>
<artifactId>kubernetes-spring-starter</artifactId>
</dependency>
<dependency>
<groupId>io.dekorate</groupId>
<artifactId>certmanager-annotations</artifactId>
</dependency>
<dependency>
<groupId>io.dekorate</groupId>
<artifactId>jib-annotations</artifactId>
</dependency>
<dependency>
<groupId>io.javaoperatorsdk</groupId>
<artifactId>kubernetes-webhooks-framework-core</artifactId>
Expand Down