-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Quarkus kubernetes/openshift/minikube extension should allow for common resources #22290
Comments
I have fixed that upstream: dekorateio/dekorate#942. |
Thank you @iocanel ! When this gets pulled into Quarkus will the documentation be updated as well, showing how to use the feature? |
@Sgitario mind updating the docs to reflect that we know support this feature? Thanks |
@iocanel was going to update it, but first Dekorate needs to release this change and Quarkus needs to be updated accordingly. |
Oh, I thought that was already done |
Dekorate's bump version will be done in #26303, which will include this feature. |
Hey @geoand / @Sgitario has this been done? If it was, I don't see anything in the documentation (https://quarkus.io/guides/deploying-to-kubernetes#using-existing-resources) describing how to use this? |
I doubt it, it probably slipped through the cracks, but @Sgitario would know more. |
Sounds good. The ticket he referenced (#26303) seems to be closed, so if it is "in" I don't know how to use it. |
Yes, this should be already supported as the changes in dekorateio/dekorate#942 are included in the Dekorate version, but indeed we need to update the documentation and perhaps also some tests. |
When generating the manifests for multiple deployment targets like Kubernetes, OpenShift or Knative, we can place the common resources in `src/main/kubernetes/common.yml`, so these resources will be integrated into the generated `kubernetes.json`/`kubernetes.yml`, and `openshift.json`/`openshift.yml` files (if you configure the Kubernetes and Openshift extensions at the same time). For example, we can write a ConfigMap resource only once in the file `src/main/kubernetes/common.yml`: ```yaml apiVersion: v1 kind: ConfigMap metadata: name: common-configmap data: hello: world ``` And this config map resource will be integrated into the generated `kubernetes.json`/`kubernetes.yml`, and `openshift.json`/`openshift.yml` files. Fix quarkusio#22290
It seems that the changes in dekorateio/dekorate#942 were not relevant for Quarkus. Therefore, I've created a pull request to implement this feature, and also to document it. |
When generating the manifests for multiple deployment targets like Kubernetes, OpenShift or Knative, we can place the common resources in `src/main/kubernetes/common.yml`, so these resources will be integrated into the generated `kubernetes.json`/`kubernetes.yml`, and `openshift.json`/`openshift.yml` files (if you configure the Kubernetes and Openshift extensions at the same time). For example, we can write a ConfigMap resource only once in the file `src/main/kubernetes/common.yml`: ```yaml apiVersion: v1 kind: ConfigMap metadata: name: common-configmap data: hello: world ``` And this config map resource will be integrated into the generated `kubernetes.json`/`kubernetes.yml`, and `openshift.json`/`openshift.yml` files. Fix quarkusio#22290
When generating the manifests for multiple deployment targets like Kubernetes, OpenShift or Knative, we can place the common resources in `src/main/kubernetes/common.yml`, so these resources will be integrated into the generated `kubernetes.json`/`kubernetes.yml`, and `openshift.json`/`openshift.yml` files (if you configure the Kubernetes and Openshift extensions at the same time). For example, we can write a ConfigMap resource only once in the file `src/main/kubernetes/common.yml`: ```yaml apiVersion: v1 kind: ConfigMap metadata: name: common-configmap data: hello: world ``` And this config map resource will be integrated into the generated `kubernetes.json`/`kubernetes.yml`, and `openshift.json`/`openshift.yml` files. Fix quarkusio#22290
Following the use existing resources section of the Quarkus Kubernetes Guide it mentions I can place files in
src/main/kubernetes
that will be picked up by the extensions.It says
What if I have some resources that I want added to the generated
kubernetes.yml
andopenshift.yml
? It seems that only specific filenames ofkubernetes.yml
oropenshift.yml
are picked up insrc/main/kubernetes
. What if I have a resource, like aConfigMap
, that I want to appear in all the generated descriptors? Do I need to create both asrc/main/kubernetes/kubernetes.yml
and asrc/main/kubernetes/openshift.yml
with the same content?@edeandrea indeed you do. @iocanel maybe it makes sense to improve on that somehow
Originally posted by @geoand in #22258 (comment)
The text was updated successfully, but these errors were encountered: