Skip to content

Instantly share code, notes, and snippets.

@kleimkuhler
Created April 6, 2021 01:11
Show Gist options
  • Save kleimkuhler/b92386a12277ab90032a38a6ad25621a to your computer and use it in GitHub Desktop.
Save kleimkuhler/b92386a12277ab90032a38a6ad25621a to your computer and use it in GitHub Desktop.
Fix caching in ingress mode: setup for testing
apiVersion: v1
kind: Service
metadata:
name: svc-1
spec:
ports:
- name: 80-80
port: 80
protocol: TCP
targetPort: 80
selector:
app: dep-1
sessionAffinity: None
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dep-1
spec:
replicas: 1
selector:
matchLabels:
app: dep-1
template:
metadata:
annotations:
linkerd.io/inject: enabled
labels:
app: dep-1
spec:
containers:
- image: nginx
imagePullPolicy: Always
name: nginx
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
name: svc-2
spec:
ports:
- name: 80-80
port: 80
protocol: TCP
targetPort: 80
selector:
app: dep-2
sessionAffinity: None
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dep-2
spec:
replicas: 1
selector:
matchLabels:
app: dep-2
template:
metadata:
annotations:
linkerd.io/inject: enabled
labels:
app: dep-2
spec:
containers:
- image: nginx
imagePullPolicy: Always
name: nginx
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: curl
spec:
selector:
matchLabels:
app: curl
template:
metadata:
annotations:
linkerd.io/inject: ingress
labels:
app: curl
spec:
containers:
- name: curl
image: curlimages/curl
command: ["/bin/sleep", "3650d"]
imagePullPolicy: IfNotPresent
restartPolicy: Always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment