-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add podLabels podAnnotations to Helm Charts #8712
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ced9554
[helm] add nodeSelector
yashgorana b702037
[helm] add podLabels & podAnnotations
yashgorana c417c45
[helm] update resource limits
yashgorana a8154f8
[helm] add profiles to devspace
yashgorana a7efc49
[devspace] remove dev tag
yashgorana 253aed9
Merge branch 'dev' into yash/helm-node-selector
yashgorana 4d5deca
fix insufficient CPU in CI
yashgorana c06911a
fix wait_for seaweedfs
yashgorana 78d5477
fix incorrect node type
yashgorana 4ce5368
Merge branch 'dev' into yash/helm-node-selector
yashgorana File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,5 +73,6 @@ nohup.out | |
|
||
# notebook data | ||
notebooks/helm/scenario_data.jsonl | ||
|
||
# tox syft.build.helm generated file | ||
out.txt | ||
out.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# =================================================== | ||
# Deploy Syft High Side Node to an AKS Cluster | ||
# DOES NOT sync seaweedfs to a Azure bucket | ||
# =================================================== | ||
|
||
node: | ||
name: syft-azure | ||
side: high | ||
rootEmail: info@openmined.org | ||
defaultWorkerPoolCount: 1 | ||
resourcesPreset: 2xlarge | ||
|
||
ingress: | ||
# Make sure cluster is created with --enable-app-routing | ||
# az aks create -g group-name -n cluster-name -l region --enable-app-routing | ||
className: webapprouting.kubernetes.azure.com | ||
# or, has azure-application-gateway setup through dashboard or CLI | ||
# className: azure-application-gateway | ||
|
||
|
||
seaweedfs: | ||
resourcesPreset: 2xlarge | ||
|
||
proxy: | ||
resourcesPreset: medium | ||
|
||
registry: | ||
resourcesPreset: medium | ||
|
||
frontend: | ||
resourcesPreset: medium | ||
|
||
mongo: | ||
resourcesPreset: large |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# GCS Deployment | ||
|
||
## Resource Links | ||
* [Autopilot Overview](https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview) | ||
* [Autopilot Resource Limits Defaults](https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-resource-requests#compute-class-defaults) | ||
* [AutoPilot Resource Limits Min/Max](https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-resource-requests#min-max-requests) | ||
* [Compute Classes](https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-compute-classes) | ||
* [Performance Pods](https://cloud.google.com/kubernetes-engine/docs/how-to/performance-pods) | ||
|
||
## Setup | ||
|
||
Helm `values.yaml` for high & low side deployments | ||
- [`gcp.high.yaml`](./gcp.high.yaml) | ||
- [`gcp.low.yaml`](./gcp.low.yaml) | ||
|
||
Deployment on GKE with SeaweedFS sync to GCS requires: | ||
1. A GCS bucket in the same project where the cluster will be deployed | ||
* `syft-bucket-high` (for high side deployment) | ||
* `syft-bucket-low` (for low side deployment) | ||
|
||
2. An IAM service account with sufficient permissions to read/write/delete object to these buckets | ||
|
||
## For Autopilot Cluster | ||
|
||
Uncomment the `nodeSelector` to use a specific compute class + machine family. | ||
|
||
Set resource limits in-line with the machine family | ||
|
||
```yaml | ||
nodeSelector: | ||
cloud.google.com/compute-class: Performance | ||
cloud.google.com/machine-family: c3 | ||
|
||
resources: | ||
requests: | ||
cpu: 2 | ||
memory: "8Gi" | ||
limits: | ||
cpu: 4 | ||
memory: "16Gi" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# =================================================== | ||
# Deploy Syft High Side Node to a GKE Cluster | ||
# Syncs seaweedfs to a GCS bucket "syft-bucket-high" | ||
# =================================================== | ||
|
||
node: | ||
name: syft-gcp | ||
side: high | ||
|
||
# Force backend to write results to this bucket | ||
# should be same as mountApi.mounts.local_bucket | ||
defaultBucketName: syft-bucket-high-gcs | ||
|
||
# For autopilot clusters with GKE 1.28+, uncomment this | ||
# nodeSelector: | ||
# cloud.google.com/compute-class: Performance | ||
# cloud.google.com/machine-family: c3 | ||
|
||
# Resources set inline with c3-standard-4 machine type | ||
resources: | ||
requests: | ||
cpu: 2 | ||
memory: "8Gi" | ||
limits: | ||
cpu: 4 | ||
memory: "16Gi" | ||
|
||
seaweedfs: | ||
storageSize: 100Gi | ||
|
||
mountApi: | ||
# Mount remote GCS bucket named "syft-bucket-high" to seaweedfs bucket named "syft-bucket-high-gcs | ||
mounts: | ||
- local_bucket: syft-bucket-high-gcs | ||
remote_bucket: | ||
type: gcs | ||
bucket_name: syft-bucket-high | ||
# filename should be as secret.mountCredentials.name | ||
# directory will always be /run/secrets/ | ||
creds: /run/secrets/gcs_creds.json | ||
|
||
secret: | ||
mountCredentials: | ||
# remove this comment and paste the Service Account JSON Here | ||
# TODO: move to workload identity | ||
- name: gcs_creds.json | ||
value: | | ||
{ | ||
"": "" | ||
} | ||
|
||
# For autopilot clusters with GKE 1.28+, uncomment this | ||
# nodeSelector: | ||
# cloud.google.com/compute-class: Performance | ||
# cloud.google.com/machine-family: c3 | ||
|
||
# Resources set inline with c3-standard-4 machine type | ||
resources: | ||
requests: | ||
cpu: 2 | ||
memory: "8Gi" | ||
limits: | ||
cpu: 4 | ||
memory: "16Gi" | ||
|
||
ingress: | ||
# GKE 1.28+ need ingressClassName | ||
className: gce | ||
class: gce | ||
|
||
proxy: | ||
resourcesPreset: medium | ||
|
||
registry: | ||
resourcesPreset: medium | ||
|
||
frontend: | ||
resourcesPreset: medium | ||
|
||
mongo: | ||
resourcesPreset: large |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# =================================================== | ||
# Deploy Syft Low Side Node to a GKE Cluster | ||
# Syncs seaweedfs to a GCS bucket "syft-bucket-low" | ||
# =================================================== | ||
|
||
node: | ||
name: syft-gcp | ||
side: low | ||
|
||
# Force backend to write results to this bucket | ||
# should be same as mountApi.mounts.local_bucket | ||
defaultBucketName: syft-bucket-low-gcs | ||
|
||
# For autopilot clusters with GKE 1.28+, uncomment this | ||
# nodeSelector: | ||
# cloud.google.com/compute-class: Performance | ||
# cloud.google.com/machine-family: c3 | ||
|
||
# Resources set inline with c3-standard-4 machine type | ||
resources: | ||
requests: | ||
cpu: 2 | ||
memory: "8Gi" | ||
limits: | ||
cpu: 4 | ||
memory: "16Gi" | ||
|
||
seaweedfs: | ||
storageSize: 100Gi | ||
|
||
mountApi: | ||
# Mount remote GCS bucket named "syft-bucket-low" to seaweedfs bucket named "syft-bucket-low-gcs | ||
mounts: | ||
- local_bucket: syft-bucket-low-gcs | ||
remote_bucket: | ||
type: gcs | ||
bucket_name: syft-bucket-low | ||
# filename should be as secret.mountCredentials.name | ||
# directory will always be /run/secrets/ | ||
creds: /run/secrets/gcs_creds.json | ||
|
||
secret: | ||
mountCredentials: | ||
# remove this comment and paste the Service Account JSON Here | ||
# TODO: move to workload identity | ||
- name: gcs_creds.json | ||
value: | | ||
{ | ||
"": "" | ||
} | ||
|
||
# For autopilot clusters with GKE 1.28+, uncomment this | ||
# nodeSelector: | ||
# cloud.google.com/compute-class: Performance | ||
# cloud.google.com/machine-family: c3 | ||
|
||
# Resources set inline with c3-standard-4 machine type | ||
resources: | ||
requests: | ||
cpu: 2 | ||
memory: "8Gi" | ||
limits: | ||
cpu: 4 | ||
memory: "16Gi" | ||
|
||
ingress: | ||
# GKE 1.28+ need ingressClassName | ||
className: gce | ||
class: gce | ||
|
||
proxy: | ||
resourcesPreset: medium | ||
|
||
registry: | ||
resourcesPreset: medium | ||
storageSize: 50Gi | ||
|
||
frontend: | ||
resourcesPreset: medium | ||
|
||
mongo: | ||
resourcesPreset: large |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# =================================================== | ||
# Deploy Syft High Side Node to a GKE Cluster | ||
# DOES NOT sync seaweedfs to a GCS bucket | ||
# =================================================== | ||
|
||
node: | ||
name: syft-gcp | ||
side: high | ||
|
||
# Resources set inline with c3-standard-4 machine type | ||
resources: | ||
requests: | ||
cpu: 2 | ||
memory: "8Gi" | ||
limits: | ||
cpu: 4 | ||
memory: "16Gi" | ||
|
||
seaweedfs: | ||
storageSize: 100Gi | ||
|
||
# Resources set inline with c3-standard-4 machine type | ||
resources: | ||
requests: | ||
cpu: 2 | ||
memory: "8Gi" | ||
limits: | ||
cpu: 4 | ||
memory: "16Gi" | ||
|
||
ingress: | ||
# GKE 1.28+ need ingressClassName | ||
className: gce | ||
class: gce | ||
|
||
proxy: | ||
resourcesPreset: medium | ||
|
||
registry: | ||
resourcesPreset: medium | ||
storageSize: 100Gi | ||
|
||
frontend: | ||
resourcesPreset: medium | ||
|
||
mongo: | ||
resourcesPreset: large |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
When we input mutiple podsLabels , it takes the last one.
Example Values files
Output
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.
But if I reverse the order
It takes the last one
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.
It should take into account all the pod labels?
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.
This is valid & expected.
metadata.labels
&metadata.annotations
are a map and not list. Both kubernetes and golang templating will hold only one value because underlying struct is a go map. You also see a squigly error line under your YAML because that's validation failure 😉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.
Ahh ok, is there a way such that a user could provide multiple pod annotations to pod spec by helm values?
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.
Yes it is supported and this change implements it (example), but k8s spec has explicit directives for the type of values the labels and annotations must have. Since keys-values must be strings, often times k8s providers will expect a JSON string as values (GKE example)