Skip to content

feat: update fabric8 client to v6 RC1 #26

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 7 commits into from
Sep 6, 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
6 changes: 4 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ jobs:

# Generate manifests and image
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
./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

# Install manifests
kubectl apply -f target/classes/META-INF/dekorate/kubernetes.yml
kubectl apply -f k8s/kubernetes.yml

# Wait until the service is started
kubectl wait --for=condition=available --timeout=600s deployment/spring-boot-sample
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<sonar.host.url>https://sonarcloud.io</sonar.host.url>

<junit.version>5.8.2</junit.version>
<fabric8-client.version>5.12.2</fabric8-client.version>
<fabric8-client.version>6.1.1</fabric8-client.version>
<slf4j.version>1.7.32</slf4j.version>
<log4j.version>2.17.1</log4j.version>
<mokito.version>4.1.0</mokito.version>
Expand All @@ -63,6 +63,7 @@
<maven-javadoc-plugin.version>3.3.1</maven-javadoc-plugin.version>
<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>
</properties>

<modules>
Expand Down
1 change: 0 additions & 1 deletion samples/commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

<properties>
<java.version>11</java.version>
<spring-boot-dependencies.version>2.6.6</spring-boot-dependencies.version>
</properties>

<dependencies>
Expand Down
131 changes: 131 additions & 0 deletions samples/spring-boot/k8s/kubernetes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Generated by dekorate - replace with generate if dekorate supports v6.1.1 fabric8 client
---
apiVersion: v1
kind: Secret
metadata:
name: pkcs12-pass
data:
password: c3VwZXJzZWNyZXQ=
type: Opaque
---
apiVersion: v1
kind: Service
metadata:
annotations:
app.dekorate.io/vcs-url: <<unknown>>
labels:
app.kubernetes.io/name: spring-boot-sample
app.kubernetes.io/version: 0.2.1-SNAPSHOT
name: spring-boot-sample
spec:
ports:
- name: http
port: 443
targetPort: 443
selector:
app.kubernetes.io/name: spring-boot-sample
app.kubernetes.io/version: 0.2.1-SNAPSHOT
type: ClusterIP
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
annotations:
app.dekorate.io/vcs-url: <<unknown>>
labels:
app.kubernetes.io/version: 0.2.1-SNAPSHOT
app.kubernetes.io/name: spring-boot-sample
name: spring-boot-sample
spec:
dnsNames:
- spring-boot-sample.test.svc
- localhost
duration: 7776000000000000ns
encodeUsagesInRequest: false
isCA: false
issuerRef:
name: spring-boot-sample
keystores:
pkcs12:
create: true
passwordSecretRef:
key: password
name: pkcs12-pass
privateKey:
algorithm: RSA
encoding: PKCS8
size: 2048
renewBefore: 1296000000000000ns
secretName: tls-secret
subject:
organizations:
- Dekorate
- Community
usages:
- server auth
- client auth
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
app.dekorate.io/vcs-url: <<unknown>>
labels:
app.kubernetes.io/version: 0.2.1-SNAPSHOT
app.kubernetes.io/name: spring-boot-sample
name: spring-boot-sample
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/version: 0.2.1-SNAPSHOT
app.kubernetes.io/name: spring-boot-sample
template:
metadata:
annotations:
app.dekorate.io/vcs-url: <<unknown>>
labels:
app.kubernetes.io/version: 0.2.1-SNAPSHOT
app.kubernetes.io/name: spring-boot-sample
spec:
containers:
- env:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SERVER_SSL_KEY_STORE
value: /etc/certs/keystore.p12
- name: SERVER_SSL_KEY_STORE_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: pkcs12-pass
image: spring-boot-sample:latest
imagePullPolicy: Never
name: spring-boot-sample
ports:
- containerPort: 443
name: http
protocol: TCP
volumeMounts:
- mountPath: /etc/certs
name: volume-certs
readOnly: true
volumes:
- name: volume-certs
secret:
optional: false
secretName: tls-secret
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
annotations:
app.dekorate.io/vcs-url: <<unknown>>
labels:
app.kubernetes.io/version: 0.2.1-SNAPSHOT
app.kubernetes.io/name: spring-boot-sample
name: spring-boot-sample
spec:
selfSigned: {}
31 changes: 14 additions & 17 deletions samples/spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

<properties>
<java.version>11</java.version>
<spring-boot-dependencies.version>2.6.6</spring-boot-dependencies.version>
<dekorate.version>2.11.1</dekorate.version>
<jib-maven-plugin.version>3.3.0</jib-maven-plugin.version>
</properties>

<dependencyManagement>
Expand All @@ -40,21 +39,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</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>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down Expand Up @@ -84,6 +68,19 @@

<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib-maven-plugin.version}</version>
<configuration>
<from>
<image>gcr.io/distroless/java:11</image>
</from>
<to>
<image>spring-boot-sample</image>
</to>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
Expand Down