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 / 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:
#!/usr/bin/env bash
set -e
if eksctl get cluster -f $FILE >/dev/null 2>&1; then
# See https://github.com/weaveworks/eksctl/blob/33ec1ed967c1ad03c985bf18774ea970d85c86f1/site/content/usage/03-cluster-upgrade.md#L41
eksctl update cluster -f $FILE
eksctl utils update-kube-proxy
eksctl utils update-aws-node
eksctl utils update-coredns
#!/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
@mumoshu
mumoshu / action.yml
Created October 8, 2019 05:38
GitHub Actions v2 Gotcha: It seems like we're unable to use ${{ inputs.. }} from within `runs.using` of action.yml :(
name: 'VariantRun'
description: 'Run Variant task defined in your Variantfile https://github.com/mumoshu/variant'
inputs:
image:
description: 'Docker image for Variant containers'
required: false
default: 'Dockerfile'
runs:
using: 'docker'
image: '${{ inputs.image }}'
$ 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
@mumoshu
mumoshu / prow.md
Last active July 2, 2019 04:46
helmfile + flagger + istio + chatops demo

Generate a random password for verifying HTTP requests from GitHub to your WebHook endpoint:

openssl rand -hex 20 > /path/to/hook_secret

Decide the GitHub repository named for the demo:

ORG=mumoshu # Replace with your org name!
$ goweight ./
5.7 MB github.com/aws/aws-sdk-go/service/s3
3.8 MB net/http
3.3 MB runtime
1.9 MB golang.org/x/net/http2
1.8 MB github.com/golang/protobuf/proto
1.8 MB net
1.8 MB crypto/tls
1.7 MB google.golang.org/api/storage/v1
1.5 MB github.com/aws/aws-sdk-go/aws/endpoints
@mumoshu
mumoshu / eks
Last active February 1, 2019 06:12
ek
#!/usr/bin/env variant
mixins:
cluster: &cluster
type: object
properties:
vpc-private-subnets:
type: array
vpc-public-subnets:
type: array

Rationale

I'm doing GitOps(https://www.weave.works/blog/gitops-operations-by-pull-request). Personally I've been using brigade and atlantis for their respective sweet-spots.

However, all the existing solutions had required me to maintain machines to host them. Something that works in long term without my hand is always appreciated.

What

I'd like it a lot if Codefresh added "Slack" or more generically "Webhook" as pipeline triggers.

try:
tf.nn.seq2seq = tf.contrib.legacy_seq2seq
tf.nn.rnn_cell = tf.contrib.rnn
tf.nn.rnn_cell.GRUCell = tf.contrib.rnn.GRUCell
tf.nn.rnn = tf.contrib.rnn.static_rnn
# https://github.com/tensorflow/tensorflow/issues/7032
tf.sub = tf.subtract
# https://stackoverflow.com/questions/47296969/valueerror-variable-rnn-basic-rnn-cell-kernel-already-exists-disallowed-did-y
tf.reset_default_graph()
print("TensorFlow's version : 1.0 (or more)")