Skip to content

Instantly share code, notes, and snippets.

View nak3's full-sized avatar

Kenjiro Nakayama nak3

View GitHub Profile
# Resources for AddonComponents prometheus component
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus-istio-system
labels:
app: prometheus
release: istio
rules:
function prepare() {
kubectl create ns bug
kubectl create ns bug-alt
kubectl label ns bug istio-injection=enabled
kubectl label ns bug-alt istio-injection=enabled
cat <<EOF | kubectl apply -f -
apiVersion: "authentication.istio.io/v1alpha1"
kind: "Policy"
metadata:
-------
resource: NAME
-------
-------
resource: bindings
-------
apiVersion: v1
items: []
kind: List
metadata:
This file has been truncated, but you can view the full file.
-------
resource: NAME
-------
-------
resource: bindings
-------
apiVersion: v1
items: []
kind: List
metadata:
This file has been truncated, but you can view the full file.
-------
resource: NAME
-------
-------
resource: bindings
-------
apiVersion: v1
items: []
kind: List
metadata:
@nak3
nak3 / destinationrule.yaml
Created December 3, 2019 12:26
Knative Serving mTLS STRICT configs
# Copyright 2019 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
---
# PATCH #1: Creating the istio-system namespace.
apiVersion: v1
kind: Namespace
metadata:
name: istio-system
labels:
istio-injection: disabled
# PATCH #1 ends.
---
#!/bin/bash
function foo(){
cat | kubectl apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: config-mako
data:
# This should only be used by our performance automation.
@nak3
nak3 / big.go
Created February 10, 2019 08:01
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
"math/big"
@nak3
nak3 / s3.py
Created August 7, 2018 06:48
s3 create bucket
import boto
import boto.s3.connection
access_key = "testkey"
secret_key = "testsecret"
endpoint = "s3.US.knakayam-ceph-c2.example.com"
endport = 80
boto.config.add_section('s3a')