Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions manifests/00-crd-extension-console-cli-download.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: consoleclidownloads.console.openshift.io
annotations:
displayName: ConsoleCLIDownload
description: Extension for configuring openshift web console command line interface (CLI) downloads.
spec:
scope: Cluster
group: console.openshift.io
versions:
- name: v1
served: true
storage: true
names:
plural: consoleclidownloads
singular: consoleclidownload
kind: ConsoleCLIDownload
listKind: ConsoleCLIDownloadList
additionalPrinterColumns:
- name: Display name
type: string
JSONPath: .spec.displayName
- name: Age
type: string
JSONPath: .metadata.creationTimestamp
- name: Description
type: string
JSONPath: .spec.description
subresources:
status: {}
validation:
openAPIV3Schema:
properties:
spec:
type: object
description: Represents console CLI download spec
required:
- displayName
- description
- links
properties:
displayName:
type: string
description: Display name of the CLI download
description:
type: string
description: Description of the CLI download (can include markdown)
links:
Comment thread
benjaminapetersen marked this conversation as resolved.
type: array
description: Objects that hold CLI download link details
nullable: true
items:
type: object
required:
- href
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- ./?%&=])?$'

56 changes: 56 additions & 0 deletions manifests/00-crd-extension-console-link.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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
Comment thread
benjaminapetersen marked this conversation as resolved.
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: '\bHelpMenu\b|\bUserMenu\b'
68 changes: 68 additions & 0 deletions manifests/00-crd-extension-console-notification.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: consolenotifications.console.openshift.io
annotations:
displayName: ConsoleNotification
description: Extension for configuring openshift web console notifications.
spec:
scope: Cluster
group: console.openshift.io
versions:
- name: v1
served: true
storage: true
names:
plural: consolenotifications
singular: consolenotification
kind: ConsoleNotification
listKind: ConsoleNotificationList
additionalPrinterColumns:
- name: Text
type: string
JSONPath: .spec.text
- name: Location
type: string
JSONPath: .spec.location
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
subresources:
status: {}
validation:
openAPIV3Schema:
properties:
spec:
type: object
description: Represents console notification spec
required:
- text
- location
properties:
text:
type: string
description: Text of the notification
location:
type: string
description: The location of the notification (BannerTop, BannerBottom, BannerTopBottom)
pattern: '^(BannerTop|BannerBottom|BannerTopBottom)$'
link:
type: object
description: Object that holds notification link details
required:
- href
- text
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- ./?%&=])?$'
backgroundColor:
type: string
description: The background color for the notification as CSS data type color
color:
type: string
description: The color of the text for the notification as CSS data type color
17 changes: 17 additions & 0 deletions manifests/03-rbac-role-cluster-extensions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# any logged-in user authenticated through the
# console needs READONLY access to these resources
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: console-extensions-reader
rules:
- apiGroups:
- console.openshift.io
resources:
- consolelinks
- consoleclidownloads
- consolenotifications
verbs:
- get
- list
- watch
12 changes: 12 additions & 0 deletions manifests/04-rbac-rolebinding-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
kind: ClusterRoleBinding
Comment thread
benjaminapetersen marked this conversation as resolved.
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: console-extensions-reader
roleRef:
kind: ClusterRole
name: console-extensions-reader
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: Group
name: system:authenticated
apiGroup: rbac.authorization.k8s.io