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

Deck render no tag and workspace information #1155

Open
cello86 opened this issue Jan 3, 2024 · 7 comments
Open

Deck render no tag and workspace information #1155

cello86 opened this issue Jan 3, 2024 · 7 comments

Comments

@cello86
Copy link

cello86 commented Jan 3, 2024

Hi all,
we tried to use deck render to create a single YAML file from a distrubuted config and we would use this configuration on a Kong in-memory storage istance. It's not possible into deck render command to specify the "_info" configuration for tags an "_workspace" part.

Is it possible to avoid this limit?

Thanks,
Marcello

@Tieske
Copy link
Member

Tieske commented Jan 4, 2024

with "Kong in-memory storage instance" you mean a DBless deployment?

I think you encounter some entries in the file that are not supported by the DBless format. The formats, though similar, are not compatible. Have you tried using deck file patch to remove the invalid entries?

For more clarity; can you provide a minimal example of what you're getting and what you are expecting?

@cello86
Copy link
Author

cello86 commented Jan 9, 2024

@Tieske
I used these 2 files:

_format_version: "3.0"
_info:
  select_tags:
  - test-external
_workspace: test
services:
- connect_timeout: 60000
  host: test1-svc.local
  name: test1
  path: /
  port: 443
  protocol: https
  read_timeout: 60000
  retries: 5
  write_timeout: 60000
  routes:
  - hosts:
    - site.local
    name: test1-get
    methods:
    - GET
    paths:
    - ~/v1/test1/[A-Z]{3}$
_format_version: "3.0"
_info:
  select_tags:
  - test-external
_workspace: test
services:
- connect_timeout: 60000
  host: test2-svc.local
  name: test2
  path: /
  port: 443
  protocol: https
  read_timeout: 60000
  retries: 5
  write_timeout: 60000
  routes:
  - hosts:
    - site.local
    name: test2-get
    methods:
    - GET
    paths:
    - ~/v1/test2/[A-Z]{3}$

I executed the render command but the tags and workspace information weren't present.

# deck version
decK v1.29.2 (77682ca)
# deck file render .
_format_version: "3.0"
services:
- connect_timeout: 60000
  host: test1-svc.local
  name: test1
  path: /
  port: 443
  protocol: https
  read_timeout: 60000
  retries: 5
  routes:
  - hosts:
    - site.local
    https_redirect_status_code: 426
    methods:
    - GET
    name: test1-get
    path_handling: v0
    paths:
    - ~/v1/test1/[A-Z]{3}$
    preserve_host: false
    protocols:
    - http
    regex_priority: 100
    request_buffering: true
    response_buffering: true
    strip_path: false
  write_timeout: 60000
- connect_timeout: 60000
  host: test2-svc.local
  name: test2
  path: /
  port: 443
  protocol: https
  read_timeout: 60000
  retries: 5
  routes:
  - hosts:
    - site.local
    https_redirect_status_code: 426
    methods:
    - GET
    name: test2-get
    path_handling: v0
    paths:
    - ~/v1/test2/[A-Z]{3}$
    preserve_host: false
    protocols:
    - http
    regex_priority: 100
    request_buffering: true
    response_buffering: true
    strip_path: false
  write_timeout: 60000

@rspurgeon
Copy link
Collaborator

@cello86 can you please describe your intended workflow a little more clearly? Are you intending to use deck file render to apply the resulting configuration using deck gateway sync or do you intend to push the resulting file to a DB-Less Kong instance via the /config endpoint?

@cello86
Copy link
Author

cello86 commented Jan 9, 2024

@rspurgeon ideally deck provides some features like:

  • variables substitution
  • deduplication plugib config
  • distributed configuration with different files
  • default configuration injection
    These features can simplify the life with db-less config because actually requires the management with a single file.
    We raised to Kong commercial team this requirement to have a CI/CD environment and a blue green deployment done via versioned dbless config file and a simple docker image, but kong suggestion is to install the hybrid mode and this can be an useless overhead for some customers. The dbless config has a lot of advantages but with a single file management is not useful and easy to implement.

You can check #604

@cello86
Copy link
Author

cello86 commented Jan 19, 2024

@rspurgeon Is the use I described of deck to try to create a db-less from files used for normal sync incorrect?

@rspurgeon
Copy link
Collaborator

@rspurgeon Is the use I described of deck to try to create a db-less from files used for normal sync incorrect?

Sorry @cello86 it's still unclear to me what workflow you are trying to enable. Are you trying to configure a DB-Less Kong instance or are you trying to assemble a decK file to apply using deck gateway sync ?

@cello86
Copy link
Author

cello86 commented Jan 30, 2024

I tried to generate a db less config starting from different files (one file per service)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants