The generated Deployment YAML is not valid when set quarkus.openshift.deployment-kind=Deployment
Closed this issue · 7 comments
Describe the bug
When building projects and changing the generated deployment resource by setting quarkus.openshift.deployment-kind=Deployment
property for Maven build, the generated YAML for the Deployment resource doesn't contain .spec.template.metadata
and its child elements.
To Reproduce
Steps to reproduce the behavior:
- Run maven build with
quarkus.openshift.deployment-kind=Deployment
property setting.
./mvnw clean package \
-Dquarkus.profile=openshift-17 \
-Dquarkus.kubernetes.deploy=true \
-Dquarkus.openshift.deployment-kind=Deployment
-
Open the
target/kubernetes/openshift.yml
file and look for YAML for the Deployment resource. -
.spec.template.metadata
and child elements didn't get generated.
Expected behavior
.spec.template.metadata
and its child elements e.g. labels
, and annotations
should be generated.
Desktop (please complete the following information):
- OS: macOS Ventura
- JDK: Java SE build 17.0.5+9-LTS-191
- Maven: mvnw comes with the project
Additional context
Sample generated YAML of Deployment resource.
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
app.openshift.io/vcs-url: <<unknown>>
app.openshift.io/connects-to: "fights-db,fights-kafka,apicurio,rest-villains,rest-heroes,otel-collector"
app.quarkus.io/commit-id: 58303663091232da528a9eecfcd74f0c592f558d
app.quarkus.io/build-timestamp: 2022-11-28 - 14:42:55 +0000
prometheus.io/scrape: "true"
prometheus.io/path: /q/metrics
prometheus.io/port: "8082"
prometheus.io/scheme: http
labels:
app.kubernetes.io/name: rest-fights
app.kubernetes.io/part-of: fights-service
app.kubernetes.io/version: "1.0"
app: rest-fights
application: fights-service
system: quarkus-super-heroes
app.openshift.io/runtime: quarkus
name: rest-fights
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: rest-fights
app.kubernetes.io/part-of: fights-service
app.kubernetes.io/version: "1.0"
template:
spec:
containers:
- env:
- name: JAVA_APP_JAR
value: /deployments/quarkus-run.jar
envFrom:
- secretRef:
name: rest-fights-config-creds
- configMapRef:
name: rest-fights-config
image: quay.io/quarkus-super-heroes/rest-fights:1.0
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /q/health/live
port: 8082
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 10
name: rest-fights
ports:
- containerPort: 8082
name: http
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /q/health/ready
port: 8082
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 10
Yup, we already have an open issue for that
This one? quarkusio/quarkus#29497
Yup
@audomsak see quarkusio/quarkus#29497 - you can follow that issue. Once that gets resolved and makes it into a Quarkus release it'll be picked up by this project within a day or so post-release.
Unless there is anything else, I am going to close this issue.
@edeandrea that's only one issue I have. I'll be waiting for the fix on Quarkus side. Thank you.