Created
February 13, 2020 20:34
-
-
Save stvdilln/6bb573700a63dcc9c02e3f9313b231ba to your computer and use it in GitHub Desktop.
Hello world app for Ambassador Edge Connect Blog.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
# This must match annotation "consul.hashicorp.com/connect-service": | |
name: demo-helloworld | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: demo-helloworld | |
spec: | |
template: | |
metadata: | |
name: demo-helloworld | |
annotations: | |
# https://www.consul.io/docs/platform/k8s/connect.html | |
"consul.hashicorp.com/connect-inject": "true" | |
# Must match service account (above), this defaults to the | |
# name of the first container in the pod. If ACLs are | |
# means: | |
# The ServiceAccount.Name must match | |
# pod.spec.conainers[0].name OR | |
# You can override that name here and explicitly match | |
# the servicename, regardless of what the first pod name is. | |
#"consul.hashicorp.com/connect-service": "demo-helloworld" | |
# This annotation is unecessary in this case, the First Port | |
# on the Fist Pod is the default exposed port. You | |
# can explicitly set it here. | |
#"consul.hashicorp.com/connect-service-port": 80 | |
labels: | |
app: demo-helloworld | |
# pod specification | |
spec: | |
serviceAccountName: demo-helloworld | |
containers: | |
- image: karthequian/helloworld:latest | |
# The name of the first container in the pod | |
# Must match The Service Account Name. | |
# You can override with annotation consul.hashicorp.com/connect-service | |
name: demo-helloworld | |
resources: | |
requests: | |
cpu: 100m | |
memory: 128Mi | |
limits: | |
cpu: 250m | |
memory: 256Mi | |
ports: | |
- containerPort: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment