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

add support for description from file in topic resource #52

Merged

Conversation

strokyl
Copy link
Collaborator

@strokyl strokyl commented Jul 16, 2024

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.

Copy link
Member

@qboileau qboileau left a comment

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
Copy link
Collaborator Author

strokyl commented Jul 17, 2024

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
4 checks passed
@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