Skip to content

Instantly share code, notes, and snippets.

@ihcsim
Last active March 13, 2019 20:49
Show Gist options
  • Save ihcsim/b457b9a799cb4ea56f7ce8441838b511 to your computer and use it in GitHub Desktop.
Save ihcsim/b457b9a799cb4ea56f7ce8441838b511 to your computer and use it in GitHub Desktop.

Test cases

The following is the list of test cases for the proxy config overrides feature (linkerd/linkerd/#2471).

auto-inject create

  • Specify the config annotations in the pod template. Expect pod's proxy config to be overridden.
  • Specify the config annotations in the namespace. Expect effects on all workloads in the same namespace.

auto-inject update

  1. Deploy a workload with no config annotations.
  2. Annotate the workload with config annotations.
  3. Expect proxy configs to be overridden per provided annotations.

install

  • Update the controller.yaml Helm chart with pod-level annotations. Expect effects on controller proxy.
  • Update the namespace.yaml Helm chart with namespace-level annotations. Expect effects on all control plane proxies.

diff YAML output

  • Refer to diff.yaml below.
bin/linkerd install --tls=optional --proxy-auto-inject --skip-inbound-ports 8888,9999 --skip-outbound-ports 7777 | k apply -f -
k -n linkerd get po
k -n linkerd describe cm linkerd-config
bin/linkerd dashboard &

## pod-level annotations
less -N emojivoto-autoinject-pods-overrides.yaml
k apply -f emojivoto-autoinject-pods-overrides.yaml
k -n emojivoto get po
k -n emojivoto describe deploy emoji|less -N
k -n emojivoto patch deployment voting --type json -p='[{"op": "add", "path": "/spec/template/metadata/annotations/config.linkerd.io~1request-cpu", "value":"500m"}]'
k -n emojivoto patch deployment voting --type json -p='[{"op": "add", "path": "/spec/template/metadata/annotations/config.linkerd.io~1limit-cpu", "value":"1"}]'
k -n emojivoto describe deploy voting|less -N
k delete ns emojivoto

## overrides on updates
less -N emojivoto-autoinject-pods.yaml
k apply -f emojivoto-autoinject-pods.yaml
k -n emojivoto describe deploy|less -N
k -n emojivoto patch deployment voting --type json -p='[{"op": "add", "path": "/spec/template/metadata/annotations/config.linkerd.io~1ignore-inbound-ports", "value":"5432,5632"}]'
k -n emojivoto patch deployment voting --type json -p='[{"op": "add", "path": "/spec/template/metadata/annotations/config.linkerd.io~1ignore-outbound-ports", "value":"53"}]'
---
###
### Controller
###
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: linkerd-controller
namespace: {{.Values.Namespace}}
---
kind: {{if not .Values.SingleNamespace}}Cluster{{end}}Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: linkerd-{{.Values.Namespace}}-controller
{{- if .Values.SingleNamespace}}
namespace: {{.Values.Namespace}}
{{- end}}
rules:
- apiGroups: ["extensions", "apps"]
resources: ["daemonsets", "deployments", "replicasets", "statefulsets"]
verbs: ["list", "get", "watch"]
- apiGroups: ["extensions", "batch"]
resources: ["jobs"]
verbs: ["list" , "get", "watch"]
- apiGroups: [""]
resources: ["pods", "endpoints", "services", "replicationcontrollers"{{if not .Values.SingleNamespace}}, "namespaces"{{end}}]
verbs: ["list", "get", "watch"]
{{- if .Values.SingleNamespace }}
- apiGroups: [""]
resources: ["namespaces"]
resourceNames: ["{{.Values.Namespace}}"]
verbs: ["list", "get", "watch"]
{{- else }}
- apiGroups: ["linkerd.io"]
resources: ["serviceprofiles"]
verbs: ["list", "get", "watch"]
{{- end }}
---
kind: {{if not .Values.SingleNamespace}}Cluster{{end}}RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: linkerd-{{.Values.Namespace}}-controller
{{- if .Values.SingleNamespace}}
namespace: {{.Values.Namespace}}
{{- end}}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: {{if not .Values.SingleNamespace}}Cluster{{end}}Role
name: linkerd-{{.Values.Namespace}}-controller
subjects:
- kind: ServiceAccount
name: linkerd-controller
namespace: {{.Values.Namespace}}
---
kind: Service
apiVersion: v1
metadata:
name: linkerd-controller-api
namespace: {{.Values.Namespace}}
labels:
{{.Values.ControllerComponentLabel}}: controller
annotations:
{{.Values.CreatedByAnnotation}}: {{.Values.CliVersion}}
spec:
type: ClusterIP
selector:
{{.Values.ControllerComponentLabel}}: controller
ports:
- name: http
port: 8085
targetPort: 8085
---
kind: Service
apiVersion: v1
metadata:
name: linkerd-destination
namespace: {{.Values.Namespace}}
labels:
{{.Values.ControllerComponentLabel}}: controller
annotations:
{{.Values.CreatedByAnnotation}}: {{.Values.CliVersion}}
spec:
type: ClusterIP
selector:
{{.Values.ControllerComponentLabel}}: controller
ports:
- name: grpc
port: 8086
targetPort: 8086
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: linkerd-controller
namespace: {{.Values.Namespace}}
labels:
{{.Values.ControllerComponentLabel}}: controller
annotations:
{{.Values.CreatedByAnnotation}}: {{.Values.CliVersion}}
spec:
replicas: {{.Values.ControllerReplicas}}
template:
metadata:
labels:
{{.Values.ControllerComponentLabel}}: controller
annotations:
{{.Values.CreatedByAnnotation}}: {{.Values.CliVersion}}
config.linkerd.io/proxy-image: gcr.io/linkerd-io/proxy:edge-19.2.5
config.linkerd.io/proxy-image-pull-policy: Always
config.linkerd.io/init-image: gcr.io/linkerd-io/proxy-init:edge-19.2.5
config.linkerd.io/init-image-pull-policy: Always
config.linkerd.io/control-port: "9000"
config.linkerd.io/ignore-inbound-ports: "4222,6222"
config.linkerd.io/ignore-outbound-ports: "53"
config.linkerd.io/inbound-port: "5143"
config.linkerd.io/metrics-port: "5191"
config.linkerd.io/outbound-port: "5140"
config.linkerd.io/request-cpu: "0.25"
config.linkerd.io/request-memory: "64Mi"
config.linkerd.io/limit-cpu: "1.25"
config.linkerd.io/limit-memory: "256Mi"
config.linkerd.io/uid: "8000"
config.linkerd.io/log-level: info,linkers2_proxy=debug
config.linkerd.io/disable-external-profiles: "true"
spec:
serviceAccountName: linkerd-controller
containers:
- name: public-api
ports:
- name: http
containerPort: 8085
- name: admin-http
containerPort: 9995
image: {{.Values.ControllerImage}}
imagePullPolicy: {{.Values.ImagePullPolicy}}
args:
- "public-api"
- "-prometheus-url=http://linkerd-prometheus.{{.Values.Namespace}}.svc.cluster.local:9090"
- "-controller-namespace={{.Values.Namespace}}"
- "-log-level={{.Values.ControllerLogLevel}}"
livenessProbe:
httpGet:
path: /ping
port: 9995
initialDelaySeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 9995
failureThreshold: 7
{{- if .Values.EnableHA }}
resources:
requests:
cpu: 20m
memory: 50Mi
{{- end }}
securityContext:
runAsUser: {{.Values.ControllerUID}}
- name: destination
ports:
- name: grpc
containerPort: 8086
- name: admin-http
containerPort: 9996
image: {{.Values.ControllerImage}}
imagePullPolicy: {{.Values.ImagePullPolicy}}
args:
- "destination"
- "-addr=:8086"
- "-controller-namespace={{.Values.Namespace}}"
- "-enable-tls={{.Values.EnableTLS}}"
- "-enable-h2-upgrade={{.Values.EnableH2Upgrade}}"
- "-log-level={{.Values.ControllerLogLevel}}"
livenessProbe:
httpGet:
path: /ping
port: 9996
initialDelaySeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 9996
failureThreshold: 7
{{- if .Values.EnableHA }}
resources:
requests:
cpu: 20m
memory: 50Mi
{{- end }}
securityContext:
runAsUser: {{.Values.ControllerUID}}
- name: tap
ports:
- name: grpc
containerPort: 8088
- name: admin-http
containerPort: 9998
image: {{.Values.ControllerImage}}
imagePullPolicy: {{.Values.ImagePullPolicy}}
args:
- "tap"
- "-controller-namespace={{.Values.Namespace}}"
- "-log-level={{.Values.ControllerLogLevel}}"
livenessProbe:
httpGet:
path: /ping
port: 9998
initialDelaySeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 9998
failureThreshold: 7
{{- if .Values.EnableHA }}
resources:
requests:
cpu: 20m
memory: 50Mi
{{- end }}
securityContext:
runAsUser: {{.Values.ControllerUID}}
---
kind: ConfigMap
apiVersion: v1
metadata:
name: linkerd-config
namespace: {{.Values.Namespace}}
labels:
{{.Values.ControllerComponentLabel}}: controller
annotations:
{{.Values.CreatedByAnnotation}}: {{.Values.CliVersion}}
data:
{{- if .Values.GlobalConfig}}
global: |
{{.Values.GlobalConfig}}
{{- end}}
{{- if .Values.ProxyConfig}}
proxy: |
{{.Values.ProxyConfig}}
{{- end }}
--- original-emoji-deployment.yaml 2019-03-13 13:49:08.311866378 -0700
+++ override-emoji-deployment.yaml 2019-03-13 13:48:59.907932144 -0700
@@ -4,18 +4,18 @@
annotations:
deployment.kubernetes.io/revision: "1"
kubectl.kubernetes.io/last-applied-configuration: |
- {"apiVersion":"apps/v1beta1","kind":"Deployment","metadata":{"annotations":{},"creationTimestamp":null,"name":"emoji","namespace":"emojivoto-01"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"emoji-svc"}},"strategy":{},"template":{"metadata":{"annotations":{"linkerd.io/inject":"enabled"},"creationTimestamp":null,"labels":{"app":"emoji-svc"}},"spec":{"containers":[{"env":[{"name":"GRPC_PORT","value":"8080"}],"image":"buoyantio/emojivoto-emoji-svc:v6","name":"emoji-svc","ports":[{"containerPort":8080,"name":"grpc"}],"resources":{"requests":{"cpu":"100m"}}}]}}},"status":{}}
- creationTimestamp: "2019-03-13T20:37:22Z"
+ {"apiVersion":"apps/v1beta1","kind":"Deployment","metadata":{"annotations":{},"creationTimestamp":null,"name":"emoji","namespace":"emojivoto"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"emoji-svc"}},"strategy":{},"template":{"metadata":{"annotations":{"config.linkerd.io/control-port":"4000","config.linkerd.io/disable-external-profile":"true","config.linkerd.io/ignore-inbound-ports":"4222,6222","config.linkerd.io/ignore-outbound-ports":"8078,8079","config.linkerd.io/inbound-port":"5000","config.linkerd.io/init-image":"gcr.io/linkerd-io/proxy-init","config.linkerd.io/limit-cpu":"1","config.linkerd.io/limit-memory":"128Mi","config.linkerd.io/log-level":"info,linkerd2_proxy=debug","config.linkerd.io/metrics-port":"5001","config.linkerd.io/outbound-port":"5002","config.linkerd.io/proxy-image":"gcr.io/linkerd-io/proxy","config.linkerd.io/request-cpu":"0.2","config.linkerd.io/request-memory":"64Mi","config.linkerd.io/uid":"9700","linkerd.io/inject":"enabled"},"creationTimestamp":null,"labels":{"app":"emoji-svc"}},"spec":{"containers":[{"env":[{"name":"GRPC_PORT","value":"8080"}],"image":"buoyantio/emojivoto-emoji-svc:v6","name":"emoji-svc","ports":[{"containerPort":8080,"name":"grpc"}],"resources":{"requests":{"cpu":"100m"}}}]}}},"status":{}}
+ creationTimestamp: "2019-03-13T17:57:58Z"
generation: 1
labels:
app: emoji-svc
linkerd.io/control-plane-ns: linkerd
linkerd.io/proxy-deployment: emoji
name: emoji
- namespace: emojivoto-01
- resourceVersion: "346045"
- selfLink: /apis/extensions/v1beta1/namespaces/emojivoto-01/deployments/emoji
- uid: ce1ab9aa-45cf-11e9-be5d-ec7d530f2a6d
+ namespace: emojivoto
+ resourceVersion: "334043"
+ selfLink: /apis/extensions/v1beta1/namespaces/emojivoto/deployments/emoji
+ uid: 89637e13-45b9-11e9-be5d-ec7d530f2a6d
spec:
progressDeadlineSeconds: 600
replicas: 1
@@ -31,6 +31,21 @@
template:
metadata:
annotations:
+ config.linkerd.io/control-port: "4000"
+ config.linkerd.io/disable-external-profile: "true"
+ config.linkerd.io/ignore-inbound-ports: 4222,6222
+ config.linkerd.io/ignore-outbound-ports: 8078,8079
+ config.linkerd.io/inbound-port: "5000"
+ config.linkerd.io/init-image: gcr.io/linkerd-io/proxy-init
+ config.linkerd.io/limit-cpu: "1"
+ config.linkerd.io/limit-memory: 128Mi
+ config.linkerd.io/log-level: info,linkerd2_proxy=debug
+ config.linkerd.io/metrics-port: "5001"
+ config.linkerd.io/outbound-port: "5002"
+ config.linkerd.io/proxy-image: gcr.io/linkerd-io/proxy
+ config.linkerd.io/request-cpu: "0.2"
+ config.linkerd.io/request-memory: 64Mi
+ config.linkerd.io/uid: "9700"
linkerd.io/created-by: linkerd/proxy-injector git-b1567f52
linkerd.io/identity-mode: optional
linkerd.io/inject: enabled
@@ -59,17 +74,17 @@
terminationMessagePolicy: File
- env:
- name: LINKERD2_PROXY_LOG
- value: warn,linkerd2_proxy=info
+ value: info,linkerd2_proxy=debug
- name: LINKERD2_PROXY_CONTROL_URL
value: tcp://linkerd-destination.linkerd.svc.cluster.local:8086
- name: LINKERD2_PROXY_CONTROL_LISTENER
- value: tcp://0.0.0.0:4190
+ value: tcp://0.0.0.0:4000
- name: LINKERD2_PROXY_METRICS_LISTENER
- value: tcp://0.0.0.0:4191
+ value: tcp://0.0.0.0:5001
- name: LINKERD2_PROXY_OUTBOUND_LISTENER
- value: tcp://127.0.0.1:4140
+ value: tcp://127.0.0.1:5002
- name: LINKERD2_PROXY_INBOUND_LISTENER
- value: tcp://0.0.0.0:4143
+ value: tcp://0.0.0.0:5000
- name: LINKERD2_PROXY_DESTINATION_PROFILE_SUFFIXES
value: .
- name: LINKERD2_PROXY_POD_NAMESPACE
@@ -101,7 +116,7 @@
failureThreshold: 3
httpGet:
path: /metrics
- port: 4191
+ port: 5001
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
@@ -109,26 +124,32 @@
timeoutSeconds: 1
name: linkerd-proxy
ports:
- - containerPort: 4143
+ - containerPort: 5000
name: linkerd-proxy
protocol: TCP
- - containerPort: 4191
+ - containerPort: 5001
name: linkerd-metrics
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /metrics
- port: 4191
+ port: 5001
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
- resources: {}
+ resources:
+ limits:
+ cpu: "1"
+ memory: 128Mi
+ requests:
+ cpu: 200m
+ memory: 64Mi
securityContext:
procMount: Default
- runAsUser: 2102
+ runAsUser: 9700
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
@@ -142,15 +163,15 @@
initContainers:
- args:
- --incoming-proxy-port
- - "4143"
+ - "5000"
- --outgoing-proxy-port
- - "4140"
+ - "5002"
- --proxy-uid
- - "2102"
+ - "9700"
- --inbound-ports-to-ignore
- - 8888,9999,4190,4191
+ - 4222,6222,4000,5001
- --outbound-ports-to-ignore
- - "7777"
+ - 8078,8079
image: gcr.io/linkerd-io/proxy-init:git-b1567f52
imagePullPolicy: IfNotPresent
name: linkerd-init
@@ -183,15 +204,15 @@
status:
availableReplicas: 1
conditions:
- - lastTransitionTime: "2019-03-13T20:37:50Z"
- lastUpdateTime: "2019-03-13T20:37:50Z"
+ - lastTransitionTime: "2019-03-13T17:58:24Z"
+ lastUpdateTime: "2019-03-13T17:58:24Z"
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- - lastTransitionTime: "2019-03-13T20:37:23Z"
- lastUpdateTime: "2019-03-13T20:37:50Z"
- message: ReplicaSet "emoji-68db59f65c" has successfully progressed.
+ - lastTransitionTime: "2019-03-13T17:57:58Z"
+ lastUpdateTime: "2019-03-13T17:58:24Z"
+ message: ReplicaSet "emoji-6c85c4d5b4" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
apiVersion: v1
kind: Namespace
metadata:
name: emojivoto
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: emoji
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: emoji-svc
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: emoji-svc
annotations:
linkerd.io/inject: enabled
config.linkerd.io/proxy-image: gcr.io/linkerd-io/proxy
config.linkerd.io/init-image: gcr.io/linkerd-io/proxy-init
config.linkerd.io/control-port: "4000"
config.linkerd.io/ignore-inbound-ports: "4222,6222"
config.linkerd.io/ignore-outbound-ports: "8079,8080"
config.linkerd.io/inbound-port: "5000"
config.linkerd.io/metrics-port: "5001"
config.linkerd.io/outbound-port: "5002"
config.linkerd.io/request-cpu: "0.2"
config.linkerd.io/request-memory: "64Mi"
config.linkerd.io/limit-cpu: "1"
config.linkerd.io/limit-memory: "128Mi"
config.linkerd.io/uid: "9700"
config.linkerd.io/log-level: info,linkerd2_proxy=debug
config.linkerd.io/disable-external-profile: "true"
spec:
containers:
- env:
- name: GRPC_PORT
value: "8080"
image: buoyantio/emojivoto-emoji-svc:v6
name: emoji-svc
ports:
- containerPort: 8080
name: grpc
resources:
requests:
cpu: 100m
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: emoji-svc
namespace: emojivoto
spec:
selector:
app: emoji-svc
clusterIP: None
ports:
- name: grpc
port: 8080
targetPort: 8080
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: voting
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: voting-svc
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: voting-svc
annotations:
linkerd.io/inject: enabled
spec:
containers:
- env:
- name: GRPC_PORT
value: "8080"
image: buoyantio/emojivoto-voting-svc:v6
name: voting-svc
ports:
- containerPort: 8080
name: grpc
resources:
requests:
cpu: 100m
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: voting-svc
namespace: emojivoto
spec:
selector:
app: voting-svc
clusterIP: None
ports:
- name: grpc
port: 8080
targetPort: 8080
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: web
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: web-svc
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: web-svc
annotations:
linkerd.io/inject: enabled
spec:
containers:
- env:
- name: WEB_PORT
value: "80"
- name: EMOJISVC_HOST
value: emoji-svc.emojivoto:8080
- name: VOTINGSVC_HOST
value: voting-svc.emojivoto:8080
- name: INDEX_BUNDLE
value: dist/index_bundle.js
image: buoyantio/emojivoto-web:v6
name: web-svc
ports:
- containerPort: 80
name: http
resources:
requests:
cpu: 100m
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: web-svc
namespace: emojivoto
spec:
type: LoadBalancer
selector:
app: web-svc
ports:
- name: http
port: 80
targetPort: 80
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: vote-bot
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: vote-bot
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: vote-bot
annotations:
linkerd.io/inject: enabled
spec:
containers:
- command:
- emojivoto-vote-bot
env:
- name: WEB_HOST
value: web-svc.emojivoto:80
image: buoyantio/emojivoto-web:v6
name: vote-bot
resources:
requests:
cpu: 10m
status: {}
---
---
apiVersion: v1
kind: Namespace
metadata:
name: emojivoto
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: emoji
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: emoji-svc
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: emoji-svc
annotations:
linkerd.io/inject: enabled
spec:
containers:
- env:
- name: GRPC_PORT
value: "8080"
image: buoyantio/emojivoto-emoji-svc:v6
name: emoji-svc
ports:
- containerPort: 8080
name: grpc
resources:
requests:
cpu: 100m
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: emoji-svc
namespace: emojivoto
spec:
selector:
app: emoji-svc
clusterIP: None
ports:
- name: grpc
port: 8080
targetPort: 8080
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: voting
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: voting-svc
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: voting-svc
annotations:
linkerd.io/inject: enabled
spec:
containers:
- env:
- name: GRPC_PORT
value: "8080"
image: buoyantio/emojivoto-voting-svc:v6
name: voting-svc
ports:
- containerPort: 8080
name: grpc
resources:
requests:
cpu: 100m
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: voting-svc
namespace: emojivoto
spec:
selector:
app: voting-svc
clusterIP: None
ports:
- name: grpc
port: 8080
targetPort: 8080
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: web
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: web-svc
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: web-svc
annotations:
linkerd.io/inject: enabled
spec:
containers:
- env:
- name: WEB_PORT
value: "80"
- name: EMOJISVC_HOST
value: emoji-svc.emojivoto:8080
- name: VOTINGSVC_HOST
value: voting-svc.emojivoto:8080
- name: INDEX_BUNDLE
value: dist/index_bundle.js
image: buoyantio/emojivoto-web:v6
name: web-svc
ports:
- containerPort: 80
name: http
resources:
requests:
cpu: 100m
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: web-svc
namespace: emojivoto
spec:
type: LoadBalancer
selector:
app: web-svc
ports:
- name: http
port: 80
targetPort: 80
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: vote-bot
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: vote-bot
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: vote-bot
annotations:
linkerd.io/inject: enabled
spec:
containers:
- command:
- emojivoto-vote-bot
env:
- name: WEB_HOST
value: web-svc.emojivoto:80
image: buoyantio/emojivoto-web:v6
name: vote-bot
resources:
requests:
cpu: 10m
status: {}
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment