-
Notifications
You must be signed in to change notification settings - Fork 806
use Helm to init rustfs in sandbox #7233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v2
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| {{- if and .Values.rustfs.enabled .Values.rustfs.bucketInit.enabled }} | ||
| {{- $accessKey := .Values.rustfsupstream.secret.rustfs.access_key }} | ||
| {{- $secretKey := .Values.rustfsupstream.secret.rustfs.secret_key }} | ||
| apiVersion: batch/v1 | ||
| kind: Job | ||
| metadata: | ||
| name: {{ printf "%s-rustfs-bucket-init" .Release.Name | trunc 63 | trimSuffix "-" }} | ||
| namespace: {{ .Release.Namespace | quote }} | ||
| labels: | ||
| {{- include "flyte-demo.labels" . | nindent 4 }} | ||
| annotations: | ||
| "helm.sh/hook": post-install,post-upgrade | ||
| "helm.sh/hook-weight": "10" | ||
| "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
| spec: | ||
| backoffLimit: 6 | ||
| template: | ||
| metadata: | ||
| labels: | ||
| {{- include "flyte-demo.selectorLabels" . | nindent 8 }} | ||
| app.kubernetes.io/component: rustfs-bucket-init | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious why do we need this label here? I thought this is just an one-off k8s job and maybe we don't need label? |
||
| spec: | ||
| restartPolicy: OnFailure | ||
| containers: | ||
| - name: bucket-init | ||
| image: "{{ .Values.rustfs.bucketInit.image.repository }}:{{ .Values.rustfs.bucketInit.image.tag }}" | ||
| imagePullPolicy: {{ .Values.rustfs.bucketInit.image.pullPolicy }} | ||
| command: | ||
| - /bin/sh | ||
| - -ec | ||
| - | | ||
| until mc alias set local '{{ .Values.rustfs.bucketInit.endpoint }}' '{{ $accessKey }}' '{{ $secretKey }}'; do | ||
| echo "waiting for rustfs endpoint..." | ||
| sleep 2 | ||
| done | ||
| {{- range $bucket := .Values.rustfs.defaultBuckets }} | ||
| mc mb --ignore-existing local/{{ $bucket }} | ||
| {{- end }} | ||
| {{- end }} | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ flyte-binary: | |
| s3: | ||
| disableSSL: true | ||
| v2Signing: true | ||
| endpoint: http://rustfs.{{ .Release.Namespace }}:9000 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we keep using |
||
| endpoint: http://rustfs-svc:9000 | ||
| authType: accesskey | ||
| accessKey: rustfs | ||
| secretKey: rustfsstorage | ||
|
|
@@ -52,7 +52,7 @@ flyte-binary: | |
| plugins: | ||
| k8s: | ||
| default-env-vars: | ||
| - FLYTE_AWS_ENDPOINT: http://rustfs.{{ .Release.Namespace }}:9000 | ||
| - FLYTE_AWS_ENDPOINT: http://rustfs-svc:9000 | ||
| - FLYTE_AWS_ACCESS_KEY_ID: rustfs | ||
| - FLYTE_AWS_SECRET_ACCESS_KEY: rustfsstorage | ||
| - _U_EP_OVERRIDE: 'flyte-binary-http.{{ .Release.Namespace }}:8090' | ||
|
|
@@ -111,8 +111,35 @@ flyte-binary: | |
|
|
||
| rustfs: | ||
| enabled: true | ||
| accessKey: rustfs | ||
| secretKey: rustfsstorage | ||
| bucketInit: | ||
| enabled: true | ||
| endpoint: http://rustfs-svc:9000 | ||
| image: | ||
| repository: minio/mc | ||
| tag: latest | ||
| pullPolicy: IfNotPresent | ||
| defaultBuckets: | ||
| - flyte-data | ||
|
|
||
| # Upstream RustFS chart configuration. | ||
| rustfsupstream: | ||
| fullnameOverride: rustfs | ||
| mode: | ||
| standalone: | ||
| enabled: true | ||
| distributed: | ||
| enabled: false | ||
| image: | ||
| repository: rustfs/rustfs | ||
| tag: sandbox | ||
| service: | ||
| type: NodePort | ||
| endpoint: | ||
| nodePort: 30002 | ||
| secret: | ||
| rustfs: | ||
| access_key: rustfs | ||
| secret_key: rustfsstorage | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed that there is a rustfs test connection pod remain in the cluster, which is not required because the sandbox should failed to startup if connection failed. We can do so by: |
||
|
|
||
| postgresql: | ||
| fullnameOverride: postgresql | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ flyte: create_builder | |
| helm-repos: | ||
| helm repo add docker-registry https://twuni.github.io/docker-registry.helm | ||
| helm repo add bitnami https://charts.bitnami.com/bitnami | ||
| helm repo add rustfs https://rustfs.github.io/helm | ||
| helm repo update | ||
|
|
||
| .PHONY: dep_build | ||
|
|
@@ -51,7 +52,7 @@ manifests: dep_update | |
| --load-restrictor=LoadRestrictionsNone \ | ||
| kustomize/dev > manifests/dev.yaml | ||
|
|
||
| CONSOLE_IMAGE := ghcr.io/flyteorg/flyte-client-v2 | ||
| CONSOLE_IMAGE := ghcr.io/unionai-oss/flyteconsole-v2 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pingsutw I'm not sure if we will pull console image from ghcr.io/unionai-oss in the future? Should we do this fix here?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I already changed the image name to ghcr.io/unionai-oss/flyteconsole-v2 in another PR |
||
| CONSOLE_TAG := latest | ||
|
|
||
| .PHONY: console | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that the job pod remain in cluster after job finished. could we add a
ttlSecondsAfterFinishedunder spec section to delete it?