-
Notifications
You must be signed in to change notification settings - Fork 136
Conversation
This contains just enough to define a k8s_object rule that effectively passes through the input object. Subsequent changes will expand the surface of this to support more meaningful operations.
|
||
k8s_object( | ||
name = "dev", | ||
kind = "deployment", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need a version
field in k8s object at all? The docs still say to use apps/v1beta1 for Deployment: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, the user is expected to set that themselves in the object. What is the "kind" used for then? It doesn't look like anything right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing yet, it is ultimately used for kubectl
subcommands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, it just seems a little weird to have it here and in the file itself. Is there anything coming to automatically extract it from the file? What if it doesn't match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDK if we'll extract it, but we may add validation that the object we're dealing with matches what's in the file (if such a thing is possible). Ultimately, with CRDs, there doesn't need to be any correlation between the kind
in the resource and the command-line keyword.
|
||
k8s_object( | ||
name = "dev", | ||
kind = "deployment", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, it just seems a little weird to have it here and in the file itself. Is there anything coming to automatically extract it from the file? What if it doesn't match?
This contains just enough to define a k8s_object rule that effectively passes through the input object.
Subsequent changes will expand the surface of this to support more meaningful operations.