Skip to content

Instantly share code, notes, and snippets.

View alicek106's full-sized avatar

Chanho Yong alicek106

View GitHub Profile
@alicek106
alicek106 / envoy-stats.yaml
Created April 12, 2020 13:59
envoy-stats.yaml
# 현재 버그(?) 가 있어, 원래 relabel config를 그대로 옮기면 prometheus env에 target_label이 들어가지 않는 이상한 현상이 있다.
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: envoy-stats-monitor
namespace: default
labels:
app: monitoring
monitoring: istio-proxies
spec:
@alicek106
alicek106 / prometheus-simple.yaml
Last active May 1, 2021 02:21
prometheus-simple.yaml
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
labels:
owner: alicek106
name: prometheus
namespace: default
spec:
alerting:
alertmanagers:
from couchbase.cluster import Cluster
from couchbase.cluster import PasswordAuthenticator
cluster = Cluster('couchbase://couchbase')
authenticator = PasswordAuthenticator('admin', 'testpassword')
# from couchbase.admin import Admin
# adm = Admin('admin', 'testpassword', host='couchbase', port=8091)
# adm.bucket_create('alice-bucket-test', bucket_type='couchbase')
cluster.authenticate(authenticator)
apiVersion: apps/v1
kind: Deployment
metadata:
name: ingress-annotation-test-flask
labels:
app: ingress-annotation-test-flask
spec:
replicas: 1
selector:
matchLabels:
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: sample-app-virtualservice
namespace: default
spec:
gateways:
- sample-app-gateway
hosts:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: sample-app-gateway
namespace: default
spec:
selector:
istio: ingressgateway
servers:
- hosts:
apiVersion: apps/v1
kind: Deployment
metadata:
name: ingress-annotation-test-spring
namespace: default
labels:
app: ingress-annotation-test-spring
spec:
replicas: 1
selector:
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app: jaeger
app.kubernetes.io/component: agent
app.kubernetes.io/instance: jaeger-allinone
app.kubernetes.io/managed-by: jaeger-operator
app.kubernetes.io/name: jaeger-allinone-agent
app.kubernetes.io/part-of: jaeger
terraform {
required_version = ">= 0.12.0"
}
module "eks" {
source = "terraform-aws-modules/eks/aws"
cluster_name = "alicek106-cluster"
subnets = ["subnet-A", "subnet-B", "subnet-C"]
manage_aws_auth = true
version = "~> 7.0.0"
@alicek106
alicek106 / Retrieve-AllEvents.ps1
Created December 17, 2019 11:37
Retrieve-AllEvents.ps1 (윈도우 로그 이벤트 모두 반환해서 덤프떠서 보여주는 파웨셸 스크립트 모달)
#requires -version 2
Param(
[Parameter(ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Enter the one or more hosts')]
[Alias('ComputerName','MachineName','Server','Host')]
[switch]$ExportToCsv,
[string]$ExportToCSVPath = '.'
)
if (!([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]'Administrator'))