Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
mkdir CA
openssl genrsa -aes256 -out CA/rootCA.key 4096
openssl req -x509 -new -nodes -key CA/rootCA.key -sha256 -days 3650 -out CA/rootCA.crt
@pmuir
pmuir / kafka-consumer-perf-test.yaml
Created November 25, 2021 21:47
Deploy producers and consumers to Kubernetes
kind: Deployment
apiVersion: apps/v1
metadata:
name: kafka-consumer-perf-test
spec:
replicas: 12
selector:
matchLabels:
app: kafka-consumer-perf-test
template:
@pmuir
pmuir / rhosak.json
Last active November 17, 2021 17:58
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
Traceback (most recent call last):\n File \"/usr/bin/google-cloud-sdk/bin/bootstrapping/gsutil.py\", line 123, in \u003cmodule\u003e\n exceptions.HandleError(e, 'gsutil')\n File \"/usr/bin/google-cloud-sdk/lib/googlecloudsdk/calliope/exceptions.py\", line 527, in HandleError\n core_exceptions.reraise(exc)\n File \"/usr/bin/google-cloud-sdk/lib/googlecloudsdk/core/exceptions.py\", line 146, in reraise\n six.reraise(type(exc_value), exc_value, tb)\n File \"/usr/bin/google-cloud-sdk/bin/bootstrapping/gsutil.py\", line 121, in \u003cmodule\u003e\n main()\n File \"/usr/bin/google-cloud-sdk/bin/bootstrapping/gsutil.py\", line 48, in main\n if account in c_gce.Metadata().Accounts():\n File \"/usr/bin/google-cloud-sdk/lib/googlecloudsdk/core/credentials/gce.py\", line 76, in Inner\n return f(self, *args, **kwargs)\n File \"/usr/bin/google-cloud-sdk/lib/googlecloudsdk/core/credentials/gce.py\", line 160, in Accounts\n gce_read.GOOGLE_GCE_METADATA_ACCOUNTS_URI + '/')\n File \"/usr/bin/googl
Operation failed with error:
generic::invalid_argument: terraform apply failed, error: exit status 1, stderr:
Error: Error applying plan:
1 error occurred:
\t* cse_kube_config.service: 1 error occurred:
\t* cse_kube_config.service: unable to call kubectl. out: , err: timeout calling /export/hda3/borglet/remote_package_fs_dirs/mpm.cloud__saas_accelerator__management__terraform.v1-9ad7ed5a_b33f8550_ff667d27_fc29bc8c_80775178.m0.d0.c0.it4500.firstclass.f4ff7cb2d10bf1e60b84e6a919ef5f49.cloud-control2-terraform-engine.138509999084/mount_point/kubectl [--insecure-skip-tls-verify=true --server=http://localhost:32979 apply -f -]. Last stderr: Error from server (BadRequest): error when creating \"STDIN\": Job in version \"v1\" cannot be handled as a Job: v1.Job.Spec: v1.JobSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.Containers: []v1.Container: v1.Container.Env: []v1.EnvVar: v1.EnvVar.v1.EnvVar.Value: ReadString: expects \" or n, but found 1, error found in #10 byte of ...|,\"value\":1},{\"name\":|..., bigger
=== FAIL: pkg/logs TestGetRunningBuildLogsWithMatchingBuildPods (0.04s)
WARNING: Failed to retrieve team settings: failed to create the jx client: namespaces "jx" not found - falling back to default settings...
EOF
Showing logs for build fakeowner/fakerepo/fakebranch/1 stage app-extension and container build-step-credential-initializer-xht92
Pod logs...
Showing logs for build fakeowner/fakerepo/fakebranch/1 stage app-extension and container build-step-working-dir-initializer-8c9w5
Showing logs for build fakeowner/fakerepo/fakebranch/1 stage app-extension and container build-step-place-tools
error: upgrading helm chart '.': failed to run 'kubectl apply --recursive -f /var/folders/qr/h482727j4dvc7qphqfkvws1r0000gn/T/helm-template-workdir-095494330/jxing/output/namespaces/kube-system -l jenkins.io/chart-release=jxing --namespace kube-system --wait --validate=false' command in directory '/var/folders/qr/h482727j4dvc7qphqfkvws1r0000gn/T/jx-helm-apply-728712013/jxing', output: 'clusterrole.rbac.authorization.k8s.io/jxing-nginx-ingress unchanged
clusterrolebinding.rbac.authorization.k8s.io/jxing-nginx-ingress unchanged
configmap/jxing-nginx-ingress-controller unchanged
deployment.extensions/jxing-nginx-ingress-controller configured
deployment.extensions/jxing-nginx-ingress-default-backend configured
role.rbac.authorization.k8s.io/jxing-nginx-ingress unchanged
rolebinding.rbac.authorization.k8s.io/jxing-nginx-ingress unchanged
serviceaccount/jxing-nginx-ingress unchanged
Error from server (Invalid): error when applying patch:
{"spec":{"clusterIP":""}}
package gits
import (
"fmt"
"net/url"
"os"
"os/user"
"runtime/debug"
"sort"
"strings"
=== Failed
=== FAIL: pkg/cmd/step/scheduler TestStepSchedulerConfigMigrateNonGitopsAdvanced (0.09s)
Loading prow config from file test_data/step_scheduler_config_migrate/nongitops_advanced/config.yaml
Loading prow plugins from file test_data/step_scheduler_config_migrate/nongitops_advanced/plugins.yaml
Building scheduler resources from prow config
Verifying generated config
step_scheduler_config_migrate_test.go:56:
Error Trace: step_scheduler_config_migrate_test.go:56
Error: Received unexpected error:
Migrated Prow config do not match, not applying!