Skip to content

docs: add design docs for including additional objects in bundles #1564

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 1 commit into from
Jul 1, 2020

Conversation

exdx
Copy link
Member

@exdx exdx commented Jun 2, 2020

Description of the change:
Docs for including new objects in the bundle.

  • PodDisruptionBudget (policy/v1beta1)
  • PriorityClass (scheduling.k8s.io/v1alpha,v1beta1,v1)
  • VerticalPodAutoScaler

Docs were written in a generic way to target both upstream and downstream OpenShift audiences. The underlying assumption is that we will allow users to include these objects in the bundle with no limitations on the actual content of these objects.

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@exdx exdx requested review from ecordell and njhale June 2, 2020 18:28
@exdx exdx changed the title feat: add design docs for including additional objects in bundles docs: add design docs for including additional objects in bundles Jun 3, 2020
@exdx exdx requested a review from awgreene June 3, 2020 13:18
Copy link
Member

@njhale njhale left a comment

Choose a reason for hiding this comment

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

These are great notes!

In addition to this, for design proposals we want some more concrete implementation details like:

  • How will the new resources be stored in a bundle
  • How will they be unpacked and applied to the cluster
  • How do we handle incompatibilities; e.g. old version of OLM doesn't know how to apply the new resources, what happens? (think index backport safety)

There are several older examples in the design-proposals directory that may help.

@exdx exdx force-pushed the feat/gardener-objects-bundle branch from fe8d9bb to 64d4b17 Compare June 4, 2020 17:42
@exdx exdx requested a review from njhale June 4, 2020 17:42
Copy link
Member

@awgreene awgreene left a comment

Choose a reason for hiding this comment

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

Great work @exdx! Left a few open questions / brainstorming comments.

@exdx
Copy link
Member Author

exdx commented Jun 23, 2020

As this is doc-only we should be OK to merge without CI pending approval.

@exdx exdx force-pushed the feat/gardener-objects-bundle branch 2 times, most recently from 362f1dc to 8f796c0 Compare June 25, 2020 17:25
@kevinrizza
Copy link
Member

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 25, 2020
No limitations are placed on the contents of a `PriorityClass` manifest at this time when installing on-cluster, but that may change as OLM develops
an advanced strategy to ensure installed objects do not compromise the cluster.

However, the following is a suggested guideline to follow when including `PriorityClass` objects in a bundle.
Copy link
Member

Choose a reason for hiding this comment

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

So here's an edge case that I think we should cover:

  1. I install an operator with a globalDefault=true PDB
  2. An update is pushed that changes the name of the PDB
  3. Boom?

Copy link
Member Author

@exdx exdx Jun 30, 2020

Choose a reason for hiding this comment

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

If I understand this correctly, I think we should be ok in this case - per If you delete a PriorityClass, existing Pods that use the name of the deleted PriorityClass remain unchanged, but you cannot create more Pods that use the name of the deleted PriorityClass. so the rename would't affect existing pods.

see https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#notes-about-podpriority-and-existing-clusters

If the operator continues to use the name of the old PDB in their code then that's an issue, but on their end

Copy link
Member

Choose a reason for hiding this comment

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

If the PDB is renamed in an update, the existing PDB sticks around until the CSV is deleted, which only happens once the new CSV is ready. I think we still would have a problem since there would be a time where you have two PDBs with the global field set true concurrently.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is an edge-case that could get us during upgrades of operators with PDBs. I think as we think through the usecases we add e2e tests that can verify OLM behavior in this scenario.

@exdx exdx force-pushed the feat/gardener-objects-bundle branch from 8f796c0 to 0e0d139 Compare June 30, 2020 14:41
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: exdx, kevinrizza

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@exdx exdx requested a review from njhale June 30, 2020 14:41
@ecordell
Copy link
Member

ecordell commented Jul 1, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2020
@exdx
Copy link
Member Author

exdx commented Jul 1, 2020

manually merging as this is doc-only.

@exdx exdx merged commit 48951d3 into operator-framework:master Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants