Skip to content
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

cleaner kubernetes.yaml generation #9280

Closed
2 tasks
maxandersen opened this issue May 13, 2020 · 4 comments · Fixed by #9675
Closed
2 tasks

cleaner kubernetes.yaml generation #9280

maxandersen opened this issue May 13, 2020 · 4 comments · Fixed by #9675
Assignees
Labels
Milestone

Comments

@maxandersen
Copy link
Contributor

Description
while working and comparing our yaml with example yaml i noticed a few things that could make ours a bit nicer:

  • don't add quotes unless needed (i.e. MINIMIZE_QUOTES )
  • don't generate labels/annotations for vcs and similar if those values are not available, i..e. "<>" looks noisy

i.e. generate this:

---
apiVersion: v1
kind: ServiceAccount
metadata:
  annotations:
    app.quarkus.io/build-timestamp: "2020-05-13 - 20:16:21 +0000"
  labels:
    app.kubernetes.io/name: jugchdemo
    app.kubernetes.io/version: 1.0-SNAPSHOT
  name: jugchdemo

instead of

---
apiVersion: "v1"
kind: "ServiceAccount"
metadata:
  annotations:
    app.quarkus.io/vcs-url: "<<unknown>>"
    app.quarkus.io/build-timestamp: "2020-05-13 - 20:16:21 +0000"
    app.quarkus.io/commit-id: "<<unknown>>"
  labels:
    app.kubernetes.io/name: "jugchdemo"
    app.kubernetes.io/version: "1.0-SNAPSHOT"
  name: "jugchdemo"
@geoand
Copy link
Contributor

geoand commented May 14, 2020

  • The quotes thing should be easy (I would assume) to do in Dekorate by controlling the ObjectMapper.
  • The empty values should probably also be fixed in Dekorate although we could just remove them in Quarkus if necessary.

cc @iocanel

@geoand
Copy link
Contributor

geoand commented May 14, 2020

I'll take this up in Dekorate

geoand added a commit to dekorateio/dekorate that referenced this issue May 14, 2020
geoand added a commit to dekorateio/dekorate that referenced this issue May 14, 2020
@geoand
Copy link
Contributor

geoand commented May 14, 2020

dekorateio/dekorate#509 should take care of both

iocanel pushed a commit to dekorateio/dekorate that referenced this issue May 15, 2020
iocanel pushed a commit to dekorateio/dekorate that referenced this issue May 15, 2020
iocanel pushed a commit to dekorateio/dekorate that referenced this issue May 15, 2020
iocanel pushed a commit to dekorateio/dekorate that referenced this issue May 15, 2020
@geoand geoand self-assigned this May 28, 2020
@geoand
Copy link
Contributor

geoand commented May 28, 2020

@iocanel when trying to use dekorate 0.12.1 I am getting:

[ERROR] Failed to execute goal on project quarkus-kubernetes-deployment: Could not resolve dependencies for project io.quarkus:quarkus-kubernetes-deployment:jar:999-SNAPSHOT: The following artifacts could not be resolved: io.dekorate:kubernetes-annotations:jar:noapt:0.12.1, io.dekorate:openshift-annotations:jar:noapt:0.12.1, io.dekorate:knative-annotations:jar:noapt:0.12.1: Failure to find io.dekorate:kubernetes-annotations:jar:noapt:0.12.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

geoand added a commit to geoand/quarkus that referenced this issue May 29, 2020
geoand added a commit that referenced this issue May 29, 2020
Bump Dekorate to 0.12.1
@gsmet gsmet added this to the 1.6.0 - master milestone Jun 10, 2020
johnaohara pushed a commit to johnaohara/quarkus that referenced this issue Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants