Created
January 31, 2017 18:17
-
-
Save mandarjog/098a4dfacc6208186cf0c392d3131565 to your computer and use it in GitHub Desktop.
Replication controller with downward API
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: ReplicationController | |
metadata: | |
name: purchases | |
spec: | |
replicas: 1 | |
selector: | |
app: purchases | |
template: | |
metadata: | |
labels: | |
app: purchases | |
spec: | |
volumes: | |
- name: service-config | |
configMap: | |
name: purchases-service-config | |
containers: | |
- name: purchases-svc | |
image: "${IMAGE}" | |
ports: | |
- containerPort: 8081 | |
env: | |
- name: SVC_NAME | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.name | |
- name: SVC_NAMESPACE | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.namespace | |
- name: esp | |
image: "${ESP_IMAGE}" | |
args: [ | |
"--service_json_path", "/tmp/service-config/purchases.json", | |
"--backend", "localhost:8081", | |
"--dns", "${dns}" | |
] | |
ports: | |
- containerPort: 8080 | |
securityContext: | |
privileged: true | |
volumeMounts: | |
- mountPath: /tmp/service-config | |
name: service-config | |
readOnly: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment