sidecar deployment

This commit is contained in:
Tony Hallworth 2020-03-17 21:35:22 +11:00
parent 7c12b05791
commit 3469a4c436
10 changed files with 173 additions and 110 deletions

View file

@ -12,21 +12,21 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
apiVersion: networking.istio.io/v1alpha3 # apiVersion: networking.istio.io/v1alpha3
kind: Gateway # kind: Gateway
metadata: # metadata:
name: frontend-gateway # name: frontend-gateway
spec: # spec:
selector: # selector:
istio: ingressgateway # use Istio default gateway implementation # istio: ingressgateway # use Istio default gateway implementation
servers: # servers:
- port: # - port:
number: 80 # number: 80
name: http # name: http
protocol: HTTP # protocol: HTTP
hosts: # hosts:
- "*" # - "*"
--- # ---
apiVersion: networking.istio.io/v1alpha3 apiVersion: networking.istio.io/v1alpha3
kind: VirtualService kind: VirtualService
metadata: metadata:
@ -35,7 +35,7 @@ spec:
hosts: hosts:
- "*" - "*"
gateways: gateways:
- frontend-gateway - ingressgateway.istio-system
http: http:
- route: - route:
- destination: - destination:

View file

@ -214,7 +214,7 @@ metadata:
release: istio release: istio
istio: galley istio: galley
data: data:
validatingwebhookconfiguration.yaml: |- validatingwebhookconfiguration.yaml: |-
apiVersion: admissionregistration.k8s.io/v1beta1 apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration kind: ValidatingWebhookConfiguration
metadata: metadata:
@ -334,7 +334,7 @@ metadata:
release: istio release: istio
istio: grafana istio: grafana
data: data:
custom-resources.yaml: |- custom-resources.yaml: |-
apiVersion: authentication.istio.io/v1alpha1 apiVersion: authentication.istio.io/v1alpha1
kind: Policy kind: Policy
metadata: metadata:
@ -350,18 +350,18 @@ data:
- name: grafana - name: grafana
ports: ports:
- number: 3000 - number: 3000
run.sh: |- run.sh: |-
#!/bin/sh #!/bin/sh
set -x set -x
if [ "$#" -ne "1" ]; then if [ "$#" -ne "1" ]; then
echo "first argument should be path to custom resource yaml" echo "first argument should be path to custom resource yaml"
exit 1 exit 1
fi fi
pathToResourceYAML=${1} pathToResourceYAML=${1}
kubectl get validatingwebhookconfiguration istio-galley 2>/dev/null kubectl get validatingwebhookconfiguration istio-galley 2>/dev/null
if [ "$?" -eq 0 ]; then if [ "$?" -eq 0 ]; then
echo "istio-galley validatingwebhookconfiguration found - waiting for istio-galley deployment to be ready" echo "istio-galley validatingwebhookconfiguration found - waiting for istio-galley deployment to be ready"
@ -381,7 +381,7 @@ data:
fi fi
sleep 5 sleep 5
kubectl apply -f ${pathToResourceYAML} kubectl apply -f ${pathToResourceYAML}
--- ---
# Source: istio/charts/grafana/templates/configmap-dashboards.yaml # Source: istio/charts/grafana/templates/configmap-dashboards.yaml
@ -14696,7 +14696,7 @@ data:
orgId: 1 orgId: 1
type: prometheus type: prometheus
url: http://prometheus:9090 url: http://prometheus:9090
dashboardproviders.yaml: | dashboardproviders.yaml: |
apiVersion: 1 apiVersion: 1
providers: providers:
@ -14707,7 +14707,7 @@ data:
path: /var/lib/grafana/dashboards/istio path: /var/lib/grafana/dashboards/istio
orgId: 1 orgId: 1
type: file type: file
--- ---
# Source: istio/charts/kiali/templates/configmap.yaml # Source: istio/charts/kiali/templates/configmap.yaml
apiVersion: v1 apiVersion: v1
@ -14732,10 +14732,10 @@ data:
web_root: /kiali web_root: /kiali
external_services: external_services:
tracing: tracing:
url: url:
in_cluster_url: http://tracing/jaeger in_cluster_url: http://tracing/jaeger
grafana: grafana:
url: url:
in_cluster_url: http://grafana:3000 in_cluster_url: http://grafana:3000
prometheus: prometheus:
url: http://prometheus:9090 url: http://prometheus:9090
@ -15051,7 +15051,7 @@ metadata:
release: istio release: istio
istio: citadel istio: citadel
data: data:
custom-resources.yaml: |- custom-resources.yaml: |-
# Authentication policy to enable permissive mode for all services (that have sidecar) in the mesh. # Authentication policy to enable permissive mode for all services (that have sidecar) in the mesh.
apiVersion: "authentication.istio.io/v1alpha1" apiVersion: "authentication.istio.io/v1alpha1"
kind: "MeshPolicy" kind: "MeshPolicy"
@ -15066,18 +15066,18 @@ data:
peers: peers:
- mtls: - mtls:
mode: PERMISSIVE mode: PERMISSIVE
run.sh: |- run.sh: |-
#!/bin/sh #!/bin/sh
set -x set -x
if [ "$#" -ne "1" ]; then if [ "$#" -ne "1" ]; then
echo "first argument should be path to custom resource yaml" echo "first argument should be path to custom resource yaml"
exit 1 exit 1
fi fi
pathToResourceYAML=${1} pathToResourceYAML=${1}
kubectl get validatingwebhookconfiguration istio-galley 2>/dev/null kubectl get validatingwebhookconfiguration istio-galley 2>/dev/null
if [ "$?" -eq 0 ]; then if [ "$?" -eq 0 ]; then
echo "istio-galley validatingwebhookconfiguration found - waiting for istio-galley deployment to be ready" echo "istio-galley validatingwebhookconfiguration found - waiting for istio-galley deployment to be ready"
@ -15097,7 +15097,7 @@ data:
fi fi
sleep 5 sleep 5
kubectl apply -f ${pathToResourceYAML} kubectl apply -f ${pathToResourceYAML}
--- ---
# Source: istio/templates/configmap.yaml # Source: istio/templates/configmap.yaml
@ -15858,7 +15858,7 @@ spec:
configMap: configMap:
name: istio-grafana-custom-resources name: istio-grafana-custom-resources
restartPolicy: OnFailure restartPolicy: OnFailure
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -15890,7 +15890,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
--- ---
# Source: istio/charts/kiali/templates/serviceaccount.yaml # Source: istio/charts/kiali/templates/serviceaccount.yaml
@ -16039,7 +16039,7 @@ spec:
configMap: configMap:
name: istio-security-custom-resources name: istio-security-custom-resources
restartPolicy: OnFailure restartPolicy: OnFailure
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -16071,7 +16071,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
--- ---
# Source: istio/charts/security/templates/serviceaccount.yaml # Source: istio/charts/security/templates/serviceaccount.yaml
@ -16803,7 +16803,7 @@ spec:
name: http name: http
selector: selector:
app: grafana app: grafana
--- ---
# Source: istio/charts/kiali/templates/service.yaml # Source: istio/charts/kiali/templates/service.yaml
@ -17065,7 +17065,7 @@ spec:
resources: resources:
requests: requests:
cpu: 10m cpu: 10m
volumes: volumes:
- name: certs - name: certs
secret: secret:
@ -17077,7 +17077,7 @@ spec:
- name: mesh-config - name: mesh-config
configMap: configMap:
name: istio name: istio
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -17109,7 +17109,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
--- ---
# Source: istio/charts/gateways/templates/deployment.yaml # Source: istio/charts/gateways/templates/deployment.yaml
@ -17124,7 +17124,7 @@ metadata:
heritage: Tiller heritage: Tiller
istio: egressgateway istio: egressgateway
release: istio release: istio
spec: spec:
replicas: 1 replicas: 1
selector: selector:
@ -17143,7 +17143,7 @@ spec:
heritage: Tiller heritage: Tiller
istio: egressgateway istio: egressgateway
release: istio release: istio
annotations: annotations:
sidecar.istio.io/inject: "false" sidecar.istio.io/inject: "false"
spec: spec:
@ -17200,7 +17200,7 @@ spec:
requests: requests:
cpu: 10m cpu: 10m
memory: 40Mi memory: 40Mi
env: env:
- name: NODE_NAME - name: NODE_NAME
valueFrom: valueFrom:
@ -17255,7 +17255,7 @@ spec:
value: kubernetes://apis/apps/v1/namespaces/istio-system/deployments/istio-egressgateway value: kubernetes://apis/apps/v1/namespaces/istio-system/deployments/istio-egressgateway
- name: ISTIO_META_ROUTER_MODE - name: ISTIO_META_ROUTER_MODE
value: standard value: standard
volumeMounts: volumeMounts:
- name: istio-certs - name: istio-certs
mountPath: /etc/certs mountPath: /etc/certs
@ -17279,7 +17279,7 @@ spec:
secret: secret:
secretName: "istio-egressgateway-ca-certs" secretName: "istio-egressgateway-ca-certs"
optional: true optional: true
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -17311,7 +17311,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@ -17324,7 +17324,7 @@ metadata:
heritage: Tiller heritage: Tiller
istio: ingressgateway istio: ingressgateway
release: istio release: istio
spec: spec:
replicas: 1 replicas: 1
selector: selector:
@ -17343,7 +17343,7 @@ spec:
heritage: Tiller heritage: Tiller
istio: ingressgateway istio: ingressgateway
release: istio release: istio
annotations: annotations:
sidecar.istio.io/inject: "false" sidecar.istio.io/inject: "false"
spec: spec:
@ -17406,7 +17406,7 @@ spec:
requests: requests:
cpu: 10m cpu: 10m
memory: 40Mi memory: 40Mi
env: env:
- name: NODE_NAME - name: NODE_NAME
valueFrom: valueFrom:
@ -17461,8 +17461,8 @@ spec:
value: kubernetes://apis/apps/v1/namespaces/istio-system/deployments/istio-ingressgateway value: kubernetes://apis/apps/v1/namespaces/istio-system/deployments/istio-ingressgateway
- name: ISTIO_META_ROUTER_MODE - name: ISTIO_META_ROUTER_MODE
value: standard value: standard
volumeMounts: volumeMounts:
- name: istio-certs - name: istio-certs
mountPath: /etc/certs mountPath: /etc/certs
@ -17486,7 +17486,7 @@ spec:
secret: secret:
secretName: "istio-ingressgateway-ca-certs" secretName: "istio-ingressgateway-ca-certs"
optional: true optional: true
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -17518,7 +17518,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
--- ---
--- ---
@ -17576,7 +17576,7 @@ spec:
resources: resources:
requests: requests:
cpu: 10m cpu: 10m
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data/grafana mountPath: /data/grafana
@ -17618,7 +17618,7 @@ spec:
- name: config - name: config
mountPath: "/etc/grafana/provisioning/dashboards/dashboardproviders.yaml" mountPath: "/etc/grafana/provisioning/dashboards/dashboardproviders.yaml"
subPath: dashboardproviders.yaml subPath: dashboardproviders.yaml
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -17650,7 +17650,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
volumes: volumes:
- name: config - name: config
configMap: configMap:
@ -17729,14 +17729,14 @@ spec:
httpGet: httpGet:
path: /kiali/healthz path: /kiali/healthz
port: 20001 port: 20001
scheme: 'HTTP' scheme: 'HTTP'
initialDelaySeconds: 5 initialDelaySeconds: 5
periodSeconds: 30 periodSeconds: 30
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /kiali/healthz path: /kiali/healthz
port: 20001 port: 20001
scheme: 'HTTP' scheme: 'HTTP'
initialDelaySeconds: 5 initialDelaySeconds: 5
periodSeconds: 30 periodSeconds: 30
env: env:
@ -17754,7 +17754,7 @@ spec:
resources: resources:
requests: requests:
cpu: 10m cpu: 10m
volumes: volumes:
- name: kiali-configuration - name: kiali-configuration
configMap: configMap:
@ -17767,7 +17767,7 @@ spec:
secret: secret:
secretName: kiali secretName: kiali
optional: true optional: true
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -17799,7 +17799,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
--- ---
# Source: istio/charts/mixer/templates/deployment.yaml # Source: istio/charts/mixer/templates/deployment.yaml
@ -17849,7 +17849,7 @@ spec:
secret: secret:
secretName: policy-adapter-secret secretName: policy-adapter-secret
optional: true optional: true
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -17881,7 +17881,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
containers: containers:
- name: mixer - name: mixer
image: "docker.io/istio/mixer:1.5.0" image: "docker.io/istio/mixer:1.5.0"
@ -17911,7 +17911,7 @@ spec:
requests: requests:
cpu: 10m cpu: 10m
memory: 100Mi memory: 100Mi
volumeMounts: volumeMounts:
- name: istio-certs - name: istio-certs
mountPath: /etc/certs mountPath: /etc/certs
@ -17969,7 +17969,7 @@ spec:
requests: requests:
cpu: 10m cpu: 10m
memory: 40Mi memory: 40Mi
volumeMounts: volumeMounts:
- name: istio-certs - name: istio-certs
mountPath: /etc/certs mountPath: /etc/certs
@ -18026,7 +18026,7 @@ spec:
secret: secret:
secretName: telemetry-adapter-secret secretName: telemetry-adapter-secret
optional: true optional: true
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -18058,7 +18058,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
containers: containers:
- name: mixer - name: mixer
image: "docker.io/istio/mixer:1.5.0" image: "docker.io/istio/mixer:1.5.0"
@ -18095,7 +18095,7 @@ spec:
requests: requests:
cpu: 50m cpu: 50m
memory: 100Mi memory: 100Mi
volumeMounts: volumeMounts:
- name: istio-certs - name: istio-certs
mountPath: /etc/certs mountPath: /etc/certs
@ -18156,7 +18156,7 @@ spec:
requests: requests:
cpu: 10m cpu: 10m
memory: 40Mi memory: 40Mi
volumeMounts: volumeMounts:
- name: istio-certs - name: istio-certs
mountPath: /etc/certs mountPath: /etc/certs
@ -18164,7 +18164,7 @@ spec:
- name: uds-socket - name: uds-socket
mountPath: /sock mountPath: /sock
--- ---
--- ---
# Source: istio/charts/pilot/templates/deployment.yaml # Source: istio/charts/pilot/templates/deployment.yaml
@ -18248,7 +18248,7 @@ spec:
requests: requests:
cpu: 10m cpu: 10m
memory: 100Mi memory: 100Mi
volumeMounts: volumeMounts:
- name: config-volume - name: config-volume
mountPath: /etc/istio/config mountPath: /etc/istio/config
@ -18299,7 +18299,7 @@ spec:
requests: requests:
cpu: 10m cpu: 10m
memory: 40Mi memory: 40Mi
volumeMounts: volumeMounts:
- name: istio-certs - name: istio-certs
mountPath: /etc/certs mountPath: /etc/certs
@ -18312,7 +18312,7 @@ spec:
secret: secret:
secretName: istio.istio-pilot-service-account secretName: istio.istio-pilot-service-account
optional: true optional: true
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -18344,7 +18344,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
--- ---
# Source: istio/charts/prometheus/templates/deployment.yaml # Source: istio/charts/prometheus/templates/deployment.yaml
@ -18376,12 +18376,27 @@ spec:
spec: spec:
serviceAccountName: prometheus serviceAccountName: prometheus
containers: containers:
- name: sidecar
image: gcr.io/stackdriver-prometheus/stackdriver-prometheus-sidecar:0.7.3
args:
- "--stackdriver.project-id=tonyh-gke-o11y-anz-openbanking"
- "--prometheus.wal-directory=/data/wal"
- "--prometheus.api-address=http://127.0.0.1:9090"
- "--stackdriver.kubernetes.location=australia-southeast1"
- "--stackdriver.kubernetes.cluster-name=o11y-ob"
ports:
- name: sidecar
containerPort: 9091
volumeMounts:
- name: data-volume
mountPath: /data
- name: prometheus - name: prometheus
image: "docker.io/prom/prometheus:v2.12.0" image: "docker.io/prom/prometheus:v2.12.0"
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
args: args:
- '--storage.tsdb.retention=6h' - '--storage.tsdb.retention=6h'
- '--config.file=/etc/prometheus/prometheus.yml' - '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/data'
ports: ports:
- containerPort: 9090 - containerPort: 9090
name: http name: http
@ -18396,13 +18411,17 @@ spec:
resources: resources:
requests: requests:
cpu: 10m cpu: 10m
volumeMounts: volumeMounts:
- name: data-volume
mountPath: /data
- name: config-volume - name: config-volume
mountPath: /etc/prometheus mountPath: /etc/prometheus
- mountPath: /etc/istio-certs - mountPath: /etc/istio-certs
name: istio-certs name: istio-certs
volumes: volumes:
- name: data-volume
emptyDir: {}
- name: config-volume - name: config-volume
configMap: configMap:
name: prometheus name: prometheus
@ -18410,7 +18429,7 @@ spec:
secret: secret:
defaultMode: 420 defaultMode: 420
secretName: istio.default secretName: istio.default
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -18442,7 +18461,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
--- ---
# Source: istio/charts/security/templates/deployment.yaml # Source: istio/charts/security/templates/deployment.yaml
@ -18497,8 +18516,8 @@ spec:
resources: resources:
requests: requests:
cpu: 10m cpu: 10m
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -18530,7 +18549,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
--- ---
# Source: istio/charts/sidecarInjectorWebhook/templates/deployment.yaml # Source: istio/charts/sidecarInjectorWebhook/templates/deployment.yaml
@ -18610,7 +18629,7 @@ spec:
resources: resources:
requests: requests:
cpu: 10m cpu: 10m
volumes: volumes:
- name: config-volume - name: config-volume
configMap: configMap:
@ -18626,7 +18645,7 @@ spec:
path: config path: config
- key: values - key: values
path: values path: values
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -18658,7 +18677,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
--- ---
# Source: istio/charts/tracing/templates/deployment-jaeger.yaml # Source: istio/charts/tracing/templates/deployment-jaeger.yaml
@ -18726,7 +18745,7 @@ spec:
- name: MEMORY_MAX_TRACES - name: MEMORY_MAX_TRACES
value: "50000" value: "50000"
- name: QUERY_BASE_PATH - name: QUERY_BASE_PATH
value: /jaeger value: /jaeger
livenessProbe: livenessProbe:
httpGet: httpGet:
path: / path: /
@ -18741,8 +18760,8 @@ spec:
resources: resources:
requests: requests:
cpu: 10m cpu: 10m
affinity: affinity:
nodeAffinity: nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms: nodeSelectorTerms:
@ -18774,7 +18793,7 @@ spec:
- key: beta.kubernetes.io/arch - key: beta.kubernetes.io/arch
operator: In operator: In
values: values:
- "s390x" - "s390x"
volumes: volumes:
- name: data - name: data
emptyDir: {} emptyDir: {}

