Thursday, March 3, 2022

HostAliases for Kubernetes

https://stackoverflow.com/questions/56390226/how-to-add-extra-hosts-entries-in-helm-charts 

Kubernetes provides a DNS service that all pods get to use. In turn, you can define an ExternalName service that just defines a DNS record. Once you do that, your pods can talk to that service the same way they'd talk to any other Kubernetes service, and reach whatever server.

You could deploy a set of ExternalName services globally. You could do it in a Helm chart too, if you wanted, something like

apiVersion: v1
kind: Service
metadata:
  name: {{ .Release.Name }}-{{ .Chart.Name }}-foo
spec:
  type: ExternalName
  externalName: {{ .Values.fooHostname }}

Thursday, February 24, 2022

git migration

 

Migrate one repo-a into another repo-b

git clone </path/to/repo-b>

git checkout -b branch-to-merge-repo-a

git subtree add -P aws ssh://git@git.fei.com:7999/in/aws.git <revision>

git push


Then create pull request and merge the new branch into master


Import file/folder history from one repo-a to repo-b


cd repository

git log --pretty=email --patch-with-stat --reverse --full-index --binary -- cloudformation/opensearch > ~/tmp/opensearch.patch

cd ../another_repository

git am --committer-date-is-author-date < ~/tmp/opensearch.patch


git log --pretty=email --patch-with-stat --full-index --binary --reverse -- client > patch

Saturday, February 12, 2022

istio troubleshootin

 

  1.   istioctl proxy-status
  2.   istioctl proxy-config listener istio-ingressgateway-1-n istio-system
  3.   istioctl proxy-config cluster istio-ingressgateway-1 -n istio-system
  4.  istioctl proxy-config route istio-ingressgateway-1 -n istio-system