Skip to content

Commit

Permalink
add-agent-default-minio-env
Browse files Browse the repository at this point in the history
Signed-off-by: Future Outlier <[email protected]>
  • Loading branch information
Future Outlier committed Oct 15, 2023
1 parent c6476cc commit 393c434
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 15 deletions.
2 changes: 1 addition & 1 deletion charts/flyteagent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A Helm chart for Flyte agent
| additionalVolumeMounts | list | `[]` | Appends additional volume mounts to the main container's spec. May include template values. |
| additionalVolumes | list | `[]` | Appends additional volumes to the deployment spec. May include template values. |
| affinity | object | `{}` | affinity for flyteagent deployment |
| agentSecret.secretData | object | `{"data":{"username":"User"}}` | Specify your Secret (with sensitive data) or pseudo-manifest (without sensitive data). |
| agentSecret.secretData | object | `{"data":{"FLYTE_AWS_ACCESS_KEY_ID":"minio","FLYTE_AWS_ENDPOINT":"http://flyte-sandbox-minio.flyte:9000","FLYTE_AWS_SECRET_ACCESS_KEY":"miniostorage","username":"User"}}` | Specify your Secret (with sensitive data) or pseudo-manifest (without sensitive data). |
| commonAnnotations | object | `{}` | |
| commonLabels | object | `{}` | |
| configPath | string | `"/etc/flyteagent/config/*.yaml"` | Default regex string for searching configuration files |
Expand Down
32 changes: 24 additions & 8 deletions charts/flyteagent/templates/agent/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,44 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
name: flyteagent
volumeMounts: {{- include "agentSecret.volumeMount" . | nindent 8 }}
ports:
- containerPort: {{ .Values.ports.containerPort }}
name: {{ .Values.ports.name }}
resources: {{- toYaml .Values.resources | nindent 10 }}
env:
- name: FLYTE_AWS_ENDPOINT
valueFrom:
secretKeyRef:
name: {{ template "flyteagent.name" . }}
key: FLYTE_AWS_ENDPOINT
- name: FLYTE_AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: {{ template "flyteagent.name" . }}
key: FLYTE_AWS_ACCESS_KEY_ID
- name: FLYTE_AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ template "flyteagent.name" . }}
key: FLYTE_AWS_SECRET_ACCESS_KEY
volumeMounts: {{- include "agentSecret.volumeMount" . | nindent 10 }}
{{- with .Values.additionalVolumeMounts -}}
{{ tpl (toYaml .) $ | nindent 8 }}
{{ tpl (toYaml .) $ | nindent 10 }}
{{- end }}
{{- with .Values.additionalContainers -}}
{{- tpl (toYaml .) $ | nindent 6}}
{{- tpl (toYaml .) $ | nindent 8}}
{{- end }}
serviceAccountName: {{ template "flyteagent.name" . }}
volumes: {{- include "agentSecret.volume" . | nindent 6 }}
volumes: {{- include "agentSecret.volume" . | nindent 8 }}
{{- with .Values.additionalVolumes -}}
{{ tpl (toYaml .) $ | nindent 6 }}
{{ tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector: {{ tpl (toYaml .) $ | nindent 8 }}
nodeSelector: {{ tpl (toYaml .) $ | nindent 10 }}
{{- end }}
{{- with .Values.affinity }}
affinity: {{ tpl (toYaml .) $ | nindent 8 }}
affinity: {{ tpl (toYaml .) $ | nindent 10 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations: {{ tpl (toYaml .) $ | nindent 8 }}
tolerations: {{ tpl (toYaml .) $ | nindent 10 }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/flyteagent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ agentSecret:
secretData:
data:
username: User
FLYTE_AWS_ENDPOINT: http://flyte-sandbox-minio.flyte:9000
FLYTE_AWS_ACCESS_KEY_ID: minio
FLYTE_AWS_SECRET_ACCESS_KEY: miniostorage

# -- Replicas count for flyteagent deployment
replicaCount: 1
Expand Down
3 changes: 3 additions & 0 deletions deployment/agent/flyte_agent_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ metadata:
namespace: flyte
type: Opaque
data:
FLYTE_AWS_ACCESS_KEY_ID: minio
FLYTE_AWS_ENDPOINT: http://flyte-sandbox-minio.flyte:9000
FLYTE_AWS_SECRET_ACCESS_KEY: miniostorage
username: User
---
# Source: flyteagent/templates/agent/service.yaml
Expand Down
7 changes: 5 additions & 2 deletions docker/sandbox-bundled/manifests/complete-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ type: Opaque
---
apiVersion: v1
data:
haSharedSecret: R2JRWFVRYThnRFVLbHpuSA==
haSharedSecret: Wk9VRzZ1a1BjNDk3MHlteQ==
proxyPassword: ""
proxyUsername: ""
kind: Secret
Expand Down Expand Up @@ -874,6 +874,9 @@ type: Opaque
---
apiVersion: v1
data:
FLYTE_AWS_ACCESS_KEY_ID: minio
FLYTE_AWS_ENDPOINT: http://flyte-sandbox-minio.flyte:9000
FLYTE_AWS_SECRET_ACCESS_KEY: miniostorage
username: User
kind: Secret
metadata:
Expand Down Expand Up @@ -1409,7 +1412,7 @@ spec:
metadata:
annotations:
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
checksum/secret: 0ee1553aec7c03152a0a44e7b1a82985795774412a779f7b607a57e59f42c8ef
checksum/secret: 4683cf4a765862d5c9e0d509cfbcc2cc90991ddf90bf6a23ef9d81d1fd3f4687
labels:
app: docker-registry
release: flyte-sandbox
Expand Down
4 changes: 2 additions & 2 deletions docker/sandbox-bundled/manifests/complete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ type: Opaque
---
apiVersion: v1
data:
haSharedSecret: d1l6eWRCOXBJcFhiNEo5QQ==
haSharedSecret: ZWNvaDR4SFpTWEljYmpKdw==
proxyPassword: ""
proxyUsername: ""
kind: Secret
Expand Down Expand Up @@ -1366,7 +1366,7 @@ spec:
metadata:
annotations:
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
checksum/secret: 2f5b6d46fd3276b5b25c8a537298beb6943b13b0b21900db8b2da23e166f0593
checksum/secret: b309ba8b2b4bd6f3ef7d57302a4273efa0caaf58aef9c292f6a27a9107fbba80
labels:
app: docker-registry
release: flyte-sandbox
Expand Down
4 changes: 2 additions & 2 deletions docker/sandbox-bundled/manifests/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ metadata:
---
apiVersion: v1
data:
haSharedSecret: UkFsUVRMRndZeTNJUVNFSA==
haSharedSecret: dGpvMnBNMlZ1QnhOS1c0Tg==
proxyPassword: ""
proxyUsername: ""
kind: Secret
Expand Down Expand Up @@ -933,7 +933,7 @@ spec:
metadata:
annotations:
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
checksum/secret: 25a046ef1aaf34ffb59f7b92554e1cfd0015b9a11f7f165ce06bba31e3bced1b
checksum/secret: 0a47ea847e68c844e9b427914d1dc1a2d74e9d8e8716f05365a5ad55d3e95272
labels:
app: docker-registry
release: flyte-sandbox
Expand Down

0 comments on commit 393c434

Please sign in to comment.