View file

@ -39,7 +39,7 @@ spec:
# - name: DISABLE_TRACING # - name: DISABLE_TRACING
# value: "1" # value: "1"
- name: JAEGER_SERVICE_ADDR - name: JAEGER_SERVICE_ADDR
value: "jaeger-collector:14268" value: "jaeger-collector.istio-sysem.svc:14268"
resources: resources:
requests: requests:
cpu: 200m cpu: 200m

View file

@ -58,7 +58,7 @@ spec:
# - name: DISABLE_PROFILER # - name: DISABLE_PROFILER
# value: "1" # value: "1"
- name: JAEGER_SERVICE_ADDR - name: JAEGER_SERVICE_ADDR
value: "jaeger-collector:14268" value: "jaeger-collector.istio-sysem.svc:14268"
resources: resources:
requests: requests:
cpu: 100m cpu: 100m

View file

@ -70,7 +70,7 @@ spec:
# - name: DISABLE_PROFILER # - name: DISABLE_PROFILER
# value: "1" # value: "1"
- name: JAEGER_SERVICE_ADDR - name: JAEGER_SERVICE_ADDR
value: "jaeger-collector:14268" value: "jaeger-collector.istio-sysem.svc:14268"
resources: resources:
requests: requests:
cpu: 100m cpu: 100m

