Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Yusuke Kuoka mumoshu

🏠
Working from home
View GitHub Profile
@mumoshu
mumoshu / setup.sh
Last active Aug 22, 2022 — forked from h3poteto/setup.sh
Setup Kubernetes using kubeadm. In case you provided a wrong control-plane node address, run `sudo kubeadm reset` and try again.
View setup.sh
#!/bin/bash
set -e
if [ $# -ne 1 ]; then
echo "controle-plane-endpoint is required" 1>&2
exit 1
fi
CONTROLE_PLANE_ENDPOINT=$1
View helm-diff-deps.log
default, argocd-application-controller, ServiceAccount (v1) has changed:
# Source: helm-diff-dependencies/charts/argo-cd/templates/argocd-application-controller/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: true
metadata:
name: argocd-application-controller
labels:
helm.sh/chart: argo-cd-3.11.5
- app.kubernetes.io/name: argocd-override-application-controller
@mumoshu
mumoshu / main.go
Created Jan 17, 2021
errgroup.Groupの亜種(一時的なエラーの場合は部分的に再試行し、そうでなければ全て中止する)
View main.go
package main
import (
"context"
"errors"
"fmt"
"os"
"strings"
"sync"
"time"
@mumoshu
mumoshu / main.go
Last active Jan 17, 2021
errgroup.Groupの亜種(最初のエラーで他のgoroutineをキャンセルする)
View main.go
package main
import (
"context"
"errors"
"fmt"
"os"
"sync"
"time"
)
View gist:e42e8a319aab6885916270cd3c4d0c35
metric {
provider = "cloudwatch"
max = 10
query = <<EOS
[
{
"Id": "e1",
"Expression": "m1",
"Label": "ErrorCount"
},
View all.yaml
---
# 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
View github-actions-chatops-template.yaml
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
View app-of-apps.yaml
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 / datadog-cluster-agent.yaml
Created Dec 17, 2019
Datadog for EKS on Fargate
View datadog-cluster-agent.yaml
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 / testapp.deployment.yaml
Created Dec 15, 2019
EKS on Fargate Datadog and Fluentbit sidecars example
View testapp.deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: testapp
name: testapp
spec:
replicas: 1
selector:
matchLabels: