Skip to content

add support for description from file in topic resource - #52

Merged
strokyl merged 1 commit into
mainfrom
cons-1378-cli-add-support-for-descriptionfile-in-topic-resource
Jul 17, 2024
Merged

strokyl merged 1 commit into
mainfrom
cons-1378-cli-add-support-for-descriptionfile-in-topic-resource

Conversation

@strokyl

@strokyl strokyl commented Jul 16, 2024

Copy link
Copy Markdown
Contributor

On this PR, I added the possibility of using a separate file for the description of a topic resource.
For example, now the user can apply the following yaml:

---
apiVersion: v2
kind: Topic
metadata:
  cluster: local
  name: tata
  labels: {
    "conduktor.io/descriptionFile": "tata_desc.md"
  }
spec:
  replicationFactor: 1
  partitions: 3
  configs:
    min.insync.replicas: '1'
    cleanup.policy: delete
    retention.ms: '60000'

If tata_desc.md contain the following content:

This is a critical topic

This would be the equivalent of applying the following resource:

---
apiVersion: v2
kind: Topic
metadata:
  cluster: local
  name: tata
  labels: {
    "conduktor.io/description": "This is a critical topic"
  }
spec:
  replicationFactor: 1
  partitions: 3
  configs:
    min.insync.replicas: '1'
    cleanup.policy: delete
    retention.ms: '60000'

I took the opportunity to improve error handling of the similar existing mechanism for subject schema.

@qboileau qboileau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@twobeeb BTW why we never went with the de-facto yaml standard !include 'xx.txt'.
Not in real yaml spec but implemented in some parsers and many people are familiar with it

@strokyl

strokyl commented Jul 17, 2024

Copy link
Copy Markdown
Contributor Author

LGTM

@twobeeb BTW why we never went with the de-facto yaml standard !include 'xx.txt'. Not in real yaml spec but implemented in some parsers and many people are familiar with it

Quentin did you check if it work with the go parser?

@strokyl
strokyl merged commit 518861d into main Jul 17, 2024
@strokyl
strokyl deleted the cons-1378-cli-add-support-for-descriptionfile-in-topic-resource branch July 17, 2024 08:19
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

Successfully merging this pull request may close these issues.

2 participants