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
66 changes: 66 additions & 0 deletions manifests/00-crd-extension-console-log-link.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: consoleexternalloglinks.console.openshift.io
annotations:
displayName: ConsoleExternalLogLinks
description: ConsoleExternalLogLink is an extension for customizing OpenShift web console log links.
spec:
scope: Cluster
group: console.openshift.io
versions:
- name: v1
served: true
storage: true
names:
plural: consoleexternalloglinks
singular: consoleexternalloglink
kind: ConsoleExternalLogLink
listKind: ConsoleExternalLogLinkList
additionalPrinterColumns:
- name: Text
type: string
JSONPath: .spec.text
- name: HrefTemplate
type: string
JSONPath: .spec.hrefTemplate
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
subresources:
status: {}
validation:
openAPIV3Schema:
properties:
spec:
type: object
description: >-
ConsoleExternalLogLinkSpec is the desired log link configuration.
The log link will appear on the logs tab of the pod details page.
required:
- text
- hrefTemplate
properties:
text:
type: string
description: text is the display text for the link
hrefTemplate:
Comment thread
rhamilto marked this conversation as resolved.
type: string
description: |-
hrefTemplate is an absolute secure URL (must use https) for the log link including variables to be replaced. Variables are specified in the URL with the format ${variableName}, for instance, ${containerName} and will be replaced with the corresponding values from the resource. Resource is a pod.
Supported variables are
* ${resourceName} - name of the resource which containes the logs
* ${resourceUID} - UID of the resource which contains the logs
* e.g. `11111111-2222-3333-4444-555555555555`
* ${containerName} - name of the resource's container that contains the logs
* ${resourceNamespace} - namespace of the resource that contains the logs
* ${podLabels} - JSON representation of labels matching the pod with the logs
* e.g. `{"key1":"value1","key2":"value2"}`
e.g., https://example.com/logs?resourceName=${resourceName}&containerName=${containerName}&resourceNamespace=${resourceNamespace}&podLabels=${podLabels}
pattern: '^https://'
namespaceFilter:
Comment thread
benjaminapetersen marked this conversation as resolved.
type: string
description: >-
namespaceFilter is a regular expression used to restrict a log link to a
matching set of namespaces (e.g., `openshift-`). If not specified, links will
be displayed for all the namespaces.
1 change: 1 addition & 0 deletions manifests/03-rbac-role-cluster-extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ rules:
- consolelinks
- consoleclidownloads
- consolenotifications
- consoleexternalloglinks
verbs:
- get
- list
Expand Down