Last active
October 27, 2016 14:59
-
-
Save bkonkle/849f93f4b5844306b5328398b0239cca to your computer and use it in GitHub Desktop.
Helm Replication Controller example
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: {{ template "fullname" . }} | |
labels: | |
app: {{ template "fullname" . }} | |
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | |
release: "{{ .Release.Name }}" | |
heritage: "{{ .Release.Service }}" | |
spec: | |
replicas: {{ .Values.replicas }} | |
selector: | |
app: {{ template "fullname" . }} | |
template: | |
metadata: | |
name: {{ template "fullname" . }} | |
labels: | |
app: {{ template "fullname" . }} | |
spec: | |
containers: | |
- name: {{ template "fullname" . }} | |
image: "{{ .Values.imageName }}:{{ .Values.imageTag }}" | |
imagePullPolicy: Always | |
resources: | |
requests: | |
cpu: "{{ .Values.cpu }}" | |
memory: "{{ .Values.memory }}" | |
limits: | |
cpu: "{{ .Values.cpu }}" | |
memory: "{{ .Values.memory }}" | |
env: | |
- name: PORT | |
value: "{{ .Values.port }}" | |
{{- range .Values.env }} | |
- name: {{ .name }} | |
value: {{ .value }} | |
{{- end }} | |
ports: | |
- name: node | |
containerPort: 3000 | |
readinessProbe: | |
tcpSocket: | |
port: 3000 | |
initialDelaySeconds: 30 | |
timeoutSeconds: 1 | |
livenessProbe: | |
tcpSocket: | |
port: 3000 | |
initialDelaySeconds: 30 | |
timeoutSeconds: 1 | |
restartPolicy: Always | |
terminationGracePeriodSeconds: 30 | |
dnsPolicy: ClusterFirst | |
{{- if .Values.imagePullSecrets }} | |
imagePullSecrets: | |
{{- range .Values.imagePullSecrets }} | |
- name: {{ .name }} | |
{{- end }} | |
{{- end -}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment