Kong / Kong/kongctl

Feat: Allow for embedding of decK configuration within Control Plane resource config

Open
#710 2 comments 0 reactions 0 assignees View on GitHub
declarative enhancement medium-priority triaged
Dominant language
Go
Stars
17
Forks
24
Avg merge
8h 13m
Merged PRs (30d)
196

Description

As of now, users must have deck file declarations in an independent file which the `_deck` declaration references:

```
control_planes:
- ref: example-cp
name: "example-cp"
description: "Example Control Plane managed by kongctl"
cluster_type: "CLUSTER_TYPE_SERVERLESS"
_deck:
files:
- "gateway-services.yaml"
flags:
- "--analytics=false"

gateway_services:
- ref: example-gw-svc
_external:
selector:
matchFields:
name: "example-http-service"
```

The request is to allow for the deck configuration to be embedded directly instead of requiring the external file. Something like this:

```
control_planes:
- ref: example-cp
name: "example-cp"
description: "Example Control Plane managed by kongctl"
cluster_type: "CLUSTER_TYPE_SERVERLESS"
_deck:
config:
_format_version: "3.0"
_info:
select_tags:
- "kongctl-example"
services:
- name: example-http-service
url: http://httpbin.konghq.com
tags:
- kongctl-example
routes:
- name: example-http-route
paths:
- /example
protocols:
- http
- https
tags:
- kongctl-example
flags:
- "--analytics=false"
gateway_services:
- ref: example-gw-svc
_external:
selector:
matchFields:
name: "example-http-service"
```

The above example then results in some redundant definitions, the gateway service specifically. We should evaluate ways to reduce that boilerplate if possible.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how the existing `_deck.files` declarations are read and how the embedded control-plane configuration is parsed. Compare the external-file and proposed inline forms, including the redundant gateway service definition, and document a clear approach that supports inline configuration while addressing the boilerplate concern.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.