Tim Flannagan
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: Initial Platform Operators Documentation author: timflannagan --- # Overview Implements the components described in the [phase 0 platform operators EP](https://github.com/openshift/enhancements/blob/master/enhancements/olm/platform-operators.md). ## Payload Introduction The [o/platform-operators#58](https://github.com/openshift/platform-operators/pull/58) introduces the platform operator components to the payload. ## High Level Components Note: These components will only be present when admins enable the "TechPreviewNoUpgrades" feature set. ### Terminology - CPOM: cluster platform operator manager - ACO: aggregate ClusterOperator controller - PO: platform operator(s) - BD: rukpak BundleDeployment API - CO: ClusterOperator API ### Overview - CPOM: Reconciles the PlatformOperator resource and creates BundleDeployment resources. Interacts with OLM's CatalogSource API and registry+v1 bundle format. - ACO: Reconciles an "aggregate" ClusterOperator resource and acts as a proxy to the CVO. Lists any PlatformOperator resources in the cluster, inspects their status, and bubbles up any failure states to the "platform-operators-aggregated" ClusterOperator resource. - RukPak: Manages the Bundle and BundleDeployment resources. Dynamically watches the underlying resources, and ensures they're present on the cluster. ## Configuring Platform Operators ### Enabling the "TechPreviewNoUpgrades" Feature Set This feature set can either be enabled before cluster creation or after cluster rollout. #### Before Cluster Creation Configure a "FeatureGate" YAML manifest and include that manifest in the cluster's Kubernetes manifests before running the openshift installer. The openshift installer will bootstrap the cluster using those configured manifests. #### After Cluster Creation Patch the "FeatureGate" cluster singleton resource and enable this feature set: ```bash= cat <<EOF | oc apply -f - --- apiVersion: config.openshift.io/v1 kind: FeatureGate metadata: annotations: include.release.openshift.io/self-managed-high-availability: "true" include.release.openshift.io/single-node-developer: "true" release.openshift.io/create-only: "true" name: cluster spec: featureSet: TechPreviewNoUpgrade EOF } ``` After patching that resource, you can run `kubectl wait --for=condition=Available=True clusteroperators.config.openshift.io/platform-operators-aggregated` command to ensure a successful rollout. ### Installing Platform Operators > Note: Only the redhat-operators catalog source can be used during phase 0. This is a short term limitation. The small pool of testing candidates may include the cert-manager, service-binding-operator, and local-storage-operator packages. > Note: During phase 0, automatic upgrades are unsupported. In the case that the generated BundleDeployment resource already exists, the reconciliation logic will skip running the sourcing logic to avoid performing unnecessary work. An admin may wish to create a PO resource before or after cluster creation. #### Before Cluster Creation The process for creating a PO before cluster creation is similar to the "Enabling the "TechPreviewNoUpgrades" Feature Set" header where the admin will configure a PO YAML manifest and include it with the rest of the cluster's Kubernetes manifests. #### After Cluster Creation After cluster creation, an admin can create a PO resource. The following will attempt to install the cert-manager component as a platform operator: ```yaml= apiVersion: platform.openshift.io/v1alpha1 kind: PlatformOperator metadata: name: cert-manager spec: package: name: openshift-cert-manager-operator ``` Once that resource has been created, the CPOM component will attempt to find that "openshift-cert-manager-operator" resource in the redhat-operators catalog source, and then generate a rukpak BundleDeployment resource that specifies a registry+v1 bundle image that's within that package name. After creating the cert-manager PlatformOperator resource, wait until that resource has reported an "Install=true" status condition: ```yaml= ... status: activeBundleDeployment: name: cert-manager conditions: - lastTransitionTime: "2022-10-24T17:24:40Z" message: Successfully applied the cert-manager BundleDeployment resource reason: InstallSuccessful status: "True" type: Installed ``` And then verify that the "platform-operators-aggregated" ClusterOperator resource is reporting an "Available=True" status condition state: ```yaml= ... status: conditions: - lastTransitionTime: "2022-10-24T17:43:26Z" message: All platform operators are in a successful state reason: AsExpected status: "False" type: Progressing - lastTransitionTime: "2022-10-24T17:43:26Z" status: "False" type: Degraded - lastTransitionTime: "2022-10-24T17:43:26Z" message: All platform operators are in a successful state reason: AsExpected status: "True" type: Available ``` It's important to note that an "invalid" PlatformOperator resource can influence cluster lifecycle events, which is similar to how the ClusterOperator components behave. During phase 0, this means that an "invalid" PlatformOperator can block cluster rollout. ### Deleting Platform Operators In the case that an admin wants to delete a previously installed platform operator from the cluster, the following workflow could be used: - Run `kubectl get platformoperators` to determine the `metadata.name` of the platform operator they wish to delete from the cluster. - Run `kubectl delete platformoperator <name of PO resource>`. After running those commands, a cascading deletion of the PO resources will be performed. In the case that the PO being deleted was able to successfully source and install a registry+v1 bundle, then the expectation is that all the bundle's resources (e.g. CRDs/operator deployments/etc.) will be deleted. Note: This cascading deletion behavior can only account for the Kubernetes manifests defined in a registry+v1 bundle image. In the case that a platform operator creates/manages/etc. resources that are defined outside of their bundle image, then those resources won't be garbage collected and will require manual admin intervention to remove an remaining resources. This is a known limitation of the cert-manager component when testing on 4.12 clusters. ### Manually Updating Platform Operators As mentioned above, the phase 0 implementation doesn't support automatic upgrades. After a PO has been successfully installed on the cluster, then the CPOM component will only ensure that the generated BundleDeployment resource is still present on the cluster. In the case that the redhat-operators catalog source has been updated, and new bundle content is available, then either of the following manual steps can be performed: - Delete the underlying BundleDeployment resource. This may result in Kubernetes garbage collecting cluster-scoped resources, e.g. CRDs, which can impact workload health in unsupported configurations. - Update the underlying BundleDeployment resource and change the registry+v1 bundle image container image being referenced. In order to update the underlying BundleDeployment resource: - Identify the desired registry+v1 bundle container image. This can be done by inspecting the redhat-operators catalog source, and using OLM's registry gRPC APIs to find bundles within the admin configured package name. The CPOM component will chose the highest semver value for all the bundles in that list. - Patch the generated BundleDeployment resource with that desired registry+v1 bundle image. The CPOM component will generate a BundleDeployment resource with the same name as the PO resource that manages that resource. After performing those steps, you can watch the BundleDeployment resource status to ensure a successful pivot occurs. This can be verified by running the `kubectl get bd -w` command, and eventually seeing a populated "InstallationSucceeded" message in the "INSTALL STATE" custom column output. ## Summary The [CPOM component](https://github.com/openshift/platform-operators/pull/41) is responsible for reconciling the PlatformOperators API. During phase 0, admins will configure a desired OLM-based operator package name that's present in the redhat-operators catalog source. During reconciliation, this component is responsible for finding a registry+v1 bundle that satisfies the admin configured package name. In the case of an invalid configuration, e.g. the configured package doesn't exist, that state will be bubbled up to the PlatformOperator resource the manager is reconciling. After "sourcing" a registry+v1 bundle, the reconciliation logic will generate a rukpak BundleDeployment resource under-the-hood, and delegate the management of that registry+v1 bundle's contents to the rukpak stack. After generating the BundleDeployment resource that will manage the sourced registry+v1 bundle, the manager will be responsible for inspecting that resource's status sub-resource, and bubble up any failure states to the PlatformOperator resource it's currently reconciling. Common examples may include a registry+v1 bundle that cannot be successfully "unpacked" by rukpak's registry+v1 provisioner, or a registry+v1 bundle contains manifests that are invalid and the Kubernetes API server rejects the creation of that manifest. ## Testing As mentioned above, this work will be delivered through tech preview guidelines. As a result, it may be reasonable to only block payload introduction on any systematic issue discovered that cannot result in a PO being installed. ### Reporting Bugs See [the platform operators wiki](https://hackmd.io/@qi9P1V9yRHWRt8a_qoeq9w/BknVnZFbi#Where-do-I-file-bugs) for more information. ### Suggested Testing Plan - An "invalid" PO can block cluster rollout. If a PlatformOperator references an OLM package through via the `spec.package.name` field, and that package doesn't exist in the redhat-operators catalog source, then cluster roll out should be blocked. - A generated BundleDeployment resource that references a registry+v1 bundle image that doesn't support the AllNamespace install mode should result in an installation failure. The aggregate CO resource should be updated to reflect that failure condition. - When there's no POs installed on the cluster, then the aggregate CO should report an available state. - When there are multiple POs installed on the cluster, and one of those POs has failed to find a registry+v1 bundle image or fails to install successfully, then the aggregate CO should report an unavailable state. - The platform-operators-aggregate ClusterOperator should have a populated status.versions that matches the other ClusterOperator versions in the cluster. - Deleting an installed PlatformOperator should result in the underlying operator resources being deleted. ### Optional Testing Checks - Installing an OLM operator that references the same package as an installed PO results in a failed installation. - Deleting an underlying platform operator resource (e.g. deployment) results in that resource being recreated. - Manually updating a PO results in the rollout of new platform operator contents. - POs are excluded from the hypershift cluster profile during phase 0. - Any PSA/webhook HA/service-ca-operator configuration issues. ### Known Limitations - OLM's marketplace component is an optional cluster capability that can be disabled. This has implications on phase 0 as we only source from the redhat-operators catalog source that's managed by the marketplace component. Available workarounds include creating this catalog source yourself. - The rukpak provisioner implementations don't have the ability to inspect the health/state of the resources that it's managing. This has implications when bubbling up the generated BundleDeployment state to the PlatformOperator resource that owns it. In the case that a registry+v1 bundle contains manifests that can be successfully applied to the cluster, but will fail at runtime (e.g. a Deployment referencing a non-existent image) the result will be a successful status being reflected in an individual PlatformOperator/BundleDeployment resource. - Admins configuring these PlatformOperator custom resources before cluster creation cannot easily determine the desired package name without leveraging an existing cluster, or relying on downstream documented examples. There's no validation logic that ensures an individually configured PlatformOperator resource will be able to successfully roll out to the cluster. - There's no logic that guarantees package name uniqueness. - There's no core ClusterOperator that reflects the status of the CPOM component. - There's no logic to ensure that accommodates the current cluster topology mode. All webhooks are deployed using the HA configuration, which has implications on SNO cluster environments.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully