Skip to content
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

create poc for adding plugins to rosa #1912

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ciaranRoche
Copy link
Member

@ciaranRoche ciaranRoche commented Apr 9, 2024

With lots of time recently spent discussing proxy aws commands. This POC looks to add support for plugins in ROSA, allowing us to easily add the aws binary as a plugin to ROSA.

So far this POC supports both the aws and ocm binaries along with any other plugins that are prefixed with rosa-

Usage

Using aws plugin

╭─croche@fedora ~/Work/ocm/rosa ‹poc-plugin› 
╰─$ rosa aws iam get-policy --policy-arn arn:aws:iam::765374464689:policy/croche-4.13-Installer-Role-Policy | jq 
{
  "Policy": {
    "PolicyName": "croche-4.13-Installer-Role-Policy",
    "PolicyId": "ANPA3EM67QKYZSNXPRRXR",
    "Arn": "arn:aws:iam::765374464689:policy/croche-4.13-Installer-Role-Policy",
    "Path": "/",
    "DefaultVersionId": "v1",
    "AttachmentCount": 1,
    "PermissionsBoundaryUsageCount": 0,
    "IsAttachable": true,
    "CreateDate": "2024-04-03T11:12:24+00:00",
    "UpdateDate": "2024-04-03T11:12:24+00:00",
    "Tags": [
      {
        "Key": "rosa_role_prefix",
        "Value": "croche-4.13"
      },
      {
        "Key": "red-hat-managed",
        "Value": "true"
      },
      {
        "Key": "rosa_openshift_version",
        "Value": "4.15"
      },
      {
        "Key": "rosa_role_type",
        "Value": "installer"
      }
    ]
  }
}

Using the ocm plugin

╭─croche@fedora ~/Work/ocm/rosa ‹poc-plugin› 
╰─$ rosa ocm list clusters
ID                                NAME                          API URL                                                     OPENSHIFT_VERSION   PRODUCT ID      CLOUD_PROVIDER  REGION ID       STATE        
17ccnfgpfasu8e731vlps34qtg9a5hv2  c9f7b02f-c28d-45f3-9892-5867  NONE                                                        NONE                ocp             NONE            NONE            ready        
188uv2hjmql5i5eirkf8thiau1pvr1t5  519a1cee-0023-1118-bce7-e153  NONE                                                        NONE                ocp             NONE            NONE            ready        
19dc5cd43lpc4i9ekje0cr8f0slicchl  63ae9d4d-6bfc-448e-9334-25e8  NONE                                                        NONE                ocp             NONE            NONE            ready  

Listing all plugins

╭─croche@fedora ~/Work/ocm/rosa ‹poc-plugin› 
╰─$ rosa plugin list                                                                                            130 ↵
- Name:  ocm
  Path:  /home/croche/go/bin
- Name:  rosa-mgmt
  Path:  /home/croche/go/bin
- Name:  rosa-ocm
  Path:  /home/croche/go/bin
- Name:  aws
  Path:  /usr/local/bin
- Name:  rosa-aws
  Path:  /usr/local/bin

This is just a POC and is missing tests etc, but just looking for some feedback on this.

@ciaranRoche
Copy link
Member Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 9, 2024
@openshift-ci openshift-ci bot requested review from den-rgb and gdbranco April 9, 2024 13:31
Copy link
Contributor

openshift-ci bot commented Apr 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ciaranRoche

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 9, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 20, 2024
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

openshift-ci bot commented Apr 22, 2024

@ciaranRoche: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/commits f21f0ff link true /test commits
ci/prow/test f21f0ff link true /test test
ci/prow/coverage f21f0ff link true /test coverage
ci/prow/images-release-images f21f0ff link true /test images-release-images

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants