Skip to content

ADR on Product image selection #259

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

Merged
merged 15 commits into from
Sep 8, 2022
Merged

ADR on Product image selection #259

merged 15 commits into from
Sep 8, 2022

Conversation

Maleware
Copy link
Member

@Maleware Maleware commented Aug 24, 2022

ADR23 on design of operators to accept custom images

@Maleware Maleware self-assigned this Aug 24, 2022
Copy link
Contributor

@fhennig fhennig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this Maxi!

I added some notes. Also it looks like the file doesn't have the .adoc extension (which also causes it to not be rendered by github)

@lfrancke lfrancke changed the title Image selection ADR on Image selection Aug 30, 2022
@sbernauer sbernauer changed the title ADR on Image selection ADR on Product image selection Aug 31, 2022
@fhennig
Copy link
Contributor

fhennig commented Sep 1, 2022

I want to link this ticket: stackabletech/issues#141 as it is relevant

@sbernauer
Copy link
Member

Waiting for approval in Arch meeting

@maltesander
Copy link
Member

I did a quick test with an untagged enum https://github.com/stackabletech/operator-rs/blob/image_version_crd/src/commons/image.rs (dont mind the names, i did not use the ADR names yet).
This leads to problems. First of the Custom and Auto variants get confused when deserializing, which causes the tests to fail. Secondly i cannot apply a CRD using this as all:

[customresourcedefinition.apiextensions.k8s.io/zookeeperznodes.zookeeper.stackable.tech](http://customresourcedefinition.apiextensions.k8s.io/zookeeperznodes.zookeeper.stackable.tech) created
The CustomResourceDefinition "zookeeperclusters.zookeeper.stackable.tech" is invalid:
* spec.validation.openAPIV3Schema.properties[spec].properties[version].anyOf[0].properties[productVersion].type: Forbidden: must be empty to be structural
* spec.validation.openAPIV3Schema.properties[spec].properties[version].anyOf[0].properties[repo].default: Forbidden: must be undefined to be structural
* spec.validation.openAPIV3Schema.properties[spec].properties[version].anyOf[0].properties[repo].type: Forbidden: must be empty to be structural
* spec.validation.openAPIV3Schema.properties[spec].properties[version].anyOf[0].properties[stackableVersion].type: Forbidden: must be empty to be structural
* spec.validation.openAPIV3Schema.properties[spec].properties[version].anyOf[0].type: Forbidden: must be empty to be structural
* spec.validation.openAPIV3Schema.properties[spec].properties[version].anyOf[1].properties[custom].type: Forbidden: must be empty to be structural
* spec.validation.openAPIV3Schema.properties[spec].properties[version].anyOf[1].properties[productVersion].type: Forbidden: must be empty to be structural
* spec.validation.openAPIV3Schema.properties[spec].properties[version].anyOf[1].type: Forbidden: must be empty to be structural
* spec.validation.openAPIV3Schema.properties[spec].properties[version].type: Required value: must not be empty for specified object fields

@teozkr said this could probably be fixed in kube-rs. But until then, our proposed solution does not work unless we actually use the enum variant names in the CRD (not using untagged), which will be another breaking change when trying to move back to the untagged version.

@sbernauer
Copy link
Member

Thanks @maltesander!
I feared the same thing, so we have to use a complex enum I'd say

@sbernauer
Copy link
Member

sbernauer commented Sep 7, 2022

We also want a new attribute called pullSecrets similar to imagePullSecrets in spark-k8s setting https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret

  pullPolicy: IfNotPresent # Enum. defaults to IfNotPresent
  pullSecrets:
    - name: regcred # reference to secret in same namespace

sbernauer
sbernauer previously approved these changes Sep 8, 2022
Copy link
Member

@sbernauer sbernauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % commets.
Can you please rename the file to something like ADR023-product-image-selection.adoc (don't forget to update in current_adrs.adoc)

Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de>
Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de>
@Maleware
Copy link
Member Author

Maleware commented Sep 8, 2022

@sbernauer done

@sbernauer sbernauer self-assigned this Sep 8, 2022
@Maleware
Copy link
Member Author

Maleware commented Sep 8, 2022

bors merge

@bors
Copy link

bors bot commented Sep 8, 2022

Configuration problem:
bors.toml: not found

@Maleware Maleware merged commit 4ec3ef5 into main Sep 8, 2022
@Maleware Maleware deleted the image-selection branch September 8, 2022 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants