snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Kubernetes - multiple problems in generated kubernetes.yml after merging #194

Closed iocanel closed 3 years ago

iocanel commented 3 years ago

I want to add a securityContext to the Deployment and leave all else unchanged. but I run into some snags with the generated kubernetes.yml.

Steps to reproduce -- Following this guide: https://quarkus.io/guides/deploying-to-kubernetes

Try kubernetes1.yml

PROBLEM 1: Crashes with NPE, stack trace in kubernetes1-stacktrace.txt

Try kubernetes2.yml and check target/kubernetes/kubernetes.yml

PROBLEM 2: This disappears completely: supplementalGroups: [5555] Note: The surrounding RunAsUser/RunAsGroup dont disappear Note: This is example code from https://docs.openshift.com/container-platform/3.11/install_config/persistent_storage/persistent_storage_nfs.html#nfs-supplemental-groups

PROBLEM 3: I want only to add a securityContext under spec/template/spec/containers/ and keep the quarkus generated data. But almost everything disappears an extra wrinkle is metadata/labels/* where the version number is removed and must be maintained manually. Hence, the selector of the 'Service' object does not point to the DeploymentConfig when the project version number is modified. Workaround: In application.properties: define quarkus.openshift.version=999.999 so it wont modify

PROBLEM 4: Uncomment # error to cause a syntax error.
The error message talks about line 13 not 20 This means line numbers are counted starting from the current resource at line 8

PROBLEM 5: Our org is running openshift 3.11. It identifies applications based on the 'app' label which is not defined by quarkus.

Workaround:
    In application.properties: define quarkus.openshift.labels.app=application name

PROBLEM 6: Minor problem - If I change the name of the Deployment, I get 2 deployments (correct) but the name of the service account changes too (strange). Hence, the first Deployment now refers to a non-existant service account

kubernetes1.yml.txt kubernetes2.yml.txt kubernetes1-stacktrace.txt


https://github.com/quarkusio/quarkus/issues/12826


$upstream:12826$