Skip to content

Instantly share code, notes, and snippets.

@dln
Created September 17, 2019 07:46
Show Gist options
  • Save dln/08a24de3b4aa3214f265be2720be0a12 to your computer and use it in GitHub Desktop.
Save dln/08a24de3b4aa3214f265be2720be0a12 to your computer and use it in GitHub Desktop.
kustomize from istio helm chart + gke ingress health checks
apiVersion: apps/v1
kind: Deployment
metadata:
name: istio-ingressgateway
spec:
template:
spec:
containers:
- name: istio-proxy
readinessProbe:
httpGet:
path: /_healthz
port: 443
scheme: HTTPS
apiVersion: embark-studios.com/v1
kind: Istio
metadata:
name: istio
istio:
version: "1.3.0"
helm_values: values.yaml
generators:
- istio.yaml
resources:
- health-check-filter.yaml
patches:
- ingressgateway_probes.yaml
#!/bin/bash
set -ex
function _config() {
yaml2json < istio.yaml | jq -r "$@"
}
istio_version="$(_config .istio.version)"
values="$(_config '.istio.helm_values // "values.yaml" ')"
tmp=$(mktemp -d -t istio.XXXXX)
trap "{ rm -rf $tmp; }" EXIT
archive=/tmp/istio-${istio_version}-linux.tar.gz
if [[ ! -f $archive ]]; then
curl -fsL -o $archive https://github.com/istio/istio/releases/download/${istio_version}/istio-${istio_version}-linux.tar.gz
fi
tar -C $tmp -xzf $archive
helm_dir="$tmp/istio-${istio_version}/install/kubernetes/helm"
helm template --namespace istio-system -f $values --name istio-init $helm_dir/istio-init
helm template --namespace istio-system -f $values --name istio $helm_dir/istio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment