Skip to content
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

Feature: Edit Project Description #5806

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .run/single-binary.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
<filePath value="$PROJECT_DIR$" />
<method v="2" />
</configuration>
</component>
</component>
3 changes: 2 additions & 1 deletion charts/flyte-binary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ Chart for basic single Flyte executable deployment
| flyte-core-components.admin.disableClusterResourceManager | bool | `false` | |
| flyte-core-components.admin.disableScheduler | bool | `false` | |
| flyte-core-components.admin.disabled | bool | `false` | |
| flyte-core-components.admin.seedProjects[0] | string | `"flytesnacks"` | |
| flyte-core-components.admin.seedProjects[0].description | string | `"flytesnacks project"` | |
| flyte-core-components.admin.seedProjects[0].name | string | `"flytesnacks"` | |
| flyte-core-components.dataCatalog.disabled | bool | `false` | |
| flyte-core-components.propeller.disableWebhook | bool | `false` | |
| flyte-core-components.propeller.disabled | bool | `false` | |
Expand Down
3 changes: 2 additions & 1 deletion charts/flyte-binary/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ flyte-core-components:
disableClusterResourceManager: false
# seedProjects flyte projects to create by default
seedProjects:
- flytesnacks
- name: flytesnacks
description: "flytesnacks project"
# propeller Configuration to disable propeller or any of its components
propeller:
# disabled Disables flytepropeller
Expand Down
2 changes: 1 addition & 1 deletion charts/flyte-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ helm install gateway bitnami/contour -n flyte
| configmap.enabled_plugins.tasks.task-plugins.enabled-plugins | list | `["container","sidecar","k8s-array","agent-service","echo"]` | [Enabled Plugins](https://pkg.go.dev/github.com/lyft/flyteplugins/go/tasks/config#Config). Enable sagemaker*, athena if you install the backend plugins |
| configmap.k8s | object | `{"plugins":{"k8s":{"default-cpus":"100m","default-env-vars":[],"default-memory":"100Mi"}}}` | Kubernetes specific Flyte configuration |
| configmap.k8s.plugins.k8s | object | `{"default-cpus":"100m","default-env-vars":[],"default-memory":"100Mi"}` | Configuration section for all K8s specific plugins [Configuration structure](https://pkg.go.dev/github.com/lyft/flyteplugins/go/tasks/pluginmachinery/flytek8s/config) |
| configmap.project | object | `{"projects":[{"description":"flytesnacks project","name":"flytesnacks"},{"description":"flytetester project","name":"flytetester"},{"description":"flyteexamples project","name":"flyteexamples"}]}` | Projects configuration for Flyte |
| configmap.remoteData.remoteData.region | string | `"us-east-1"` | |
| configmap.remoteData.remoteData.scheme | string | `"local"` | |
| configmap.remoteData.remoteData.signedUrls.durationMinutes | int | `3` | |
Expand Down Expand Up @@ -167,7 +168,6 @@ helm install gateway bitnami/contour -n flyte
| flyteadmin.image.pullPolicy | string | `"IfNotPresent"` | |
| flyteadmin.image.repository | string | `"cr.flyte.org/flyteorg/flyteadmin"` | Docker image for Flyteadmin deployment |
| flyteadmin.image.tag | string | `"v1.13.2"` | |
| flyteadmin.initialProjects | list | `["flytesnacks","flytetester","flyteexamples"]` | Initial projects to create |
| flyteadmin.nodeSelector | object | `{}` | nodeSelector for Flyteadmin deployment |
| flyteadmin.podAnnotations | object | `{}` | Annotations for Flyteadmin pods |
| flyteadmin.podLabels | object | `{}` | Labels for Flyteadmin pods |
Expand Down
3 changes: 3 additions & 0 deletions charts/flyte-core/templates/admin/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ data:
{{- with .Values.db.admin }}
db.yaml: | {{ tpl (toYaml .) $ | nindent 4 }}
{{- end }}
{{- with .Values.configmap.project }}
project.yaml: | {{ tpl (toYaml .) $ | nindent 4 }}
{{- end }}
{{- with .Values.configmap.domain }}
domain.yaml: | {{ tpl (toYaml .) $ | nindent 4 }}
{{- end }}
Expand Down
5 changes: 0 additions & 5 deletions charts/flyte-core/templates/admin/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,12 @@ spec:
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.flyteadmin.initialProjects }}
- command:
- flyteadmin
- --config
- {{ .Values.flyteadmin.configPath }}
- migrate
- seed-projects
{{- range .Values.flyteadmin.initialProjects }}
- {{ . }}
{{- end }}
image: "{{ .Values.flyteadmin.image.repository }}:{{ .Values.flyteadmin.image.tag }}"
imagePullPolicy: "{{ .Values.flyteadmin.image.pullPolicy }}"
name: seed-projects
Expand All @@ -73,7 +69,6 @@ spec:
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}
{{- if and (.Values.cluster_resource_manager.enabled) (not .Values.cluster_resource_manager.standalone_deploy) }}
- command:
- flyteadmin
Expand Down
14 changes: 9 additions & 5 deletions charts/flyte-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ flyteadmin:
memory: 50Mi
# -- Default regex string for searching configuration files
configPath: /etc/flyte/config/*.yaml
# -- Initial projects to create
initialProjects:
- flytesnacks
- flytetester
- flyteexamples
# -- Service settings for Flyteadmin
service:
annotations:
Expand Down Expand Up @@ -672,6 +667,15 @@ configmap:
BASE_URL: /console
CONFIG_DIR: /etc/flyte/config

# -- Projects configuration for Flyte
project:
projects:
- name: flytesnacks
description: "flytesnacks project"
- name: flytetester
description: "flytetester project"
- name: flyteexamples
description: "flyteexamples project"
# -- Domains configuration for Flyte projects. This enables the specified number of domains across all projects in Flyte.
domain:
domains:
Expand Down
13 changes: 9 additions & 4 deletions cmd/single/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,21 @@ type Propeller struct {
}

type Admin struct {
Disabled bool `json:"disabled" pflag:",Disables flyteadmin in the single binary mode"`
DisableScheduler bool `json:"disableScheduler" pflag:",Disables Native scheduler in the single binary mode"`
DisableClusterResourceManager bool `json:"disableClusterResourceManager" pflag:",Disables Cluster resource manager"`
SeedProjects []string `json:"seedProjects" pflag:",flyte projects to create by default."`
Disabled bool `json:"disabled" pflag:",Disables flyteadmin in the single binary mode"`
DisableScheduler bool `json:"disableScheduler" pflag:",Disables Native scheduler in the single binary mode"`
DisableClusterResourceManager bool `json:"disableClusterResourceManager" pflag:",Disables Cluster resource manager"`
SeedProjects []Project `json:"seedProjects" pflag:",flyte projects to create by default."`
}

type DataCatalog struct {
Disabled bool `json:"disabled" pflag:",Disables datacatalog in the single binary mode"`
}

type Project struct {
Name string `json:"name" pflag:",flyte project name."`
Description string `json:"description" pflag:",flyte project description."`
}

// GetConfig returns a handle to the configuration for Flyte Single Binary
func GetConfig() *Config {
return configSection.GetConfig().(*Config)
Expand Down
10 changes: 7 additions & 3 deletions cmd/single/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package single

import (
"context"
"github.com/flyteorg/flyte/flyteadmin/pkg/repositories/config"
"net/http"
"os"

Expand Down Expand Up @@ -71,9 +72,12 @@ func startAdmin(ctx context.Context, cfg Admin) error {
}

logger.Infof(ctx, "Seeding default projects...")
projects := []string{"flytesnacks"}
if len(cfg.SeedProjects) != 0 {
projects = cfg.SeedProjects
projects := []config.Project{{Name: "flytesnacks", Description: "flytesnacks project"}}
if len(cfg.SeedProjects) > 0 {
projects = make([]config.Project, 0)
for _, project := range cfg.SeedProjects {
projects = append(projects, config.Project{Name: project.Name, Description: project.Description})
}
}
logger.Infof(ctx, "Seeding default projects...", projects)
if err := adminServer.SeedProjects(ctx, projects); err != nil {
Expand Down
13 changes: 9 additions & 4 deletions deployment/eks/flyte_aws_scheduler_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ data:
passwordPath: /etc/db/pass.txt
port: 5432
username: flyteadmin
project.yaml: |
projects:
- description: flytesnacks project
name: flytesnacks
- description: flytetester project
name: flytetester
- description: flyteexamples project
name: flyteexamples
domain.yaml: |
domains:
- id: development
Expand Down Expand Up @@ -857,7 +865,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "618a516ca42e8bbe5222a76f7865a0a444b6048002d7fcc06144c9188f3fd3d"
configChecksum: "fb3a55d3dea6d7cdfd79c145c4a06d41b7693a4b3226bba60e96bf742b85391"
labels:
app.kubernetes.io/name: flyteadmin
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -896,9 +904,6 @@ spec:
- /etc/flyte/config/*.yaml
- migrate
- seed-projects
- flytesnacks
- flytetester
- flyteexamples
image: "cr.flyte.org/flyteorg/flyteadmin:v1.13.2"
imagePullPolicy: "IfNotPresent"
name: seed-projects
Expand Down
15 changes: 10 additions & 5 deletions deployment/eks/flyte_helm_controlplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ data:
passwordPath: /etc/db/pass.txt
port: 5432
username: flyteadmin
project.yaml: |
projects:
- description: flytesnacks project
name: flytesnacks
- description: flytetester project
name: flytetester
- description: flyteexamples project
name: flyteexamples
domain.yaml: |
domains:
- id: development
Expand Down Expand Up @@ -560,7 +568,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "5ce6f593fb92c9a6fd183825231d187471b5f10fe948f601f6d5b56edd02b51"
configChecksum: "292d80f09361b2fd6766eb31cc3c40a0d93510f2aaba6e2f62beb030dfdf860"
labels:
app.kubernetes.io/name: flyteadmin
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -599,9 +607,6 @@ spec:
- /etc/flyte/config/*.yaml
- migrate
- seed-projects
- flytesnacks
- flytetester
- flyteexamples
image: "cr.flyte.org/flyteorg/flyteadmin:v1.13.2"
imagePullPolicy: "IfNotPresent"
name: seed-projects
Expand Down Expand Up @@ -982,7 +987,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "5ce6f593fb92c9a6fd183825231d187471b5f10fe948f601f6d5b56edd02b51"
configChecksum: "292d80f09361b2fd6766eb31cc3c40a0d93510f2aaba6e2f62beb030dfdf860"
labels:
app.kubernetes.io/name: flytescheduler
app.kubernetes.io/instance: flyte
Expand Down
15 changes: 10 additions & 5 deletions deployment/eks/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ data:
passwordPath: /etc/db/pass.txt
port: 5432
username: flyteadmin
project.yaml: |
projects:
- description: flytesnacks project
name: flytesnacks
- description: flytetester project
name: flytetester
- description: flyteexamples project
name: flyteexamples
domain.yaml: |
domains:
- id: development
Expand Down Expand Up @@ -888,7 +896,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "5ce6f593fb92c9a6fd183825231d187471b5f10fe948f601f6d5b56edd02b51"
configChecksum: "292d80f09361b2fd6766eb31cc3c40a0d93510f2aaba6e2f62beb030dfdf860"
labels:
app.kubernetes.io/name: flyteadmin
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -927,9 +935,6 @@ spec:
- /etc/flyte/config/*.yaml
- migrate
- seed-projects
- flytesnacks
- flytetester
- flyteexamples
image: "cr.flyte.org/flyteorg/flyteadmin:v1.13.2"
imagePullPolicy: "IfNotPresent"
name: seed-projects
Expand Down Expand Up @@ -1310,7 +1315,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "5ce6f593fb92c9a6fd183825231d187471b5f10fe948f601f6d5b56edd02b51"
configChecksum: "292d80f09361b2fd6766eb31cc3c40a0d93510f2aaba6e2f62beb030dfdf860"
labels:
app.kubernetes.io/name: flytescheduler
app.kubernetes.io/instance: flyte
Expand Down
15 changes: 10 additions & 5 deletions deployment/gcp/flyte_helm_controlplane_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ data:
passwordPath: /etc/db/pass.txt
port: 5432
username: flyteadmin
project.yaml: |
projects:
- description: flytesnacks project
name: flytesnacks
- description: flytetester project
name: flytetester
- description: flyteexamples project
name: flyteexamples
domain.yaml: |
domains:
- id: development
Expand Down Expand Up @@ -575,7 +583,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "0705f122f2535babec96a6083827c3e6d27e6e9b0e460b4d07292c858079ac7"
configChecksum: "95d68684ffb58e443e3ab4d76b9eb577732449635254eac74e4f0c4823558b0"
labels:
app.kubernetes.io/name: flyteadmin
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -614,9 +622,6 @@ spec:
- /etc/flyte/config/*.yaml
- migrate
- seed-projects
- flytesnacks
- flytetester
- flyteexamples
image: "cr.flyte.org/flyteorg/flyteadmin:v1.13.2"
imagePullPolicy: "IfNotPresent"
name: seed-projects
Expand Down Expand Up @@ -997,7 +1002,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "0705f122f2535babec96a6083827c3e6d27e6e9b0e460b4d07292c858079ac7"
configChecksum: "95d68684ffb58e443e3ab4d76b9eb577732449635254eac74e4f0c4823558b0"
labels:
app.kubernetes.io/name: flytescheduler
app.kubernetes.io/instance: flyte
Expand Down
15 changes: 10 additions & 5 deletions deployment/gcp/flyte_helm_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ data:
passwordPath: /etc/db/pass.txt
port: 5432
username: flyteadmin
project.yaml: |
projects:
- description: flytesnacks project
name: flytesnacks
- description: flytetester project
name: flytetester
- description: flyteexamples project
name: flyteexamples
domain.yaml: |
domains:
- id: development
Expand Down Expand Up @@ -911,7 +919,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "0705f122f2535babec96a6083827c3e6d27e6e9b0e460b4d07292c858079ac7"
configChecksum: "95d68684ffb58e443e3ab4d76b9eb577732449635254eac74e4f0c4823558b0"
labels:
app.kubernetes.io/name: flyteadmin
app.kubernetes.io/instance: flyte
Expand Down Expand Up @@ -950,9 +958,6 @@ spec:
- /etc/flyte/config/*.yaml
- migrate
- seed-projects
- flytesnacks
- flytetester
- flyteexamples
image: "cr.flyte.org/flyteorg/flyteadmin:v1.13.2"
imagePullPolicy: "IfNotPresent"
name: seed-projects
Expand Down Expand Up @@ -1333,7 +1338,7 @@ spec:
template:
metadata:
annotations:
configChecksum: "0705f122f2535babec96a6083827c3e6d27e6e9b0e460b4d07292c858079ac7"
configChecksum: "95d68684ffb58e443e3ab4d76b9eb577732449635254eac74e4f0c4823558b0"
labels:
app.kubernetes.io/name: flytescheduler
app.kubernetes.io/instance: flyte
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ data:
disableScheduler: false
disabled: false
seedProjects:
- flytesnacks
- description: flytesnacks project
name: flytesnacks
dataCatalog:
disabled: false
propeller:
Expand Down Expand Up @@ -360,7 +361,7 @@ spec:
app.kubernetes.io/instance: flyte
app.kubernetes.io/component: flyte-binary
annotations:
checksum/configuration: faaefbd3b3b2ddfd4e718bd77c02c632c75e7111dad0a6e25dc415dc88add73f
checksum/configuration: 7665182d708a7f1a3a36e980a2973a7baa9970fd6080512a6c85d4b100aa1b5a
checksum/configuration-secret: d5d93f4e67780b21593dc3799f0f6682aab0765e708e4020939975d14d44f929
checksum/cluster-resource-templates: 7dfa59f3d447e9c099b8f8ffad3af466fecbc9cf9f8c97295d9634254a55d4ae
spec:
Expand Down
Loading
Loading