View file

@ -41,7 +41,7 @@ spec:
# - name: DISABLE_PROFILER # - name: DISABLE_PROFILER
# value: "1" # value: "1"
- name: JAEGER_SERVICE_ADDR - name: JAEGER_SERVICE_ADDR
value: "jaeger-collector:14268" value: "jaeger-collector.istio-sysem.svc:14268"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:3550"] command: ["/bin/grpc_health_probe", "-addr=:3550"]

View file

@ -40,7 +40,7 @@ spec:
- name: DISABLE_PROFILER - name: DISABLE_PROFILER
value: "1" value: "1"
- name: JAEGER_SERVICE_ADDR - name: JAEGER_SERVICE_ADDR
value: "jaeger-collector:14268" value: "jaeger-collector.istio-sysem.svc:14268"
readinessProbe: readinessProbe:
periodSeconds: 5 periodSeconds: 5
exec: exec:

View file

@ -91,16 +91,16 @@ spec:
- name: http - name: http
port: 80 port: 80
targetPort: 8080 targetPort: 8080
--- # ---
apiVersion: v1 # apiVersion: v1
kind: Service # kind: Service
metadata: # metadata:
name: frontend-external # name: frontend-external
spec: # spec:
type: LoadBalancer # type: LoadBalancer
selector: # selector:
app: frontend # app: frontend
ports: # ports:
- name: http # - name: http
port: 80 # port: 80
targetPort: 8080 # targetPort: 8080

45
patch.sh Executable file
View file

@ -0,0 +1,45 @@
#!/bin/sh
KUBE_NAMESPACE=istio-system
KUBE_CLUSTER=o11y-ob
GCP_REGION=australia-southeast1
GCP_PROJECT=tonyh-gke-o11y-anz-openbanking
DATA_DIR=/data
DATA_VOLUME=data-volume
SIDECAR_IMAGE_TAG=0.7.3
set -e
set -u
usage() {
echo -e "Usage: $0 <deployment|statefulset> <name>\n"
}
if [ $# -le 1 ]; then
usage
exit 1
fi
# Override to use a different Docker image name for the sidecar.
export SIDECAR_IMAGE_NAME=${SIDECAR_IMAGE_NAME:-'gcr.io/stackdriver-prometheus/stackdriver-prometheus-sidecar'}
kubectl -n "${KUBE_NAMESPACE}" patch "$1" "$2" --type strategic --patch "
spec:
template:
spec:
containers:
- name: sidecar
image: ${SIDECAR_IMAGE_NAME}:${SIDECAR_IMAGE_TAG}
imagePullPolicy: Always
args:
- \"--stackdriver.project-id=${GCP_PROJECT}\"
- \"--prometheus.wal-directory=${DATA_DIR}/wal\"
- \"--stackdriver.kubernetes.location=${GCP_REGION}\"
- \"--stackdriver.kubernetes.cluster-name=${KUBE_CLUSTER}\"
#- \"--stackdriver.generic.location=${GCP_REGION}\"
#- \"--stackdriver.generic.namespace=${KUBE_CLUSTER}\"
ports:
- name: sidecar
containerPort: 9091
volumeMounts:
- name: ${DATA_VOLUME}
mountPath: ${DATA_DIR}
"

View file

@ -85,5 +85,4 @@ profiles:
deploy: deploy:
kubectl: kubectl:
manifests: manifests:
- ./kubernetes-manifests/**.yaml - ./kubernetes-manifests-tracing/**.yaml
- ./istio-manifests/**.yaml