Skip to content

Instantly share code, notes, and snippets.

View thoraxe's full-sized avatar

Erik Jacobs thoraxe

View GitHub Profile
@thoraxe
thoraxe / cache.yaml
Last active October 28, 2020 19:30
Red Hat Data Grid for Space Ring Things - an extra secret with just the operator user and password is required
metadata:
name: playerdata-cache
namespace: srt
spec:
adminAuth:
secretName: playerdata-grid-auth
clusterName: gamedata
name: playerdata
templateName: org.infinispan.REPL_SYNC
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://example.com/example.json",
"type": "object",
"title": "The Space Ring Things Player Schema",
"description": "The root schema comprises the entire JSON document.",
"default": {},
"examples": [
{
"position": {
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
kubernetesVersion: v1.21.1
apiServer:
apiVersion: kafka.strimzi.io/v1beta1
kind: Kafka
metadata:
name: my-cluster
namespace: serverless-demo
spec:
kafka:
config:
offsets.topic.replication.factor: 1
transaction.state.log.replication.factor: 1
kind: Deployment
apiVersion: apps/v1
metadata:
annotations:
deployment.kubernetes.io/revision: '1'
selfLink: /apis/apps/v1/namespaces/stressy/deployments/stress
resourceVersion: '31943'
name: stress
uid: b3161dca-06f4-46b8-9736-03a0c6258653
creationTimestamp: '2020-08-17T14:30:12Z'
@thoraxe
thoraxe / alert.yaml
Last active August 13, 2020 15:33
custom metrics and alerting content
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: example-alert
spec:
groups:
- name: example
rules:
- alert: TooManyErrorAlert
expr: http_requests_total{code="404"} > 10
kind: LimitRange
apiVersion: v1
metadata:
name: stressy-core-resource-limits
spec:
limits:
- type: Container
max:
cpu: '4'
memory: 6Gi
 __ __
/ \ / \ ______ _ _ __ __ __
/ /\ / /\ \ / __ \ | | | | / \ \ \ / /
/ / / / \ \ | | | | | | | | / /\ \ \ /
\ \ \ \ / / | |__| | | |__| | / ____ \ | |
\ \/ \ \/ / \_ ___/ \____/ /_/ \_\ |_|
\__/ \__/ \ \__
\___\ by Red Hat
Build, Store, and Distribute your Containers
apiVersion: redhatcop.redhat.io/v1alpha1
kind: QuayEcosystem
metadata:
selfLink: >-
/apis/redhatcop.redhat.io/v1alpha1/namespaces/container-registry/quayecosystems/quayecosystem
resourceVersion: '75113'
name: quayecosystem
uid: 5c22133d-3b3e-47a4-bf9f-6078518e4936
creationTimestamp: '2020-08-11T16:54:30Z'
generation: 2
- name: wait for the status of the ArgoCD subscription to not be empty
k8s_info:
api_version: operators.coreos.com/v1alpha1
kind: Subscription
name: argocd-operator
namespace: "{{ ocp4_workload_argocd_operator_project }}"
register: r_ocp4_workload_argocd_operator_subscription
until:
- r_ocp4_workload_argocd_operator_subscription is defined
- r_ocp4_workload_argocd_operator_subscription.resources is defined