Skip to content

Instantly share code, notes, and snippets.

View mumoshu's full-sized avatar
🏠
Working from home

Yusuke Kuoka mumoshu

🏠
Working from home
View GitHub Profile
@mumoshu
mumoshu / testapp.deployment.yaml
Created December 15, 2019 02:54
EKS on Fargate Datadog and Fluentbit sidecars example
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: testapp
name: testapp
spec:
replicas: 1
selector:
matchLabels:
metric {
provider = "cloudwatch"
max = 10
query = <<EOS
[
{
"Id": "e1",
"Expression": "m1",
"Label": "ErrorCount"
},
---
# Source: datadog/charts/kube-state-metrics/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/name: kube-state-metrics
helm.sh/chart: kube-state-metrics-2.8.4
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/instance: datadog
name: Pull Request ChatOps Template
on:
# https://help.github.com/en/articles/events-that-trigger-workflows#issue-comment-event-issue_comment
issue_comment:
types: [created]
jobs:
example:
name: Example ChatOps command
runs-on: ubuntu-latest
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: apps
namespace: kube-system
spec:
project: default
source:
repoURL: https://github.com/mumoshu/configrepo.git
targetRevision: HEAD
@mumoshu
mumoshu / create-range.js
Last active December 18, 2019 01:28
選択範囲の文字列を取得するjs
// See: Introduction to Range
// http://www.quirksmode.org/dom/range_intro.html
var range = document.createRange();
// In which DOM node does the Range start or end?
range.setStart(selectionObject.anchorNode, selectionObject.anchorOffset);
// At which text offset does the Range start or end? The text offset is the position of the first or last character in the text node that's part of the Range.
range.setEnd(selectionObject.focusNode, selectionObject.focusOffset);
@mumoshu
mumoshu / datadog-cluster-agent.yaml
Created December 17, 2019 06:12
Datadog for EKS on Fargate
kind: ServiceAccount
apiVersion: v1
metadata:
name: datadog-cluster-agent
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: datadog-cluster-agent
@mumoshu
mumoshu / podinfo.demo.virtualnode.yaml
Last active December 14, 2019 14:16
AppMesh on EKS examples. Assume the cluster name is `test3`
apiVersion: appmesh.k8s.aws/v1alpha1
kind: VirtualNode
metadata:
# Matches APPMESH_VIRTUAL_NODE_NAME=mesh/global/virtualNode/podinfo-demo envvar injected to pods by appmesh-inject
# so that appmesh-controller can locate this virtual node from the pod
name: podinfo
namespace: demo
spec:
meshName: global
listeners:
#!/bin/bash
set -e
if [ ! -z "$DEBUG" ]; then
set -vx
fi
kubectl get po -a --all-namespaces | grep -v ^NAME | fzf | awk '{ print $1, $2 }' > ns-pod
$ HELM_HOME=$HOME/Library/helm make install
scripts/update-gofmt.sh
scripts/verify-gofmt.sh
scripts/verify-golint.sh
scripts/verify-govet.sh
+ go vet ./pkg/...
go: warning: "./pkg/..." matched no packages
no packages to vet
+ go vet ./cmd/...
# github.com/databus23/helm-diff/vendor/github.com/deislabs/oras/pkg/context