Skip to content

Commit

Permalink
fix helm env vars (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeseandcereal committed Nov 12, 2019
1 parent 626f478 commit 6485ab6
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 19 deletions.
4 changes: 1 addition & 3 deletions dragonchain/job_processor/contract_job.py
Expand Up @@ -265,10 +265,8 @@ def build_contract_image(self) -> None:
self.model.set_state(state=self.end_error_state, msg="Docker build error")
raise exceptions.BadImageError("Docker build error")

_log.info(f"Pushing to ECR {self.faas_image}")
_log.info(f"Pushing to docker registry {self.faas_image}")
try:
# For on prem, the auth will need an abstraction layer so the customer can maintain a private registry for their contracts
# For now, we default to using ECR auth. This works in minikube as the localhost:5000 registry is unauthenticated, so auth_config gets ignored.
self.docker.images.push(f"{FAAS_REGISTRY}/customer-contracts", tag=self.model.id, auth_config=registry_interface.get_login())
image = self.docker.images.get(self.faas_image)
_log.debug(f"Built image attrs: {image.attrs}")
Expand Down
1 change: 0 additions & 1 deletion dragonchain/test_env.py
Expand Up @@ -22,7 +22,6 @@
os.environ["RATE_LIMIT"] = "0"
os.environ["AWS_DEFAULT_REGION"] = "test"
os.environ["ENCRYPTION"] = "secp256k1"
os.environ["STACK_NAME"] = ""
os.environ["DRAGONCHAIN_VERSION"] = ""
os.environ["STORAGE_TYPE"] = "s3"
os.environ["STORAGE_LOCATION"] = ""
Expand Down
4 changes: 1 addition & 3 deletions helm/dragonchain-k8s/templates/configmap.yaml
Expand Up @@ -26,7 +26,6 @@ data:
FAAS_GATEWAY: "{{ .Values.faas.gateway }}"
FAAS_REGISTRY: "{{ .Values.faas.registry }}"
NAMESPACE: "{{ .Release.Namespace }}"
STACK_NAME: "d-{{ .Values.global.environment.INTERNAL_ID }}-{{ .Values.global.environment.STAGE }}"
DEPLOYMENT_NAME: "{{ .Release.Name }}"
ERROR_REPORTING_TYPE: "{{ .Values.dragonchain.reporting_type }}"
DRAGONCHAIN_NAME: "{{ .Values.global.environment.DRAGONCHAIN_NAME }}"
Expand All @@ -40,8 +39,7 @@ data:
REGISTRY_USERNAME: "{{ .Values.faas.registry_username }}"
{{- end }}
STORAGE_TYPE: disk
SECRET_TYPE: env
SECRET_LOCATION: SECRETSTRING
SECRET_LOCATION: "{{ .Values.secret.mountPath }}/{{ .Values.secret.name }}"
DRAGONCHAIN_IMAGE: "{{ .Values.dragonchain.image.value }}:{{ .Values.dragonchain.image.version }}"
{{ toYaml .Values.global.environment | indent 2 }}
---
Expand Down
12 changes: 0 additions & 12 deletions helm/dragonchain-k8s/templates/deployment.yaml
Expand Up @@ -87,8 +87,6 @@ spec:
env:
- name: SERVICE
value: webserver
- name: SECRET_LOCATION
value: "{{ .Values.secret.mountPath }}/{{ .Values.secret.name }}"
volumeMounts:
- name: secrets
mountPath: {{ .Values.secret.mountPath }}
Expand Down Expand Up @@ -185,8 +183,6 @@ spec:
env:
- name: SERVICE
value: txprocessor
- name: SECRET_LOCATION
value: "{{ .Values.secret.mountPath }}/{{ .Values.secret.name }}"
volumeMounts:
- name: secrets
mountPath: {{ .Values.secret.mountPath }}
Expand Down Expand Up @@ -264,8 +260,6 @@ spec:
env:
- name: SERVICE
value: contractInvoker
- name: SECRET_LOCATION
value: "{{ .Values.secret.mountPath }}/{{ .Values.secret.name }}"
volumeMounts:
- name: secrets
mountPath: {{ .Values.secret.mountPath }}
Expand Down Expand Up @@ -345,8 +339,6 @@ spec:
env:
- name: SERVICE
value: jobprocessor
- name: SECRET_LOCATION
value: "{{ .Values.secret.mountPath }}/{{ .Values.secret.name }}"
volumeMounts:
- name: secrets
mountPath: {{ .Values.secret.mountPath }}
Expand Down Expand Up @@ -424,8 +416,6 @@ spec:
env:
- name: SERVICE
value: bcprocessor
- name: SECRET_LOCATION
value: "{{ .Values.secret.mountPath }}/{{ .Values.secret.name }}"
volumeMounts:
- name: secrets
mountPath: {{ .Values.secret.mountPath }}
Expand Down Expand Up @@ -503,8 +493,6 @@ spec:
env:
- name: SERVICE
value: scheduler
- name: SECRET_LOCATION
value: "{{ .Values.secret.mountPath }}/{{ .Values.secret.name }}"
volumeMounts:
- name: secrets
mountPath: {{ .Values.secret.mountPath }}
Expand Down

0 comments on commit 6485ab6

Please sign in to comment.