Rukpak
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners 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 New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy 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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Supporting local bundle content ## Summary https://github.com/operator-framework/rukpak/issues/92 Currently the Bundle API only supports referencing a spec.source.image container image, or a spec.source.git git repository. It would be nice to be able to support configuring a Bundle to source local cluster contents, e.g. a mounted ConfigMap or PersistentVolume filesystem path, so we can avoid having to build/push a scratch-based container image or create a git repository to create a Bundle on the fly. This functionality of creating a Bundle dynamically within the cluster, without creating external sources, is important for the success of deppy. Deppy performs resolution based on a set of Inputs, and returns a resolution result. This will likely be in the form of a ResolveSet Bundle, a collection of BundleDeployments that are managed as one unit. See [this doc](https://hackmd.io/nprZyBwPQqmix94abAiMsA#ResolveSet-bundle-integration) for more information. This ResolveSet Bundle needs to be created on demand, and so having it be backed by a cluster resource like a ConfigMap is desirable. ## Use-cases 1. Deppy creates a ResolveSet bundle dynamically as a result of a successful resolution. The ResolveSet consists of one or more BundleDeployments that rukpak should manage. There is no pre-existing container image or git repository that contains the BundleDeployments, so there needs to be a way to on-demand create a source for a Bundle embedded in a BD. Creating a ConfigMap, storing the BDs in the configmap, and then passing it to the rukpak layer enables deppy to create resources on the fly. 2. Supporting dynamic Bundle creation via a backing source would also be valuable for the dev experience. Instead of manually creating an image, or a git repository, to create a Bundle simply uploading manifests to a ConfigMap in the cluster and then referencing it allows for quicker iteration and a nice dev UX. ## Proposal The proposed solution is to introduce a new source type, `local`, to the existing union type field on the Bundle API. The first type of local file would be based on a ConfigMap, and later can be expanded to a path on a PersistentVolume. The proposed API could be something like this: ```yaml apiVersion: core.rukpak.io/v1alpha1 kind: Bundle metadata: name: resolveset-aef235c spec: source: type: local # oneOf union type local: configMap: name: cm-resolveset-aef235c namespace: rukpak-system provisionerClassName: core.rukpak.io/plain ``` The user specifies an existing ConfigMap on the cluster as part of their Bundle. The mount path (based on `bundle.name`) is then added to the existing `/var/run/bundles` path present in the local storage of the plain provisioner. The directory name would be the name of the bundle. This ensures that the unpacked bundle is treated the same way as other unpacked bundle types. The manifests would be stored in a tar.gz file. Initially, the API is intentionally limited. Once support for a PV file type is added, the file API can be expanded to include a `path` field that specifies where on the PV the manifests are located. The ConfigMap will be ownerref'd by the Bundle that references it, so that when a Bundle is removed, the backing ConfigMap is also removed. ## Workflow 1. User has a `manifests` directory locally that contains a set of valid Kubernetes objects as YAML files. 2. User runs `kubectl create configmap my-configmap --from-file=<manifests directory>` which creates a ConfigMap that contains the objects in the directory. The key for each entry is the filename, and the value is the contents of the file. 3. User creates a BundleDeployment referencing the configmap (by namespace/name) using the `local` source type in the template, as in the above example. 4. The provisioner referenced by the Bundle sees the new BundleDeployment, and goes to unpack its contents. The provisioner, as part of its reconcilation loop, reads the contents of the configmap and stores them in a `/var/run/bundles/<bundle-name>.tar.gz` in its local storage. 5. From there, the BundleDeployment behaves the same as any other. 6. When the BD is removed, the underlying configmap gets deleted as well. ## Limitations * ConfigMaps have a limited size (1MB) and therefore cannot accomodate a large number of manifests. This is a known limitation for all ConfigMaps in Kubernetes and something the user should be aware of. Adding support for a PersistentVolume source will let users work around this size limitation. ## Implementation Checklist - [ ] Implement new source type with a ConfigMap as the supported backend - [ ] Write tests verifying the new source type - [ ] Add docs outlining the new source type

    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