Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Add the k8s_object rule. #2

Merged
merged 1 commit into from
Sep 2, 2017
Merged

Add the k8s_object rule. #2

merged 1 commit into from
Sep 2, 2017

Conversation

mattmoor
Copy link
Contributor

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.

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.
@mattmoor mattmoor requested a review from dlorenc August 31, 2017 22:46
@mattmoor mattmoor mentioned this pull request Aug 31, 2017

k8s_object(
name = "dev",
kind = "deployment",
Copy link

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/

Copy link

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.

Copy link
Contributor Author

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.

Copy link

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?

Copy link
Contributor Author

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",
Copy link

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?

@mattmoor mattmoor merged commit f56b2c6 into master Sep 2, 2017
@nlopezgi nlopezgi deleted the just-build branch November 27, 2018 15:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants