Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/flyte-binary-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ jobs:
- name: Set version
id: set_version
run: |
echo "FLYTE_SANDBOX_VERSION=${{ github.sha }}" >> $GITHUB_ENV
echo "FLYTE_DEMO_VERSION=${{ github.sha }}" >> $GITHUB_ENV
- name: Prepare Image Names
id: image-names
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{ github.repository_owner }}/flyte-sandbox-v2
ghcr.io/${{ github.repository_owner }}/flyte-demo
Comment thread
pingsutw marked this conversation as resolved.
tags: |
type=raw,value=nightly,enable=${{ github.event_name == 'push' && github.ref == 'refs/heads/v2' }}
type=sha,format=long,
Expand All @@ -169,5 +169,5 @@ jobs:
allow: "security.insecure"
platforms: linux/arm64, linux/amd64
tags: ${{ steps.image-names.outputs.tags }}
build-args: "FLYTE_SANDBOX_VERSION=${{ env.FLYTE_SANDBOX_VERSION }}"
build-args: "FLYTE_DEMO_VERSION=${{ env.FLYTE_DEMO_VERSION }}"
push: true
2 changes: 1 addition & 1 deletion charts/flyte-binary/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ flyte-core-components:
secret:
kubernetes:
namespace: "flyte"
clusterName: "flyte-sandbox"
clusterName: "flyte-demo"
kubeconfig: ""
qps: 100
burst: 200
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: flyte-sandbox
description: A Helm chart for the Flyte local sandbox
name: flyte-demo
description: A Helm chart for the Flyte local demo

# A chart can be either an 'application' or a 'library' chart.
#
Expand Down
Comment thread
pingsutw marked this conversation as resolved.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "flyte-sandbox.name" -}}
{{- define "flyte-demo.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "flyte-sandbox.fullname" -}}
{{- define "flyte-demo.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "flyte-sandbox.chart" -}}
{{- define "flyte-demo.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "flyte-sandbox.labels" -}}
helm.sh/chart: {{ include "flyte-sandbox.chart" . }}
{{ include "flyte-sandbox.selectorLabels" . }}
{{- define "flyte-demo.labels" -}}
helm.sh/chart: {{ include "flyte-demo.chart" . }}
{{ include "flyte-demo.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "flyte-sandbox.selectorLabels" -}}
app.kubernetes.io/name: {{ include "flyte-sandbox.name" . }}
{{- define "flyte-demo.selectorLabels" -}}
app.kubernetes.io/name: {{ include "flyte-demo.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "flyte-sandbox.serviceAccountName" -}}
{{- define "flyte-demo.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "flyte-sandbox.fullname" .) .Values.serviceAccount.name }}
{{- default (include "flyte-demo.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand All @@ -64,43 +64,43 @@ Create the name of the service account to use
{{/*
Name of inline ConfigMap containing additional configuration or overrides for Flyte
*/}}
{{- define "flyte-sandbox.configuration.inlineConfigMap" -}}
{{- define "flyte-demo.configuration.inlineConfigMap" -}}
{{- printf "%s-extra-config" .Release.Name -}}
{{- end }}

{{/*
Name of inline ConfigMap containing additional cluster resource templates
*/}}
{{- define "flyte-sandbox.clusterResourceTemplates.inlineConfigMap" -}}
{{- define "flyte-demo.clusterResourceTemplates.inlineConfigMap" -}}
{{- printf "%s-extra-cluster-resource-templates" .Release.Name -}}
{{- end }}

{{/*
Name of PersistentVolume and PersistentVolumeClaim for PostgreSQL database
*/}}
{{- define "flyte-sandbox.persistence.dbVolumeName" -}}
{{- define "flyte-demo.persistence.dbVolumeName" -}}
{{- printf "%s-db-storage" .Release.Name -}}
{{- end }}

{{/*
Name of PersistentVolume and PersistentVolumeClaim for Minio
*/}}
{{- define "flyte-sandbox.persistence.minioVolumeName" -}}
{{- define "flyte-demo.persistence.minioVolumeName" -}}
{{- printf "%s-minio-storage" .Release.Name -}}
{{- end }}


{{/*
Selector labels for console
*/}}
{{- define "flyte-sandbox.consoleSelectorLabels" -}}
{{ include "flyte-sandbox.selectorLabels" . }}
{{- define "flyte-demo.consoleSelectorLabels" -}}
{{ include "flyte-demo.selectorLabels" . }}
app.kubernetes.io/component: console
{{- end }}

{{/*
Name of development-mode Flyte headless service
*/}}
{{- define "flyte-sandbox.localHeadlessService" -}}
{{- define "flyte-demo.localHeadlessService" -}}
{{- printf "%s-local" .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "flyte-sandbox.clusterResourceTemplates.inlineConfigMap" . }}
name: {{ include "flyte-demo.clusterResourceTemplates.inlineConfigMap" . }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "flyte-sandbox.configuration.inlineConfigMap" . }}
name: {{ include "flyte-demo.configuration.inlineConfigMap" . }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "flyte-sandbox.fullname" . }}-console
name: flyte-console
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
labels: {{- include "flyte-demo.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels: {{- include "flyte-sandbox.consoleSelectorLabels" . | nindent 6 }}
matchLabels: {{- include "flyte-demo.consoleSelectorLabels" . | nindent 6 }}
template:
metadata:
labels: {{- include "flyte-sandbox.consoleSelectorLabels" . | nindent 8 }}
labels: {{- include "flyte-demo.consoleSelectorLabels" . | nindent 8 }}
spec:
containers:
- name: console
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "flyte-sandbox.fullname" . }}-console
name: flyte-console
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
labels: {{- include "flyte-demo.labels" . | nindent 4 }}
spec:
selector: {{- include "flyte-sandbox.consoleSelectorLabels" . | nindent 4 }}
selector: {{- include "flyte-demo.consoleSelectorLabels" . | nindent 4 }}
ports:
- name: http
port: 80
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
apiVersion: v1
kind: Endpoints
metadata:
name: {{ include "flyte-sandbox.localHeadlessService" . }}
name: {{ include "flyte-demo.localHeadlessService" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "flyte-sandbox.labels" . | nindent 4 }}
{{- include "flyte-demo.labels" . | nindent 4 }}
subsets:
- addresses:
- ip: '%{HOST_GATEWAY_IP}%'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "flyte-sandbox.localHeadlessService" . }}
name: {{ include "flyte-demo.localHeadlessService" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "flyte-sandbox.labels" . | nindent 4 }}
{{- include "flyte-demo.labels" . | nindent 4 }}
spec:
clusterIP: None
ports:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{{- if or ( index .Values "flyte-binary" "enabled" ) .Values.sandbox.dev }}
{{- $backendService := "" }}
{{- if index .Values "flyte-binary" "enabled" }}
{{- $backendService = include "flyte-binary.service.http.name" . }}
{{- $backendService = printf "%s-http" ( index .Values "flyte-binary" "fullnameOverride" | default "flyte-binary" ) }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we use include "flyte-binary.service.http.name" here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because i use fullNameOverride here. (To override the minio and console pod name. flyte-sandbox-minio-* -> minio)
https://github.com/flyteorg/flyte/pull/7170/files#diff-adef5e315f572e8907dfd23161687da28a891638e72eea0f874c0c134b2f9c23R16-R19

  This was changed as part of the rename from flyte-sandbox → flyte-demo. The old version   
  used the helper template flyte-binary.service.http.name (defined in the flyte-binary
  subchart) to derive the backend service name. The new version constructs the service name 
  directly using fullnameOverride from values, appending -http.                            
                                                          
  The reason: when the chart was renamed from flyte-sandbox to flyte-demo, the template     
  helper flyte-binary.service.http.name may not resolve correctly across the chart rename
  (since Helm template includes depend on chart naming context). By inlining the service    
  name construction with printf "%s-http" using the fullnameOverride value, it becomes    
  independent of the subchart's internal template names — making it more robust during the
  rename.                                                                                  

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can still use it as we only rename the parent chart (flyte-sandbox -> flyte-demo) while keeping the subchart flyte-binary the same?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me test it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it doesn't work because I override the pods name to flyte-binary, so the service name is flyte-binary-http as well, not flyte-demo-http

{{- else }}
{{- $backendService = include "flyte-sandbox.localHeadlessService" . }}
{{- $backendService = include "flyte-demo.localHeadlessService" . }}
{{- end }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "flyte-sandbox.fullname" . }}-api
name: {{ include "flyte-demo.fullname" . }}-api
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
labels: {{- include "flyte-demo.labels" . | nindent 4 }}
spec:
rules:
- http:
Expand All @@ -37,9 +37,9 @@ spec:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "flyte-sandbox.fullname" . }}-console
name: flyte-console
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
labels: {{- include "flyte-demo.labels" . | nindent 4 }}
spec:
rules:
- http:
Expand All @@ -48,7 +48,7 @@ spec:
pathType: Prefix
backend:
service:
name: {{ include "flyte-sandbox.fullname" . }}-console
name: flyte-console
port:
number: 80
{{- end }}
Expand All @@ -57,9 +57,9 @@ spec:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "flyte-sandbox.fullname" . }}-minio
name: {{ include "flyte-demo.fullname" . }}-minio
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
labels: {{- include "flyte-demo.labels" . | nindent 4 }}
annotations:
traefik.ingress.kubernetes.io/router.middlewares: {{ .Release.Namespace }}-strip-minio@kubernetescrd
spec:
Expand All @@ -70,7 +70,7 @@ spec:
pathType: Prefix
backend:
service:
name: {{ .Release.Name }}-minio
name: minio
port:
number: 9001
---
Expand All @@ -79,7 +79,7 @@ kind: Middleware
metadata:
name: strip-minio
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
labels: {{- include "flyte-demo.labels" . | nindent 4 }}
spec:
stripPrefix:
prefixes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: HelmChartConfig
metadata:
name: traefik
namespace: kube-system
labels: {{- include "flyte-sandbox.labels" . | nindent 4 }}
labels: {{- include "flyte-demo.labels" . | nindent 4 }}
spec:
valuesContent: |
service:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ include "flyte-sandbox.persistence.minioVolumeName" . }}
name: {{ include "flyte-demo.persistence.minioVolumeName" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "flyte-sandbox.labels" . | nindent 4 }}
{{- include "flyte-demo.labels" . | nindent 4 }}
spec:
storageClassName: manual
accessModes:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "flyte-sandbox.persistence.minioVolumeName" . }}
name: {{ include "flyte-demo.persistence.minioVolumeName" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "flyte-sandbox.labels" . | nindent 4 }}
{{- include "flyte-demo.labels" . | nindent 4 }}
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
volumeName: {{ include "flyte-sandbox.persistence.minioVolumeName" . }}
volumeName: {{ include "flyte-demo.persistence.minioVolumeName" . }}
Loading
Loading