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
Initial behavior examples for conformance #85960
Initial behavior examples for conformance #85960
Conversation
/hold |
@@ -0,0 +1,205 @@ | |||
- suite: pods/affinity | |||
level: "" |
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.
Was this field generated? It doesn't seem to be in our yaml spec.
5656f87
to
7acfc81
Compare
/retitle Initial behavior examples for conformance |
/priority important-soon |
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.
I can't comment on the actual behaviors, but left a few notes for file format and structure.
@@ -35,5 +35,7 @@ type Behavior struct { | |||
APIObject string `json:"apiObject,omitempty"` | |||
APIField string `json:"apiField,omitempty"` | |||
APIType string `json:"apiType,omitempty"` | |||
Version string `json:"version,omitempty"` | |||
Status string `json:"status,omitempty"` |
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.
What is this field for? It doesn't seem to be used.
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.
The idea was to be able to have provisional behaviors that we know should be part of conformance but that we also know are not covered yet. In order to be conforming, a cluster needs to meet the required behaviors. That is, we want to be able to define the behaviors before the tests are ready.
I can add in a value for this for all the behaviors in this PR.
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.
ack. I'm worried this might introduce human error where we forget to remove this even after writing a test. Personally, I feel that the CI tooling should be able to determine this when generating the behavior <> test mapping. At the same time though, if it's defined here, coverage should be extremely easy to compute.
@@ -35,5 +35,7 @@ type Behavior struct { | |||
APIObject string `json:"apiObject,omitempty"` | |||
APIField string `json:"apiField,omitempty"` | |||
APIType string `json:"apiType,omitempty"` | |||
Version string `json:"version,omitempty"` |
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.
Should we prepend v1.18 (or whatever the version should be) to all the behaviors we're adding?
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.
Hmm. Good question. Most of these behaviors have been around for a long, long time. But once we transition to the behavior model, then it will really only apply to those newer versions. I had put in v1.14 for the readiness gates; that's when it went GA. But it would be easier to just make them all v1.18, since no earlier cluster would be subject to these rules.
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.
Should I just remove API* fields? They were intended to provide context / help with regeneration when using kubetestgen
. But at least for now we're not really re-generating things, but instead just using them for bootstrapping. Different PR though.
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.
I think it's helpful in certain situations when we're just enumerating over one field (eg service type)...although we should probably be more explicit in specifying which fields are mandatory vs optional.
Different PR, I agree.
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.
I ended up removing version and status for now, we can deal with that later. I also simplified the initial lists of behaviors.
@@ -0,0 +1,16 @@ | |||
- suite: pods/readinessGates | |||
level: "" |
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.
This can be removed
@@ -0,0 +1,45 @@ | |||
suite: services/spec |
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.
Let's be consistent in the file and suite name. Either services-spec.yaml
or service/spec
for suite name
@@ -0,0 +1,16 @@ | |||
- suite: pods/readinessGates |
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.
Same comment about consistency in file and suite name.
@@ -0,0 +1,103 @@ | |||
suite: pods/spec |
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.
Same comment about consistency in file and suite name.
7acfc81
to
e73b56d
Compare
Organizes the behaviors directory based on SIG, and provides a few example behavior descriptions for Pods and Services to start. Note that these are very incomplete lists of behaviors at this point.
e73b56d
to
becdd79
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johnbelamaric The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
/lgtm |
/retest Review the full test history for this PR. Silence the bot with an |
10 similar comments
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Updates to the conformance tooling as defined in this KEP.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
This is a work-in-progress, the spec.yaml and readiness-gates.yaml are the furthest along.
The initial files were generated with
kubetestgen
and from there I re-oraganized and tweaked them. Files in this format will eventually become the standard description of what conformant Kubernetes is, and the tests will just validate these behaviors. Behaviors may be flagged with a Provisional status, to indicate that they are desired behaviors but we do not yet have a test that covers them. This will be helpful during the transition, although it likely will be needed for quite some time as we backfill tests.The KEP describes linking the tests and the behaviors throught a
tests.yaml
file, but instead I think it will be easier just to add a section to the conformance test meta-data:The test runner then can emit the covered behaviors, simplifying producing a report of whether a given cluster is conformant. All non-provisional behaviors must be hit in the test run; this avoids "missing" tests going undetected.
We should consider how to divide the meta-data between the YAML and the test comment. For example, "version" in the YAML would apply to what Kubernetes version expects that behavior. Version in the test comment may refer to when the test was added, if we believe we need it at all.
The expectation is that we can define the list of behaviors up front, much more rapidly than we can define and write the tests themselves. We must therefore decide whether clusters that pass all existing tests but demonstrably do not meet Provisional behaviors are conformant. I would suggest they are not.
We still need the manual review process for any tests that claims to be hitting conformance behaviors. The reviewers must be careful to ensure that any implicit behaviors that are relied upon by a conformance test are also conformant. I don't see any way to automate that. However, the pool of reviewers/approvers for those tests can be much wider than the pool of reviewers/approvers for the behaviors themselves.
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: