Skip to content

Instantly share code, notes, and snippets.

View andrewballantyne's full-sized avatar

Andrew Ballantyne andrewballantyne

  • Red Hat
  • Ottawa, Canada
View GitHub Profile
@andrewballantyne
andrewballantyne / PR 6255.diff
Created September 10, 2020 18:13
Allow same named ClusterTriggerBindings and TriggerBindings into the Add Trigger modal dropdown
diff --git frontend/packages/console-shared/src/components/dropdown/ResourceDropdown.tsx frontend/packages/console-shared/src/components/dropdown/ResourceDropdown.tsx
index 9514e4632..965f0c66a 100644
--- frontend/packages/console-shared/src/components/dropdown/ResourceDropdown.tsx
+++ frontend/packages/console-shared/src/components/dropdown/ResourceDropdown.tsx
@@ -62,6 +62,7 @@ interface ResourceDropdownProps {
actionTitle: string;
actionKey: string;
}[];
+ customResourceKey?: (dataSelectorValue: any, resource: K8sResourceKind) => string;
dataSelector: string[] | number[] | symbol[];
@andrewballantyne
andrewballantyne / README.md
Created January 19, 2021 18:05
Sum Istanbul Coverage Report

Purpose

Quick and dirty summing of coverage report generated by the Istanbul npm package.

Helps understand overall groupings percentage covered. Works with OpenShift Console.

Steps

  1. Checkout and navigate to frontend/
  2. yarn coverage
@andrewballantyne
andrewballantyne / test-error-boundaries.diff
Last active June 17, 2022 15:20
Test component and extensions for testing Error Boundaries (openshift/console#11607)
diff --git a/dynamic-demo-plugin/console-extensions.json b/dynamic-demo-plugin/console-extensions.json
index 57ce393b66..e680f9c558 100644
--- a/dynamic-demo-plugin/console-extensions.json
+++ b/dynamic-demo-plugin/console-extensions.json
@@ -7,6 +7,78 @@
* 'default' export). Only the plugin's exposed modules may be used in code references.
*/
[
+ {
+ "type": "console.dashboards/overview/detail/item",
@andrewballantyne
andrewballantyne / ModelServingMetricsContext.tsx
Last active December 7, 2022 01:02
Subbed out definition for the Metrics Context
import * as React from 'react';
export enum ModelServingMetricType {
ENDPOINT_HEALTH = 'end-point-health',
INFERENCE_PERFORMANCE = 'inference-performance',
AVG_RESPONSE_TIME = 'avg-response-time',
REQUEST_COUNT = 'request-count',
FAILED_REQUEST_COUNT = 'failed-request-count',
}
@andrewballantyne
andrewballantyne / rmartine.yaml
Created April 18, 2023 18:28
Test Kubeflow Pipeline Upload File
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: conditional-execution-pipeline
annotations:
tekton.dev/output_artifacts: '{"flip-coin": [{"key": "artifacts/$PIPELINERUN/flip-coin/Output.tgz",
"name": "flip-coin-Output", "path": "/tmp/outputs/Output/data"}], "random-num":
[{"key": "artifacts/$PIPELINERUN/random-num/Output.tgz", "name": "random-num-Output",
"path": "/tmp/outputs/Output/data"}], "random-num-2": [{"key": "artifacts/$PIPELINERUN/random-num-2/Output.tgz",
"name": "random-num-2-Output", "path": "/tmp/outputs/Output/data"}]}'
@andrewballantyne
andrewballantyne / example.yaml
Last active September 6, 2023 12:50
Habana AcceleratorProfile
apiVersion: dashboard.opendatahub.io/v1alpha
kind: AcceleratorProfile
metadata:
name: hpu-profile
spec:
description: gaudi device
displayName: Habana HPU
enabled: true
identifier: habana.ai/gaudi
tolerations:

Today's Connection Logic

Workbenches

sequenceDiagram
    actor U as End User
    participant C as Connection
    participant K8s as Kubernetes
    participant webhook as Mutating Webhook