Skip to content

Conversation

@rhamilto
Copy link
Member

@rhamilto rhamilto commented Mar 29, 2019

https://jira.coreos.com/browse/CONSOLE-1483

Screen Shot 2019-04-23 at 11 46 24 AM
Screen Shot 2019-04-23 at 11 47 32 AM
Screen Shot 2019-04-23 at 11 47 25 AM

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: consolelinks.console.openshift.io
  annotations:
    displayName: ConsoleLinks
    description: Extension for customizing OpenShift web console links
spec:
  scope: Cluster
  group: console.openshift.io
  versions:
  - name: v1
    served: true
    storage: true
  names:
    plural: consolelinks
    singular: consolelink
    kind: ConsoleLink
    listKind: ConsoleLinkList
  additionalPrinterColumns:
  - name: Text
    type: string
    JSONPath: .spec.text
  - name: URL
    type: string
    JSONPath: .spec.href
  - name: Menu
    type: string
    JSONPath: .spec.menu
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  subresources:
    status: {}
  validation:
    openAPIV3Schema:
      properties:
        spec:
          type: object
          description: Represents console link customizations spec
          required:
          - text
          - href
          - location
          properties:
            text:
              type: string
              description: Text of the link
            href:
              type: string
              description: Absolute secure URL for the link (must use https)
              pattern: '^https://([\w-]+.)+[\w-]+(/[\w- ./?%&=])?$'
            location:
              type: string
              description: Determines which dropdown menu the link is added to (HelpMenu, UserMenu)
              pattern: ^(HelpMenu|UserMenu)$

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 29, 2019
@rhamilto rhamilto force-pushed the console-links-crd branch from d33c08c to 9705a43 Compare March 29, 2019 17:21
@rhamilto rhamilto changed the base branch from master to master-next March 29, 2019 17:25
@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 29, 2019
@rhamilto rhamilto force-pushed the console-links-crd branch from 9705a43 to dfd03f5 Compare March 29, 2019 17:47
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 29, 2019
@rhamilto rhamilto force-pushed the console-links-crd branch 4 times, most recently from 7c3c1bd to 7ceee4a Compare March 29, 2019 19:04
@spadgett spadgett added this to the v4.2 milestone Apr 2, 2019
@rhamilto rhamilto force-pushed the console-links-crd branch 2 times, most recently from 907cbcb to 6c19d19 Compare April 8, 2019 12:57
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 12, 2019
@rhamilto rhamilto force-pushed the console-links-crd branch from 6c19d19 to 808b850 Compare April 12, 2019 13:05
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 12, 2019
@rhamilto rhamilto force-pushed the console-links-crd branch 3 times, most recently from 6ceb328 to f55bb5f Compare April 18, 2019 13:14
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 18, 2019
@rhamilto rhamilto force-pushed the console-links-crd branch 2 times, most recently from 32c6a9a to ad7e7c5 Compare April 18, 2019 18:02
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 18, 2019
@rhamilto rhamilto force-pushed the console-links-crd branch from ad7e7c5 to 6dd65ec Compare April 23, 2019 15:48
@openshift-ci-robot openshift-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 23, 2019
@rhamilto rhamilto force-pushed the console-links-crd branch from 5aee65f to bf10831 Compare May 28, 2019 19:31
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 28, 2019
@benjaminapetersen
Copy link
Contributor

The CRD file can be removed from this PR. frontend/extensions/console-link.crd.yaml

@rhamilto rhamilto force-pushed the console-links-crd branch from bf10831 to 76c8e46 Compare May 28, 2019 19:43
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 28, 2019
@rhamilto rhamilto force-pushed the console-links-crd branch 2 times, most recently from c1a4c1a to 2198e50 Compare May 29, 2019 18:13
@rhamilto
Copy link
Member Author

/retest

benjaminapetersen added a commit to benjaminapetersen/console-operator that referenced this pull request Jun 4, 2019
@christianvogt
Copy link
Contributor

@spadgett we should create extensions for all these areas of contribution and then have the CRD simply populate the extensions
FYI @vojtechszocs

@rhamilto rhamilto force-pushed the console-links-crd branch from 2198e50 to 8538548 Compare June 19, 2019 18:01
@rhamilto
Copy link
Member Author

/retest

@rhamilto rhamilto force-pushed the console-links-crd branch from 8538548 to 44ff079 Compare June 19, 2019 19:20
benjaminapetersen added a commit to benjaminapetersen/console-operator that referenced this pull request Jun 20, 2019
@spadgett spadgett removed the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Jun 25, 2019
@rhamilto rhamilto changed the title [WIP] Add ConsoleLink CRD to enable custom links in help and user dropdowns Add ConsoleLink CRD to enable custom links in help and user dropdowns Jun 25, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 25, 2019
@spadgett
Copy link
Member

@spadgett we should create extensions for all these areas of contribution and then have the CRD simply populate the extensions
FYI @vojtechszocs

Makes sense, I agree.

If you don't mind, I suggest we get the initial change in and then make it a proper extension in a follow-on so we don't miss 4.2. This PR has been blocked for about 3 months on API changes and was originally written before static plugins were added!

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

@rhamilto Please open a follow on issue to add an extension point for static plugins to contribute links. Some examples are #1668 and #1615. Thanks!

spec:
href: 'https://www.example.com'
location: HelpMenu
text: Additional help menu link
Copy link
Member

Choose a reason for hiding this comment

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

nit: We probably want title case in the YAML template since the other menu items are title case

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 25, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhamilto, spadgett

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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-merge-robot openshift-merge-robot merged commit 62003fc into openshift:master Jun 25, 2019
@rhamilto rhamilto deleted the console-links-crd branch June 25, 2019 15:13
@spadgett
Copy link
Member

@spadgett we should create extensions for all these areas of contribution and then have the CRD simply populate the extensions
FYI @vojtechszocs

@christianvogt I opened an issue to make this change: https://jira.coreos.com/browse/CONSOLE-1571

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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants