-
Notifications
You must be signed in to change notification settings - Fork 104
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
KEP-9 and 10 Updates which includes all possible user facing YAML possibilities #847
Conversation
also... |
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 have just a few quite small comments around the descriptions and fields...
I think we should definitely note what language we use for that validation scheme, it's a bit confusing for the reader then...
keps/0009-operator-toolkit.md
Outdated
version: "5.7" | ||
kudoVersion: ">= 0.2.0" | ||
kubeVersion: ">= 1.14" | ||
name: str(max=253, lowercase alphanumeric characters, -, and .) |
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.
is this some validation/spec language? if so, should we probably not what we're using here? It kind of looks like a golang to me but the notation says yaml so I am a bit confused...
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 question here: what kind of Yaml spec language is this? Is there a parser for it?
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.
although if this IS some sort of spec language that is already known, I would totally use this in params.yaml so we could get nested values :o
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.
it is vaguely close to https://github.com/23andMe/Yamale
the point was to have condensed yet understandable constraints.
even in the psuedo sense... it seems understandable
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.
not to replace a real schema at some pt of course
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'm torn on this one: if we're talking about defining a real schema then I'd go with OpenAPI and keep it outside of the KEP. An even better approach would be to generate these to keep them in sync with the rest of the codebase but I don't have a solution right now, so we might need to research our options here first.
The proposed pseudo schema is neither generated nor is it parsed and raises questions of why it is in this form. In this case, it can simply be examples with YAML comments describing individual fields.
keps/0009-operator-toolkit.md
Outdated
name: str(max=253, lowercase alphanumeric characters, -, and .) | ||
description: str(required=False) | ||
version: semver(desc='version of operator') | ||
appVersion: str(desc='component controlled version', required=False) |
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 we could do better with desc here. I am not sure what is component and how is it controlling a version. I feel like it's hard to explain the difference between these two versions in one sentence 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.
Agree. This is the first time a "component" is mentioned and the distinction between appVersion
and operatorVersion
is not clear.
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 the verbosity of the difference will need to be elaborated in docs
keps/0009-operator-toolkit.md
Outdated
description: str(required=False) | ||
version: semver(desc='version of operator') | ||
appVersion: str(desc='component controlled version', required=False) | ||
kudoVersion: semver(desc='minVersion of KUDO') |
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 about - 'minimal required version (semver) of KUDO required for this operator to work'
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.
Not part of this PR, but now, that I'm looking at it, we might want to make it a string to support Pipfile versioning style e.g. "<2.7.0,>=2.1" or
==3.4` in the future.
keps/0009-operator-toolkit.md
Outdated
version: semver(desc='version of operator') | ||
appVersion: str(desc='component controlled version', required=False) | ||
kudoVersion: semver(desc='minVersion of KUDO') | ||
kubernetesVersion: semver(desc='minVersion of Kubernetes') |
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 about - 'minimal required version (semver) of Kubernetes required for this operator to work'
keps/0009-operator-toolkit.md
Outdated
- str(desc='name of resource') | ||
plans: map[string]Plan | ||
str(max 253, desc='name of plan'): | ||
strategy: ordering(*serial|parallel, desc='determines how to order phases', required=False) |
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 also document what is the default somewhere since it's not required?
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.
Currently this is required in code... this was a suggestion to make it not required and providing default information is super useful... that was the intent of *
in *serial
but that could be better.
keps/0010-package-manager.md
Outdated
- name: str(max=253) | ||
version: semver() | ||
appVersion: str(desc='component controlled version', required=False) | ||
home: url(desc='home page, git repo', required=False) |
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.
in operator we call this url, I think home is a bit too generic here. I was immediately thinking about home directory :D I would personally omit this value from index altogether, it's inside operator, we can always add it here if the metadata is needed. It's hard to remove, but it's easy to add :)
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 is already part of our code... are you suggesting that we remove it from code? or just not expose it?
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'm not sure who was initially responsible for the original code and yaml... this yaml has urls, home and source. There is a url in operator we should consolidate on the same nomenclature.
I'll look into that. Also agree on easier to add in later.
keps/0010-package-manager.md
Outdated
version: semver() | ||
appVersion: str(desc='component controlled version', required=False) | ||
home: url(desc='home page, git repo', required=False) | ||
sources: array(str, required=False) |
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.
wow, why is sources a list? Do we expect operator source to live in multiple repos? I also don't feel like this should be in index right now 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.
this is already part of our code... part of the intent of this PR was to surface all of what is current. Is your proposal to remove from code? or to reduce to 1? or to not expose?
keps/0010-package-manager.md
Outdated
maintainers: array(Maintainer, required=False) | ||
- name: str() | ||
email: email() | ||
deprecated: bool(desc='reflects if operator is deprecated') |
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.
maybe the description should rather say what deprecated means for us? Can you still install? I honestly don't know how exactly we interpret this
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'm wondering if should do this by GVK. don't deprecate at the field level, deprecate at the GVK. that way, we just support multiple GVKs, deprecate a given GVK in a given release, and remove it after that.
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'm not sure I follow completely... that said is that a vote to remove deprecated?
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.
Yes. My vote is to deprecate the entire "version" of our operator.yaml spec by adding an apiVersion tag to it at some point, rather than deprecate individual fields.
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.
Aside from a few nits, my biggest question is about Yaml schema itself.
keps/0009-operator-toolkit.md
Outdated
version: "5.7" | ||
kudoVersion: ">= 0.2.0" | ||
kubeVersion: ">= 1.14" | ||
name: str(max=253, lowercase alphanumeric characters, -, and .) |
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 question here: what kind of Yaml spec language is this? Is there a parser for it?
keps/0009-operator-toolkit.md
Outdated
name: str(max=253, lowercase alphanumeric characters, -, and .) | ||
description: str(required=False) | ||
version: semver(desc='version of operator') | ||
appVersion: str(desc='component controlled version', required=False) |
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.
Agree. This is the first time a "component" is mentioned and the distinction between appVersion
and operatorVersion
is not clear.
keps/0009-operator-toolkit.md
Outdated
description: str(required=False) | ||
version: semver(desc='version of operator') | ||
appVersion: str(desc='component controlled version', required=False) | ||
kudoVersion: semver(desc='minVersion of KUDO') |
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.
Not part of this PR, but now, that I'm looking at it, we might want to make it a string to support Pipfile versioning style e.g. "<2.7.0,>=2.1" or
==3.4` in the future.
The format questions aside..
|
...and since we're defining a formal schema, wdyt about putting it into |
There is still a need to clean up the keps... I will remove the controversial elements and make this mergeable. |
40d928b
to
a272856
Compare
This PR now is consist with the Go Struct changes in #863 It removes the controversial schema notation which will be add back in later. Please look with a new set of eyes. |
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.
LGTM have just two small nits
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.
made one suggestion on top of alena's comments, I went ahead and generated a sha256 with some random thing. :D
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 agree with the existing comments. Otherwise lgtm 🚢
@kensipe what do we do with this PR? |
@kensipe ping |
a272856
to
24f2f14
Compare
updating params array updates based on pr feedback Update to keps without schema details which will be updated at a later date updates based on pr feedback Signed-off-by: Ken Sipe <kensipe@gmail.com>
74a9264
to
b81fa41
Compare
thanks @alenkacz this hasn't been top of mind... cleaned it up and ready to go. thanks for the feedback |
Plenty of approvals... updates made for all feedback... rebased and ready to merge |
Signed-off-by: Ken Sipe <kensipe@gmail.com> Signed-off-by: Thomas Runyon <runyontr@gmail.com>
This PR now is consist with the Go Struct changes in #863
It removes the controversial schema notation which will be add back in later. Please look with a new set of eyes.
DETAILS FROM ORIGINAL PR BELOW
What this PR does / why we need it:
What I would like to see as part of the review process:
required-False
... Is something required that shouldn't be or vice versa