Skip to content

Instantly share code, notes, and snippets.

View nrb's full-sized avatar
🤔

Nolan Brubaker nrb

🤔
View GitHub Profile
@nrb
nrb / workspace.xml
Created January 27, 2023 15:38
GoLand build/debug settigns for KCP
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunManager" selected="Go Build.kcp">
<configuration name="kcp" type="GoApplicationRunConfiguration" factoryName="Go Application">
<module name="kcp" />
<working_directory value="$PROJECT_DIR$" />
<parameters value="start -v=2 --token-auth-file=test/e2e/framework/auth-tokens.csv --profiler-address=:6060 --audit-log-path=.kcp/audit.log --audit-log-maxsize=1024 --audit-log-mode=batch --audit-log-batch-max-wait=1s --audit-log-batch-max-size=1000 --audit-log-batch-buffer-size=10000 --audit-log-batch-throttle-burst=15 --audit-log-batch-throttle-enable=true --audit-log-batch-throttle-qps=10 --audit-policy-file=.kcp/audit-policy.yaml" />
<envs>
<env name="UNSAFE_E2E_HACK_DISABLE_ETCD_FSYNC" value="1" />
</envs>
@nrb
nrb / config.yaml
Last active August 11, 2020 20:28
Hugo files for testing Velero migration
#baseURL: "https://velero.io/"
disablePathToLower: true
languageCode: en-us
DefaultContentLanguage: "en"
title: Velero
frontmatter:
date: [":filename", ":default"]
params:
author: Velero Authors
vm_logo: vm-logo.png
---
kind: DownloadRequest
apiVersion: velero.io/v1
metadata:
name: snapshot-request
namespace: velero
spec:
target:
kind: BackupVolumeSnapshots
# name here is the backup name
@nrb
nrb / elasticsearches.json
Created April 20, 2020 18:11
Demonstration of elasticsearches CRD after it's been taken from a Kubernetes v1.17 API server with Velero master
{
"apiVersion": "apiextensions.k8s.io/v1beta1",
"kind": "CustomResourceDefinition",
"metadata": {
"annotations": {
"controller-gen.kubebuilder.io/version": "v0.2.5",
},
"creationTimestamp": "2020-04-20T17:55:32Z",
"generation": 1,
"name": "elasticsearches.elasticsearch.k8s.elastic.co",
I0408 20:50:53.175311 1 server.go:118] GRPC request: {}
I0408 20:50:53.175692 1 server.go:123] GRPC response: {"capabilities":[{"Type":{"Rpc":{"type":1}}},{"Type":{"Rpc":{"type":3}}}]}
I0408 20:50:53.180497 1 server.go:117] GRPC call: /csi.v1.Node/NodeStageVolume
I0408 20:50:53.180539 1 server.go:118] GRPC request: {"staging_target_path":"/var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-da43a0eb-2ee1-4dab-86a3-8ec7d6fd7dfb/globalmount","volume_capability":{"AccessType":{"Mount":{"fs_type":"ext4"}},"access_mode":{"mode":1}},"volume_context":{"storage.kubernetes.io/csiProvisionerIdentity":"1586377289887-8081-hostpath.csi.k8s.io"},"volume_id":"56ee5713-79d8-11ea-a524-028290ea0903"}
I0408 20:50:53.181583 1 server.go:123] GRPC response: {}
I0408 20:50:53.187779 1 server.go:117] GRPC call: /csi.v1.Node/NodeGetCapabilities
I0408 20:50:53.187928 1 server.go:118] GRPC request: {}
I0408 20:50:53.188603 1 server.go:123] GRPC response: {"capabilities":[{"Type":{"Rpc":{"typ
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 3m3s default-scheduler persistentvolumeclaim "mysql-pv-claim" not found
Normal Scheduled 3m2s default-scheduler Successfully assigned wordpress/wordpress-mysql-7f7dc5d664-zcddj to kind-worker
Normal SuccessfulAttachVolume 3m2s attachdetach-controller AttachVolume.Attach succeeded for volume "pvc-dbbba746-15b9-468f-bad3-999a553150a9"
Warning FailedMount 59s kubelet, kind-worker Unable to attach or mount volumes: unmounted volumes=[mysql-persistent-storage], unattached volumes=[mysql-persistent-storage default-token-g4nz6]: timed out waiting for the condition
Warning FailedMount 45s (x9 over 2m54s) kubelet, kind-worker MountVolume.SetUp failed for volume
#!/usr/bin/env sh
# This script lives in ~/bin
# It mostly automates the instructions found on https://heptio.github.io/ark/v0.9.0/gcp-config, except that creating the bucket and service account has already been done.
# Source the variables since they're private information
# Defines $PROJECT, $CREDS_FILE, $SERVICE_ACCOUNT_EMAIL, and $BUCKET.
source ~/bin/gke-vars.sh
# Spin up a GKE cluster and get the credentials for kubeconfig
Name: velero
Namespace: velero
CreationTimestamp: Wed, 18 Sep 2019 13:16:18 -0400
Labels: component=velero
Annotations: deployment.kubernetes.io/revision=1
Selector: deploy=velero
Replicas: 0 desired | 0 updated | 0 total | 0 available | 0 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 0
RollingUpdateStrategy: 25% max unavailable, 25% max surge
Name: only-velero
Namespace: velero
Labels: velero.io/storage-location=default
Annotations: <none>
Phase: Completed
Namespaces:
Included: velero
Excluded: <none>
env:
- name: VELERO_SCRATCH_DIR
value: /scratch
- name: VELERO_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
{{- if and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp")) }}
{{- if eq $provider "aws" }}