github.com/smartcontractkit/chainlink-testing-framework/libs@v0.0.0-20240227141906-ec710b4eb1a3/charts/foundry/templates/deployment.yaml (about) 1 apiVersion: apps/v1 2 kind: Deployment 3 metadata: 4 name: {{ include "foundry.fullname" . }} 5 labels: 6 {{- include "foundry.labels" . | nindent 4 }} 7 spec: 8 {{- if not .Values.autoscaling.enabled }} 9 replicas: {{ .Values.replicaCount }} 10 {{- end }} 11 selector: 12 matchLabels: 13 {{- include "foundry.selectorLabels" . | nindent 6 }} 14 template: 15 metadata: 16 {{- with .Values.podAnnotations }} 17 annotations: 18 {{- toYaml . | nindent 8 }} 19 {{- end }} 20 labels: 21 {{- include "foundry.labels" . | nindent 8 }} 22 {{- with .Values.podLabels }} 23 {{- toYaml . | nindent 8 }} 24 {{- end }} 25 spec: 26 {{- with .Values.imagePullSecrets }} 27 imagePullSecrets: 28 {{- toYaml . | nindent 8 }} 29 {{- end }} 30 serviceAccountName: {{ include "foundry.serviceAccountName" . }} 31 securityContext: 32 {{- toYaml .Values.podSecurityContext | nindent 8 }} 33 containers: 34 - name: {{ .Chart.Name }} 35 securityContext: 36 {{- toYaml .Values.securityContext | nindent 12 }} 37 image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 38 tty: true 39 stdin: true 40 command: 41 - "anvil" 42 - "--chain-id" 43 - {{ .Values.anvil.chainId | quote }} 44 - "--block-time" 45 - {{ .Values.anvil.blockTime | quote }} 46 - "--host" 47 - {{ .Values.anvil.host }} 48 - "--port" 49 - {{ .Values.anvil.port | quote }} 50 {{- if .Values.anvil.forkURL }} 51 - "--fork-url" 52 - {{ .Values.anvil.forkURL }} 53 {{- else }} 54 {{- end }} 55 {{- if .Values.anvil.forkBlockNumber }} 56 - "--fork-block-number" 57 - {{ .Values.anvil.forkBlockNumber | quote }} 58 {{- else }} 59 {{- end }} 60 {{- if .Values.anvil.forkRetryBackoff }} 61 - "--fork-retry-backoff" 62 - {{ .Values.anvil.forkRetryBackoff }} 63 {{- else }} 64 {{- end }} 65 {{- if .Values.anvil.forkRetries }} 66 - "--retries" 67 - {{ .Values.anvil.forkRetries | quote }} 68 {{- else }} 69 {{- end }} 70 {{- if .Values.anvil.forkTimeout }} 71 - "--timeout" 72 - {{ .Values.anvil.forkTimeout | quote }} 73 {{- else }} 74 {{- end }} 75 {{- if .Values.anvil.forkComputeUnitsPerSecond }} 76 - "--compute-units-per-second" 77 - {{ .Values.anvil.forkComputeUnitsPerSecond | quote }} 78 {{- else }} 79 {{- end }} 80 {{- if .Values.anvil.forkNoRateLimit }} 81 - "--no-rate-limit" 82 {{- else }} 83 {{- end }} 84 {{- if .Values.anvil.runAsOptimism }} 85 - "--optimism" 86 {{- end }} 87 imagePullPolicy: {{ .Values.image.pullPolicy }} 88 ports: 89 - name: http 90 containerPort: {{ .Values.anvil.port }} 91 protocol: TCP 92 readinessProbe: 93 exec: 94 command: ["/bin/sh", "-c", 'until nc -z -v {{ .Values.anvil.host }} {{ .Values.anvil.port }}; do sleep 2; done'] 95 initialDelaySeconds: 5 96 periodSeconds: 5 97 failureThreshold: 2 98 timeoutSeconds: 120 99 livenessProbe: 100 exec: 101 command: ["/bin/sh", "-c", 'until nc -z -v {{ .Values.anvil.host }} {{ .Values.anvil.port }}; do sleep 2; done'] 102 initialDelaySeconds: 5 103 periodSeconds: 5 104 failureThreshold: 2 105 timeoutSeconds: 10 106 resources: 107 {{- toYaml .Values.resources | nindent 12 }} 108 {{- with .Values.volumeMounts }} 109 volumeMounts: 110 {{- toYaml . | nindent 12 }} 111 {{- end }} 112 {{- with .Values.volumes }} 113 volumes: 114 {{- toYaml . | nindent 8 }} 115 {{- end }} 116 {{- with .Values.nodeSelector }} 117 nodeSelector: 118 {{- toYaml . | nindent 8 }} 119 {{- end }} 120 {{- with .Values.affinity }} 121 affinity: 122 {{- toYaml . | nindent 8 }} 123 {{- end }} 124 {{- with .Values.tolerations }} 125 tolerations: 126 {{- toYaml . | nindent 8 }} 127 {{- end }}