Skip to content

Instantly share code, notes, and snippets.

@ekkinox
Created August 8, 2024 14:10
Show Gist options
  • Save ekkinox/280678da279e3e1e915f7f520ecc485b to your computer and use it in GitHub Desktop.
Save ekkinox/280678da279e3e1e915f7f520ecc485b to your computer and use it in GitHub Desktop.
k8s-tmp.yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: demo
labels:
istio-injection: enabled
---
apiVersion: v1
kind: Service
metadata:
labels:
name: demo-a-app
name: demo-a-app
namespace: demo
spec:
ports:
- name: http
port: 8080
targetPort: 8080
selector:
name: demo-a-app
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-a-app
namespace: demo
spec:
minReadySeconds: 10
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
name: demo-a-app
template:
metadata:
labels:
name: demo-a-app
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: "/metrics"
prometheus.io/port: "8081"
spec:
containers:
- image: europe-docker.pkg.dev/artifact-registry-8196/ankorstore/go-test-a:3.2.0
args: [ run ]
imagePullPolicy: Always
name: demo-a-app
env:
- name: APP_ENV
value: prod
- name: APP_DEBUG
value: "true"
- name: GRAFANA_AGENT_HOST
value: "grafana-agent.grafana-agent-system.svc.cluster.local:4317"
- name: PONG_HOST
value: "http://demo-b-app.demo.svc.cluster.local:8080"
- name: GRPC_HOST
value: "demo-b-app.demo.svc.cluster.local:50051"
ports:
- containerPort: 8080
name: http-app
- containerPort: 8081
name: http-core
---
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: default-a
namespace: demo
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "demo-a.sandbox-poc.ankorstore.com"
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: default-a
namespace: demo
spec:
gateways:
- default-a
hosts:
- 'demo-a.sandbox-poc.ankorstore.com'
http:
- name: "platform-auth-disabled"
route:
- destination:
host: demo-a-app
port:
number: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment